Package net.sourceforge.coffea.uml2.model.impl

Examples of net.sourceforge.coffea.uml2.model.impl.PackageService$RenamingRunnable


            }
            else if(
                lastSelectedElementHandler
                instanceof IPackageHandling
            ) {
              IPackageHandling packH =
                ((IPackageHandling)lastSelectedElementHandler);
              IModelHandling modelH = packH.getModelHandler();
              if(
                  (modelH!=null)
                  /*&&(
                      !modelH.getFullName().equals(
                          packH.getFullName()
                      )
                  )
                   */
              ){
                el = packH.getJavaElement();
              }
            }
            StructuredSelection javaSelection = null;
            IWorkbenchPart vPart = null;
            if(el!=null) {
View Full Code Here


        else if(pack.getKind()==IPackageFragmentRoot.K_SOURCE) {
          String name = pack.getElementName();
          if((name==null)||(name.length()==0)) {
            name = IModelService.defaultPackageFileName;
          }
          IPackageService group =
            model.resolvePackageService(name);
          if(group==null) {
            new PackageService(
                pack,
                model
View Full Code Here

          "A model must be loaded first"
      );
    }
    // First, we need to identify a container package and isolate the
    // simple name
    IPackageService containerPackageService = null;
    String containerFullName = null;
    String simpleName = null;
    int lastPointIndex = packageFullName.lastIndexOf('.');
    if(lastPointIndex > 0) {
      containerFullName =
        packageFullName.substring(0, lastPointIndex - 1);
      simpleName = packageFullName.substring(lastPointIndex + 1);
    }
    else {
      simpleName = packageFullName;
    }
    // If we have a container package,
    if(containerFullName != null) {
      // Then we resolve the corresponding service
      containerPackageService =
        modelService.resolvePackageService(containerFullName);
    }
    else {
      // Else we resolve the default package service
      containerPackageService =
        modelService.resolvePackageService(
          IPackageService.defaultUMLPackageName
        );
    }
    if(containerPackageService != null) {
      IPackageService packageService =
        containerPackageService.createNestedPackage(simpleName);
      return packageService != null;
    }
    else return false;
  }
View Full Code Here

          displayedFigure = null;
        }
        figureSystem.setContents(displayedFigure);
      }
      else if(packageEl != null) {
        IPackageService packageService =
          serviceBuilder.buildPackageService(packageEl);
        if(packageService != null) {
          displayedFigure =
            new PackageFigure<IPackageService>(packageService);
        }
View Full Code Here

  }

  /** Set up the package hierarchy from the content of {@link #packages} */
  protected void setUpPackageHierarchy() {
    if(packages!=null) {
      IPackageService p = null;
      // In a first loop on the packages list,
      for(int i=0 ; i<packages.size() ; i++) {
        //Each package retrieves its parent
        p = packages.get(i);
        if(p!=null) {
          p.retrieveContainerFromHierarchy();
        }
      }
      // Recursively each package retrieve its children
      List<IPackageService> root = fetchSubPackagesFromHierarchy();
      packages = root;
View Full Code Here

    return packages;
  }

  public IPackageService resolvePackageService(String n) {
    for (int i = 0; i < this.packages.size(); i++) {
      IPackageService pck = this.packages.get(i);
      String packFullName = pck.getFullName();
      if ((packFullName!=null)&&(packFullName.equals(n))) {
        return pck;
      }
      else {
        IPackageService el;
        if ((el = pck.resolvePackageService(n)) != null) {
          return el;
        }
      }
    }
View Full Code Here

  public List<IPackageService> fetchSubPackagesFromHierarchy() {
    // Looping on the packages list,
    List<IPackageService> rootPackages =
      new ArrayList<IPackageService>();
    IPackageService p = null;
    for(int i=0 ; i<packages.size() ; i++) {
      // We identify which have directly the model for container
      p = packages.get(i);
      if((p!=null) &&(p.getContainerService().equals(this))) {
        // The package, which are "root packages", will be the
        // basement for a recursive retrieving of sub packages
        p.fetchSubPackagesFromHierarchy();
        rootPackages.add(p);
      }
    }
    return rootPackages;
  }
View Full Code Here

          ret.add(t);
        }
      }
    }
    if(packages!=null) {
      IPackageService p;
      for(int i=0 ; i<packages.size() ; i++) {
        p = packages.get(i);
        if(p!=null) {
          ret.add(p);
        }
View Full Code Here

            }
          }
        }
      }
      if((ret==null)&&(packages!=null)) {
        IPackageService p;
        for(int i=0 ; i<packages.size() ; i++) {
          p = packages.get(i);
          if(p!=null) {
            if(n.equals(p.getFullName())) {
              ret = p;
            }
            else {
              ret = p.getElementService(n);
            }
            if(ret!=null) {
              break;
            }
          }
View Full Code Here

        // Then we look for it in the model
        supplier = getModelService().resolveTypeService(typeName);
      }
      else {
        // Else we got to get the local package
        IPackageService packH = null;
        IContainerService contH = getContainerService();
        while(
            (contH != null)
            &&(!(contH instanceof IPackageService))
            &&(contH instanceof IContainableElementService<?, ?>)
        ) {
         
          contH =
            ((IContainableElementService<?, ?>)contH)
            .getContainerService();
        }
        // From the package we can have the type
        if(contH instanceof IPackageService) {
          packH = (IPackageService)contH;
          String packName = packH.getFullName();
          String fullName = packName + '.' + typeName;
          supplier = packH.resolveTypeService(fullName);
        }
      }
    }
    return supplier;
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.coffea.uml2.model.impl.PackageService$RenamingRunnable

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.