Package org.eclipse.uml2

Examples of org.eclipse.uml2.Model


    }
    return null;
  }

  private Package addPackage(String name, ModelAccessFacade model) {
    Model m = (Model) ((UML2Resource) model.getModel()).getContents()
        .get(0);
    return m.createNestedPackage(name);
  }
View Full Code Here


                {
                    public boolean evaluate(final Object object)
                    {
                        if (object instanceof NamedElement)
                        {
                            NamedElement element = (NamedElement)object;
                            StringBuffer fullName = new StringBuffer(getPackageName(
                                        element,
                                        separator,
                                        modelName));
                            String name = element.getName();
                            if (StringUtils.isNotBlank(name))
                            {
                                String namespaceSeparator = MetafacadeConstants.NAMESPACE_SCOPE_OPERATOR;
                                if (!modelName)
                                {
View Full Code Here

     */
    protected java.lang.String handleGetVisibility()
    {
        if (this.metaObject instanceof NamedElement)
        {
            final NamedElement element = (NamedElement)this.metaObject;
            final VisibilityKind kind = element.getVisibility();
            String visibility = null;
            if (kind.equals(VisibilityKind.PACKAGE_LITERAL))
            {
                visibility = "package";
            }
View Full Code Here

    {
        // In UML2, model elements need not have a name,
        // only when they are an instance of NamedElement.
        if (this.metaObject instanceof NamedElement)
        {
            NamedElement namedElement = (NamedElement) this.metaObject;
            return namedElement.getName();

        }
        return "";
    }
View Full Code Here

        for (TreeIterator iterator = UmlUtilities.findModel(this.model).eAllContents(); iterator.hasNext();)
        {
            final EObject object = (EObject)iterator.next();
            if (object instanceof NamedElement)
            {
                final NamedElement element = (NamedElement)object;
                if (UmlUtilities.containsStereotype(
                        element,
                        name))
                {
                    elements.add(element);
View Full Code Here

                    public boolean evaluate(final Object element)
                    {
                        boolean valid = false;
                        if (element instanceof NamedElement)
                        {
                            final NamedElement modelElement = (NamedElement)element;
                            final StringBuffer packageName =
                                new StringBuffer(
                                    UmlUtilities.getPackageName(
                                        modelElement,
                                        MetafacadeConstants.NAMESPACE_SCOPE_OPERATOR,
                                        true));

                            // - if the model element is a package then the package name will be the name
                            // of the package with its package name
                            if (element instanceof org.eclipse.uml2.Package)
                            {
                                final String name = modelElement.getName();
                                if (StringUtils.isNotBlank(name))
                                {
                                    packageName.append(MetafacadeConstants.NAMESPACE_SCOPE_OPERATOR);
                                    packageName.append(name);
                                }
View Full Code Here

        AndroMDALogger.initialize();
    }

    public Collection getStereotypeNames(Object modelElement)
    {
        NamedElement element = (NamedElement)modelElement;
        Set stereotypes = element.getAppliedStereotypes();
        ArrayList names = new ArrayList();
        for (final Iterator iterator = stereotypes.iterator(); iterator.hasNext();)
        {
            Stereotype stereotype = (Stereotype)iterator.next();
            names.add(stereotype.getName());
View Full Code Here

        for (final Iterator iterator = nodes.iterator(); iterator.hasNext();)
        {
            final Object nextNode = iterator.next();
            if (nextNode instanceof CallOperationAction)
            {
                final Operation operation = ((CallOperationAction)nextNode).getOperation();
                if (operation != null)
                {
                    operations.add(operation);
                }
            }
View Full Code Here

        for (final Iterator iterator = nodes.iterator(); iterator.hasNext();)
        {
            final Object nextNode = iterator.next();
            if (nextNode instanceof CallOperationAction)
            {
                final Operation operation = ((CallOperationAction)nextNode).getOperation();
                if (operation != null)
                {
                    operations.add(operation);
                }
            }
View Full Code Here

        Object modelElement = null;
        for (final Iterator iterator = resourceSet.getResources().iterator();
            iterator.hasNext() && modelElement == null;)
        {
            final Resource resource = (Resource)iterator.next();
            final Package model =
                (Package)EcoreUtil.getObjectByType(
                    resource.getContents(),
                    UML2Package.eINSTANCE.getPackage());
            if (model != null)
            {
                for (final TreeIterator elementIterator = model.eAllContents();
                    elementIterator.hasNext() && modelElement == null;)
                {
                    final Object object = elementIterator.next();
                    if (pred.evaluate(object))
                    {
View Full Code Here

TOP

Related Classes of org.eclipse.uml2.Model

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.