Package org.eclipse.wst.common.project.facet.core

Examples of org.eclipse.wst.common.project.facet.core.IProjectFacet


    // In the absence of any facet information, assume the highest level
    float version = FacetModuleCoreSupport.DEFAULT_SERVLET_VERSION;
    try {
      IFacetedProject faceted = ProjectFacetsManager.create(project);
      if (faceted != null && ProjectFacetsManager.isProjectFacetDefined(JST_WEB_MODULE)) {
        IProjectFacet webModuleFacet = ProjectFacetsManager.getProjectFacet(JST_WEB_MODULE);
        if (faceted.hasProjectFacet(webModuleFacet)) {
          version = Float.parseFloat(faceted.getInstalledVersion(webModuleFacet).getVersionString());
        }
      }
    }
View Full Code Here


      return false;
   
    try {
      if (ProjectFacetsManager.isProjectFacetDefined(JST_WEB_MODULE)) {
        IFacetedProject faceted = ProjectFacetsManager.create(project);
        IProjectFacet webModuleFacet = ProjectFacetsManager.getProjectFacet(JST_WEB_MODULE);
        if (faceted != null && faceted.hasProjectFacet(webModuleFacet)) {
          return true;
        }
      }
    }
View Full Code Here

       
        if( webFacetVersion != null && webFacetVersion.compareTo( WebFacetUtils.WEB_23 ) >= 0 )
        {
            final Set<IProjectFacetVersion> facets = new HashSet<IProjectFacetVersion>();
           
            final IProjectFacet jsfFacet
                = ProjectFacetsManager.getProjectFacet( IJSFCoreConstants.JSF_CORE_FACET_ID );
           
            final IProjectFacetVersion jsfFacetVersion11
                = jsfFacet.getVersion( IJSFCoreConstants.JSF_VERSION_1_1 );
           
            facets.add( jsfFacetVersion11 );
            facets.add( webFacetVersion );
           
            if( webFacetVersion == WebFacetUtils.WEB_23 )
View Full Code Here

    // In the absence of any facet information, assume the highest level
    float version = FacetModuleCoreSupport.DEFAULT_SERVLET_VERSION;
    try {
      IFacetedProject faceted = ProjectFacetsManager.create(project);
      if (faceted != null && ProjectFacetsManager.isProjectFacetDefined(JST_WEB_MODULE)) {
        IProjectFacet webModuleFacet = ProjectFacetsManager.getProjectFacet(JST_WEB_MODULE);
        if (faceted.hasProjectFacet(webModuleFacet)) {
          version = Float.parseFloat(faceted.getInstalledVersion(webModuleFacet).getVersionString());
        }
      }
    }
View Full Code Here

      return false;
   
    try {
      if (ProjectFacetsManager.isProjectFacetDefined(JST_WEB_MODULE)) {
        IFacetedProject faceted = ProjectFacetsManager.create(project);
        IProjectFacet webModuleFacet = ProjectFacetsManager.getProjectFacet(JST_WEB_MODULE);
        if (faceted != null && faceted.hasProjectFacet(webModuleFacet)) {
          return true;
        }
      }
    }
View Full Code Here

            try
            {
                if (ProjectFacetsManager.isProjectFacetDefined(JST_WEB_MODULE))
                {
                    IFacetedProject faceted = ProjectFacetsManager.create(project);
                    IProjectFacet webModuleFacet = ProjectFacetsManager.getProjectFacet(JST_WEB_MODULE);
                    if (faceted != null && faceted.hasProjectFacet(webModuleFacet))
                    {
                        return true;
                    }
                }
View Full Code Here

        return null;
      }
     
     
     
      IProjectFacet coreFacet = ProjectFacetsManager.getProjectFacet(PHPFacetsConstants.PHP_CORE_COMPONENT);
      IProjectFacet composerFacet = ProjectFacetsManager.getProjectFacet(ComposerFacetConstants.COMPOSER_COMPONENT);
     
      // install the fixed facets
     
      if (!facetedProject.hasProjectFacet(coreFacet)) {
        facetedProject.installProjectFacet(coreFacet.getDefaultVersion(), null, monitor);
        facetedProject.installProjectFacet(PHPFacets.convertToFacetVersion(version), null, monitor);
      }
     
      if (!facetedProject.hasProjectFacet(composerFacet)) {
        facetedProject.installProjectFacet(composerFacet.getVersion(ComposerFacetConstants.COMPOSER_COMPONENT_VERSION_1), composerFacet, monitor);
      }

      return facetedProject;
     
    } catch (CoreException ex) {
View Full Code Here

        monitor = new NullProgressMonitor();
      }
     
      final IFacetedProject facetedProject = ProjectFacetsManager.create(project, true, monitor);
     
      IProjectFacet composerFacet = ProjectFacetsManager.getProjectFacet(ComposerFacetConstants.COMPOSER_COMPONENT);
     
      facetedProject.uninstallProjectFacet(composerFacet.getVersion(ComposerFacetConstants.COMPOSER_COMPONENT_VERSION_1), composerFacet, monitor);
    } catch (CoreException ex) {
      Logger.logException(ex.getMessage(), ex);
    }
  }
View Full Code Here

    } catch (ExecutionException e) {
      e.printStackTrace();
    }

    IProject[] ears = J2EEProjectUtilities.getReferencingEARProjects(project);
    IProjectFacet facet = ProjectFacetsManager.getProjectFacet(FACET_ID);
    for (int i = 0; i < ears.length; i++) {
      IFacetedProject fp = ProjectFacetsManager.create(ears[i]);
      if (!fp.hasProjectFacet(facet)) {
        try {
          createDeploymentPlanCreationOp(ears[i], config).execute(monitor, null);
View Full Code Here

   */
  public static IStatus setFacetedVersion(IProject project, PHPVersion version) {
    if (isFacetedProject(project)) {
      try {
        final IProjectFacetVersion facetedVersion = convertToFacetVersion(version);
        final IProjectFacet phpFacet = ProjectFacetsManager
            .getProjectFacet(PHPFacetsConstants.PHP_COMPONENT);
        final IFacetedProject faceted = ProjectFacetsManager
            .create(project);
        if (!facetedVersion.equals(faceted
            .getInstalledVersion(phpFacet))) {
View Full Code Here

TOP

Related Classes of org.eclipse.wst.common.project.facet.core.IProjectFacet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.