Changing Eclipse preferences programmatically [message #332168] |
Wed, 08 October 2008 10:28  |
Eclipse User |
|
|
|
Originally posted by: j4r0d.hotmail.com
Hello,
I have tried the following code for changing the eclipse preferences; more
precisely the JDK compliance level and the contextual launch option.
I have placed the following code in the start method of my plugin Activator
class.
Preferences nodeCore = new DefaultScope().getNode("org.eclipse.jdt.core");
if (nodeCore != null) {
nodeCore.put("org.eclipse.jdt.core.compiler.source", "1.3");
nodeCore.put("org.eclipse.jdt.core.compiler.compliance", "1.3");
nodeCore.put("org.eclipse.jdt.core.compiler.problem.assertIdentifier ",
"ignore");
nodeCore.put("org.eclipse.jdt.core.compiler.problem.enumIdentifier ",
"ignore");
}
Preferences nodeUI = new DefaultScope().getNode("org.eclipse.debug.ui");
if (nodeUI != null)
nodeUI.putBoolean("org.eclipse.debug.ui.UseContextualLaunch ", false);
Then when I run Eclipse and I go to the preferences menu, unfortunately, I
can see that the compiler compliance level is still 6.0 and the contextual
launch option is still turned on.
Why is my code not working? What is the problem?
Thanks in advance for your help.
--
J.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03704 seconds