Skip to content

Instantly share code, notes, and snippets.

@pcdavid
Created August 14, 2019 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcdavid/cfbfb54cf1aaf5735d4244f629cd1649 to your computer and use it in GitHub Desktop.
Save pcdavid/cfbfb54cf1aaf5735d4244f629cd1649 to your computer and use it in GitHub Desktop.
// From capella/core/plugins/org.polarsys.capella.core.model.handler/src/org/polarsys/capella/core/model/handler/command/CapellaResourceHelper.java
/**
* Returns whether the given project is a Capella project (project or library)
*/
public static boolean isCapellaProject(IProject targetProject) {
try {
return targetProject.hasNature(CAPELLA_PROJECT_NATURE) || targetProject.hasNature(CAPELLA_LIBRARY_PROJECT_NATURE);
} catch (CoreException exception) {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment