use of org.eclipse.wst.xsd.ui.internal.adapters.CategoryAdapter in project webtools.sourceediting by eclipse.
the class XSDSchemaEditPart method getCategoryEditPart.
protected EditPart getCategoryEditPart(int kind) {
for (Iterator j = getChildren().iterator(); j.hasNext(); ) {
EditPart row = (EditPart) j.next();
for (Iterator i = row.getChildren().iterator(); i.hasNext(); ) {
EditPart editPart = (EditPart) i.next();
if (editPart instanceof CategoryEditPart) {
CategoryEditPart categoryEditPart = (CategoryEditPart) editPart;
CategoryAdapter adapter = (CategoryAdapter) categoryEditPart.getModel();
if (adapter.getGroupType() == kind) {
return editPart;
}
}
}
}
return null;
}
use of org.eclipse.wst.xsd.ui.internal.adapters.CategoryAdapter in project webtools.sourceediting by eclipse.
the class CategoryEditPart method getModelChildren.
protected List getModelChildren() {
CategoryAdapter adapter = (CategoryAdapter) getModel();
List children = new ArrayList(Arrays.asList(adapter.getAllChildren()));
return children;
}
use of org.eclipse.wst.xsd.ui.internal.adapters.CategoryAdapter in project webtools.sourceediting by eclipse.
the class ADTContentOutlineRefreshJob method doRefresh.
private void doRefresh(final IADTObject adtObject) {
final Display display = PlatformUI.getWorkbench().getDisplay();
display.asyncExec(new Runnable() {
public void run() {
boolean isValidViewer = viewer != null && !viewer.getControl().isDisposed();
if (isValidViewer) {
viewer.refresh(adtObject);
if (!(adtObject instanceof CategoryAdapter)) {
viewer.reveal(adtObject);
}
}
}
});
}
Aggregations