Tag surrounding: the used tag names are not remembered

Having trouble installing Oxygen? Got a bug to report? Post it all here.
dma_k
Posts: 32
Joined: Fri Aug 05, 2011 8:27 pm

Tag surrounding: the used tag names are not remembered

Post by dma_k »

Dear community,

The "Surround with Tag" dialog (Alt+Shift+E) dialog contains the list, which I assume, needs to be filled with recently used tags. However it is always empty.

Expected:
The list contains the recently used tags. The user should have the ability to apply the tag just by doubleclicking the tag from the list.

Enhancement:
- The list selection is updated when the tag is typed, navigating to best matched element.
- The tag name is autocompleted when typed with last used tag. E.g. when typing "a" the autocompletion should suggest "a[uthor]" (the part in bracken is the selection) and the user should have the ability to agree with completion with "Enter".
- The tags are remembered together with attributes, e.g. 'title type="book"' and 'title type="author"' are two distinct entries.

Additional info:
oXygen XML Editor and XSLT Debugger v12.1.0.v2011031114
Eclipse Helios SR2 v3.6.2.r362_v20110210
Additional info:
oXygen XML Editor and XSLT Debugger v12.1.0.v2011031114
Eclipse Helios SR2 v3.6.2.r362_v20110210
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Tag surrounding: the used tag names are not remembered

Post by adrian »

Hello,

You should have a list of proposed elements in the "Surround with Tag" dialog for the current context in the document, similar to the Elements view. There's no recently used list for "Surround with Tag", only the editor content completion has that(type '<', or press Ctrl-space after a '<' character).

If you have a DTD/schema associated in the edited XML document that will be used to provide elements in the context, otherwise(if there's no schema) the XML document is learned by Oxygen on the fly and learned elements are provided in the appropriate context.
Note that for very large XML documents it takes a few seconds after opening before these features start to actually work(the document is validated and its structure is built and cached).

I see you've reported a number of broken features in Oxygen, so I'd suggest looking in the Eclipse Error Log(Window -> Show View -> Error Log). Check if there are any errors related to Oxygen(com.oxygenxml).

Also, have you tried editing other XML files(e.g. files from Oxygen's Sample XML Project). Do these features work with any of the Oxygen samples.


Also note that a new version of Oxygen, v12.2 is available for quite a while. You can find it here:
http://www.oxygenxml.com/download_oxyge ... ml#Eclipse
You can use either the Eclipse update site or the zip distribution. If you use the latter make sure you manually remove the old version of Oxygen.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
dma_k
Posts: 32
Joined: Fri Aug 05, 2011 8:27 pm

Re: Tag surrounding: the used tag names are not remembered

Post by dma_k »

adrian wrote:You should have a list of proposed elements in the "Surround with Tag" dialog for the current context in the document, similar to the Elements view. There's no recently used list for "Surround with Tag", only the editor content completion has that(type '<', or press Ctrl-space after a '<' character).
It looks like all elements are grayed in Elements view, the example document is mentioned here.

I confirm, that this feature works OK for other sample XMLs. Sorry for this bug report: it was not easy to learn, that the list in this dialog is actually composed out of available tags. Anyway the suggestion to remember also the tags, which are manually added, is valid.

I've updated to 12.2. There are no oXygen-related log entries in Errors view.
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Tag surrounding: the used tag names are not remembered

Post by adrian »

Hello,
dma_k wrote:Anyway the suggestion to remember also the tags, which are manually added, is valid.
This feature is somewhat indirect. The remembered tags must be in context(in the XML model), otherwise if all tags would be remembered altogether disregarding context, it would get very messy.

This is not implemented(at least not in an automatic way) because it is considered bad practice to edit a document creatively, adding new elements, without using a DTD/schema.
If you want to use this feature this way(without a DTD/schema), you can do so even now, however, it requires a manual refresh of the learned XML model after adding new elements: XML -> Learn Structure. After invoking this operation, "Surround with Tag" will contain the added elements(in context).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
dma_k
Posts: 32
Joined: Fri Aug 05, 2011 8:27 pm

Re: Tag surrounding: the used tag names are not remembered

Post by dma_k »

Hi Adrian,

Thanks. Invoking menu XML -> Learn Structure helped me.
Post Reply