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);
try{
projectNode.flush();
} 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.