Examples of ModelElement


Examples of org.eclipse.dltk.internal.core.ModelElement

        @SuppressWarnings("unchecked")
        @Override
        public int compare(Viewer viewer, Object e1, Object e2)
        {
            ModelElement left = null;
            ModelElement right = null;
            if (e1 instanceof Service && e2 instanceof Service) {
                left = (Service) e1;
                right = (Service) e2;
            } else if (e1 instanceof Bundle && e2 instanceof Bundle) {
                left = (Bundle) e1;
                right = (Bundle) e2;
            }

            if (left != null && right != null) {
                int result = getComparator().compare(left.getElementName(), right.getElementName());

                if (!ascending) {
                    result *= -1;
                }
                return result;
View Full Code Here

Examples of org.eclipse.dltk.internal.core.ModelElement

        for(Service service : services) {
            if (CodeAssistUtils.startsWithIgnoreCase(service.getId(), prefix)) {
             
                IType[] serviceTypes = model.findServiceTypes(service, project);
                ModelElement parent = null;
               
                if (serviceTypes.length > 0) {
                    parent = (ModelElement) serviceTypes[0];
                } else {
                    parent = (ModelElement) context.getSourceModule();
View Full Code Here

Examples of org.eclipse.dltk.internal.core.ModelElement

                  }
                } else {
                  bundleTypes = PhpModelAccess.getDefault().findTypes(b.getElementName(), MatchRule.EXACT, 0, 0, projectScope, null);
                }
                if (bundleTypes.length == 1) {
                    ModelElement bType = (ModelElement) bundleTypes[0];
                    if (CodeAssistUtils.startsWithIgnoreCase(bType.getElementName(), prefix)) {
                        Bundle bundleType = new Bundle(bType, b.getElementName());
                        reporter.reportType(bundleType, ":", range);
                    }
                }
            }
View Full Code Here

Examples of org.eclipse.dltk.internal.core.ModelElement

               
                IType[] bundleTypes = PhpModelAccess.getDefault().findTypes(b.getElementName(), MatchRule.EXACT, 0, 0, projectScope, null);
               
                if (bundleTypes.length == 1) {
                   
                    ModelElement bType = (ModelElement) bundleTypes[0];
                   
                    if (CodeAssistUtils.startsWithIgnoreCase(bType.getElementName(), prefix)) {
                        Bundle bundleType = new Bundle(bType, b.getElementName());
                        reporter.reportType(bundleType, ":", range);                       
                    }
                }
            }          
View Full Code Here

Examples of org.eclipse.dltk.internal.core.ModelElement

          String className = (String) data.get("elementName");
          String q = (String) data.get("qualifier");
          String viewPath = (String) data.get("viewPath");
          String method = (String) data.get("method");
         
          ModelElement parentElement = (ModelElement) sourceModule;

          if (qualifier != null) {
            parentElement = new ControllerType(parentElement, qualifier,
                Modifiers.AccNameSpace, 0, 0, 0, 0, null, doc);

            return new TemplateField(parentElement, elementName, q, className, viewPath, method);

          }     
        } else if (type.equals("scalar")) {
         
          JSONObject data = JsonUtils.getScalar(metadata);

          String className = (String) data.get("elementName");
          String viewPath = (String) data.get("viewPath");
          String method = (String) data.get("method");
         
          ModelElement parentElement = (ModelElement) sourceModule;
          return new TemplateField(parentElement, elementName, null, className, viewPath, method);     

        }
      } catch (Exception e) {
        Logger.logException(e);
View Full Code Here

Examples of org.nlogo.sdm.ModelElement

    setStartDecoration(null);
  }

  @Override
  public boolean canConnect(Figure start, Figure end) {
    ModelElement startElement =
        ((ModelElementFigure) start).getModelElement();
    ModelElement endElement =
        ((ModelElementFigure) end).getModelElement();

    // can't bind to ourselves
    if (start == end) {
      return false;
View Full Code Here

Examples of org.omg.uml.foundation.core.ModelElement

        ActivityGraph activityGraph = null;

        for (final Iterator iterator = metaObject.getOwnedElement().iterator();
            iterator.hasNext() && activityGraph == null;)
        {
            final ModelElement modelElement = (ModelElement)iterator.next();
            if (modelElement instanceof ActivityGraph)
            {
                activityGraph = (ActivityGraph)modelElement;
            }
        }
View Full Code Here

Examples of org.omg.uml.foundation.core.ModelElement

    public Collection getStereotypeNames(final Object modelElement)
    {
        Collection stereotypeNames = new ArrayList();
        if (modelElement instanceof ModelElement)
        {
            ModelElement element = (ModelElement)modelElement;
            Collection stereotypes = element.getStereotype();
            for (final Iterator iterator = stereotypes.iterator(); iterator.hasNext();)
            {
                ModelElement stereotype = (ModelElement)iterator.next();
                stereotypeNames.add(stereotype.getName());
            }
        }
        else if (modelElement instanceof ModelElementFacade)
        {
            stereotypeNames = ((ModelElementFacade)modelElement).getStereotypeNames();
View Full Code Here

Examples of org.omg.uml.foundation.core.ModelElement

                final Collection underlyingElements = model.getCore().getModelElement().refAllOfType();
                if (underlyingElements != null && !underlyingElements.isEmpty())
                {
                    for (final Iterator iterator = underlyingElements.iterator(); iterator.hasNext();)
                    {
                        ModelElement element = (ModelElement)iterator.next();
                        Collection stereotypeNames = this.getStereotypeNames(element);
                        if (stereotypeNames != null && stereotypeNames.contains(stereotype))
                        {
                            metafacades.add(MetafacadeFactory.getInstance().createMetafacade(element));
                        }
View Full Code Here

Examples of org.omg.uml.foundation.core.ModelElement

        }

        Collection elements = namespace.getOwnedElement();
        for (final Iterator iterator = elements.iterator(); iterator.hasNext();)
        {
            ModelElement element = (ModelElement)iterator.next();
            if (element.getName().equals(fullyQualifiedName[pos]))
            {
                int nextPos = pos + 1;

                if (nextPos == fullyQualifiedName.length)
                {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.