org.eclipse.gef.ui.parts.TreeViewer Java Examples

The following examples show how to use org.eclipse.gef.ui.parts.TreeViewer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProcessDiagramEditor.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @generated BonitaSoft
 */
public Object getAdapter(Class type) {
	if (type == IShowInTargetList.class) {
		return new IShowInTargetList() {
			public String[] getShowInTargetIds() {
				return new String[] { ProjectExplorer.VIEW_ID };
			}
		};
	}

	if (type == IContentOutlinePage.class) {

		TreeViewer viewer = new TreeViewer();
		viewer.setRootEditPart(new DiagramRootTreeEditPart());
		outlinePage = new DiagramOutlinePage(viewer);
		return outlinePage;
	}

	return super.getAdapter(type);
}
 
Example #2
Source File: ERDiagramOutlinePage.java    From ermaster-b with Apache License 2.0 6 votes vote down vote up
private void registerAction(TreeViewer treeViewer,
		ActionRegistry actionRegistry) {
	IAction[] actions = { new CreateIndexAction(treeViewer),
			new CreateSequenceAction(treeViewer),
			new CreateTriggerAction(treeViewer),
			new CreateTablespaceAction(treeViewer),
			new ChangeOutlineViewToPhysicalAction(treeViewer),
			new ChangeOutlineViewToLogicalAction(treeViewer),
			new ChangeOutlineViewToBothAction(treeViewer),
			new ChangeOutlineViewOrderByPhysicalNameAction(treeViewer),
			new ChangeOutlineViewOrderByLogicalNameAction(treeViewer),
			new ChangeNameAction(treeViewer),
	};

	for (IAction action : actions) {
		actionRegistry.registerAction(action);
	}
}
 
Example #3
Source File: ERDiagramOutlinePage.java    From ermasterr with Apache License 2.0 5 votes vote down vote up
private void registerAction(final TreeViewer treeViewer, final ActionRegistry actionRegistry) {
    final IAction[] actions = {new CreateIndexAction(treeViewer), new CreateSequenceAction(treeViewer), new CreateTriggerAction(treeViewer), new CreateTablespaceAction(treeViewer), new ChangeOutlineViewToPhysicalAction(treeViewer), new ChangeOutlineViewToLogicalAction(treeViewer), new ChangeOutlineViewToBothAction(treeViewer), new ChangeOutlineViewOrderByPhysicalNameAction(treeViewer), new ChangeOutlineViewOrderByLogicalNameAction(treeViewer)};

    for (final IAction action : actions) {
        actionRegistry.registerAction(action);
    }
}
 
Example #4
Source File: BonitaContentOutlineTreeView.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected PageRec doCreatePage(IWorkbenchPart part) {
    Object obj = Adapters.adapt(part, IContentOutlinePage.class, false);
    if (obj instanceof IContentOutlinePage && part instanceof DiagramEditor) {
        TreeViewer viewer = new TreeViewer();
        viewer.setRootEditPart(new DiagramRootTreeEditPart());
        IContentOutlinePage page = new BonitaTreeOutlinePage(viewer, (DiagramEditor) part);
        if (page instanceof IPageBookViewPage) {
            initPage((IPageBookViewPage) page);
        }
        page.createControl(getPageBook());
        return new PageRec(part, page);
    }
    return null;
}
 
Example #5
Source File: HideShowAction.java    From olca-app with Mozilla Public License 2.0 5 votes vote down vote up
HideShowAction(ProductSystemGraphEditor editor, TreeViewer viewer, int type) {
	if (type == SHOW) {
		setId(ActionIds.SHOW);
		setText(M.Show);
	} else if (type == HIDE) {
		setId(ActionIds.HIDE);
		setText(M.Hide);
	}
	this.editor = editor;
	this.viewer = viewer;
	this.type = type;
}
 
Example #6
Source File: ERDiagramOutlinePage.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
public ERDiagramOutlinePage(ERDiagram diagram) {
	// GEF�c���[�r���[�����g�p����
	super(new TreeViewer());

	this.viewer = (TreeViewer) this.getViewer();
	this.diagram = diagram;

	this.outlineActionRegistory = new ActionRegistry();
	this.registerAction(this.viewer, outlineActionRegistory);
}
 
Example #7
Source File: ERDiagramOutlinePage.java    From erflute with Apache License 2.0 5 votes vote down vote up
private void registerAction(TreeViewer treeViewer, ActionRegistry actionRegistry) {
    final IAction[] actions = { new CreateIndexAction(treeViewer), new CreateSequenceAction(treeViewer),
            new CreateTriggerAction(treeViewer), new CreateTablespaceAction(treeViewer),
            new ChangeOutlineViewToPhysicalAction(treeViewer), new ChangeOutlineViewToLogicalAction(treeViewer),
            new ChangeOutlineViewToBothAction(treeViewer), new ChangeOutlineViewOrderByPhysicalNameAction(treeViewer),
            new ChangeOutlineViewOrderByLogicalNameAction(treeViewer), new ChangeVirtualDiagramNameAction(treeViewer),
            new DeleteVirtualDiagramAction(treeViewer), };
    for (final IAction action : actions) {
        actionRegistry.registerAction(action);
    }
}
 
Example #8
Source File: ERDiagramOutlinePage.java    From erflute with Apache License 2.0 5 votes vote down vote up
public ERDiagramOutlinePage(ERDiagram diagram) {
    super(new TreeViewer());
    this.viewer = (TreeViewer) getViewer();
    this.diagram = diagram;
    this.outlineActionRegistory = new ActionRegistry();
    registerAction(viewer, outlineActionRegistory);
}
 
Example #9
Source File: AbstractOutlineBaseAction.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
public AbstractOutlineBaseAction(String id, String text, int style,
		TreeViewer treeViewer) {
	super(text, style);
	this.setId(id);

	this.treeViewer = treeViewer;
}
 
Example #10
Source File: ERDiagramOutlinePage.java    From ermasterr with Apache License 2.0 5 votes vote down vote up
public ERDiagramOutlinePage(final ERDiagram diagram) {
    // GEFツリービューワを使用する
    super(new TreeViewer());

    viewer = (TreeViewer) getViewer();
    this.diagram = diagram;

    outlineActionRegistory = new ActionRegistry();
    registerAction(viewer, outlineActionRegistory);
}
 
Example #11
Source File: ChangeOutlineViewOrderByLogicalNameAction.java    From ermaster-b with Apache License 2.0 4 votes vote down vote up
public ChangeOutlineViewOrderByLogicalNameAction(TreeViewer treeViewer) {
	super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer);
	this.setText(ResourceString.getResourceString("label.logical.name"));
}
 
Example #12
Source File: DeleteVirtualDiagramAction.java    From erflute with Apache License 2.0 4 votes vote down vote up
public DeleteVirtualDiagramAction(TreeViewer treeViewer) {
    super(ID, "Delete Virtual Diagram", treeViewer);
}
 
Example #13
Source File: CreateTriggerAction.java    From erflute with Apache License 2.0 4 votes vote down vote up
public CreateTriggerAction(TreeViewer treeViewer) {
    super(ID, DisplayMessages.getMessage("action.title.create.trigger"), treeViewer);
}
 
Example #14
Source File: CreateTriggerAction.java    From ermaster-b with Apache License 2.0 4 votes vote down vote up
public CreateTriggerAction(TreeViewer treeViewer) {
	super(ID, ResourceString
			.getResourceString("action.title.create.trigger"), treeViewer);
}
 
Example #15
Source File: OutlinePage.java    From olca-app with Mozilla Public License 2.0 4 votes vote down vote up
public OutlinePage(ProductSystemNode model) {
	super(new TreeViewer());
	this.model = model;
	initializeActions();
}
 
Example #16
Source File: OutlinePage.java    From olca-app with Mozilla Public License 2.0 4 votes vote down vote up
@Override
protected TreeViewer getViewer() {
	return (TreeViewer) super.getViewer();
}
 
Example #17
Source File: ChangeNameAction.java    From ermaster-b with Apache License 2.0 4 votes vote down vote up
public ChangeNameAction(TreeViewer treeViewer) {
	super(ID,
			ResourceString.getResourceString("action.title.change.name"),
			treeViewer);
}
 
Example #18
Source File: ActionFactory.java    From olca-app with Mozilla Public License 2.0 4 votes vote down vote up
public static IAction show(ProductSystemGraphEditor editor, TreeViewer viewer) {
	return new HideShowAction(editor, viewer, SHOW);
}
 
Example #19
Source File: ActionFactory.java    From olca-app with Mozilla Public License 2.0 4 votes vote down vote up
public static IAction hide(ProductSystemGraphEditor editor, TreeViewer viewer) {
	return new HideShowAction(editor, viewer, HIDE);
}
 
Example #20
Source File: ChangeOutlineViewToLogicalAction.java    From ermaster-b with Apache License 2.0 4 votes vote down vote up
public ChangeOutlineViewToLogicalAction(TreeViewer treeViewer) {
	super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer);
	this.setText(ResourceString
			.getResourceString("action.title.change.mode.to.logical"));
}
 
Example #21
Source File: ChangeOutlineViewOrderByPhysicalNameAction.java    From ermaster-b with Apache License 2.0 4 votes vote down vote up
public ChangeOutlineViewOrderByPhysicalNameAction(TreeViewer treeViewer) {
	super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer);
	this.setText(ResourceString.getResourceString("label.physical.name"));
}
 
Example #22
Source File: CreateTablespaceAction.java    From ermaster-b with Apache License 2.0 4 votes vote down vote up
public CreateTablespaceAction(TreeViewer treeViewer) {
	super(ID, ResourceString
			.getResourceString("action.title.create.tablespace"),
			treeViewer);
}
 
Example #23
Source File: CreateSequenceAction.java    From ermaster-b with Apache License 2.0 4 votes vote down vote up
public CreateSequenceAction(TreeViewer treeViewer) {
	super(ID, ResourceString
			.getResourceString("action.title.create.sequence"), treeViewer);
}
 
Example #24
Source File: CreateIndexAction.java    From ermaster-b with Apache License 2.0 4 votes vote down vote up
public CreateIndexAction(TreeViewer treeViewer) {
	super(ID,
			ResourceString.getResourceString("action.title.create.index"),
			treeViewer);
}
 
Example #25
Source File: AbstractOutlineBaseAction.java    From ermaster-b with Apache License 2.0 4 votes vote down vote up
public AbstractOutlineBaseAction(String id, String text,
		TreeViewer treeViewer) {
	this(id, text, SWT.NONE, treeViewer);
}
 
Example #26
Source File: ChangeOutlineViewToPhysicalAction.java    From ermaster-b with Apache License 2.0 4 votes vote down vote up
public ChangeOutlineViewToPhysicalAction(TreeViewer treeViewer) {
	super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer);
	this.setText(ResourceString
			.getResourceString("action.title.change.mode.to.physical"));
}
 
Example #27
Source File: AbstractOutlineBaseAction.java    From ermaster-b with Apache License 2.0 4 votes vote down vote up
protected TreeViewer getTreeViewer() {
	return treeViewer;
}
 
Example #28
Source File: ChangeOutlineViewToBothAction.java    From ermaster-b with Apache License 2.0 4 votes vote down vote up
public ChangeOutlineViewToBothAction(TreeViewer treeViewer) {
	super(ID, null, IAction.AS_RADIO_BUTTON, treeViewer);
	this.setText(ResourceString
			.getResourceString("action.title.change.mode.to.both"));
}
 
Example #29
Source File: CreateTriggerAction.java    From ermasterr with Apache License 2.0 4 votes vote down vote up
public CreateTriggerAction(final TreeViewer treeViewer) {
    super(ID, ResourceString.getResourceString("action.title.create.trigger"), treeViewer);
}
 
Example #30
Source File: CreateTablespaceAction.java    From ermasterr with Apache License 2.0 4 votes vote down vote up
public CreateTablespaceAction(final TreeViewer treeViewer) {
    super(ID, ResourceString.getResourceString("action.title.create.tablespace"), treeViewer);
}