Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » customizing getDoubleClickStrategy for XML editor
customizing getDoubleClickStrategy for XML editor [message #1091002] Tue, 20 August 2013 19:47 Go to next message
antony chiu is currently offline 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 13:57 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2237
Registered: July 2009
Senior Member
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 WTP, IBM
Previous Topic:WSDL/XSD Editor resolves imports only by project path
Next Topic:eclipse failed to load JNI shared library
Goto Forum:
  


Current Time: Tue Jul 29 09:01:54 EDT 2014

Powered by FUDForum. Page generated in 0.01885 seconds