Example #1
0
  public static boolean isLiferayProject(IProject project) {
    boolean retval = false;

    if (project == null) {
      return retval;
    }

    try {
      IFacetedProject facetedProject = ProjectFacetsManager.create(project);

      if (facetedProject != null) {
        for (IProjectFacetVersion facet : facetedProject.getProjectFacets()) {
          IProjectFacet projectFacet = facet.getProjectFacet();

          if (projectFacet.getId().startsWith("liferay")) {
            retval = true;
            break;
          }
        }
      }
    } catch (Exception e) {
    }

    return retval;
  }
Example #2
0
 public static boolean isLiferayFacet(IProjectFacet projectFacet) {
   return projectFacet != null && projectFacet.getId().startsWith("liferay");
 }