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

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


    init();
  }

  private void init() {
    final IFacetedProjectWorkingCopy fpjwc = getFacetedProjectWorkingCopy();
    final IProjectFacetVersion fv = getProjectFacetVersion();

    if (this.librariesUninstallDelegate == null && fpjwc != null
        && fv != null) {
      this.librariesUninstallDelegate = new LibraryUninstallDelegate(
          fpjwc, fv);
View Full Code Here


        getTapestryFacetedVersion(event.getProject().getProject()) != null //must be a Tapestry faceted project
        ){
      //remove condition : TapestryLibraryConfigurationHelper.isConfiguredForSystemSuppliedImplementation(event.getProject().getProject())
      try {       
        IProject project = event.getProject().getProject();
        IProjectFacetVersion fv = getTapestryFacetedVersion(project);
        ClasspathHelper.removeClasspathEntries(project, fv);
        ClasspathHelper.addClasspathEntries(project, fv);
      } catch (CoreException e) {
        TapestryCorePlugin.log(IStatus.ERROR, "Unable to replace server supplied implementation when runtime changed.", e);//$NON-NLS-1$
      }
View Full Code Here

            final IFacetedProject facetedProject = ProjectFacetsManager.create(project);
            final Set facets = facetedProject.getProjectFacets();

            for (final Iterator it = facets.iterator(); it.hasNext();)
            {
                final IProjectFacetVersion  facetVersion =
                    (IProjectFacetVersion) it.next();

                if (IJSFCoreConstants.JSF_CORE_FACET_ID.equals(facetVersion.getProjectFacet().getId()))
                {
                    return facetVersion.getVersionString();
                }
            }
        }
        catch (final CoreException ce)
        {
View Full Code Here

            IStructuredDocumentContextResolverFactory.
                INSTANCE.getWorkspaceContextResolver(context);
       
        IProject project = wkResolver.getProject();
       
        IProjectFacetVersion  projectVersion = JSFAppConfigUtils.getProjectFacet(project);
       
        if (projectVersion != null)
        {
            return projectVersion.getVersionString();
        }
       
        return null;
    }
View Full Code Here

    try {
      if(WebArtifactEdit.isValidWebModule(component)){
        IFacetedProject facetedProject = ProjectFacetsManager.create(project);
        Object facets[] = facetedProject.getProjectFacets().toArray();
        for(int i=0;i<facets.length;i++){
          IProjectFacetVersion facet = (IProjectFacetVersion)facets[i];
          if(facet.getProjectFacet().getId().equals("click")){
            return true;
          }
        }
      }
    } catch(Exception ex){
View Full Code Here

          }
        };
      }

      public boolean check(final IPreset preset) {
        final IProjectFacetVersion primaryFacetVersion = PHPFacets
            .getCoreVersion();
        return preset.getProjectFacets().contains(primaryFacetVersion);
      }

      private void handleProjectFacetsChangedEvent(
View Full Code Here

   * @return the status of setting the version
   */
  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))) {
          final Set<IFacetedProject.Action> actions = new HashSet<IFacetedProject.Action>();
          actions.add(new IFacetedProject.Action(
              IFacetedProject.Action.Type.VERSION_CHANGE,
              facetedVersion, null));
View Full Code Here

      final IFacetedProject faceted = ProjectFacetsManager
          .create(project);
      if (faceted != null) {
        IProjectFacet phpFacet = ProjectFacetsManager
            .getProjectFacet(PHPFacetsConstants.PHP_COMPONENT);
        final IProjectFacetVersion version = faceted
            .getInstalledVersion(phpFacet);
        if (PHPFacetsConstants.PHP_COMPONENT_VERSION_4.equals(version
            .getVersionString())) {
          return PHPVersion.PHP4;
        }
        if (PHPFacetsConstants.PHP_COMPONENT_VERSION_5.equals(version
            .getVersionString())) {
          return PHPVersion.PHP5;
        }
        if (PHPFacetsConstants.PHP_COMPONENT_VERSION_5_3.equals(version
            .getVersionString())) {
          return PHPVersion.PHP5_3;
        }
        if (PHPFacetsConstants.PHP_COMPONENT_VERSION_5_4.equals(version
            .getVersionString())) {
          return PHPVersion.PHP5_4;
        }
      }
    } catch (CoreException ex) {
View Full Code Here

    try {
      if(WebArtifactEdit.isValidWebModule(component)){
        IFacetedProject facetedProject = ProjectFacetsManager.create(project);
        Object facets[] = facetedProject.getProjectFacets().toArray();
        for(int i=0;i<facets.length;i++){
          IProjectFacetVersion facet = (IProjectFacetVersion)facets[i];
          if(facet.getProjectFacet().getId().equals("click")){
            return true;
          }
        }
      }
    } catch(Exception ex){
View Full Code Here

        //Since there's no support for version update -yet- we stop here
        return;
      }
     
      FacetDetectorManager facetDetectorManager = FacetDetectorManager.getInstance();
      IProjectFacetVersion jsfVersion = facetDetectorManager.findFacetVersion(mavenProjectFacade, JSF_FACET.getId(), monitor);
      if (fproj != null && jsfVersion != null) {
        installJSFFacet(fproj, mavenProject, jsfVersion, monitor);
      }
    }
   
View Full Code Here

TOP

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

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.