use of org.eclipse.wst.xsd.ui.internal.adapters.XSDSchemaAdapter in project webtools.sourceediting by eclipse.
the class XSDSchemaEditPart method getModelChildren.
protected List getModelChildren() {
XSDSchemaAdapter schemaAdapter = (XSDSchemaAdapter) getModel();
List list = new ArrayList();
// Bug 103870: undo blanks out schema view
// schemaAdapter.updateCategories();
List templist = new ArrayList();
templist.add(schemaAdapter.getCategory(CategoryAdapter.DIRECTIVES));
Holder holder = new Holder(templist);
list.add(holder);
templist = new ArrayList();
templist.add(schemaAdapter.getCategory(CategoryAdapter.ELEMENTS));
templist.add(schemaAdapter.getCategory(CategoryAdapter.TYPES));
holder = new Holder(templist);
list.add(holder);
templist = new ArrayList();
templist.add(schemaAdapter.getCategory(CategoryAdapter.ATTRIBUTES));
templist.add(schemaAdapter.getCategory(CategoryAdapter.GROUPS));
holder = new Holder(templist);
list.add(holder);
return list;
}
use of org.eclipse.wst.xsd.ui.internal.adapters.XSDSchemaAdapter in project webtools.sourceediting by eclipse.
the class XSDSchemaEditPart method refreshVisuals.
protected void refreshVisuals() {
super.refreshVisuals();
LineBorder border = (LineBorder) outer.getBorder();
border.setWidth(isSelected ? 2 : 1);
headingFigure.setSelected(isSelected);
XSDSchemaAdapter schemaAdapter = (XSDSchemaAdapter) getModel();
Image image = schemaAdapter.getImage();
headingFigure.getLabel().setIcon(image);
if (image != null) {
headingFigure.getLabel().setIcon(XSDCommonUIUtils.getUpdatedImage((XSDConcreteComponent) schemaAdapter.getTarget(), image, false));
}
outer.repaint();
String targetNamespaceValue = ((XSDSchema) ((XSDSchemaAdapter) getModel()).getTarget()).getTargetNamespace();
targetNamespaceValue = TextProcessor.process(targetNamespaceValue);
if (targetNamespaceValue == null || targetNamespaceValue.length() == 0) {
targetNamespaceValue = Messages._UI_GRAPH_XSDSCHEMA_NO_NAMESPACE;
}
// $NON-NLS-1$
headingFigure.getLabel().setText(Messages._UI_GRAPH_XSDSCHEMA + " : " + targetNamespaceValue);
}
Aggregations