Class ProjectManager

java.lang.Object
tools.descartes.dlim.generator.editor.utils.ProjectManager

public class ProjectManager extends Object
This class provides resource and path utilities within an Eclipse project.
  • Constructor Details

    • ProjectManager

      public ProjectManager(ISelection selection)
      Create a ProjectManager for the project that contains the current selection.
      Parameters:
      selection - the selection
    • ProjectManager

      public ProjectManager(IResource resource)
      Create a ProjectManager for the project that contains the current resource.
      Parameters:
      resource - the resource
  • Method Details

    • getProjectPath

      public String getProjectPath()
      Get the project's root path.
      Returns:
      the project path
    • refreshProject

      public void refreshProject()
      Refresh the ProjectManager's project.
    • saveStringToPreferences

      public static void saveStringToPreferences(String key, String value)
      Stores the String to the Eclipse Preferences.
      Parameters:
      key - the storage key.
      value - the value to store.
    • retrieveStringFromPreferences

      public static String retrieveStringFromPreferences(String key)
      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.