Package org.eclipse.jst.tapestry.core.internal.tapestrylibraryregistry

Examples of org.eclipse.jst.tapestry.core.internal.tapestrylibraryregistry.TapestryLibraryRegistry


   *
   * @param library JSFLibrary instance
   */
  protected void libraryAdded(TapestryLibrary library) {
    if (library != null && library.isImplementation()) {
      TapestryLibraryRegistry jsfLibReg = TapestryLibraryRegistryUtil.getInstance().getTapestryLibraryRegistry();
      EList impls = jsfLibReg.getImplTapestryLibraries();
      if (impls.size() == 1) {
        jsfLibReg.setDefaultImplementation(library);
      }
    }
  }
View Full Code Here


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

   * this method for it to have any effect.
   *
   * @param library JSFLibrary instance
   */
  private void implementationFlagSet(TapestryLibrary library) {
    TapestryLibraryRegistry jsfLibReg = TapestryLibraryRegistryUtil.getInstance().getTapestryLibraryRegistry();
    if (jsfLibReg != null) {
      TapestryLibrary 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

   * Sets the first available JSFLibrary marked as an implementation as the
   * default implementation or sets the default implementation to null if no
   * JSFLibrary is marked as an implementation.
   */
  protected void setNewDefaultImplementation() {
    TapestryLibraryRegistry jsfLibReg = TapestryLibraryRegistryUtil.getInstance().getTapestryLibraryRegistry();
    EList impls = jsfLibReg.getImplTapestryLibraries();
    if (impls.size() > 0) {
      jsfLibReg.setDefaultImplementation((TapestryLibrary)impls.get(0));
    } else {
      jsfLibReg.setDefaultImplementation(null);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.tapestry.core.internal.tapestrylibraryregistry.TapestryLibraryRegistry

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.