[jbosstools-issues] [JBoss JIRA] (JBIDE-14735) Improve text formatting when dropping widgets from Palette view

Victor Rubezhny (JIRA) jira-events at lists.jboss.org
Thu Jun 13 08:59:55 EDT 2013


    [ https://issues.jboss.org/browse/JBIDE-14735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781401#comment-12781401 ] 

Victor Rubezhny commented on JBIDE-14735:
-----------------------------------------

So, If we need this template to be always inserted into a new line - we have to add '\n' character at the beginning of start template text. Otherwise it will always be inserted into the current line without any indentation.

If we don't need this template to add extra empty line - we have to remove '\n' character from the end of start template text. Otherwise it always be inserted with indentation after the last non-empty template line.

If we want to change the current algorithm and perform a more sophisticated formatting - we have a chance to kill some lines of text that was entered by a user (and not by template) which is not good IMHO. It's much better to change the template itself if we want to change the way it is inserted to/formatted in text.


                
> Improve text formatting when dropping widgets from Palette view
> ---------------------------------------------------------------
>
>                 Key: JBIDE-14735
>                 URL: https://issues.jboss.org/browse/JBIDE-14735
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: jsp/jsf/xml/html source editing
>            Reporter: Alexey Kazakov
>            Assignee: Victor Rubezhny
>              Labels: new_and_noteworthy
>             Fix For: 4.2.x
>
>
> 1. Suppose we have the following code:
> {code}
> <div data-role="page" id="page-1">
>   <div data-role="content">|
>   </div>
> </div>
> {code}
> | marks the cursor position.
> 2. Press Enter right after <div data-role="content">:
> {code}
> <div data-role="page" id="page-1">
>   <div data-role="content">
>   |
>   </div>
> </div>
> {code}
> 3. Then click on *button* widget in jQuery Mobile Palette. Click on OK.
> The following code is generated:
> {code}
> <div data-role="page" id="page-1">
>   <div data-role="content">
>   <a href="" id="button-1" data-role="button">Link button</a>
>   
>   </div>
> </div>
> {code}
> But it should be
> {code}
> <div data-role="page" id="page-1">
>   <div data-role="content">
>     <a href="" id="button-1" data-role="button">Link button</a>
>   
>   </div>
> </div>
> {code}
> instead.
> Also we probably should use the preferences/settings of the editor to insert space symbols (N spaces/tab) instead of hardcoded "  ".

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list