001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.uml.core.eventframework;
043:
044: /**
045: * @author sumitabhk
046: *
047: */
048: public class EventDispatchNameKeeper {
049:
050: public static int EDT_WORKSPACE_KIND = 0;
051: public static int EDT_DRAWINGAREA_KIND = 1;
052: public static int EDT_PROJECTTREE_KIND = 2;
053: public static int EDT_ELEMENTMODIFIED_KIND = 3;
054: public static int EDT_EDITCTRL_KIND = 4;
055: public static int EDT_PROJECTTREEDIALOGFILTER_KIND = 5;
056: public static int EDT_ADDIN_KIND = 6;
057: public static int EDT_MESSAGING_KIND = 7;
058: public static int EDT_VBA_KIND = 8;
059: public static int EDT_RELATION_KIND = 9;
060: public static int EDT_ELEMENT_LIFETIME_KIND = 10;
061: public static int EDT_CLASSIFIER_KIND = 11;
062: public static int EDT_COREPRODUCT_KIND = 12;
063: public static int EDT_PREFERENCEMANAGER_KIND = 13;
064: public static int EDT_SCM_KIND = 14;
065: public static int EDT_DYNAMICS_KIND = 15;
066: public static int EDT_STRUCTURE_KIND = 16;
067: public static int EDT_ACTIVITIES_KIND = 17;
068: public static int EDT_ROUNDTRIP_KIND = 18;
069: public static int EDT_WORKSPACE_KIND_DP = 19;
070:
071: public static String dispatcherName(int type) {
072: String typeName = "";
073:
074: if (type == EDT_WORKSPACE_KIND)
075: typeName = "WorkspaceDispatcher";
076:
077: else if (type == EDT_WORKSPACE_KIND_DP)
078: typeName = "WorkspaceDispatcherDP";
079:
080: else if (type == EDT_DRAWINGAREA_KIND)
081: typeName = "DrawingAreaDispatcher";
082:
083: else if (type == EDT_PROJECTTREE_KIND)
084: typeName = "ProjectTreeDispatcher";
085:
086: else if (type == EDT_ELEMENTMODIFIED_KIND)
087: typeName = "ElementChangeDispatcher";
088:
089: else if (type == EDT_EDITCTRL_KIND)
090: typeName = "EditCtrlDispatcher";
091:
092: else if (type == EDT_PROJECTTREEDIALOGFILTER_KIND)
093: typeName = "ProjectTreeFilterDialogDispatcher";
094:
095: else if (type == EDT_ADDIN_KIND)
096: typeName = "AddInDispatcher";
097:
098: else if (type == EDT_MESSAGING_KIND)
099: typeName = "UMLMessagingDispatcher";
100:
101: else if (type == EDT_VBA_KIND)
102: typeName = "VBAIntegrationDispatcher";
103:
104: else if (type == EDT_RELATION_KIND)
105: typeName = "RelationValidatorEventDispatcher";
106:
107: else if (type == EDT_ELEMENT_LIFETIME_KIND)
108: typeName = "LifeTimeDispatcher";
109:
110: else if (type == EDT_CLASSIFIER_KIND)
111: typeName = "ClassifierDispatcher";
112:
113: else if (type == EDT_COREPRODUCT_KIND)
114: typeName = "CoreProductDispatcher";
115:
116: else if (type == EDT_PREFERENCEMANAGER_KIND)
117: typeName = "PreferenceManager";
118:
119: else if (type == EDT_SCM_KIND)
120: typeName = "SCM";
121:
122: else if (type == EDT_DYNAMICS_KIND)
123: typeName = "DynamicsDispatcher";
124:
125: else if (type == EDT_ACTIVITIES_KIND)
126: typeName = "ActivitiesDispatcher";
127:
128: else if (type == EDT_STRUCTURE_KIND)
129: typeName = "StructureDispatcher";
130:
131: else if (type == EDT_ROUNDTRIP_KIND)
132: typeName = "RoundTripDispatcher";
133:
134: return typeName;
135: }
136:
137: public static String workspaceName() {
138: return dispatcherName(EventDispatchNameKeeper.EDT_WORKSPACE_KIND);
139: }
140:
141: public static String drawingAreaName() {
142: return dispatcherName(EventDispatchNameKeeper.EDT_DRAWINGAREA_KIND);
143: }
144:
145: public static String projectTreeName() {
146: return dispatcherName(EventDispatchNameKeeper.EDT_PROJECTTREE_KIND);
147: }
148:
149: public static String modifiedName() {
150: return dispatcherName(EventDispatchNameKeeper.EDT_ELEMENTMODIFIED_KIND);
151: }
152:
153: public static String editCtrlName() {
154: return dispatcherName(EventDispatchNameKeeper.EDT_EDITCTRL_KIND);
155: }
156:
157: public static String projectTreeFilterDialogName() {
158: return dispatcherName(EventDispatchNameKeeper.EDT_PROJECTTREEDIALOGFILTER_KIND);
159: }
160:
161: public static String addInName() {
162: return dispatcherName(EventDispatchNameKeeper.EDT_ADDIN_KIND);
163: }
164:
165: public static String messagingName() {
166: return dispatcherName(EventDispatchNameKeeper.EDT_MESSAGING_KIND);
167: }
168:
169: public static String vBA() {
170: return dispatcherName(EventDispatchNameKeeper.EDT_VBA_KIND);
171: }
172:
173: public static String relation() {
174: return dispatcherName(EventDispatchNameKeeper.EDT_RELATION_KIND);
175: }
176:
177: public static String lifeTime() {
178: return dispatcherName(EventDispatchNameKeeper.EDT_ELEMENT_LIFETIME_KIND);
179: }
180:
181: public static String classifier() {
182: return dispatcherName(EventDispatchNameKeeper.EDT_CLASSIFIER_KIND);
183: }
184:
185: public static String coreProduct() {
186: return dispatcherName(EventDispatchNameKeeper.EDT_COREPRODUCT_KIND);
187: }
188:
189: public static String preferenceManager() {
190: return dispatcherName(EventDispatchNameKeeper.EDT_PREFERENCEMANAGER_KIND);
191: }
192:
193: public static String SCM() {
194: return dispatcherName(EventDispatchNameKeeper.EDT_SCM_KIND);
195: }
196:
197: public static String dynamics() {
198: return dispatcherName(EventDispatchNameKeeper.EDT_DYNAMICS_KIND);
199: }
200:
201: public static String activities() {
202: return dispatcherName(EventDispatchNameKeeper.EDT_ACTIVITIES_KIND);
203: }
204:
205: public static String structure() {
206: return dispatcherName(EventDispatchNameKeeper.EDT_STRUCTURE_KIND);
207: }
208:
209: public static String roundTrip() {
210: return dispatcherName(EventDispatchNameKeeper.EDT_ROUNDTRIP_KIND);
211: }
212:
213: public static String workspaceNameDP() {
214: return dispatcherName(EventDispatchNameKeeper.EDT_WORKSPACE_KIND_DP);
215: }
216:
217: }
|