Package net.sourceforge.coffea.uml2

Examples of net.sourceforge.coffea.uml2.Resources


        monitor = new NullProgressMonitor();
      }
      if(objective!=null) {
        String simpleName =
          ClassService.simpleNameExtraction(objective);
        IModelService model = getModelService();
        IModelServiceBuilding builder = null;
        if(model!=null) {
          builder = model.getServiceBuilder();
        }
        if(
            (simpleName!=null)
            &&(simpleName.length()>0)
            &&(builder!=null)
View Full Code Here


                              instanceof
                              IPackageHandling

                          )
                      ){
                        IPackageHandling packH =
                          (IPackageHandling)elH;
                        if(
                            packH.getJavaElement()
                            !=null
                        ) {
                          String lastId =
                            ReverseHandler
                            .getInteractionsReceiver()
                            .getLastSourceViewId();
                          opened = true;
                          EditionHandler
                          .getEditionReceiver()
                          .edit(
                              packH
                              .getJavaElement(),
                              win,
                              lastId
                          );
                          break searchPages;
View Full Code Here

    else {
      String name = new String();
      IElementHandling el =
        creator.getModelHandler().getElementHandler(name);
      if(el instanceof IPackageHandling) {
        IPackageHandling pack = (IPackageHandling)el;
        EditionHandler.getEditionReceiver().edit(
            pack.getJavaElement(),
            creator.getSourceWorkbenchWindow(),
            creator.getSourceViewId()
        );
      }
    }
View Full Code Here

            }
            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

TOP

Related Classes of net.sourceforge.coffea.uml2.Resources

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.