customizing getDoubleClickStrategy for XML editor [message #1091002] |
Tue, 20 August 2013 23:47 |
antony chiu Messages: 2 Registered: August 2013 |
Junior Member |
|
|
Hello!
I am working on customizing the XML Editor to suit my personal development needs. Here is my problem: when I'm viewing a XML file using the Eclipse XML Editor, I want to change the behaviour of double clicking on certain parts of the code. For instance, if I have an XML attribute value value="abc.example" and I double click on the text "example", the editor would highlight the entire text "abc.example", but instead, I simply want it to highlight the text "example".
In essence, the problem boils down to adding periods (.) as a delimiter during double clicking. After researching in the Eclipse FAQ and fiddling around in the source codes, I was able to narrow the problem down to 1. Adding my own getDoubleClickStrategy OR 2. Modifying schema/editorconfiguration.exsd
And here I'm stuck... I'm not sure what's my next step. I have been testing various things under editorconfiguration.exsd and nothing seems to work.
If anyone point me to the right direction, that would be much appreciated!
Thanks,
|
|
|
Re: customizing getDoubleClickStrategy for XML editor [message #1092371 is a reply to message #1091002] |
Thu, 22 August 2013 17:57 |
|
Modifying the schema file wouldn't do anything beneficial; its presence is just to help authoring the plugin.xml files. If your viewer configuration is associated to a subtype of the XML content type defined for your file type specifically, it will be loaded, and your own strategy used. If it's just XML files in general that you want to change the behavior of, we're open to the idea of patching org.eclipse.wst.xml.ui.internal.doubleclick.XMLDoubleClickStrategy to behave better.
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
Powered by
FUDForum. Page generated in 0.03434 seconds