X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.g3d%2Fsrc%2Forg%2Fsimantics%2Fproconf%2Fg3d%2Fbase%2FEditorContribution.java;fp=org.simantics.g3d%2Fsrc%2Forg%2Fsimantics%2Fproconf%2Fg3d%2Fbase%2FEditorContribution.java;h=176408bd8071a8e74e9441ee12e283273e807121;hb=10f144a2bb2d7bec98b812b83acecb333fd098ea;hp=0000000000000000000000000000000000000000;hpb=3055b543aa5afc0cca4bb3b341704e7c5103fa6a;p=simantics%2F3d.git diff --git a/org.simantics.g3d/src/org/simantics/proconf/g3d/base/EditorContribution.java b/org.simantics.g3d/src/org/simantics/proconf/g3d/base/EditorContribution.java new file mode 100644 index 00000000..176408bd --- /dev/null +++ b/org.simantics.g3d/src/org/simantics/proconf/g3d/base/EditorContribution.java @@ -0,0 +1,80 @@ +/******************************************************************************* + * Copyright (c) 2007- VTT Technical Research Centre of Finland. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.proconf.g3d.base; + +import java.util.Collection; + +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.swt.widgets.Composite; +import org.simantics.db.Graph; +import org.simantics.proconf.g3d.actions.ContextAction; +import org.simantics.proconf.g3d.common.StructuredResourceSelection; + +public interface EditorContribution { + + public String getName(); + + /** + * Initializes the contribution + * @param graph + */ + void initialize(Graph graph); + + + /** + * Allows contribution to modify current ui. + * @param parent + */ + void createControl(Composite parent); + + /** + * Removes all changes created by createControl + */ + void disposeControl(); + + /** + * Fills context menu + * @param graph + * @param manager + */ + void fillContextMenu(Graph graph, IMenuManager manager, StructuredResourceSelection selection); + + /** + * Fills toolbar + * + * @param manager + */ + void fillLocalToolBar(IToolBarManager manager); + + /** + * Fills menumanager + * + * + * @param manager + */ + void fillLocalPullDown(IMenuManager manager); + + + /** + * Returns context dependent actions + * @return + */ + Collection getActions(); + + /** + * + */ + void run(); + + void dispose(); + +}