Package org.eclipse.jst.jsf.core.internal.jsflibraryregistry

Examples of org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary


    IStatus status = null;
   
    JSFLibraryInternalReference[] compLibs = (JSFLibraryInternalReference[]) getProperty(IJSFFacetInstallDataModelProperties.COMPONENT_LIBRARIES);
    if (compLibs != null){
      for (int i=0;i<compLibs.length;i++){
        JSFLibrary lib = compLibs[i].getLibrary();
        status = checkForDupeArchiveFiles(jars, lib);
          if (!OK_STATUS.equals(status)){
            return status;
          }
      }   
View Full Code Here


   */
  public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
    if (isJSFLibraryContainer(containerPath)) {
      String libId= containerPath.lastSegment();
           
      JSFLibrary ref= JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry().getJSFLibraryByID(libId);
      if (ref != null) {
        JSFLibraryClasspathContainer container= new JSFLibraryClasspathContainer(ref);
        JavaCore.setClasspathContainer(containerPath, new IJavaProject[] { project },   new IClasspathContainer[] { container }, null);
      }
    }
View Full Code Here

   * @see org.eclipse.jdt.core.ClasspathContainerInitializer#getDescription(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
   */
  public String getDescription(IPath containerPath, IJavaProject project) {
    if (isJSFLibraryContainer(containerPath)) {
      String id = containerPath.lastSegment();
      JSFLibrary libref = JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry().getJSFLibraryByID(id);
      String displayText = id;

      if (libref == null){
        displayText = displayText + " " + MISSING_LIBRARY; //$NON-NLS-1$
      }
View Full Code Here

        Object result = caseJSFLibraryRegistry(jsfLibraryRegistry);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case JSFLibraryRegistryPackage.JSF_LIBRARY: {
        JSFLibrary jsfLibrary = (JSFLibrary)theEObject;
        Object result = caseJSFLibrary(jsfLibrary);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case JSFLibraryRegistryPackage.PLUGIN_PROVIDED_JSF_LIBRARY: {
View Full Code Here

   * @param library JSFLibrary instance
   */
  protected void libraryRemoved(JSFLibrary library) {
    if (library != null && library.isImplementation()) {
      JSFLibraryRegistry jsfLibReg = JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry();
      JSFLibrary defaultImpl = jsfLibReg.getDefaultImplementation();
      if (defaultImpl == null || library.getID().equals(defaultImpl.getID())) {
        setNewDefaultImplementation();
      }
    }
  }
View Full Code Here

   * @param library JSFLibrary instance
   */
  private void implementationFlagSet(JSFLibrary library) {
    JSFLibraryRegistry jsfLibReg = JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry();
    if (jsfLibReg != null) {
      JSFLibrary defaultImpl = jsfLibReg.getDefaultImplementation();
      if (
          library.isImplementation() &&
          defaultImpl == null
      ) {
        jsfLibReg.setDefaultImplementation(library);
      } else if (
          !library.isImplementation() &&
          (defaultImpl != null && library.getID().equals(defaultImpl.getID())))
      {
        setNewDefaultImplementation();
      }
    }
  }
View Full Code Here

   * A null is returned when there is no libraries in the registry.
   *
   * @return JSFLibraryInternalReference
   */
  public JSFLibraryInternalReference getDefaultJSFImplementationLibrary() {
    JSFLibrary dftImplLib = getJSFLibraryRegistry().getDefaultImplementation();
   
    return ((dftImplLib != null) ?
        getJSFLibraryReferencebyID(dftImplLib.getID()) :
        null);
  }
View Full Code Here

   */
  public void addJSFLibrary(final JSFLibraryInternalReference library) {
     // Library is added only if it does not exist in registry
    if (library != null && getJSFLibraryRegistry().getJSFLibraryByID(library.getID()) == null) {
      // Add the library working copy into workspace registry.
      JSFLibrary jsfLib = library.getLibrary();
      getJSFLibraryRegistry().addJSFLibrary(jsfLib.getWorkingCopy());
     
      // Add library into the collection depends on its type.
      List list = (library.isImplementation() ?
              getJSFImplementationLibraries() :
              getJSFComponentLibraries());
View Full Code Here

 
 
  private List wrapJSFLibraries(final EList libs) {
    List list = new ArrayList();
    if (libs != null) {
      JSFLibrary jsfLib;
      JSFLibraryInternalReference jsfLibDctr;
     
      Iterator it = libs.iterator();
      while (it.hasNext()) {
        jsfLib = (JSFLibrary) it.next();
View Full Code Here

  }

  private boolean isAnyLibraryChanged(final List list) {
    Iterator it = list.iterator();
    JSFLibraryInternalReference wclib = null;    // working copy library
    JSFLibrary lib = null;
   
    while(it.hasNext()) {
      wclib = (JSFLibraryInternalReference)it.next();
      lib = getJSFLibraryRegistry().getJSFLibraryByID(wclib.getID());
      if (lib == null) {          // removed. Hence, changed.
        return true;
      }
      if (wclib.getArchiveFiles().size() !=
        lib.getArchiveFiles().size()) { // Archives changed..
        return true;
      }
      if (isAnyArchiveFileChanged(wclib.getArchiveFiles(),
          lib.getArchiveFiles())) {   // Check archive file changes.  I.e., name and location
        return true;
      }
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary

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.