/******************************************************************************* * 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(); }