Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » It works in PropertyPage, but nowhere else(Saved property is not retreived outside PropertyPage)
It works in PropertyPage, but nowhere else [message #1060608] Mon, 27 May 2013 09:59
Marko Gašparič is currently offline Marko GašparičFriend
Messages: 10
Registered: May 2013
Location: Free University of Bolzan...
Junior Member
With property page I save some values:

Inside: protected Control createContents(Composite parent)
projectNode = new ProjectScope((IProject)getElement().getAdapter(IProject.class)).getNode(Recommender.PLUGIN_ID);

Inside: performOk()
projectNode.put(PROJECT_ID, selectedProjectId);
} catch (BackingStoreException e) {
   DialogCreator.showDialog("Error", "Saving failed!");

And I can also retrieve the data next time I open it without problems.

Inside: protected Control createContents(Composite parent)
projectNode.get(PROJECT_ID, null)

But when I want to obtain it in another class it always returns null!!
IEclipsePreferences projectNode = new ProjectScope(file.getProject()).getNode(Recommender.PLUGIN_ID);
return projectNode.get(PropertyPage.PROJECT_ID, null);

I really want to know the reason for that.
Thank you in advance.
Previous Topic:Eclipse plugin view not refreshed
Next Topic:Java7 class files in spite of ExecEnv=1.6
Goto Forum:

Current Time: Fri May 25 13:11:59 GMT 2018

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

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

Back to the top