Package org.apache.felix.sigil.common.model

Examples of org.apache.felix.sigil.common.model.ICompoundModelElement


            });
        }

        if (e instanceof ICompoundModelElement)
        {
            ICompoundModelElement c = (ICompoundModelElement) e;
            IModelElement[] ch = c.children();
            for (IModelElement ee : ch)
            {
                findUsers(ee, users);
            }
        }
View Full Code Here


        {
            reqs.add((IRequirementModelElement) element);
        }
        else if (element instanceof ICompoundModelElement)
        {
            ICompoundModelElement compound = (ICompoundModelElement) element;
            compound.visit(new IModelWalker()
            {
                public boolean visit(IModelElement element)
                {
                    if (element instanceof IRequirementModelElement)
                    {
View Full Code Here

        {
            public Object[] getChildren(Object parentElement)
            {
                if (parentElement instanceof ICompoundModelElement)
                {
                    ICompoundModelElement model = (ICompoundModelElement) parentElement;
                    return model.children();
                }

                return null;
            }

            public Object getParent(Object element)
            {
                if (element instanceof IModelElement)
                {
                    IModelElement model = (IModelElement) element;
                    return model.getParent();
                }

                return null;
            }

            public boolean hasChildren(Object element)
            {
                if (element instanceof ICompoundModelElement)
                {
                    ICompoundModelElement model = (ICompoundModelElement) element;
                    return model.children().length > 0;
                }
                return false;
            }

            public Object[] getElements(Object inputElement)
            {
                IBundleRepository rep = (IBundleRepository) inputElement;
                IRepositoryModel model = SigilCore.getRepositoryModel(rep);
                if ( model.getProblem() == null ) {
                    return getBundles(rep);
                }
                else {
                    return new Object[] { model.getProblem() };
                }
            }
        });

        treeViewer.setComparator(new ModelElementComparator());
View Full Code Here

TOP

Related Classes of org.apache.felix.sigil.common.model.ICompoundModelElement

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.