Package net.sourceforge.coffea.uml2.model

Examples of net.sourceforge.coffea.uml2.model.IElementHandling


    return container;
  }

  public String getFullName() {
    String name = new String();
    IContainerService ct = getContainerService();
    if(!(ct instanceof IModelService)) {
      String containerFullName = ct.getFullName();
      if(
          (
              !containerFullName.equals(
                  IModelService.primitiveTypesPackageName
              )
          )
          &&(
              !containerFullName.equals(
                  IModelService.classpathTypesPackageName
              )
          )
          &&(containerFullName.length()>0)
      ) {
        if(!(ct instanceof IClassifierService<?, ?>)) {
          IModelService m = getModelService();
          if(
              !(
                  (m!=null)
                  &&(ct instanceof IModelService)
                  &&(
                      !containerFullName.equals(
                          IModelService
                          .defaultPackageFileName
                      )
                  )
              )
          ) {
            name += containerFullName + '.';
          }
        }
        else {
          name += containerFullName + '#';
        }
      }
    }
    String simpleName = getSimpleName();
    /*
     * Removing  anything before any point in the simple name for
     * the hierarchy transition case (if we are not in the primitive types
     * or the class path)
     */
    int ind = -1;
    IContainerService contH = getContainerService();
    if(
        ((ind = simpleName.indexOf('.'))!=-1)
        &&(ind<simpleName.length())
        &&(contH!=null)
        &&(contH.getFullName()!=null)
        &&(contH.getFullName().length()>0)
    ) {
      simpleName = simpleName.substring(ind +1);
    }
    name += simpleName;
    return name;
View Full Code Here


              simpleName = adjustedDefaultUMLPackageName;
            }
            IPackageFragmentRoot fragRoot =
              (IPackageFragmentRoot)parent;
            String qualifiedName = new String();
            IContainerService contH = getContainerService();
            if(contH != null) {
              String parentFullName = contH.getFullName();
              if(
                  (parentFullName!=null)
                  &&(
                      !parentFullName.equals(
                          ModelService
View Full Code Here

      if((javaElement!=null)&&(newName!=null)) {
        JavaRenameProcessor p;
        try {
          p = new RenamePackageProcessor(javaElement);
          String qualifiedName = null;
          IContainerService contH = getContainerService();
          if(contH!=null) {
            String parentFullName = contH.getFullName();
            if(
                (parentFullName!=null)
                &&(
                    !parentFullName.equals(
                        ModelService
View Full Code Here

                        UMLClassDiagramJavaEditor
                    ) {
                      UMLClassDiagramJavaEditor umlEditor
                      = ((UMLClassDiagramJavaEditor)
                            editor);
                      IElementHandling elH =
                        umlEditor
                        .getLastSelectedElementHandler();
                      if(
                          (elH!=null)
                          &&(
View Full Code Here

        }
        if(name!=null) {
          TransactionalEditingDomain domain =
            g.getEditingDomain();
          if(listeners.get(name)==null) {
            IElementHandling elH = findHandler(g);
            if(elH!=null) {
              domain.addResourceSetListener(elH);
              listeners.put(name, elH);
            }
          }
View Full Code Here

   * Name of the element to return the handler for
   * @return Element handler responding to the given element name
   */
  protected IElementHandling getElementHandler(String name) {
    IModelHandling mdl = null;
    IElementHandling rt = null;
    if(creator!=null) {
      mdl = creator.getModelHandler();
      if(mdl!=null) {
        rt = mdl.getElementHandler(name);
        if(rt==null) {
          IElementHandling defaultPackageElement =
            mdl.getElementHandler(
                IModelHandling.defaultPackageFileName
            );
          if(defaultPackageElement instanceof IPackageHandling) {
            rt =
View Full Code Here

      Object child = null;
      EditPart childEditPart = null;
      String childName = null;
      NamedElement childElement = null;
      Node childModel = null;
      IElementHandling childH = null;
      for(int i=0 ; i<children.size() ; i++) {
        child = children.get(i);
        if((child!=null)&&(child instanceof EditPart)) {
          childEditPart = (EditPart)child;
          if(childEditPart.getModel() instanceof Node) {
View Full Code Here

   * @param p
   * Edit part for which the edit policy must be initialized
   */
  private void initEditPolicy(EditPart p) {
    if(p!=null) {
      IElementHandling elH =
        findHandler(p);
      ensureEditPolicy(p, elH);
      if((mainPackagePart == null)&&(p instanceof PackageEditPart)) {
        mainPackagePart = (PackageEditPart)p;
      }
View Full Code Here

    else if(packSel!=null) {
      name = PackageHandler.buildFullyQualifiedName(packSel);
    }
     */
    // From the element name we get the corresponding tool
    IElementHandling elH = getElementHandler(name);
    return elH;
  }
View Full Code Here

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

TOP

Related Classes of net.sourceforge.coffea.uml2.model.IElementHandling

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.