| // ***************************************************************************** |
| // Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency |
| // 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: |
| // Pierre Allard - initial API and implementation |
| // Regent L'Archeveque |
| // Sebastien Gemme |
| // |
| // SPDX-License-Identifier: EPL-1.0 |
| // ***************************************************************************** |
| @GenModel(prefix="ApogyCommonTopologyUIViewer", |
| childCreationExtenders="true", |
| extensibleProviderFactory="true", |
| multipleEditorPages="false", |
| copyrightText="******************************************************************************* |
| Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency |
| 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: |
| Pierre Allard - initial API and implementation |
| Regent L'Archeveque, |
| Sebastien Gemme |
| |
| SPDX-License-Identifier: EPL-1.0 |
| *******************************************************************************", |
| modelName="ApogyCommonTopologyUIViewer", |
| complianceLevel="8.0") |
| @GenModel(dynamicTemplates="true", templateDirectory="platform:/plugin/org.eclipse.apogy.common.emf.codegen/templates") |
| @GenModel(modelDirectory="/org.eclipse.apogy.common.topology.ui.viewer/src-gen") |
| @GenModel(editDirectory="/org.eclipse.apogy.common.topology.ui.viewer.edit/src-gen") |
| |
| package org.eclipse.apogy.common.topology.ui.viewer |
| |
| import org.eclipse.apogy.common.topology.ui.NodeSelection |
| import org.eclipse.apogy.common.Apogy |
| |
| // Types |
| |
| type ITopologyViewer wraps org.eclipse.apogy.common.topology.ui.viewer.ITopologyViewer |
| |
| /** |
| * A register of Topology Viewer. It keeps track of Node Selection made and mouse button clicked. |
| */ |
| @Apogy(hasCustomClass="true") |
| class TopologyViewerRegistry |
| { |
| /** |
| * The list of topology viewers registered. |
| */ |
| ITopologyViewer[] iTopologyViewers |
| |
| /** |
| * The last NodeSelection that was raised by a topology viewer registered. |
| */ |
| refers transient NodeSelection latestNodeSelection |
| |
| /** |
| * The lastest mouse button clicked in one of the viewer. |
| */ |
| MouseButton latestMouseButtonCliked |
| |
| /** |
| * Adds a topology viewer to this registry. |
| * @param iTopologyViewer The topology viewer to register. |
| */ |
| op void registerITopologyViewer(ITopologyViewer iTopologyViewer) |
| |
| /** |
| * Removes a topology viewer to this registry. |
| * @param iTopologyViewer The topology viewer to unregister. |
| */ |
| op void unRegisterITopologyViewer(ITopologyViewer iTopologyViewer) |
| } |
| |
| /** |
| * The mouse buttons. |
| */ |
| enum MouseButton |
| { |
| LEFT = 0 |
| MIDDLE = 1 |
| RIGHT = 2 |
| } |