| 1 | /********************************************************************** |
| 2 | * Copyright (c) 2005, 2013 IBM Corporation, Ericsson |
| 3 | * All rights reserved. This program and the accompanying materials |
| 4 | * are made available under the terms of the Eclipse Public License v1.0 |
| 5 | * which accompanies this distribution, and is available at |
| 6 | * http://www.eclipse.org/legal/epl-v10.html |
| 7 | * |
| 8 | * Contributors: |
| 9 | * IBM - Initial API and implementation |
| 10 | * Bernd Hufmann - Updated for TMF |
| 11 | **********************************************************************/ |
| 12 | |
| 13 | package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider; |
| 14 | |
| 15 | /** |
| 16 | * Interface for providing a graph node supporter. |
| 17 | * |
| 18 | * Sequence Diagram loaders which implement this class provide the actions for finding or filtering the sequence |
| 19 | * diagram. This interface also allow the implementor to set which action/feature are supported |
| 20 | * |
| 21 | * Action provider are associated to a Sequence Diagram SDWidget calling <code>SDViewer.setSDFindProvider()</code> or |
| 22 | * <code>SDViewer.setSDFilterProvider()</code>. |
| 23 | * |
| 24 | * @version 1.0 |
| 25 | * @author sveyrier |
| 26 | * |
| 27 | */ |
| 28 | public interface ISDGraphNodeSupporter { |
| 29 | |
| 30 | // ------------------------------------------------------------------------ |
| 31 | // Constants |
| 32 | // ------------------------------------------------------------------------ |
| 33 | |
| 34 | /** |
| 35 | * Lifeline support ID |
| 36 | */ |
| 37 | static int LIFELINE = 0; |
| 38 | /** |
| 39 | * Synchronous message support ID |
| 40 | */ |
| 41 | static int SYNCMESSAGE = 1; |
| 42 | /** |
| 43 | * Synchronous message return support ID |
| 44 | */ |
| 45 | static int SYNCMESSAGERETURN = 2; |
| 46 | /** |
| 47 | * Asynchronous message support ID |
| 48 | */ |
| 49 | static int ASYNCMESSAGE = 3; |
| 50 | /** |
| 51 | * Asynchronous message return support ID |
| 52 | */ |
| 53 | static int ASYNCMESSAGERETURN = 4; |
| 54 | /** |
| 55 | * Stop support ID |
| 56 | */ |
| 57 | static int STOP = 5; |
| 58 | |
| 59 | // ------------------------------------------------------------------------ |
| 60 | // Methods |
| 61 | // ------------------------------------------------------------------------ |
| 62 | |
| 63 | /** |
| 64 | * Return true to enable this options, false otherwise |
| 65 | * |
| 66 | * @param nodeType |
| 67 | * The integer value matching the type of the node |
| 68 | * @return true to enable this options, false otherwise |
| 69 | */ |
| 70 | boolean isNodeSupported(int nodeType); |
| 71 | |
| 72 | /** |
| 73 | * Return the name to use in dialogs Not called if isNodeSupported return |
| 74 | * false |
| 75 | * |
| 76 | * @param nodeType |
| 77 | * The integer value matching the type of the node |
| 78 | * @param loaderClassName |
| 79 | * The name of the loader class |
| 80 | * @return the name to use in dialogs |
| 81 | */ |
| 82 | String getNodeName(int nodeType, String loaderClassName); |
| 83 | } |