use of org.eclipse.wst.xsd.ui.internal.design.figures.IExtendedFigureFactory in project webtools.sourceediting by eclipse.
the class ConnectableEditPart method getExtendedFigureFactory.
public IExtendedFigureFactory getExtendedFigureFactory() {
EditPartFactory factory = getViewer().getEditPartFactory();
// $NON-NLS-1$
Assert.isTrue(factory instanceof IExtendedFigureFactory, "EditPartFactory must be an instanceof of IExtendedFigureFactory");
return (IExtendedFigureFactory) factory;
}
use of org.eclipse.wst.xsd.ui.internal.design.figures.IExtendedFigureFactory in project webtools.sourceediting by eclipse.
the class XSDEditorConfiguration method updateList.
private void updateList(String ID) {
IConfigurationElement[] xsdEditorExtensionList = Platform.getExtensionRegistry().getConfigurationElementsFor(ID);
boolean definedExtensionsExist = (xsdEditorExtensionList != null && xsdEditorExtensionList.length > 0);
if (definedExtensionsExist) {
for (int i = 0; i < xsdEditorExtensionList.length; i++) {
XSDEditorExtensionProperties properties = new XSDEditorExtensionProperties();
definedExtensionsList.add(properties);
IConfigurationElement element = xsdEditorExtensionList[i];
String adapterFactoryClass = element.getAttribute(ADAPTERFACTORY);
if (adapterFactoryClass != null) {
Object object = loadClass(element, adapterFactoryClass);
XSDAdapterFactory adapterFactory = null;
if (object instanceof XSDAdapterFactory) {
adapterFactory = (XSDAdapterFactory) object;
properties.setAdapterFactory(adapterFactory);
}
}
String figureFactoryClass = element.getAttribute(FIGUREFACTORY);
if (figureFactoryClass != null) {
Object object = loadClass(element, figureFactoryClass);
IExtendedFigureFactory figureFactory = null;
if (object instanceof IExtendedFigureFactory) {
figureFactory = (IExtendedFigureFactory) object;
properties.setFigureFactoryList(figureFactory);
}
}
IConfigurationElement[] toolbarActions = element.getChildren(TOOLBARACTION);
List actionList = new ArrayList();
if (toolbarActions != null) {
for (int j = 0; j < toolbarActions.length; j++) {
IConfigurationElement actionElement = toolbarActions[j];
String actionClass = actionElement.getAttribute(CLASSNAME);
IXSDToolbarAction action = null;
if (actionClass != null) {
Object object = loadClass(actionElement, actionClass);
if (object instanceof IXSDToolbarAction) {
action = (IXSDToolbarAction) object;
actionList.add(action);
}
}
}
}
properties.setActionList(actionList);
String editPartFactoryClass = element.getAttribute(EDITPARTFACTORY);
if (editPartFactoryClass != null) {
Object object = loadClass(element, editPartFactoryClass);
EditPartFactory editPartFactory = null;
if (object instanceof EditPartFactory) {
editPartFactory = (EditPartFactory) object;
properties.setEditPartFactoryList(editPartFactory);
}
}
}
}
}
Aggregations