|Smart Insert Close Element does not work for StructuredTextViewer if embedded as composite in dialog [message #532124]
||Fri, 07 May 2010 05:12
| Ankit Goel
Registered: May 2010
I am trying to embed StructuredTextViewer in a dialog for editing XML code. But in this case the Smart Insert Close Element functionality (automatic insertion of ending tags) does not work as expected.
Here goes the problem:
If my dialog is launched with a WTP XML editor open in the background than the ending tags are inserted automatically.
But if the dialog is launched alone (with no WTP XML editor in background) ending tags would not be inserted.
I did little debugging on this and realized that StructuredAutoEditStrategyXML class causes this problem. Whenever a key is pressed the method customizeDocumentCommand(IDocument document, DocumentCommand command) is called. This is responsible for inserting the ending tags etc. But before doing the functionality it checks which editor is active and exits without doing anything if appropriate editor is not present.
Any help on how to get this working will be highly appreciated!!!
Powered by FUDForum
. Page generated in 0.01605 seconds