use of org.eclipse.wst.xsd.ui.internal.adt.outline.ITreeElement in project webtools.sourceediting by eclipse.
the class BoxEditPart method createFigure.
protected IFigure createFigure() {
BoxFigure figure = new BoxFigure();
LineBorder boxLineBorder = new LineBorder(1);
figure.setBorder(boxLineBorder);
ToolbarLayout toolbarLayout = new ToolbarLayout();
toolbarLayout.setStretchMinorAxis(true);
figure.setLayoutManager(toolbarLayout);
// we should organize ITreeElement and integrate it with the facade
if (getModel() instanceof ITreeElement) {
figure.getNameLabel().setIcon(((ITreeElement) getModel()).getImage());
}
return figure;
}
use of org.eclipse.wst.xsd.ui.internal.adt.outline.ITreeElement in project webtools.sourceediting by eclipse.
the class XSDSimpleTypeDefinitionAdapter method getChildren.
public ITreeElement[] getChildren() {
List adapterList = new ArrayList();
XSDSimpleTypeDefinition xsdSimpleTypeDefinition = (XSDSimpleTypeDefinition) target;
List list = xsdSimpleTypeDefinition.getEnumerationFacets();
populateAdapterList(list, adapterList);
return (ITreeElement[]) adapterList.toArray(new ITreeElement[0]);
}
use of org.eclipse.wst.xsd.ui.internal.adt.outline.ITreeElement in project webtools.sourceediting by eclipse.
the class XSDModelGroupDefinitionAdapter method getChildren.
public ITreeElement[] getChildren() {
XSDModelGroupDefinition def = (XSDModelGroupDefinition) target;
List list = new ArrayList();
// entries in the tree viewer for the same item
if (!def.isModelGroupDefinitionReference()) {
XSDModelGroup xsdModelGroup = ((XSDModelGroupDefinition) target).getResolvedModelGroupDefinition().getModelGroup();
if (xsdModelGroup != null)
list.add(xsdModelGroup);
}
List adapterList = new ArrayList();
populateAdapterList(list, adapterList);
return (ITreeElement[]) adapterList.toArray(new ITreeElement[0]);
}
use of org.eclipse.wst.xsd.ui.internal.adt.outline.ITreeElement in project webtools.sourceediting by eclipse.
the class XSDRedefineAdapter method getChildren.
public ITreeElement[] getChildren() {
XSDRedefine xsdRedefine = (XSDRedefine) getTarget();
children = new ArrayList();
if (attributesCategory != null) {
List attributes = getCategoryChildren(CategoryAdapter.ATTRIBUTES);
List groups = getCategoryChildren(CategoryAdapter.GROUPS);
List types = getCategoryChildren(CategoryAdapter.TYPES);
attributesCategory.setChildren(attributes);
attributesCategory.setAllChildren(attributes);
typesCategory.setChildren(types);
typesCategory.setAllChildren(types);
groupsCategory.setChildren(groups);
groupsCategory.setAllChildren(groups);
} else {
createCategoryAdapters(xsdRedefine);
}
children.add(attributesCategory);
children.add(typesCategory);
children.add(groupsCategory);
return (ITreeElement[]) children.toArray(new ITreeElement[0]);
}
use of org.eclipse.wst.xsd.ui.internal.adt.outline.ITreeElement in project webtools.sourceediting by eclipse.
the class XSDSchemaDirectiveAdapter method getChildren.
public ITreeElement[] getChildren() {
List list = new ArrayList();
List adapterList = new ArrayList();
populateAdapterList(list, adapterList);
return (ITreeElement[]) adapterList.toArray(new ITreeElement[0]);
}
Aggregations