Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Smart Insert Close Element does not work for StructuredTextViewer if embedded as composite in dialog(Smart Insert Close Element for xml files (auto inset of ending tags) does not work as expected when StructuredTextViewer is embedded as a composite in a dialog)
Smart Insert Close Element does not work for StructuredTextViewer if embedded as composite in dialog [message #532124] Fri, 07 May 2010 09:12 Go to next message
Ankit Goel is currently offline Ankit GoelFriend
Messages: 9
Registered: May 2010
Junior Member
Hi:

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!!!

Cheers,
Ankit

Re: Smart Insert Close Element does not work for StructuredTextViewer if embedded as composite in di [message #533319 is a reply to message #532124] Thu, 13 May 2010 10:20 Go to previous message
Ankit Goel is currently offline Ankit GoelFriend
Messages: 9
Registered: May 2010
Junior Member
Logged a bug for this - Bug 312381

https://bugs.eclipse.org/bugs/show_bug.cgi?id=312381
Previous Topic:Re: JavaScript highlighting in CDATA content
Next Topic:Undescribed error
Goto Forum:
  


Current Time: Wed Nov 26 06:54:30 GMT 2014

Powered by FUDForum. Page generated in 0.15087 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software