Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Getting Eclipse Preference Page values Programmatically
Getting Eclipse Preference Page values Programmatically [message #1763533] Wed, 17 May 2017 06:57 Go to next message
saravanakumar Mohanasundaram is currently offline saravanakumar MohanasundaramFriend
Messages: 17
Registered: February 2017
Junior Member
Hi All,

I have developed a plugin which will contribute content assist to xml editor. I have to show my proposal category at the top. But now in xml editor default xml proposal categories coming at the top. Actually i can able to change the proposal categories order through ui as shown below

index.php/fa/29387/0/

but i want to do that one programmatically.
Please guide me to do the same.



Thanks in advance


Regards,
Saravanakumar

[Updated on: Thu, 18 May 2017 05:27]

Report message to a moderator

Re: Getting Eclipse Preference Page values Programmatically [message #1764018 is a reply to message #1763533] Wed, 24 May 2017 05:46 Go to previous message
saravanakumar Mohanasundaram is currently offline saravanakumar MohanasundaramFriend
Messages: 17
Registered: February 2017
Junior Member
Hello All,
I got a answer.

Go to the work space location and then move to this location : .metadata\.plugins\org.eclipse.core.runtime\.settings.
In that folder you can find the file: org.eclipse.wst.xml.ui.prefs

Node Id : org.eclipse.wst.xml.ui
Key1: xml_content_assist_default_page_sort_order
Key2: xml_content_assist_own_page_sort_order

Value : org.eclipse.wst.xml.ui.proposalCategory.xmlTemplates\u0000org.eclipse.wst.xml.ui.proposalCategory.xmlTags\u0000

In the above value, you can the order of category

Use this following code:
Preferences prefs = (Preferences) InstanceScope.INSTANCE
				.getNode(Node Id);
prefs.put(Key1,
				value);
prefs.put(Key2,
				value);


Reference : https://wiki.eclipse.org/FAQ_How_do_I_load_and_save_plug-in_preferences%3F

Regards,
saravanakumar

[Updated on: Wed, 24 May 2017 08:18]

Report message to a moderator

Previous Topic:Extension to auto-check problems of editor
Next Topic:Open file or project from content assist(CTRL+Space) proposals
Goto Forum:
  


Current Time: Tue Sep 25 17:15:35 GMT 2018

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

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

Back to the top