/** * init * void */ private void init() { list = new ArrayList<IUMLDiagramApplication>(); IExtensionRegistry registry = Platform.getExtensionRegistry(); IConfigurationElement config[] = registry.getConfigurationElementsFor(NEXCORE_TOOL_UML_UI_CORE_EDITOR_EXTENSION); if (config != null) { for (IConfigurationElement element : config) { UMLDiagramApplication editor = new UMLDiagramApplication(); try { editor.setFactory((EditPartFactory) element.createExecutableExtension(EXTENSION_EDIT_PART_FACTORY)); editor.setName(element.getAttribute("name")); editor.setId(element.getAttribute("id")); list.add(editor); } catch (Exception e) { e.printStackTrace(); } } } }
@Override protected void initializeViewer(final Composite parent) { parent.setLayout(new FillLayout()); // Create the viewer using the supplied parent viewer = createGraphicalViewer(); final Control c = viewer.createControl(parent); c.setBackground(ColorConstants.white); // Create and initialize the root edit part final ScalableRootEditPart root = new ScalableRootEditPart(); viewer.setRootEditPart(root); viewer.setEditDomain(new DefaultEditDomain(null)); // Create and initialize the edit part factory final EditPartFactory factory = createEditPartFactory(); viewer.setEditPartFactory(factory); // Register the viewer as a selection provider getSite().setSelectionProvider(viewer); }
protected EditPart createChild(Object model) { EditPartViewer epv = getViewer(); if (epv ==null) { epv = getViewer(); } EditPartFactory epf = epv.getEditPartFactory(); EditPart part = epf.createEditPart(this, model); return part; }
/** * Is called to indicate, that the contents have changed. Causes a complete update of the contents of the outline page. */ public void initContents() { if (_diagramEditor.getDiagramTypeProvider() != null) { Diagram diagram = _diagramEditor.getDiagramTypeProvider().getDiagram(); EditPartFactory treeEditPartFactory = new OutlinePartFactory(); getViewer().setEditPartFactory(treeEditPartFactory); getViewer().setContents(diagram); } }
/** * Is called to indicate, that the contents have changed. Causes a complete * update of the contents of the outline page. */ public void initContents() { EditPartFactory treeEditPartFactory = new PictogramsTreeEditPartFactory(); getViewer().setEditPartFactory(treeEditPartFactory); Diagram diagram = ((DiagramEditorInput) _diagramEditor.getEditorInput()).getDiagram(); getViewer().setContents(diagram); }
private TimelineViewer buildTimeline(Composite composite, Object model, EditPartFactory factory) { TimelineViewer timelineViewer = new TimelineViewer(this); timelineViewer.setEditPartFactory(factory); timelineViewer.setContents(model); timelineViewer.setShowToolbar(false); addTimelineViewer(composite, timelineViewer, -1); timelineViewer.setHorizontalRangeModel(new SecondaryRangeModel(getHorizontalRangeModel())); return timelineViewer; }
/** * Gets default edit part factory. */ protected EditPartFactory getEditPartFactory( ) { if ( editPartFactoy == null ) { editPartFactoy = new GraphicalPartFactory( ); } return editPartFactoy; }
private EditPartFactory getEditPartFactory() { return new EditPartFactory() { @Override public EditPart createEditPart(final EditPart inContext, final Object inModel) { if (inModel instanceof CentralAssociationsModel) { return new RelationsEditPart((CentralAssociationsModel) inModel); } else if (inModel instanceof ItemAdapter) { return ItemEditPart.createItemEditPart((ItemAdapter) inModel, context); } else if (inModel instanceof IRelation) { return new RelationEditPart((IRelation) inModel); } return null; } }; }
/** * @return the factory */ public EditPartFactory getFactory() { return factory; }
/** * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory() */ @Override protected EditPartFactory createDiagramEditPartFactory() { return new ComponentDiagramEditPartFactory(); }
/** * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory() */ @Override protected EditPartFactory createDiagramEditPartFactory() { return new ActivityDiagramEditPartFactory(); }
/** * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory() */ @Override protected EditPartFactory createDiagramEditPartFactory() { return new SequenceDiagramEditPartFactory(); }
/** * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory() */ @Override protected EditPartFactory createDiagramEditPartFactory() { return new ClassDiagramEditPartFactory(); }
/** * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory() */ @Override protected EditPartFactory createDiagramEditPartFactory() { return new UseCaseDiagramEditPartFactory(); }
@Override protected EditPartFactory createEditParFactory() { return new ChartThemeEditPartFactory(); }
public EditPartFactory getEditPartFactory() { if (editPartFactory == null) editPartFactory = new OutlineTreeEditPartFactory(); return editPartFactory; }
public void setEditPartFactory(EditPartFactory editPartFactory) { this.editPartFactory = editPartFactory; getViewer().setEditPartFactory(getEditPartFactory()); }
@Override protected EditPartFactory createEditParFactory() { return new StyleEditPartFactory(); }
/** * @see EditPartViewer#getEditPartFactory() */ public EditPartFactory getEditPartFactory() { return factory; }
/** * @see EditPartViewer#setEditPartFactory(org.eclipse.gef.EditPartFactory) */ public void setEditPartFactory(EditPartFactory factory) { this.factory = factory; }
/** * @generated */ public final EditPartFactory getFactory() { return factory; }
/** * @generated */ protected void setFactory(EditPartFactory factory) { this.factory = factory; }
@Override protected EditPartFactory createEditPartFactory() { return new SequenceDiagramEditPartFactory(); }
@Override protected EditPartFactory createEditPartFactory() { return new ContourModelEditPartFactory(); }
protected EditPartFactory getEditPartFactory( ) { return new LibraryMasterPageGraphicalPartFactory(); }
protected EditPartFactory getEditPartFactory( ) { return new LibraryGraphicalPartFactory( ); }
/** * @return the factory */ public EditPartFactory getFactory();
/** * @param factory * the factory to set */ public void setFactory(EditPartFactory factory) { this.factory = factory; }
/** * 에디트 파트 팩토리를 생성한다. * * @return */ protected abstract EditPartFactory createDiagramEditPartFactory();
/** * Creates the {@code EditPartFactory} to be used by the viewer in order to create * {@code EditPart}s for elements of the model. This method is called by * {@link #initializeViewer(Composite)}, and the resulting factory is used during the lifetime of * the view part. * * @return the edit part factory the was created. */ protected abstract EditPartFactory createEditPartFactory();
protected abstract EditPartFactory createEditParFactory();