Example #1
0
 /**
  * Does this project have a factory path that is different from the workspace default?
  *
  * @return true if there is a project-specific factory path.
  */
 public static boolean hasProjectSpecificFactoryPath(IJavaProject jproj) {
   if (null == jproj) {
     // say no, even if workspace-level factory path does exist.
     return false;
   }
   return FactoryPathUtil.doesFactoryPathFileExist(jproj)
       && !getFactoryPath(jproj).equals(getDefaultFactoryPath(jproj));
 }
Example #2
0
 /**
  * Set the factory path for a given project or for the workspace. Does not perform any validation
  * on the path.
  *
  * @param jproj the project, or null to set the factory path for the workspace.
  * @param path a factory path, or null to reset the factory path to the default.
  */
 public static void setFactoryPath(IJavaProject jproj, IFactoryPath path) throws CoreException {
   FactoryPath fp = (FactoryPath) path;
   FactoryPathUtil.setFactoryPath(jproj, fp);
   // Project-specific factory path files are resources, so changes
   // get picked up by the resource listener.  Workspace changes aren't.
   if (jproj == null) {
     AnnotationProcessorFactoryLoader.getLoader().resetAll();
   }
 }
Example #3
0
 /**
  * Get the factory path for a given project or for the workspace.
  *
  * @param jproj the project, or null to get the factory path for the workspace.
  * @return a FactoryPath representing the current state of the specified project. Note that
  *     changes made to the project after this call will not affect the returned object - that is,
  *     it behaves like a value, not like a live link to the project state.
  */
 public static IFactoryPath getFactoryPath(IJavaProject jproj) {
   return FactoryPathUtil.getFactoryPath(jproj);
 }