[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-9408) JBoss Tools XML Editor should not format XML if the file is edited in Source tab.

Viacheslav Kabanovich (JIRA) jira-events at lists.jboss.org
Fri Aug 5 13:03:42 EDT 2011


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

Viacheslav Kabanovich commented on JBIDE-9408:
----------------------------------------------

Yes, when change is done in source pane, model is updated by that source and should come into state 'synchronized'. 

Switching between tabs runs synchronization between model and source, because, if user modified the source and switched to 'Tree' pane he has to see actual nodes in the tree and actual values in attribute field editors. The same argument is for synchronizing model when focus is moved from the text editor to Project Explorer or other view that may display contents of the file.

The synchronization was already implemented with this one exception (that takes some length to describe is steps):
a) model checks correctness of attributes to display errors in 'Tree' pane, and to set model object's state to error/correct; 
b) when model object's error state changes (new error appears in the source, or old error is fixed in the source), model has to fire change to 'Tree' pane for it to update error icons at tree nodes and attribute input fields;
c) The update checks object's 'time stamp' to avoid unnecessary work, and so model object's time stamp is increased before firing;
d) The update works both at 'Tree' and 'Source' pane and before firing event it is necessary to set correctly object's 'synchronized to text' state (which by default is set to 'not synchronized to text' as soon as object's time stamp is increased - that is helpful, when 'Tree' pane is edited)
The failure was at the step (d).



> JBoss Tools XML Editor should not format XML if the file is edited in Source tab.
> ---------------------------------------------------------------------------------
>
>                 Key: JBIDE-9408
>                 URL: https://issues.jboss.org/browse/JBIDE-9408
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: XML Structured Editor
>    Affects Versions: 3.3.0.M3
>            Reporter: Alexey Kazakov
>            Assignee: Viacheslav Kabanovich
>              Labels: new_and_noteworthy
>             Fix For: 3.3.0.M3
>
>
> EXECUTE: Create JSF KickStart project
> EXECUTE: Open web.xml with JBoss Tools XML Editor
> EXECUTE: Re-format the text (use Ctrl+A & Ctrl+Shift+F for example)
> EXECUTE: Save the file
> EXECUTE: Change {code}<load-on-startup>1</load-on-startup>{code}to{code}<load-on-startup>some string</load-on-startup>{code}
> EXECUTE: Save the file
> {color:green}ASSERT:{color} Text keeps current format.
> {color:red}FAILURE:{color} The text is re-formated back.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list