Class ProjectManager
java.lang.Object
tools.descartes.dlim.generator.editor.utils.ProjectManager
This class provides resource and path utilities within an Eclipse project.
-
Constructor Summary
ConstructorsConstructorDescriptionProjectManager
(IResource resource) Create a ProjectManager for the project that contains the current resource.ProjectManager
(ISelection selection) Create a ProjectManager for the project that contains the current selection. -
Method Summary
Modifier and TypeMethodDescriptionGet the project's root path.void
Refresh the ProjectManager's project.static String
Retrieves the String from the Eclipse Preferences.static void
saveStringToPreferences
(String key, String value) Stores the String to the Eclipse Preferences.
-
Constructor Details
-
ProjectManager
Create a ProjectManager for the project that contains the current selection.- Parameters:
selection
- the selection
-
ProjectManager
Create a ProjectManager for the project that contains the current resource.- Parameters:
resource
- the resource
-
-
Method Details
-
getProjectPath
Get the project's root path.- Returns:
- the project path
-
refreshProject
public void refreshProject()Refresh the ProjectManager's project. -
saveStringToPreferences
Stores the String to the Eclipse Preferences.- Parameters:
key
- the storage key.value
- the value to store.
-
retrieveStringFromPreferences
Retrieves the String from the Eclipse Preferences.- Parameters:
key
- the storage key.- Returns:
- the stored String, returns an empty String for invalid or inaccessible keys.
-