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

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


    public void installFacet(String facetId, String facetVersion) throws CoreException {

        IFacetedProject facetedProject = ProjectFacetsManager.create(project);
        IProjectFacet slingBundleFacet = ProjectFacetsManager.getProjectFacet(facetId);
        IProjectFacetVersion projectFacetVersion = slingBundleFacet.getVersion(facetVersion);

        facetedProject.installProjectFacet(projectFacetVersion, null, new NullProgressMonitor());

    }
View Full Code Here


      final IProjectFacet webFacet = ProjectFacetsManager
          .getProjectFacet(FACET_ID);
      if (faceted.hasProjectFacet(webFacet)) {
        return;
      }
      final IProjectFacetVersion version = webFacet.getVersion(FACET_VERSION_1_0);
      faceted.installProjectFacet(version, null, new NullProgressMonitor());
      try {
        this.storage = new SettingsPhpProjectStorage(project);
      } catch (BackingStoreException e) {
        throw new CoreException(new Status(IStatus.ERROR, PEXServerPlugin.PLUGIN_ID, "Error reading preferences", e)); //$NON-NLS-1$
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

   * @see org.eclipse.wst.common.project.facet.ui.IFacetWizardPage#setWizardContext(org.eclipse.wst.common.project.facet.ui.IWizardContext)
   */
  public void setWizardContext(IWizardContext context) {
    // hook into web datamodel if new project wizard.
    Iterator it = context.getSelectedProjectFacets().iterator();
    IProjectFacetVersion webFacetVersion = null;
    while (it.hasNext()) {
      // find Web facet
      IProjectFacetVersion pfv = (IProjectFacetVersion) it.next();
      if (pfv.getProjectFacet().getId().equals("jst.web")) { //$NON-NLS-1$
        webFacetVersion = pfv;
        break;
      }
    }
    if (webFacetVersion != null) {
View Full Code Here

    private LibraryInstallDelegate libraryInstallDelegate = null;
   
    private void initLibraryInstallDelegate()
    {
        final IFacetedProjectWorkingCopy fpjwc = (IFacetedProjectWorkingCopy) getProperty( FACETED_PROJECT_WORKING_COPY );
        final IProjectFacetVersion fv = (IProjectFacetVersion) getProperty( FACET_VERSION );
       
        if( this.libraryInstallDelegate == null && fpjwc != null && fv != null )
        {
            this.libraryInstallDelegate = new LibraryInstallDelegate( fpjwc, fv );
           
View Full Code Here

      {
          initLibraryInstallDelegate();
         
          if( this.libraryInstallDelegate != null && propertyName.equals( FACET_VERSION ) )
          {
              final IProjectFacetVersion fv = (IProjectFacetVersion) getProperty( FACET_VERSION );
              this.libraryInstallDelegate.setProjectFacetVersion( fv );
          }
      }

        return super.propertySet( propertyName, propertyValue );
View Full Code Here

            }
        }

        protected String getHandlerId(final IProject project)
        {
            IProjectFacetVersion projectFacet = JSFAppConfigUtils.getProjectFacet(project);
            if (projectFacet != null)
            {
                JSFVersion projectVersion = JSFVersion.valueOfFacetVersion(projectFacet);
               
                String defaultHandler = PRE_20_DEFAULT_VIEW_HANDLER_ID;
View Full Code Here

     */
    public static boolean isValidJSFProject(IProject project, String minVersion)
    {
        boolean isValid = false;
       
        final IProjectFacetVersion projectFacetVersion = getProjectFacet(project);
       
        if (projectFacetVersion != null)
        {
            try
            {
                final String versionString =
                    projectFacetVersion.getVersionString();
                final Comparator comparator =
                    projectFacetVersion.getProjectFacet().getVersionComparator();
                final int compareToMin =
                    comparator.compare(versionString, minVersion);
               
                if (compareToMin >=0)
                {
View Full Code Here

   * @return true if the IProject instance is a valid JSF project, else
   * false.
   */
  public static boolean isValidJSFProject(IProject project) {
    boolean isValid = false;
        IProjectFacetVersion projectFacet = getProjectFacet(project);
        if (projectFacet != null)
        {
            isValid = true;
        }
    return isValid;
View Full Code Here

                IFacetedProject facetedProject = ProjectFacetsManager.create(project);
                if (facetedProject != null) {
                    Set projectFacets = facetedProject.getProjectFacets();
                    Iterator itProjectFacets = projectFacets.iterator();
                    while (itProjectFacets.hasNext()) {
                        IProjectFacetVersion projectFacetVersion = (IProjectFacetVersion)itProjectFacets.next();
                        if (IJSFCoreConstants.JSF_CORE_FACET_ID.equals(projectFacetVersion.getProjectFacet().getId()))
                        {
                            return projectFacetVersion;
                        }
                    }
                }
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.