use of org.eclipse.wst.xsd.ui.internal.design.editparts.XSDEditPartFactory in project webtools.sourceediting by eclipse.
the class XSDGraphViewerDialog method createDialogArea.
protected Control createDialogArea(Composite parent) {
viewer = new ScrollingGraphicalViewer();
Composite c = (Composite) super.createDialogArea(parent);
if (isHighContrast) {
c.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
} else {
c.setBackground(ColorConstants.white);
}
c.setLayout(new FillLayout());
RootEditPart root = new RootEditPart();
viewer.setRootEditPart(root);
viewer.createControl(c);
// The graphical viewer tool tip processing creates an extra shell which
// interferes with the PopupDialog's deactivation logic.
removeMouseListeners(viewer.getControl());
if (isHighContrast) {
viewer.getControl().setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
} else {
viewer.getControl().setBackground(ColorConstants.white);
}
EditPartFactory editPartFactory = new XSDEditPartFactory(new TypeVizFigureFactory());
viewer.setEditPartFactory(editPartFactory);
RootContentEditPart rootContentEditPart = new RootContentEditPart();
rootContentEditPart.setModel(model);
viewer.setContents(rootContentEditPart);
getShell().addControlListener(moveListener);
return c;
}
Aggregations