Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » customizing getDoubleClickStrategy for XML editor
customizing getDoubleClickStrategy for XML editor [message #1091002] Tue, 20 August 2013 23:47 Go to next message
antony chiu is currently offline antony chiuFriend
Messages: 2
Registered: August 2013
Junior Member

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!

Re: customizing getDoubleClickStrategy for XML editor [message #1092371 is a reply to message #1091002] Thu, 22 August 2013 17:57 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3155
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 Web Tools Platform
Previous Topic:WSDL/XSD Editor resolves imports only by project path
Next Topic:eclipse failed to load JNI shared library
Goto Forum:

Current Time: Sun May 20 21:33:50 GMT 2018

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

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

Back to the top