Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 52848 Details for
Bug 80318
[Plan Item] Class Diagrams
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Class diagram in the form of a patch
patch_80318_classD_1.txt (text/plain), 1.30 MB, created by
Michael Golubev
on 2006-10-27 11:43:47 EDT
(
hide
)
Description:
Class diagram in the form of a patch
Filename:
MIME Type:
Creator:
Michael Golubev
Created:
2006-10-27 11:43:47 EDT
Size:
1.30 MB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.uml2.diagram.clazz >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/ParseException.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/ParseException.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/ParseException.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/ParseException.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,205 @@ >+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.instance; >+ >+import org.eclipse.uml2.diagram.parser.ExternalParserException; >+ >+/** >+ * This exception is thrown when parse errors are encountered. >+ * You can explicitly create objects of this exception type by >+ * calling the method generateParseException in the generated >+ * parser. >+ * >+ * You can modify this class to customize your error reporting >+ * mechanisms so long as you retain the public fields. >+ */ >+public class ParseException extends ExternalParserException { >+ >+ /** >+ * This constructor is used by the method "generateParseException" >+ * in the generated parser. Calling this constructor generates >+ * a new object of this type with the fields "currentToken", >+ * "expectedTokenSequences", and "tokenImage" set. The boolean >+ * flag "specialConstructor" is also set to true to indicate that >+ * this constructor was used to create this object. >+ * This constructor calls its super class with the empty string >+ * to force the "toString" method of parent class "Throwable" to >+ * print the error message in the form: >+ * ParseException: <result of getMessage> >+ */ >+ public ParseException(Token currentTokenVal, >+ int[][] expectedTokenSequencesVal, >+ String[] tokenImageVal >+ ) >+ { >+ super(""); >+ specialConstructor = true; >+ currentToken = currentTokenVal; >+ expectedTokenSequences = expectedTokenSequencesVal; >+ tokenImage = tokenImageVal; >+ } >+ >+ /** >+ * The following constructors are for use by you for whatever >+ * purpose you can think of. Constructing the exception in this >+ * manner makes the exception behave in the normal way - i.e., as >+ * documented in the class "Throwable". The fields "errorToken", >+ * "expectedTokenSequences", and "tokenImage" do not contain >+ * relevant information. The JavaCC generated code does not use >+ * these constructors. >+ */ >+ >+ public ParseException() { >+ super(); >+ specialConstructor = false; >+ } >+ >+ public ParseException(String message) { >+ super(message); >+ specialConstructor = false; >+ } >+ >+ /** >+ * This variable determines which constructor was used to create >+ * this object and thereby affects the semantics of the >+ * "getMessage" method (see below). >+ */ >+ protected boolean specialConstructor; >+ >+ /** >+ * This is the last token that has been consumed successfully. If >+ * this object has been created due to a parse error, the token >+ * followng this token will (therefore) be the first error token. >+ */ >+ public Token currentToken; >+ >+ /** >+ * Each entry in this array is an array of integers. Each array >+ * of integers represents a sequence of tokens (by their ordinal >+ * values) that is expected at this point of the parse. >+ */ >+ public int[][] expectedTokenSequences; >+ >+ /** >+ * This is a reference to the "tokenImage" array of the generated >+ * parser within which the parse error occurred. This array is >+ * defined in the generated ...Constants interface. >+ */ >+ public String[] tokenImage; >+ >+ /** >+ * This method has the standard behavior when this object has been >+ * created using the standard constructors. Otherwise, it uses >+ * "currentToken" and "expectedTokenSequences" to generate a parse >+ * error message and returns it. If this object has been created >+ * due to a parse error, and you do not catch it (it gets thrown >+ * from the parser), then this method is called during the printing >+ * of the final stack trace, and hence the correct error message >+ * gets displayed. >+ */ >+ public String getMessage() { >+ if (!specialConstructor) { >+ return super.getMessage(); >+ } >+ String expected = ""; >+ int maxSize = 0; >+ for (int i = 0; i < expectedTokenSequences.length; i++) { >+ if (maxSize < expectedTokenSequences[i].length) { >+ maxSize = expectedTokenSequences[i].length; >+ } >+ for (int j = 0; j < expectedTokenSequences[i].length; j++) { >+ expected += tokenImage[expectedTokenSequences[i][j]] + " "; >+ } >+ if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { >+ expected += "..."; >+ } >+ expected += eol + " "; >+ } >+ String retval = "Encountered \""; >+ Token tok = currentToken.next; >+ for (int i = 0; i < maxSize; i++) { >+ if (i != 0) retval += " "; >+ if (tok.kind == 0) { >+ retval += tokenImage[0]; >+ break; >+ } >+ retval += add_escapes(tok.image); >+ tok = tok.next; >+ } >+ retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; >+ retval += "." + eol; >+ if (expectedTokenSequences.length == 1) { >+ retval += "Was expecting:" + eol + " "; >+ } else { >+ retval += "Was expecting one of:" + eol + " "; >+ } >+ retval += expected; >+ return retval; >+ } >+ >+ /** >+ * The end of line string for this machine. >+ */ >+ protected String eol = System.getProperty("line.separator", "\n"); >+ >+ /** >+ * Used to convert raw characters to their escaped version >+ * when these raw version cannot be used as part of an ASCII >+ * string literal. >+ */ >+ protected String add_escapes(String str) { >+ StringBuffer retval = new StringBuffer(); >+ char ch; >+ for (int i = 0; i < str.length(); i++) { >+ switch (str.charAt(i)) >+ { >+ case 0 : >+ continue; >+ case '\b': >+ retval.append("\\b"); >+ continue; >+ case '\t': >+ retval.append("\\t"); >+ continue; >+ case '\n': >+ retval.append("\\n"); >+ continue; >+ case '\f': >+ retval.append("\\f"); >+ continue; >+ case '\r': >+ retval.append("\\r"); >+ continue; >+ case '\"': >+ retval.append("\\\""); >+ continue; >+ case '\'': >+ retval.append("\\\'"); >+ continue; >+ case '\\': >+ retval.append("\\\\"); >+ continue; >+ default: >+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { >+ String s = "0000" + Integer.toString(ch, 16); >+ retval.append("\\u" + s.substring(s.length() - 4, s.length())); >+ } else { >+ retval.append(ch); >+ } >+ continue; >+ } >+ } >+ return retval.toString(); >+ } >+ >+} >Index: .options >=================================================================== >RCS file: .options >diff -N .options >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ .options 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+# Debugging options for the org.eclipse.uml2.diagram.clazz plug-in >+ >+# Turn on general debugging for the org.eclipse.uml2.diagram.clazz plug-in >+org.eclipse.uml2.diagram.clazz/debug=false >+ >+# Turn on debugging of visualID processing >+org.eclipse.uml2.diagram.clazz/debug/visualID=true >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Package2ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Package2ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Package2ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Package2ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,58 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageClassifiersEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageOtherEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackagePackagesEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Package2ViewFactory extends AbstractShapeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createDescriptionStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFillStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Package2EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(PackageNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(PackagePackagesEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(PackageClassifiersEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(PackageOtherEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClass2ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClass2ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClass2ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClass2ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,58 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassClassesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class AssociationClass2ViewFactory extends AbstractShapeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createDescriptionStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFillStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClass2EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(AssociationClassNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(AssociationClassAttributesEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(AssociationClassOperationsEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(AssociationClassClassesEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property4EditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property4EditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property4EditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property4EditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class Property4EditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/EnumerationEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/EnumerationEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/EnumerationEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/EnumerationEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class EnumerationEditHelper extends UMLBaseEditHelper { >+} >Index: icons/wizban/NewUMLWizard.gif >=================================================================== >RCS file: icons/wizban/NewUMLWizard.gif >diff -N icons/wizban/NewUMLWizard.gif >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ icons/wizban/NewUMLWizard.gif 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,8 @@ >+GIF89aKBçÿÿÿîñøîñ÷¸ÃÖËÓâËÓáäéòíñø;Z=[=[Òè¼²ÙÌfÀ@Ca?EcDa?FcFcHeMiOkOkQmRmToWqWqZtZt?]w _y¢`y¢`y¡c{£f~¥i?§l©o«pªsv¯z?±}³}²··?»?¼£À£À£¿¦Â©Ä©Ã¬Æ¯È ¯È ¯Ç¤²Êª¸Î®»Ð·ÃÖ¸Ä×ÂÌÜÈÑàÓÛèÔÛçÖÝéØßêÞäîÜâìæëóäéñ<\>]?=\?^?^?A`?Db?EcGeFdJgLiQnRnTpWrWrYtYt?]w`z¢_y¡`z¡c|£e~¥l©k¨su¯y?±µ··¹¼»? ½¡¾¡½¤À¤À£¿¤¿¤¿§ÁªÄ °È¯Ç °Ç£³Ê¦µÌ©¸Î»Ð®¼Ð±¾Ò´ÁÔ»ÇØ¾ÉÚÁÌÜÇÑàËÔâÍÖäÐÙæÎ×äÓÛçÕÝéÝäîÛâìàæïÞäíìðöªÃŰȰǦ¶Ì¼Ð·ÄÖ¾ÊÚÄÏÞÈÒàÊÔáÓÜèÐÙåÎ×ãÖÞéäêòâèðêïöèíôÇÒàÍ×ãÓÜçÕÞéØàêßæïÝäíÛâëëðöêïõèíóïóøîò÷æìóäêñèîôíò÷ô®_ôÛ²óáÆ×Ä¥µ³?£|u?c? ±²¨·´¼Â¹¼Â¹ÆÇ¶¼¹¬¢½ÃÇßàÞÌÆÏÎÈÑÑÌÖÙØãÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ,KBþH° Á*\h0R#J8Ñ!©)jÜ(1/rI`, Cf,ɲãI*1¶©ðd?)c®¤Éóf,rêìÙ Bc?iôhPRIC.-Ù4R¤Puºñ§×W¡F0Ù³hÓªMûáW¯WÃjÝzW2fÉòêÝË·o®[ºp-|û2îçsâjÖ·q¤d?G%£µR$]·#|{3?'F¨KiÓR· kH£hÉ-YfÍ >+;{ý+âÑu©RukZ]?ZNà̺Lr~ù9ôX¤U'+¾õìå±gþÃ?+pfÁ?uû<Y=®Ø¹;ê"n<åH´cëoù[»ä2ÝzõæÞu Í·Ýc¬¹É~´@HËx°Ì" >+`fn/xàut4q$>H[sRË(·Ýa¶g|ñ¤K¬?òÀ(ʦ",$ÓbfÇäÂa~_t÷à4Ð?>þ8^?CBçìVRJ(q9&óQ6ÀTù£$då\Rçå{yÀ«ð9&i$¦¬é@o fºè2L0 >+ôrL2uv)zò¹Ê¦&¸ÚrPÚT^ 'àËÉ,Ã0þÂLZiOeª)§ò?1£@2Ù¡úÀ²½" ?pÊäÊÞÅ1»PZi{¤`kØfûçAº0§#ÂËf§Êb.?'Ér2ÑÎ >+¢²ç¼¸ÖP´à *å¾ãÒb®$æËe?Ì´Ëå»a)ïØÞÊé¶#[lgòËoþ07Á1Ò§³(ï¼~ÖÛ)B»ÐVñ¾ «ñÆMý$Ë( ɲøB\P˳½LèÄÎ,Ç[Jóo2KÉ¢(q2Ã)k»Ê½.§y4J¼å[Å4ÕÎRO?ðÕX«Ü'×EjñaËåteë4KþÚ >+[M/иÂ- ^KyhØiP1Ì@½7É%ûü·Öo³|"áû®tÅkÙ@yÇ´·ÚV³Í°ÊºZ~9á;ÖÍùlX(gç6Õ¥O¸Ð}"-;Ò]÷Iâzþy³ëÍ·äm»?Ð0¿ËV·Ø±?ª8gÃ4Óã¤ç²ÛýïÓ/}Ò¡4í¢/ïÂ)k*ÿÖ??[ùæWÿÀWêy5 µ~ö=9bSÜÔóð§± O=é±IözFÀï¼ 1ÈÁ&§JVØ:ô@¤ç&ÃXÆÂ q® ¡Ã`"¤þ4£Cþ®AHD!:" ?xĸÄF(1¼%®àY1vèKòa #I£??22F@#3¨@ôÂ\Â!°l²ÅrQÈc3ôxfôñ?Íh)H#ò\ÙAÞýYÑ?ÜßzÁ¶à1?̤&3YB"2?¹JH/W=p²±;á&ùKnòì¤Ùè0QÒ§4UÉKa0E3H#< ÙÊUøâRZl_¨¤ä$;¥øÍ`6µÉMmfìÓü?fàx¦P©Å±%Î7¹Ímb³IþgÖ?f62 >+h@Q˾îLÁ`@7ªMbæógnKÝA~qtîò?Ì(°¢Ô9CË`(=ý¨Oz%óa ùÅOª¨Qx¨-ŬAÓzÓ?H°ÖµN§²¶¥ }©OÎé¹|THUFH±y&ʬWÚüãå[¤z?Hà×<{$XBUMجF°ÈQCÈ$°0jb]XÃ¢ê§ Éè0KØÂö°=¬0î¹%¢gy%ë>ÉÉÅX`°¨L^½p6/IÐc1Ú$0æ´4m$ö¶îî¤(å?H[$ÄèR!QÂEH÷>¯#u\åØj;#0¹~{jBâúÖÊÎ:nyûZÀµñ¬¹¹èKú7-Ü¢ >+rk,ø¦jÇ]òo¸³ºÔ¤Æ·ª±-¹ó4ÍÛ?ÝvF¹½]xÑÌÏe~U2ºÈ¹wr¿ÝI(¹Eô×»»?Zä¼×¶q ; >Index: src/org/eclipse/uml2/diagram/clazz/navigator/UMLAbstractNavigatorItem.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/navigator/UMLAbstractNavigatorItem.java >diff -N src/org/eclipse/uml2/diagram/clazz/navigator/UMLAbstractNavigatorItem.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/navigator/UMLAbstractNavigatorItem.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,51 @@ >+package org.eclipse.uml2.diagram.clazz.navigator; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.ui.properties.views.IReadOnlyDiagramPropertySheetPageContributor; >+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor; >+ >+/** >+ * @generated >+ */ >+public abstract class UMLAbstractNavigatorItem implements IAdaptable { >+ >+ /** >+ * @generated >+ */ >+ private Object myParent; >+ >+ /** >+ * @generated >+ */ >+ protected UMLAbstractNavigatorItem(Object parent) { >+ myParent = parent; >+ } >+ >+ /** >+ * @generated >+ */ >+ abstract public String getModelID(); >+ >+ /** >+ * @generated >+ */ >+ public Object getParent() { >+ return myParent; >+ } >+ >+ /** >+ * @generated >+ */ >+ public Object getAdapter(Class adapter) { >+ if (ITabbedPropertySheetPageContributor.class.isAssignableFrom(adapter)) { >+ return new ITabbedPropertySheetPageContributor() { >+ >+ public String getContributorId() { >+ return "org.eclipse.uml2.diagram.clazz"; >+ } >+ }; >+ } >+ return null; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property2EditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property2EditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property2EditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property2EditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class Property2EditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/LiteralStringViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/LiteralStringViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/LiteralStringViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/LiteralStringViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class LiteralStringViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.LiteralStringEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeOperationsViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeOperationsViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeOperationsViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeOperationsViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class DataTypeOperationsViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeOperationsEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/ClassAttributesViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/ClassAttributesViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/ClassAttributesViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/ClassAttributesViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class ClassAttributesViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.ClassAttributesEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/DataType2ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/DataType2ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/DataType2ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/DataType2ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,56 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class DataType2ViewFactory extends AbstractShapeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createDescriptionStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFillStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.DataType2EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(DataTypeNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(DataTypeAttributesEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(DataTypeOperationsEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class EnumerationViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/SlotEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/SlotEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/SlotEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/SlotEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class SlotEditHelper extends UMLBaseEditHelper { >+} >Index: icons/incomingLinksNavigatorGroup.gif >=================================================================== >RCS file: icons/incomingLinksNavigatorGroup.gif >diff -N icons/incomingLinksNavigatorGroup.gif >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ icons/incomingLinksNavigatorGroup.gif 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,5 @@ >+GIF89aÕÿÿr/GøØf'øÐxøàøÐf>2èÆøè°èÐøðÈÿÿÿÃ6úöºøà øØ?]FøèÒ«üößãϹ´2àÀxr+ðØ?¥l$yO@_l$?R¼2ï߯¼ 2à 6!ù,s@pH,?È#âèh:¨T0ô4® >+à?p©Ñd¢Y`B¡p8G AØ%%HÁçW¶ _B???B¥¦¥ B®©C³´µI·¸FA;Content-Type: image/gif >+ >+GIF89aÕÿÿr/GøØf'øÐxøàøÐf>2èÆøè°èÐøðÈÿÿÿÃ6úöºøà øØ?]FøèÒ«üößãϹ´2àÀxr+ðØ?¥l$yO@_l$?R¼2ï߯¼ 2à 6!ù,s@pH,?È#âèh:¨T0ô4® >+à?p©Ñd¢Y`B¡p8G AØ%%HÁçW¶ _B???B¥¦¥ B®©C³´µI·¸FA; >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/ParseException.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/ParseException.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/ParseException.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/ParseException.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,205 @@ >+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.operation; >+ >+import org.eclipse.uml2.diagram.parser.ExternalParserException; >+ >+/** >+ * This exception is thrown when parse errors are encountered. >+ * You can explicitly create objects of this exception type by >+ * calling the method generateParseException in the generated >+ * parser. >+ * >+ * You can modify this class to customize your error reporting >+ * mechanisms so long as you retain the public fields. >+ */ >+public class ParseException extends ExternalParserException { >+ >+ /** >+ * This constructor is used by the method "generateParseException" >+ * in the generated parser. Calling this constructor generates >+ * a new object of this type with the fields "currentToken", >+ * "expectedTokenSequences", and "tokenImage" set. The boolean >+ * flag "specialConstructor" is also set to true to indicate that >+ * this constructor was used to create this object. >+ * This constructor calls its super class with the empty string >+ * to force the "toString" method of parent class "Throwable" to >+ * print the error message in the form: >+ * ParseException: <result of getMessage> >+ */ >+ public ParseException(Token currentTokenVal, >+ int[][] expectedTokenSequencesVal, >+ String[] tokenImageVal >+ ) >+ { >+ super(""); >+ specialConstructor = true; >+ currentToken = currentTokenVal; >+ expectedTokenSequences = expectedTokenSequencesVal; >+ tokenImage = tokenImageVal; >+ } >+ >+ /** >+ * The following constructors are for use by you for whatever >+ * purpose you can think of. Constructing the exception in this >+ * manner makes the exception behave in the normal way - i.e., as >+ * documented in the class "Throwable". The fields "errorToken", >+ * "expectedTokenSequences", and "tokenImage" do not contain >+ * relevant information. The JavaCC generated code does not use >+ * these constructors. >+ */ >+ >+ public ParseException() { >+ super(); >+ specialConstructor = false; >+ } >+ >+ public ParseException(String message) { >+ super(message); >+ specialConstructor = false; >+ } >+ >+ /** >+ * This variable determines which constructor was used to create >+ * this object and thereby affects the semantics of the >+ * "getMessage" method (see below). >+ */ >+ protected boolean specialConstructor; >+ >+ /** >+ * This is the last token that has been consumed successfully. If >+ * this object has been created due to a parse error, the token >+ * followng this token will (therefore) be the first error token. >+ */ >+ public Token currentToken; >+ >+ /** >+ * Each entry in this array is an array of integers. Each array >+ * of integers represents a sequence of tokens (by their ordinal >+ * values) that is expected at this point of the parse. >+ */ >+ public int[][] expectedTokenSequences; >+ >+ /** >+ * This is a reference to the "tokenImage" array of the generated >+ * parser within which the parse error occurred. This array is >+ * defined in the generated ...Constants interface. >+ */ >+ public String[] tokenImage; >+ >+ /** >+ * This method has the standard behavior when this object has been >+ * created using the standard constructors. Otherwise, it uses >+ * "currentToken" and "expectedTokenSequences" to generate a parse >+ * error message and returns it. If this object has been created >+ * due to a parse error, and you do not catch it (it gets thrown >+ * from the parser), then this method is called during the printing >+ * of the final stack trace, and hence the correct error message >+ * gets displayed. >+ */ >+ public String getMessage() { >+ if (!specialConstructor) { >+ return super.getMessage(); >+ } >+ String expected = ""; >+ int maxSize = 0; >+ for (int i = 0; i < expectedTokenSequences.length; i++) { >+ if (maxSize < expectedTokenSequences[i].length) { >+ maxSize = expectedTokenSequences[i].length; >+ } >+ for (int j = 0; j < expectedTokenSequences[i].length; j++) { >+ expected += tokenImage[expectedTokenSequences[i][j]] + " "; >+ } >+ if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { >+ expected += "..."; >+ } >+ expected += eol + " "; >+ } >+ String retval = "Encountered \""; >+ Token tok = currentToken.next; >+ for (int i = 0; i < maxSize; i++) { >+ if (i != 0) retval += " "; >+ if (tok.kind == 0) { >+ retval += tokenImage[0]; >+ break; >+ } >+ retval += add_escapes(tok.image); >+ tok = tok.next; >+ } >+ retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; >+ retval += "." + eol; >+ if (expectedTokenSequences.length == 1) { >+ retval += "Was expecting:" + eol + " "; >+ } else { >+ retval += "Was expecting one of:" + eol + " "; >+ } >+ retval += expected; >+ return retval; >+ } >+ >+ /** >+ * The end of line string for this machine. >+ */ >+ protected String eol = System.getProperty("line.separator", "\n"); >+ >+ /** >+ * Used to convert raw characters to their escaped version >+ * when these raw version cannot be used as part of an ASCII >+ * string literal. >+ */ >+ protected String add_escapes(String str) { >+ StringBuffer retval = new StringBuffer(); >+ char ch; >+ for (int i = 0; i < str.length(); i++) { >+ switch (str.charAt(i)) >+ { >+ case 0 : >+ continue; >+ case '\b': >+ retval.append("\\b"); >+ continue; >+ case '\t': >+ retval.append("\\t"); >+ continue; >+ case '\n': >+ retval.append("\\n"); >+ continue; >+ case '\f': >+ retval.append("\\f"); >+ continue; >+ case '\r': >+ retval.append("\\r"); >+ continue; >+ case '\"': >+ retval.append("\\\""); >+ continue; >+ case '\'': >+ retval.append("\\\'"); >+ continue; >+ case '\\': >+ retval.append("\\\\"); >+ continue; >+ default: >+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { >+ String s = "0000" + Integer.toString(ch, 16); >+ retval.append("\\u" + s.substring(s.length() - 4, s.length())); >+ } else { >+ retval.append(ch); >+ } >+ continue; >+ } >+ } >+ return retval.toString(); >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameParser.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameParser.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameParser.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameParser.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,250 @@ >+/* Generated By:JavaCC: Do not edit this line. AssociationNameParser.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.name; >+ >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class AssociationNameParser extends ExternalParserBase implements AssociationNameParserConstants { >+ private Association mySubject; >+ >+ public AssociationNameParser(){ >+ this(new StringReader("")); >+ } >+ >+ public AssociationNameParser(LookupSuite lookup){ >+ this(); >+ setLookupSuite(lookup); >+ } >+ >+ public EClass getSubjectClass(){ >+ return UMLPackage.eINSTANCE.getAssociation(); >+ } >+ >+ public void parse(EObject target, String text) throws ExternalParserException { >+ checkContext(); >+ ReInit(new StringReader(text)); >+ mySubject = (Association)target; >+ Declaration(); >+ mySubject = null; >+ } >+ >+ protected static int parseInt(Token t) throws ParseException { >+ if (t.kind != AssociationNameParserConstants.INTEGER_LITERAL){ >+ throw new IllegalStateException("Token: " + t + ", image: " + t.image); >+ } >+ try { >+ return Integer.parseInt(t.image); //XXX: "0005", "99999999999999999999999" >+ } catch (NumberFormatException e){ >+ throw new ParseException("Not supported integer value:" + t.image); >+ } >+ } >+ >+ final public void Declaration() throws ParseException { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case SLASH: >+ IsDerived(); >+ break; >+ default: >+ jj_la1[0] = jj_gen; >+ ; >+ } >+ AssociationName(); >+ jj_consume_token(0); >+ } >+ >+ final public void AssociationName() throws ParseException { >+ String name; >+ name = NameWithSpaces(); >+ mySubject.setName(name); >+ } >+ >+ final public void IsDerived() throws ParseException { >+ jj_consume_token(SLASH); >+ mySubject.setIsDerived(true); >+ } >+ >+ final public String NameWithSpaces() throws ParseException { >+ StringBuffer result = new StringBuffer(); >+ Token t; >+ t = jj_consume_token(IDENTIFIER); >+ result.append(t.image); >+ label_1: >+ while (true) { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case IDENTIFIER: >+ ; >+ break; >+ default: >+ jj_la1[1] = jj_gen; >+ break label_1; >+ } >+ t = jj_consume_token(IDENTIFIER); >+ result.append(' '); result.append(t.image); >+ } >+ {if (true) return result.toString();} >+ throw new Error("Missing return statement in function"); >+ } >+ >+ public AssociationNameParserTokenManager token_source; >+ JavaCharStream jj_input_stream; >+ public Token token, jj_nt; >+ private int jj_ntk; >+ private int jj_gen; >+ final private int[] jj_la1 = new int[2]; >+ static private int[] jj_la1_0; >+ static { >+ jj_la1_0(); >+ } >+ private static void jj_la1_0() { >+ jj_la1_0 = new int[] {0x8,0x4000000,}; >+ } >+ >+ public AssociationNameParser(java.io.InputStream stream) { >+ jj_input_stream = new JavaCharStream(stream, 1, 1); >+ token_source = new AssociationNameParserTokenManager(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 2; i++) jj_la1[i] = -1; >+ } >+ >+ public void ReInit(java.io.InputStream stream) { >+ jj_input_stream.ReInit(stream, 1, 1); >+ token_source.ReInit(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 2; i++) jj_la1[i] = -1; >+ } >+ >+ public AssociationNameParser(java.io.Reader stream) { >+ jj_input_stream = new JavaCharStream(stream, 1, 1); >+ token_source = new AssociationNameParserTokenManager(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 2; i++) jj_la1[i] = -1; >+ } >+ >+ public void ReInit(java.io.Reader stream) { >+ jj_input_stream.ReInit(stream, 1, 1); >+ token_source.ReInit(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 2; i++) jj_la1[i] = -1; >+ } >+ >+ public AssociationNameParser(AssociationNameParserTokenManager tm) { >+ token_source = tm; >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 2; i++) jj_la1[i] = -1; >+ } >+ >+ public void ReInit(AssociationNameParserTokenManager tm) { >+ token_source = tm; >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 2; i++) jj_la1[i] = -1; >+ } >+ >+ final private Token jj_consume_token(int kind) throws ParseException { >+ Token oldToken; >+ if ((oldToken = token).next != null) token = token.next; >+ else token = token.next = token_source.getNextToken(); >+ jj_ntk = -1; >+ if (token.kind == kind) { >+ jj_gen++; >+ return token; >+ } >+ token = oldToken; >+ jj_kind = kind; >+ throw generateParseException(); >+ } >+ >+ final public Token getNextToken() { >+ if (token.next != null) token = token.next; >+ else token = token.next = token_source.getNextToken(); >+ jj_ntk = -1; >+ jj_gen++; >+ return token; >+ } >+ >+ final public Token getToken(int index) { >+ Token t = token; >+ for (int i = 0; i < index; i++) { >+ if (t.next != null) t = t.next; >+ else t = t.next = token_source.getNextToken(); >+ } >+ return t; >+ } >+ >+ final private int jj_ntk() { >+ if ((jj_nt=token.next) == null) >+ return (jj_ntk = (token.next=token_source.getNextToken()).kind); >+ else >+ return (jj_ntk = jj_nt.kind); >+ } >+ >+ private java.util.Vector jj_expentries = new java.util.Vector(); >+ private int[] jj_expentry; >+ private int jj_kind = -1; >+ >+ public ParseException generateParseException() { >+ jj_expentries.removeAllElements(); >+ boolean[] la1tokens = new boolean[29]; >+ for (int i = 0; i < 29; i++) { >+ la1tokens[i] = false; >+ } >+ if (jj_kind >= 0) { >+ la1tokens[jj_kind] = true; >+ jj_kind = -1; >+ } >+ for (int i = 0; i < 2; i++) { >+ if (jj_la1[i] == jj_gen) { >+ for (int j = 0; j < 32; j++) { >+ if ((jj_la1_0[i] & (1<<j)) != 0) { >+ la1tokens[j] = true; >+ } >+ } >+ } >+ } >+ for (int i = 0; i < 29; i++) { >+ if (la1tokens[i]) { >+ jj_expentry = new int[1]; >+ jj_expentry[0] = i; >+ jj_expentries.addElement(jj_expentry); >+ } >+ } >+ int[][] exptokseq = new int[jj_expentries.size()][]; >+ for (int i = 0; i < jj_expentries.size(); i++) { >+ exptokseq[i] = (int[])jj_expentries.elementAt(i); >+ } >+ return new ParseException(token, exptokseq, tokenImage); >+ } >+ >+ final public void enable_tracing() { >+ } >+ >+ final public void disable_tracing() { >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/UsageEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/UsageEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/UsageEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/UsageEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class UsageEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeNameViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeNameViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeNameViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeNameViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class DataTypeNameViewFactory extends BasicNodeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/ClassEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/ClassEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/ClassEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/ClassEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class ClassEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property3EditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property3EditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property3EditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property3EditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class Property3EditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Package3ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Package3ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Package3ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Package3ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Package3ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Package3EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationLiteralsViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationLiteralsViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationLiteralsViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationLiteralsViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class EnumerationLiteralsViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationLiteralsEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/ParseException.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/ParseException.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/ParseException.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/ParseException.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,205 @@ >+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.end; >+ >+import org.eclipse.uml2.diagram.parser.ExternalParserException; >+ >+/** >+ * This exception is thrown when parse errors are encountered. >+ * You can explicitly create objects of this exception type by >+ * calling the method generateParseException in the generated >+ * parser. >+ * >+ * You can modify this class to customize your error reporting >+ * mechanisms so long as you retain the public fields. >+ */ >+public class ParseException extends ExternalParserException { >+ >+ /** >+ * This constructor is used by the method "generateParseException" >+ * in the generated parser. Calling this constructor generates >+ * a new object of this type with the fields "currentToken", >+ * "expectedTokenSequences", and "tokenImage" set. The boolean >+ * flag "specialConstructor" is also set to true to indicate that >+ * this constructor was used to create this object. >+ * This constructor calls its super class with the empty string >+ * to force the "toString" method of parent class "Throwable" to >+ * print the error message in the form: >+ * ParseException: <result of getMessage> >+ */ >+ public ParseException(Token currentTokenVal, >+ int[][] expectedTokenSequencesVal, >+ String[] tokenImageVal >+ ) >+ { >+ super(""); >+ specialConstructor = true; >+ currentToken = currentTokenVal; >+ expectedTokenSequences = expectedTokenSequencesVal; >+ tokenImage = tokenImageVal; >+ } >+ >+ /** >+ * The following constructors are for use by you for whatever >+ * purpose you can think of. Constructing the exception in this >+ * manner makes the exception behave in the normal way - i.e., as >+ * documented in the class "Throwable". The fields "errorToken", >+ * "expectedTokenSequences", and "tokenImage" do not contain >+ * relevant information. The JavaCC generated code does not use >+ * these constructors. >+ */ >+ >+ public ParseException() { >+ super(); >+ specialConstructor = false; >+ } >+ >+ public ParseException(String message) { >+ super(message); >+ specialConstructor = false; >+ } >+ >+ /** >+ * This variable determines which constructor was used to create >+ * this object and thereby affects the semantics of the >+ * "getMessage" method (see below). >+ */ >+ protected boolean specialConstructor; >+ >+ /** >+ * This is the last token that has been consumed successfully. If >+ * this object has been created due to a parse error, the token >+ * followng this token will (therefore) be the first error token. >+ */ >+ public Token currentToken; >+ >+ /** >+ * Each entry in this array is an array of integers. Each array >+ * of integers represents a sequence of tokens (by their ordinal >+ * values) that is expected at this point of the parse. >+ */ >+ public int[][] expectedTokenSequences; >+ >+ /** >+ * This is a reference to the "tokenImage" array of the generated >+ * parser within which the parse error occurred. This array is >+ * defined in the generated ...Constants interface. >+ */ >+ public String[] tokenImage; >+ >+ /** >+ * This method has the standard behavior when this object has been >+ * created using the standard constructors. Otherwise, it uses >+ * "currentToken" and "expectedTokenSequences" to generate a parse >+ * error message and returns it. If this object has been created >+ * due to a parse error, and you do not catch it (it gets thrown >+ * from the parser), then this method is called during the printing >+ * of the final stack trace, and hence the correct error message >+ * gets displayed. >+ */ >+ public String getMessage() { >+ if (!specialConstructor) { >+ return super.getMessage(); >+ } >+ String expected = ""; >+ int maxSize = 0; >+ for (int i = 0; i < expectedTokenSequences.length; i++) { >+ if (maxSize < expectedTokenSequences[i].length) { >+ maxSize = expectedTokenSequences[i].length; >+ } >+ for (int j = 0; j < expectedTokenSequences[i].length; j++) { >+ expected += tokenImage[expectedTokenSequences[i][j]] + " "; >+ } >+ if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { >+ expected += "..."; >+ } >+ expected += eol + " "; >+ } >+ String retval = "Encountered \""; >+ Token tok = currentToken.next; >+ for (int i = 0; i < maxSize; i++) { >+ if (i != 0) retval += " "; >+ if (tok.kind == 0) { >+ retval += tokenImage[0]; >+ break; >+ } >+ retval += add_escapes(tok.image); >+ tok = tok.next; >+ } >+ retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; >+ retval += "." + eol; >+ if (expectedTokenSequences.length == 1) { >+ retval += "Was expecting:" + eol + " "; >+ } else { >+ retval += "Was expecting one of:" + eol + " "; >+ } >+ retval += expected; >+ return retval; >+ } >+ >+ /** >+ * The end of line string for this machine. >+ */ >+ protected String eol = System.getProperty("line.separator", "\n"); >+ >+ /** >+ * Used to convert raw characters to their escaped version >+ * when these raw version cannot be used as part of an ASCII >+ * string literal. >+ */ >+ protected String add_escapes(String str) { >+ StringBuffer retval = new StringBuffer(); >+ char ch; >+ for (int i = 0; i < str.length(); i++) { >+ switch (str.charAt(i)) >+ { >+ case 0 : >+ continue; >+ case '\b': >+ retval.append("\\b"); >+ continue; >+ case '\t': >+ retval.append("\\t"); >+ continue; >+ case '\n': >+ retval.append("\\n"); >+ continue; >+ case '\f': >+ retval.append("\\f"); >+ continue; >+ case '\r': >+ retval.append("\\r"); >+ continue; >+ case '\"': >+ retval.append("\\\""); >+ continue; >+ case '\'': >+ retval.append("\\\'"); >+ continue; >+ case '\\': >+ retval.append("\\\\"); >+ continue; >+ default: >+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { >+ String s = "0000" + Integer.toString(ch, 16); >+ retval.append("\\u" + s.substring(s.length() - 4, s.length())); >+ } else { >+ retval.append(ch); >+ } >+ continue; >+ } >+ } >+ return retval.toString(); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramEditor.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramEditor.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramEditor.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramEditor.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,207 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.resources.IMarker; >+import org.eclipse.core.resources.IWorkspaceRoot; >+import org.eclipse.core.resources.ResourcesPlugin; >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.draw2d.DelegatingLayout; >+import org.eclipse.draw2d.FreeformLayer; >+import org.eclipse.draw2d.LayeredPane; >+import org.eclipse.emf.transaction.TransactionalEditingDomain; >+import org.eclipse.gef.LayerConstants; >+import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart; >+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider; >+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.document.StorageDiagramDocumentProvider; >+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor; >+import org.eclipse.jface.dialogs.ErrorDialog; >+import org.eclipse.jface.dialogs.IMessageProvider; >+import org.eclipse.jface.dialogs.MessageDialog; >+import org.eclipse.jface.window.Window; >+import org.eclipse.osgi.util.NLS; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.ui.IEditorInput; >+import org.eclipse.ui.IEditorMatchingStrategy; >+import org.eclipse.ui.IEditorReference; >+import org.eclipse.ui.IFileEditorInput; >+import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.dialogs.SaveAsDialog; >+import org.eclipse.ui.ide.IGotoMarker; >+import org.eclipse.ui.part.FileEditorInput; >+import org.eclipse.uml2.diagram.clazz.edit.parts.UMLEditPartFactory; >+ >+/** >+ * @generated >+ */ >+public class UMLDiagramEditor extends DiagramDocumentEditor implements IGotoMarker { >+ >+ /** >+ * @generated >+ */ >+ public static final String ID = "org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorID"; //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public UMLDiagramEditor() { >+ super(true); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected String getEditingDomainID() { >+ return "org.eclipse.uml2.diagram.clazz.EditingDomain"; //$NON-NLS-1$ >+ } >+ >+ /** >+ * @generated >+ */ >+ protected TransactionalEditingDomain createEditingDomain() { >+ TransactionalEditingDomain domain = super.createEditingDomain(); >+ domain.setID(getEditingDomainID()); >+ return domain; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void configureGraphicalViewer() { >+ super.configureGraphicalViewer(); >+ DiagramRootEditPart root = (DiagramRootEditPart) getDiagramGraphicalViewer().getRootEditPart(); >+ LayeredPane printableLayers = (LayeredPane) root.getLayer(LayerConstants.PRINTABLE_LAYERS); >+ FreeformLayer extLabelsLayer = new FreeformLayer(); >+ extLabelsLayer.setLayoutManager(new DelegatingLayout()); >+ printableLayers.addLayerAfter(extLabelsLayer, UMLEditPartFactory.EXTERNAL_NODE_LABELS_LAYER, LayerConstants.PRIMARY_LAYER); >+ LayeredPane scalableLayers = (LayeredPane) root.getLayer(LayerConstants.SCALABLE_LAYERS); >+ FreeformLayer scaledFeedbackLayer = new FreeformLayer(); >+ scaledFeedbackLayer.setEnabled(false); >+ scalableLayers.addLayerAfter(scaledFeedbackLayer, LayerConstants.SCALED_FEEDBACK_LAYER, DiagramRootEditPart.DECORATION_UNPRINTABLE_LAYER); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected PreferencesHint getPreferencesHint() { >+ return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT; >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getContributorId() { >+ return UMLDiagramEditorPlugin.ID; >+ } >+ >+ /** >+ * @generated >+ */ >+ private String contentObjectURI; >+ >+ /** >+ * @generated >+ */ >+ protected void setDocumentProvider(IEditorInput input) { >+ if (input instanceof IFileEditorInput) { >+ setDocumentProvider(new UMLDocumentProvider(contentObjectURI)); >+ } else { >+ setDocumentProvider(new StorageDiagramDocumentProvider()); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ public void gotoMarker(IMarker marker) { >+ MarkerNavigationService.getInstance().gotoMarker(this, marker); >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean isSaveAsAllowed() { >+ return true; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void doSaveAs() { >+ performSaveAs(new NullProgressMonitor()); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void performSaveAs(IProgressMonitor progressMonitor) { >+ Shell shell = getSite().getShell(); >+ IEditorInput input = getEditorInput(); >+ SaveAsDialog dialog = new SaveAsDialog(shell); >+ IFile original = input instanceof IFileEditorInput ? ((IFileEditorInput) input).getFile() : null; >+ if (original != null) { >+ dialog.setOriginalFile(original); >+ } >+ dialog.create(); >+ IDocumentProvider provider = getDocumentProvider(); >+ if (provider == null) { >+ // editor has been programmatically closed while the dialog was open >+ return; >+ } >+ if (provider.isDeleted(input) && original != null) { >+ String message = NLS.bind("The original file ''{0}'' has been deleted.", original.getName()); >+ dialog.setErrorMessage(null); >+ dialog.setMessage(message, IMessageProvider.WARNING); >+ } >+ if (dialog.open() == Window.CANCEL) { >+ if (progressMonitor != null) { >+ progressMonitor.setCanceled(true); >+ } >+ return; >+ } >+ IPath filePath = dialog.getResult(); >+ if (filePath == null) { >+ if (progressMonitor != null) { >+ progressMonitor.setCanceled(true); >+ } >+ return; >+ } >+ IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); >+ IFile file = workspaceRoot.getFile(filePath); >+ final IEditorInput newInput = new FileEditorInput(file); >+ // Check if the editor is already open >+ IEditorMatchingStrategy matchingStrategy = getEditorDescriptor().getEditorMatchingStrategy(); >+ IEditorReference[] editorRefs = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences(); >+ for (int i = 0; i < editorRefs.length; i++) { >+ if (matchingStrategy.matches(editorRefs[i], newInput)) { >+ MessageDialog.openWarning(shell, "Problem During Save As...", "Save could not be completed. Target file is already open in another editor."); >+ return; >+ } >+ } >+ boolean success = false; >+ try { >+ provider.aboutToChange(newInput); >+ getDocumentProvider(newInput).saveDocument(progressMonitor, newInput, getDocumentProvider().getDocument(getEditorInput()), true); >+ success = true; >+ } catch (CoreException x) { >+ IStatus status = x.getStatus(); >+ if (status == null || status.getSeverity() != IStatus.CANCEL) { >+ ErrorDialog.openError(shell, "Save Problems", "Could not save file.", x.getStatus()); >+ } >+ } finally { >+ provider.changed(newInput); >+ if (success) { >+ setInput(newInput); >+ } >+ } >+ if (progressMonitor != null) { >+ progressMonitor.setCanceled(!success); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/InterfaceRealizationViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/InterfaceRealizationViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/InterfaceRealizationViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/InterfaceRealizationViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,48 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ConnectionViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class InterfaceRealizationViewFactory extends ConnectionViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createRoutingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceRealizationEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName6ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName6ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName6ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName6ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; >+import org.eclipse.gmf.runtime.notation.Location; >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class AssociationName6ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { >+ Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint); >+ Location location = (Location) view.getLayoutConstraint(); >+ IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit()); >+ location.setX(mapMode.DPtoLP(0)); >+ location.setY(mapMode.DPtoLP(15)); >+ return view; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/ClassEditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/ClassEditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/ClassEditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/ClassEditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class ClassEditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationInplaceApplier.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationInplaceApplier.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationInplaceApplier.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationInplaceApplier.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,54 @@ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+ >+package org.eclipse.uml2.diagram.clazz.parser.operation; >+ >+import java.util.LinkedList; >+import java.util.List; >+ >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.ApplyStrategy; >+import org.eclipse.uml2.diagram.parser.BasicApplyStrategy; >+import org.eclipse.uml2.uml.Operation; >+import org.eclipse.uml2.uml.UMLPackage; >+ >+public class OperationInplaceApplier extends BasicApplyStrategy implements ApplyStrategy { >+ private static final UMLPackage UML = UMLPackage.eINSTANCE; >+ >+ public List/*1.5 <ICommand>*/ apply(EObject modelObject, EObject parsedObject) { >+ List output = new LinkedList(); >+ assertOperation(modelObject); >+ assertOperation(parsedObject); >+ Operation model = (Operation)modelObject; >+ Operation parsed = (Operation)parsedObject; >+ >+ transferValue(output, model, parsed, UML.getNamedElement_Visibility()); >+ transferValue(output, model, parsed, UML.getNamedElement_Name()); >+ transferValue(output, model, parsed, UML.getOperation_IsQuery()); >+ transferValue(output, model, parsed, UML.getOperation_IsOrdered()); >+ transferValue(output, model, parsed, UML.getOperation_IsUnique()); >+ transferValue(output, model, parsed, UML.getRedefinableElement_RedefinedElement()); >+ >+ //XXX parameters may have incoming references, try to preserve them >+ //match parameters and transfer their features one by one instead of total delete-create >+ transferValue(output, model, parsed, UML.getBehavioralFeature_OwnedParameter()); >+ >+ return output.isEmpty() ? NOT_EXECUTABLE : output; >+ } >+ >+ protected void assertOperation(EObject object){ >+ if (false == object instanceof Operation){ >+ throw new IllegalStateException("Operation expected: " + object); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/commands/UMLReorientConnectionViewCommand.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/commands/UMLReorientConnectionViewCommand.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/commands/UMLReorientConnectionViewCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/commands/UMLReorientConnectionViewCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,69 @@ >+package org.eclipse.uml2.diagram.clazz.edit.commands; >+ >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.emf.transaction.TransactionalEditingDomain; >+import org.eclipse.gmf.runtime.common.core.command.CommandResult; >+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; >+import org.eclipse.gmf.runtime.notation.Edge; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class UMLReorientConnectionViewCommand extends AbstractTransactionalCommand { >+ >+ /** >+ * @generated >+ */ >+ private IAdaptable edgeAdaptor; >+ >+ /** >+ * @generated >+ */ >+ public UMLReorientConnectionViewCommand(TransactionalEditingDomain editingDomain, String label) { >+ super(editingDomain, label, null); >+ } >+ >+ /** >+ * @generated >+ */ >+ public List getAffectedFiles() { >+ View view = (View) edgeAdaptor.getAdapter(View.class); >+ if (view != null) { >+ return getWorkspaceFiles(view); >+ } >+ return super.getAffectedFiles(); >+ } >+ >+ /** >+ * @generated >+ */ >+ public IAdaptable getEdgeAdaptor() { >+ return edgeAdaptor; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setEdgeAdaptor(IAdaptable edgeAdaptor) { >+ this.edgeAdaptor = edgeAdaptor; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) { >+ assert null != edgeAdaptor : "Null child in UMLReorientConnectionViewCommand"; //$NON-NLS-1$ >+ Edge edge = (Edge) getEdgeAdaptor().getAdapter(Edge.class); >+ assert null != edge : "Null edge in UMLReorientConnectionViewCommand"; //$NON-NLS-1$ >+ >+ View tempView = edge.getSource(); >+ edge.setSource(edge.getTarget()); >+ edge.setTarget(tempView); >+ >+ return CommandResult.newOKCommandResult(); >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/providers/UMLStructuralFeaturesParser.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/providers/UMLStructuralFeaturesParser.java >diff -N src/org/eclipse/uml2/diagram/clazz/providers/UMLStructuralFeaturesParser.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/providers/UMLStructuralFeaturesParser.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,102 @@ >+package org.eclipse.uml2.diagram.clazz.providers; >+ >+import java.text.FieldPosition; >+import java.text.MessageFormat; >+import java.util.ArrayList; >+import java.util.Iterator; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.common.notify.Notification; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.emf.transaction.TransactionalEditingDomain; >+import org.eclipse.emf.transaction.util.TransactionUtil; >+import org.eclipse.gmf.runtime.common.core.command.ICommand; >+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand; >+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; >+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus; >+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand; >+import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorPlugin; >+ >+/** >+ * @generated >+ */ >+public class UMLStructuralFeaturesParser extends UMLAbstractParser { >+ >+ /** >+ * @generated >+ */ >+ private List features; >+ >+ /** >+ * @generated >+ */ >+ public UMLStructuralFeaturesParser(List features) { >+ this.features = features; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected String getStringByPattern(IAdaptable adapter, int flags, String pattern, MessageFormat processor) { >+ EObject element = (EObject) adapter.getAdapter(EObject.class); >+ List values = new ArrayList(features.size()); >+ for (Iterator it = features.iterator(); it.hasNext();) { >+ EStructuralFeature feature = (EStructuralFeature) it.next(); >+ Object value = element.eGet(feature); >+ value = getValidValue(feature, value); >+ values.add(value); >+ } >+ return processor.format(values.toArray(new Object[values.size()]), new StringBuffer(), new FieldPosition(0)).toString(); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParserEditStatus validateValues(Object[] values) { >+ if (values.length != features.size()) { >+ return ParserEditStatus.UNEDITABLE_STATUS; >+ } >+ for (int i = 0; i < values.length; i++) { >+ Object value = getValidNewValue((EStructuralFeature) features.get(i), values[i]); >+ if (value instanceof InvalidValue) { >+ return new ParserEditStatus(UMLDiagramEditorPlugin.ID, IParserEditStatus.UNEDITABLE, value.toString()); >+ } >+ } >+ return ParserEditStatus.EDITABLE_STATUS; >+ } >+ >+ /** >+ * @generated >+ */ >+ public ICommand getParseCommand(IAdaptable adapter, Object[] values) { >+ EObject element = (EObject) adapter.getAdapter(EObject.class); >+ if (element == null) { >+ return UnexecutableCommand.INSTANCE; >+ } >+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(element); >+ if (editingDomain == null) { >+ return UnexecutableCommand.INSTANCE; >+ } >+ CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Values"); //$NON-NLS-1$ >+ for (int i = 0; i < values.length; i++) { >+ EStructuralFeature feature = (EStructuralFeature) features.get(i); >+ command.compose(getModificationCommand(element, feature, values[i])); >+ } >+ return command; >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean isAffectingEvent(Object event, int flags) { >+ if (event instanceof Notification) { >+ Object feature = ((Notification) event).getFeature(); >+ if (features.contains(feature)) { >+ return true; >+ } >+ } >+ return false; >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/TokenMgrError.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/TokenMgrError.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/TokenMgrError.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/TokenMgrError.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,144 @@ >+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.operation; >+ >+public class TokenMgrError extends Error >+{ >+ /* >+ * Ordinals for various reasons why an Error of this type can be thrown. >+ */ >+ >+ /** >+ * Lexical error occured. >+ */ >+ static final int LEXICAL_ERROR = 0; >+ >+ /** >+ * An attempt wass made to create a second instance of a static token manager. >+ */ >+ static final int STATIC_LEXER_ERROR = 1; >+ >+ /** >+ * Tried to change to an invalid lexical state. >+ */ >+ static final int INVALID_LEXICAL_STATE = 2; >+ >+ /** >+ * Detected (and bailed out of) an infinite loop in the token manager. >+ */ >+ static final int LOOP_DETECTED = 3; >+ >+ /** >+ * Indicates the reason why the exception is thrown. It will have >+ * one of the above 4 values. >+ */ >+ int errorCode; >+ >+ /** >+ * Replaces unprintable characters by their espaced (or unicode escaped) >+ * equivalents in the given string >+ */ >+ protected static final String addEscapes(String str) { >+ StringBuffer retval = new StringBuffer(); >+ char ch; >+ for (int i = 0; i < str.length(); i++) { >+ switch (str.charAt(i)) >+ { >+ case 0 : >+ continue; >+ case '\b': >+ retval.append("\\b"); >+ continue; >+ case '\t': >+ retval.append("\\t"); >+ continue; >+ case '\n': >+ retval.append("\\n"); >+ continue; >+ case '\f': >+ retval.append("\\f"); >+ continue; >+ case '\r': >+ retval.append("\\r"); >+ continue; >+ case '\"': >+ retval.append("\\\""); >+ continue; >+ case '\'': >+ retval.append("\\\'"); >+ continue; >+ case '\\': >+ retval.append("\\\\"); >+ continue; >+ default: >+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { >+ String s = "0000" + Integer.toString(ch, 16); >+ retval.append("\\u" + s.substring(s.length() - 4, s.length())); >+ } else { >+ retval.append(ch); >+ } >+ continue; >+ } >+ } >+ return retval.toString(); >+ } >+ >+ /** >+ * Returns a detailed message for the Error when it is thrown by the >+ * token manager to indicate a lexical error. >+ * Parameters : >+ * EOFSeen : indicates if EOF caused the lexicl error >+ * curLexState : lexical state in which this error occured >+ * errorLine : line number when the error occured >+ * errorColumn : column number when the error occured >+ * errorAfter : prefix that was seen before this error occured >+ * curchar : the offending character >+ * Note: You can customize the lexical error message by modifying this method. >+ */ >+ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { >+ return("Lexical error at line " + >+ errorLine + ", column " + >+ errorColumn + ". Encountered: " + >+ (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + >+ "after : \"" + addEscapes(errorAfter) + "\""); >+ } >+ >+ /** >+ * You can also modify the body of this method to customize your error messages. >+ * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not >+ * of end-users concern, so you can return something like : >+ * >+ * "Internal Error : Please file a bug report .... " >+ * >+ * from this method for such cases in the release version of your parser. >+ */ >+ public String getMessage() { >+ return super.getMessage(); >+ } >+ >+ /* >+ * Constructors of various flavors follow. >+ */ >+ >+ public TokenMgrError() { >+ } >+ >+ public TokenMgrError(String message, int reason) { >+ super(message); >+ errorCode = reason; >+ } >+ >+ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { >+ this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeAttributesViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeAttributesViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeAttributesViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeAttributesViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class PrimitiveTypeAttributesViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeAttributesEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveType2ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveType2ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveType2ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveType2ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,56 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class PrimitiveType2ViewFactory extends AbstractShapeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createDescriptionStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFillStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveType2EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(PrimitiveTypeAttributesEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(PrimitiveTypeOperationsEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: icons/obj16/UMLDiagramFile.gif >=================================================================== >RCS file: icons/obj16/UMLDiagramFile.gif >diff -N icons/obj16/UMLDiagramFile.gif >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ icons/obj16/UMLDiagramFile.gif 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,6 @@ >+GIF89a¥ åëø___¿¿¿ÿßÀÀÀÿÿÀÀÀÿÿÿ?}IÒè¼²ÙÌfÀ@´?=´?=°?>¬@§B¢C? EFwM~uN{sPÔ²iÚ½|àÈ?ùúü÷ùûõøûòõûðõûíòúêðùßéøÜç÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!ù?,pÀB, H$ÄÃln I¤äC}< >+gô7yA×Nv¥Î¡kãLVD¢FC >+¯D-£FÁZhFQzj$$}I{? >+?Qj >+Q%¢ >+%Q&&r«©Q°±²[µQA; >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Operation3EditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Operation3EditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/Operation3EditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/Operation3EditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class Operation3EditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameParserConstants.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameParserConstants.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameParserConstants.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameParserConstants.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,79 @@ >+/* Generated By:JavaCC: Do not edit this line. AssociationNameParserConstants.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.name; >+ >+public interface AssociationNameParserConstants { >+ >+ int EOF = 0; >+ int SLASH = 3; >+ int COLON = 4; >+ int EQUALS = 5; >+ int LBRACKET = 6; >+ int RBRACKET = 7; >+ int LCURLY = 8; >+ int RCURLY = 9; >+ int COMMA = 10; >+ int PLUS = 11; >+ int MINUS = 12; >+ int NUMBER_SIGN = 13; >+ int TILDE = 14; >+ int DOT = 15; >+ int STAR = 16; >+ int READ_ONLY = 17; >+ int UNION = 18; >+ int SUBSETS = 19; >+ int REDEFINES = 20; >+ int ORDERED = 21; >+ int UNORDERED = 22; >+ int UNIQUE = 23; >+ int NON_UNIQUE = 24; >+ int INTEGER_LITERAL = 25; >+ int IDENTIFIER = 26; >+ int LETTER = 27; >+ int DIGIT = 28; >+ >+ int DEFAULT = 0; >+ >+ String[] tokenImage = { >+ "<EOF>", >+ "\" \"", >+ "\"\\t\"", >+ "\"/\"", >+ "\":\"", >+ "\"=\"", >+ "\"[\"", >+ "\"]\"", >+ "\"{\"", >+ "\"}\"", >+ "\",\"", >+ "\"+\"", >+ "\"-\"", >+ "\"#\"", >+ "\"~\"", >+ "\".\"", >+ "\"*\"", >+ "\"readOnly\"", >+ "\"union\"", >+ "\"subsets\"", >+ "\"redefines\"", >+ "\"ordered\"", >+ "\"unordered\"", >+ "\"unique\"", >+ "\"nonunique\"", >+ "<INTEGER_LITERAL>", >+ "<IDENTIFIER>", >+ "<LETTER>", >+ "<DIGIT>", >+ }; >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintNameViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintNameViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintNameViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintNameViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class ConstraintNameViewFactory extends BasicNodeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/OperationEditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/OperationEditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/OperationEditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/OperationEditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class OperationEditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencyEditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencyEditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencyEditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencyEditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class DependencyEditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PackageEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PackageEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/PackageEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/PackageEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class PackageEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/EnumerationLiteralEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/EnumerationLiteralEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/EnumerationLiteralEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/EnumerationLiteralEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class EnumerationLiteralEditHelper extends UMLBaseEditHelper { >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationParser.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationParser.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationParser.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationParser.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,443 @@ >+/* Generated By:JavaCC: Do not edit this line. InstanceSpecificationParser.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.instance; >+ >+import java.io.*; >+import java.util.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupResolver; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class InstanceSpecificationParser extends ExternalParserBase implements InstanceSpecificationParserConstants { >+ private InstanceSpecification mySubject; >+ >+ private static class ClassifierLookupCallback implements LookupResolver.Callback { >+ private final InstanceSpecification mySubject; >+ >+ public ClassifierLookupCallback(InstanceSpecification subject){ >+ mySubject = subject; >+ } >+ >+ public void lookupResolved(NamedElement resolution) { >+ if (resolution instanceof Classifier){ >+ mySubject.getClassifiers().add(resolution); >+ } >+ } >+ } >+ >+ public InstanceSpecificationParser(){ >+ this(new StringReader("")); >+ } >+ >+ public InstanceSpecificationParser(LookupSuite lookup){ >+ this(); >+ setLookupSuite(lookup); >+ } >+ >+ public EClass getSubjectClass(){ >+ return UMLPackage.eINSTANCE.getInstanceSpecification(); >+ } >+ >+ public void parse(EObject target, String text) throws ExternalParserException { >+ checkContext(); >+ ReInit(new StringReader(text)); >+ mySubject = (InstanceSpecification)target; >+ Declaration(); >+ mySubject = null; >+ } >+ >+ public InstanceSpecification parseNew(String text) throws ExternalParserException { >+ InstanceSpecification instance = UMLFactory.eINSTANCE.createInstanceSpecification(); >+ parse(instance, text); >+ return instance; >+ } >+ >+ protected static int parseInt(Token t) throws ParseException { >+ if (t.kind != InstanceSpecificationParserConstants.INTEGER_LITERAL){ >+ throw new IllegalStateException("Token: " + t + ", image: " + t.image); >+ } >+ try { >+ return Integer.parseInt(t.image); //XXX: "0005", "99999999999999999999999" >+ } catch (NumberFormatException e){ >+ throw new ParseException("Not supported integer value:" + t.image); >+ } >+ } >+ >+ final public void Declaration() throws ParseException { >+ if (jj_2_1(2)) { >+ AnonymousUnnamed(); >+ } else { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case 0: >+ case COLON: >+ case IDENTIFIER: >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case IDENTIFIER: >+ InstanceName(); >+ break; >+ default: >+ jj_la1[0] = jj_gen; >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case COLON: >+ InstanceType(); >+ break; >+ default: >+ jj_la1[1] = jj_gen; >+ ; >+ } >+ jj_consume_token(0); >+ break; >+ default: >+ jj_la1[2] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ } >+ } >+ >+ final public void AnonymousUnnamed() throws ParseException { >+ jj_consume_token(COLON); >+ mySubject.setName(null); mySubject.getClassifiers().clear(); >+ } >+ >+ final public void InstanceName() throws ParseException { >+ String name; >+ name = NameWithSpaces(); >+ mySubject.setName(name); >+ } >+ >+ final public void InstanceType() throws ParseException { >+ String type; >+ jj_consume_token(COLON); >+ type = NameWithSpaces(); >+ applyLookup(Type.class, type, new ClassifierLookupCallback(mySubject)); >+ label_1: >+ while (true) { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case COMMA: >+ ; >+ break; >+ default: >+ jj_la1[3] = jj_gen; >+ break label_1; >+ } >+ jj_consume_token(COMMA); >+ type = NameWithSpaces(); >+ applyLookup(Type.class, type, new ClassifierLookupCallback(mySubject)); >+ } >+ } >+ >+ final public String NameWithSpaces() throws ParseException { >+ StringBuffer result = new StringBuffer(); >+ Token t; >+ t = jj_consume_token(IDENTIFIER); >+ result.append(t.image); >+ label_2: >+ while (true) { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case IDENTIFIER: >+ ; >+ break; >+ default: >+ jj_la1[4] = jj_gen; >+ break label_2; >+ } >+ t = jj_consume_token(IDENTIFIER); >+ result.append(' '); result.append(t.image); >+ } >+ {if (true) return result.toString();} >+ throw new Error("Missing return statement in function"); >+ } >+ >+ final private boolean jj_2_1(int xla) { >+ jj_la = xla; jj_lastpos = jj_scanpos = token; >+ try { return !jj_3_1(); } >+ catch(LookaheadSuccess ls) { return true; } >+ finally { jj_save(0, xla); } >+ } >+ >+ final private boolean jj_3_1() { >+ if (jj_3R_3()) return true; >+ return false; >+ } >+ >+ final private boolean jj_3R_3() { >+ if (jj_scan_token(COLON)) return true; >+ return false; >+ } >+ >+ public InstanceSpecificationParserTokenManager token_source; >+ JavaCharStream jj_input_stream; >+ public Token token, jj_nt; >+ private int jj_ntk; >+ private Token jj_scanpos, jj_lastpos; >+ private int jj_la; >+ public boolean lookingAhead = false; >+ private boolean jj_semLA; >+ private int jj_gen; >+ final private int[] jj_la1 = new int[5]; >+ static private int[] jj_la1_0; >+ static { >+ jj_la1_0(); >+ } >+ private static void jj_la1_0() { >+ jj_la1_0 = new int[] {0x4000000,0x10,0x4000011,0x400,0x4000000,}; >+ } >+ final private JJCalls[] jj_2_rtns = new JJCalls[1]; >+ private boolean jj_rescan = false; >+ private int jj_gc = 0; >+ >+ public InstanceSpecificationParser(java.io.InputStream stream) { >+ jj_input_stream = new JavaCharStream(stream, 1, 1); >+ token_source = new InstanceSpecificationParserTokenManager(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 5; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public void ReInit(java.io.InputStream stream) { >+ jj_input_stream.ReInit(stream, 1, 1); >+ token_source.ReInit(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 5; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public InstanceSpecificationParser(java.io.Reader stream) { >+ jj_input_stream = new JavaCharStream(stream, 1, 1); >+ token_source = new InstanceSpecificationParserTokenManager(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 5; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public void ReInit(java.io.Reader stream) { >+ jj_input_stream.ReInit(stream, 1, 1); >+ token_source.ReInit(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 5; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public InstanceSpecificationParser(InstanceSpecificationParserTokenManager tm) { >+ token_source = tm; >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 5; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public void ReInit(InstanceSpecificationParserTokenManager tm) { >+ token_source = tm; >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 5; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ final private Token jj_consume_token(int kind) throws ParseException { >+ Token oldToken; >+ if ((oldToken = token).next != null) token = token.next; >+ else token = token.next = token_source.getNextToken(); >+ jj_ntk = -1; >+ if (token.kind == kind) { >+ jj_gen++; >+ if (++jj_gc > 100) { >+ jj_gc = 0; >+ for (int i = 0; i < jj_2_rtns.length; i++) { >+ JJCalls c = jj_2_rtns[i]; >+ while (c != null) { >+ if (c.gen < jj_gen) c.first = null; >+ c = c.next; >+ } >+ } >+ } >+ return token; >+ } >+ token = oldToken; >+ jj_kind = kind; >+ throw generateParseException(); >+ } >+ >+ static private final class LookaheadSuccess extends java.lang.Error { } >+ final private LookaheadSuccess jj_ls = new LookaheadSuccess(); >+ final private boolean jj_scan_token(int kind) { >+ if (jj_scanpos == jj_lastpos) { >+ jj_la--; >+ if (jj_scanpos.next == null) { >+ jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); >+ } else { >+ jj_lastpos = jj_scanpos = jj_scanpos.next; >+ } >+ } else { >+ jj_scanpos = jj_scanpos.next; >+ } >+ if (jj_rescan) { >+ int i = 0; Token tok = token; >+ while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } >+ if (tok != null) jj_add_error_token(kind, i); >+ } >+ if (jj_scanpos.kind != kind) return true; >+ if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; >+ return false; >+ } >+ >+ final public Token getNextToken() { >+ if (token.next != null) token = token.next; >+ else token = token.next = token_source.getNextToken(); >+ jj_ntk = -1; >+ jj_gen++; >+ return token; >+ } >+ >+ final public Token getToken(int index) { >+ Token t = lookingAhead ? jj_scanpos : token; >+ for (int i = 0; i < index; i++) { >+ if (t.next != null) t = t.next; >+ else t = t.next = token_source.getNextToken(); >+ } >+ return t; >+ } >+ >+ final private int jj_ntk() { >+ if ((jj_nt=token.next) == null) >+ return (jj_ntk = (token.next=token_source.getNextToken()).kind); >+ else >+ return (jj_ntk = jj_nt.kind); >+ } >+ >+ private java.util.Vector jj_expentries = new java.util.Vector(); >+ private int[] jj_expentry; >+ private int jj_kind = -1; >+ private int[] jj_lasttokens = new int[100]; >+ private int jj_endpos; >+ >+ private void jj_add_error_token(int kind, int pos) { >+ if (pos >= 100) return; >+ if (pos == jj_endpos + 1) { >+ jj_lasttokens[jj_endpos++] = kind; >+ } else if (jj_endpos != 0) { >+ jj_expentry = new int[jj_endpos]; >+ for (int i = 0; i < jj_endpos; i++) { >+ jj_expentry[i] = jj_lasttokens[i]; >+ } >+ boolean exists = false; >+ for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) { >+ int[] oldentry = (int[])(e.nextElement()); >+ if (oldentry.length == jj_expentry.length) { >+ exists = true; >+ for (int i = 0; i < jj_expentry.length; i++) { >+ if (oldentry[i] != jj_expentry[i]) { >+ exists = false; >+ break; >+ } >+ } >+ if (exists) break; >+ } >+ } >+ if (!exists) jj_expentries.addElement(jj_expentry); >+ if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; >+ } >+ } >+ >+ public ParseException generateParseException() { >+ jj_expentries.removeAllElements(); >+ boolean[] la1tokens = new boolean[29]; >+ for (int i = 0; i < 29; i++) { >+ la1tokens[i] = false; >+ } >+ if (jj_kind >= 0) { >+ la1tokens[jj_kind] = true; >+ jj_kind = -1; >+ } >+ for (int i = 0; i < 5; i++) { >+ if (jj_la1[i] == jj_gen) { >+ for (int j = 0; j < 32; j++) { >+ if ((jj_la1_0[i] & (1<<j)) != 0) { >+ la1tokens[j] = true; >+ } >+ } >+ } >+ } >+ for (int i = 0; i < 29; i++) { >+ if (la1tokens[i]) { >+ jj_expentry = new int[1]; >+ jj_expentry[0] = i; >+ jj_expentries.addElement(jj_expentry); >+ } >+ } >+ jj_endpos = 0; >+ jj_rescan_token(); >+ jj_add_error_token(0, 0); >+ int[][] exptokseq = new int[jj_expentries.size()][]; >+ for (int i = 0; i < jj_expentries.size(); i++) { >+ exptokseq[i] = (int[])jj_expentries.elementAt(i); >+ } >+ return new ParseException(token, exptokseq, tokenImage); >+ } >+ >+ final public void enable_tracing() { >+ } >+ >+ final public void disable_tracing() { >+ } >+ >+ final private void jj_rescan_token() { >+ jj_rescan = true; >+ for (int i = 0; i < 1; i++) { >+ JJCalls p = jj_2_rtns[i]; >+ do { >+ if (p.gen > jj_gen) { >+ jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; >+ switch (i) { >+ case 0: jj_3_1(); break; >+ } >+ } >+ p = p.next; >+ } while (p != null); >+ } >+ jj_rescan = false; >+ } >+ >+ final private void jj_save(int index, int xla) { >+ JJCalls p = jj_2_rtns[index]; >+ while (p.gen > jj_gen) { >+ if (p.next == null) { p = p.next = new JJCalls(); break; } >+ p = p.next; >+ } >+ p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; >+ } >+ >+ static final class JJCalls { >+ int gen; >+ Token first; >+ int arg; >+ JJCalls next; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/EnumerationEditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/EnumerationEditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/EnumerationEditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/EnumerationEditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class EnumerationEditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PortViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PortViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PortViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PortViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,52 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PortNameEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class PortViewFactory extends AbstractShapeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createDescriptionStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFillStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.PortEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(PortNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: plugin.properties >=================================================================== >RCS file: plugin.properties >diff -N plugin.properties >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ plugin.properties 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,19 @@ >+pluginName=UML Plugin >+providerName=Sample Plugin Provider, Inc >+ >+editorName=UMLClass Diagram Editor >+newWizardName=UMLClass Diagram >+newWizardDesc=Creates UMLClass diagram. >+ >+initDiagramActionLabel=Initialize umlclass_diagram diagram file >+loadResourceActionLabel=Load Resource... >+ >+navigatorContentName=*.umlclass_diagram diagram contents >+### >+# Property Sheet >+ >+tab.appearance=Appearance >+tab.diagram=Rulers & Grid >+tab.domain=Core >+### >+ >Index: icons/linksNavigatorGroup.gif >=================================================================== >RCS file: icons/linksNavigatorGroup.gif >diff -N icons/linksNavigatorGroup.gif >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ icons/linksNavigatorGroup.gif 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,5 @@ >+GIF89aÕÿÿr/GøØf'øÐxøàøÐf>2èÆøè°èÐøðÈÿÿÿÃ6úöºøà øØ?]FøèÒ«üößãϹ´2àÀxr+ðØ?¥l$yO@_l$?R¼2ï߯¼ 2à 6!ù,s@pH,?È#âèh:¨T0ô4® >+à?p©Ñd¢Y`B¡p8G AØ%%HÁçW¶ _B???B¥¦¥ B®©C³´µI·¸FA;Content-Type: image/gif >+ >+GIF89aÕÿÿr/GøØf'øÐxøàøÐf>2èÆøè°èÐøðÈÿÿÿÃ6úöºøà øØ?]FøèÒ«üößãϹ´2àÀxr+ðØ?¥l$yO@_l$?R¼2ï߯¼ 2à 6!ù,s@pH,?È#âèh:¨T0ô4® >+à?p©Ñd¢Y`B¡p8G AØ%%HÁçW¶ _B???B¥¦¥ B®©C³´µI·¸FA; >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLPaletteFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLPaletteFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLPaletteFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLPaletteFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,594 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.gef.Tool; >+import org.eclipse.gef.palette.PaletteContainer; >+import org.eclipse.gef.palette.PaletteGroup; >+import org.eclipse.gef.palette.PaletteRoot; >+import org.eclipse.gef.palette.ToolEntry; >+import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeConnectionTool; >+import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeCreationTool; >+import org.eclipse.jface.resource.ImageDescriptor; >+import org.eclipse.uml2.diagram.clazz.providers.UMLElementTypes; >+ >+/** >+ * @generated >+ */ >+public class UMLPaletteFactory { >+ >+ /** >+ * @generated >+ */ >+ public void fillPalette(PaletteRoot paletteRoot) { >+ paletteRoot.add(createNodes1Group()); >+ paletteRoot.add(createChildren2Group()); >+ paletteRoot.add(createLinks3Group()); >+ paletteRoot.add(createInstances4Group()); >+ } >+ >+ /** >+ * @generated >+ */ >+ private PaletteContainer createNodes1Group() { >+ PaletteContainer paletteContainer = new PaletteGroup("Nodes"); >+ paletteContainer.setDescription("Diagram Nodes"); >+ paletteContainer.add(createClass1CreationTool()); >+ paletteContainer.add(createPackage2CreationTool()); >+ paletteContainer.add(createEnumeration3CreationTool()); >+ paletteContainer.add(createDataType4CreationTool()); >+ paletteContainer.add(createPrimitiveType5CreationTool()); >+ paletteContainer.add(createConstraint6CreationTool()); >+ paletteContainer.add(createAssociationClass7CreationTool()); >+ paletteContainer.add(createInterface8CreationTool()); >+ return paletteContainer; >+ } >+ >+ /** >+ * @generated >+ */ >+ private PaletteContainer createChildren2Group() { >+ PaletteContainer paletteContainer = new PaletteGroup("Children"); >+ paletteContainer.setDescription("Child Elements of the Diagram Nodes"); >+ paletteContainer.add(createAttribute1CreationTool()); >+ paletteContainer.add(createOperation2CreationTool()); >+ paletteContainer.add(createValueSpecification3CreationTool()); >+ paletteContainer.add(createEnumLiteral4CreationTool()); >+ paletteContainer.add(createPort5CreationTool()); >+ return paletteContainer; >+ } >+ >+ /** >+ * @generated >+ */ >+ private PaletteContainer createLinks3Group() { >+ PaletteContainer paletteContainer = new PaletteGroup("Links"); >+ paletteContainer.setDescription("Diagram Links"); >+ paletteContainer.add(createAssociation1CreationTool()); >+ paletteContainer.add(createGeneralization2CreationTool()); >+ paletteContainer.add(createProvidedInterface3CreationTool()); >+ paletteContainer.add(createRequiredInterface4CreationTool()); >+ paletteContainer.add(createDependency5CreationTool()); >+ paletteContainer.add(createConstrainedElement6CreationTool()); >+ paletteContainer.add(createNAryDependencyTarget7CreationTool()); >+ paletteContainer.add(createNAryDependencySource8CreationTool()); >+ paletteContainer.add(createAssociationEnd9CreationTool()); >+ return paletteContainer; >+ } >+ >+ /** >+ * @generated >+ */ >+ private PaletteContainer createInstances4Group() { >+ PaletteContainer paletteContainer = new PaletteGroup("Instances"); >+ paletteContainer.setDescription("Instances"); >+ paletteContainer.add(createInstanceSpecification1CreationTool()); >+ paletteContainer.add(createSlot2CreationTool()); >+ return paletteContainer; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createClass1CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Class_3007); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.Class_3007); >+ elementTypes.add(UMLElementTypes.Class_2001); >+ elementTypes.add(UMLElementTypes.Class_3003); >+ ToolEntry result = new NodeToolEntry("Class", "Create Class", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createPackage2CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Package_2002); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.Package_2002); >+ elementTypes.add(UMLElementTypes.Package_3006); >+ ToolEntry result = new NodeToolEntry("Package", "Create Package", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createEnumeration3CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Enumeration_3011); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.Enumeration_3011); >+ elementTypes.add(UMLElementTypes.Enumeration_2003); >+ ToolEntry result = new NodeToolEntry("Enumeration", "Create Enumeration", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createDataType4CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.DataType_3008); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.DataType_3008); >+ elementTypes.add(UMLElementTypes.DataType_2004); >+ ToolEntry result = new NodeToolEntry("DataType", "Create DataType", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createPrimitiveType5CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.PrimitiveType_3009); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.PrimitiveType_3009); >+ elementTypes.add(UMLElementTypes.PrimitiveType_2005); >+ ToolEntry result = new NodeToolEntry("PrimitiveType", "Create PrimitiveType", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createConstraint6CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Constraint_2006); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.Constraint_2006); >+ ToolEntry result = new NodeToolEntry("Constraint", "Create Constraint", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createAssociationClass7CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.AssociationClass_3012); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.AssociationClass_3012); >+ elementTypes.add(UMLElementTypes.AssociationClass_2007); >+ ToolEntry result = new NodeToolEntry("Association Class", "Create Association Class", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createInterface8CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Interface_2010); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.Interface_2010); >+ ToolEntry result = new NodeToolEntry("Interface", "Create Interface", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createAttribute1CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Property_3001); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.Property_3001); >+ elementTypes.add(UMLElementTypes.Property_3019); >+ elementTypes.add(UMLElementTypes.Property_3014); >+ elementTypes.add(UMLElementTypes.Property_3021); >+ elementTypes.add(UMLElementTypes.Property_3023); >+ ToolEntry result = new NodeToolEntry("Attribute", "Create Attribute", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createOperation2CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Operation_3002); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.Operation_3002); >+ elementTypes.add(UMLElementTypes.Operation_3020); >+ elementTypes.add(UMLElementTypes.Operation_3015); >+ elementTypes.add(UMLElementTypes.Operation_3022); >+ elementTypes.add(UMLElementTypes.Operation_3024); >+ ToolEntry result = new NodeToolEntry("Operation", "Create Operation", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createValueSpecification3CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.LiteralString_3005); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.LiteralString_3005); >+ ToolEntry result = new NodeToolEntry("Value Specification", "Create Value Specification", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createEnumLiteral4CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.EnumerationLiteral_3016); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.EnumerationLiteral_3016); >+ ToolEntry result = new NodeToolEntry("Enum Literal", "Create Enum Literal", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createPort5CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Port_3025); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.Port_3025); >+ ToolEntry result = new NodeToolEntry("Port", "Create Port", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createAssociation1CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Association_4005); >+ >+ largeImage = smallImage; >+ >+ final List relationshipTypes = new ArrayList(); >+ relationshipTypes.add(UMLElementTypes.Association_4005); >+ ToolEntry result = new LinkToolEntry("Association", "Association", smallImage, largeImage, relationshipTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createGeneralization2CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Generalization_4001); >+ >+ largeImage = smallImage; >+ >+ final List relationshipTypes = new ArrayList(); >+ relationshipTypes.add(UMLElementTypes.Generalization_4001); >+ ToolEntry result = new LinkToolEntry("Generalization", "Create Generalization Link", smallImage, largeImage, relationshipTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createProvidedInterface3CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.InterfaceRealization_4008); >+ >+ largeImage = smallImage; >+ >+ final List relationshipTypes = new ArrayList(); >+ relationshipTypes.add(UMLElementTypes.InterfaceRealization_4008); >+ ToolEntry result = new LinkToolEntry("Provided Interface", "Create Interface Realization", smallImage, largeImage, relationshipTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createRequiredInterface4CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Usage_4009); >+ >+ largeImage = smallImage; >+ >+ final List relationshipTypes = new ArrayList(); >+ relationshipTypes.add(UMLElementTypes.Usage_4009); >+ ToolEntry result = new LinkToolEntry("Required Interface", "Create Usage", smallImage, largeImage, relationshipTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createDependency5CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Dependency_4002); >+ >+ largeImage = smallImage; >+ >+ final List relationshipTypes = new ArrayList(); >+ relationshipTypes.add(UMLElementTypes.Dependency_4002); >+ ToolEntry result = new LinkToolEntry("Dependency", "Create Dependency Link", smallImage, largeImage, relationshipTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createConstrainedElement6CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.ConstraintConstrainedElement_4004); >+ >+ largeImage = smallImage; >+ >+ final List relationshipTypes = new ArrayList(); >+ relationshipTypes.add(UMLElementTypes.ConstraintConstrainedElement_4004); >+ ToolEntry result = new LinkToolEntry("Constrained Element", "Create Constrained Element Link", smallImage, largeImage, relationshipTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createNAryDependencyTarget7CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.DependencySupplier_4006); >+ >+ largeImage = smallImage; >+ >+ final List relationshipTypes = new ArrayList(); >+ relationshipTypes.add(UMLElementTypes.DependencySupplier_4006); >+ ToolEntry result = new LinkToolEntry("NAry Dependency Target", "Add NAry Dependency Target", smallImage, largeImage, relationshipTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createNAryDependencySource8CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.DependencyClient_4007); >+ >+ largeImage = smallImage; >+ >+ final List relationshipTypes = new ArrayList(); >+ relationshipTypes.add(UMLElementTypes.DependencyClient_4007); >+ ToolEntry result = new LinkToolEntry("NAry Dependency Source", "Add NAry Dependency Source", smallImage, largeImage, relationshipTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createAssociationEnd9CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Property_4003); >+ >+ largeImage = smallImage; >+ >+ final List relationshipTypes = new ArrayList(); >+ relationshipTypes.add(UMLElementTypes.Property_4003); >+ ToolEntry result = new LinkToolEntry("Association End", "Create Association End Link", smallImage, largeImage, relationshipTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createInstanceSpecification1CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.InstanceSpecification_3013); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.InstanceSpecification_3013); >+ elementTypes.add(UMLElementTypes.InstanceSpecification_2008); >+ ToolEntry result = new NodeToolEntry("Instance Specification", "Create Instance Specification", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ToolEntry createSlot2CreationTool() { >+ ImageDescriptor smallImage; >+ ImageDescriptor largeImage; >+ >+ smallImage = UMLElementTypes.getImageDescriptor(UMLElementTypes.Slot_3017); >+ >+ largeImage = smallImage; >+ >+ final List elementTypes = new ArrayList(); >+ elementTypes.add(UMLElementTypes.Slot_3017); >+ ToolEntry result = new NodeToolEntry("Slot", "Create Slot", smallImage, largeImage, elementTypes); >+ >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private static class NodeToolEntry extends ToolEntry { >+ >+ /** >+ * @generated >+ */ >+ private final List elementTypes; >+ >+ /** >+ * @generated >+ */ >+ private NodeToolEntry(String title, String description, ImageDescriptor smallIcon, ImageDescriptor largeIcon, List elementTypes) { >+ super(title, description, smallIcon, largeIcon); >+ this.elementTypes = elementTypes; >+ } >+ >+ /** >+ * @generated >+ */ >+ public Tool createTool() { >+ Tool tool = new UnspecifiedTypeCreationTool(elementTypes); >+ tool.setProperties(getToolProperties()); >+ return tool; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private static class LinkToolEntry extends ToolEntry { >+ >+ /** >+ * @generated >+ */ >+ private final List relationshipTypes; >+ >+ /** >+ * @generated >+ */ >+ private LinkToolEntry(String title, String description, ImageDescriptor smallIcon, ImageDescriptor largeIcon, List relationshipTypes) { >+ super(title, description, smallIcon, largeIcon); >+ this.relationshipTypes = relationshipTypes; >+ } >+ >+ /** >+ * @generated >+ */ >+ public Tool createTool() { >+ Tool tool = new UnspecifiedTypeConnectionTool(relationshipTypes); >+ tool.setProperties(getToolProperties()); >+ return tool; >+ } >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassAttributesViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassAttributesViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassAttributesViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassAttributesViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class AssociationClassAttributesViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassAttributesEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Dependency2ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Dependency2ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Dependency2ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Dependency2ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,50 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ConnectionViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyName2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Dependency2ViewFactory extends ConnectionViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createRoutingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Dependency2EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(DependencyName2EditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationOperationsViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationOperationsViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationOperationsViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationOperationsViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class EnumerationOperationsViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationOperationsEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/property.jj >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/property.jj >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/property/property.jj >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/property/property.jj 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,382 @@ >+options { >+ JAVA_UNICODE_ESCAPE = true; >+ STATIC=false; >+} >+ >+PARSER_BEGIN(PropertyParser) >+ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.property; >+ >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.diagram.parser.lookup.LookupResolver; >+import org.eclipse.uml2.uml.*; >+ >+public class PropertyParser extends ExternalParserBase { >+ private Property mySubject; >+ >+ private static class TypeLookupCallback implements LookupResolver.Callback { >+ private final Property myProperty; >+ >+ public TypeLookupCallback(Property property){ >+ myProperty = property; >+ } >+ >+ public void lookupResolved(NamedElement resolution) { >+ if (resolution instanceof Type){ >+ myProperty.setType((Type)resolution); >+ } >+ } >+ } >+ >+ public PropertyParser(){ >+ this(new StringReader("")); >+ } >+ >+ public PropertyParser(LookupSuite lookup){ >+ this(); >+ setLookupSuite(lookup); >+ } >+ >+ public EClass getSubjectClass(){ >+ return UMLPackage.eINSTANCE.getProperty(); >+ } >+ >+ public void parse(EObject target, String text) throws ExternalParserException { >+ checkContext(); >+ ReInit(new StringReader(text)); >+ mySubject = (Property)target; >+ Declaration(); >+ mySubject = null; >+ } >+ >+ protected static int parseInt(Token t) throws ParseException { >+ if (t.kind != PropertyParserConstants.INTEGER_LITERAL){ >+ throw new IllegalStateException("Token: " + t + ", image: " + t.image); >+ } >+ try { >+ return Integer.parseInt(t.image); //XXX: "0005", "99999999999999999999999" >+ } catch (NumberFormatException e){ >+ throw new ParseException("Not supported integer value:" + t.image); >+ } >+ } >+ >+} >+ >+PARSER_END(PropertyParser) >+ >+/* WHITE SPACE */ >+ >+SPECIAL_TOKEN : >+{ >+ " " >+| "\t" >+} >+ >+/* SEPARATORS */ >+TOKEN : >+{ >+ < SLASH: "/" > >+| < COLON: ":" > >+| < EQUALS: "=" > >+| < LBRACKET: "[" > >+| < RBRACKET: "]" > >+| < LCURLY: "{" > >+| < RCURLY: "}" > >+| < COMMA: "," > >+} >+ >+/* SPECIAL_MEANING */ >+TOKEN : >+{ >+ < PLUS: "+" > >+| < MINUS: "-" > >+| < NUMBER_SIGN: "#" > >+| < TILDE: "~" > >+| < DOT: "." > >+| < STAR: "*" > >+} >+ >+/* MODIFIERS */ >+TOKEN : >+{ >+ < READ_ONLY: "readOnly" > >+| < UNION: "union" > >+| < SUBSETS: "subsets" > >+| < REDEFINES: "redefines" > >+| < ORDERED: "ordered" > >+| < UNORDERED: "unordered" > >+| < UNIQUE: "unique" > >+| < NON_UNIQUE: "nonunique" > >+} >+ >+/* LITERALS */ >+TOKEN: >+{ >+ < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])* > >+} >+ >+TOKEN : >+{ >+ < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)* > >+| >+ < #LETTER: >+ [ >+ "\u0024", >+ "\u0041"-"\u005a", >+ "\u005f", >+ "\u0061"-"\u007a", >+ "\u00c0"-"\u00d6", >+ "\u00d8"-"\u00f6", >+ "\u00f8"-"\u00ff", >+ "\u0100"-"\u1fff", >+ "\u3040"-"\u318f", >+ "\u3300"-"\u337f", >+ "\u3400"-"\u3d2d", >+ "\u4e00"-"\u9fff", >+ "\uf900"-"\ufaff" >+ ] >+ > >+| >+ < #DIGIT: >+ [ >+ "\u0030"-"\u0039", >+ "\u0660"-"\u0669", >+ "\u06f0"-"\u06f9", >+ "\u0966"-"\u096f", >+ "\u09e6"-"\u09ef", >+ "\u0a66"-"\u0a6f", >+ "\u0ae6"-"\u0aef", >+ "\u0b66"-"\u0b6f", >+ "\u0be7"-"\u0bef", >+ "\u0c66"-"\u0c6f", >+ "\u0ce6"-"\u0cef", >+ "\u0d66"-"\u0d6f", >+ "\u0e50"-"\u0e59", >+ "\u0ed0"-"\u0ed9", >+ "\u1040"-"\u1049" >+ ] >+ > >+} >+ >+void Declaration() : >+{} >+{ >+ ( >+ [ Visibility() ] >+ [ IsDerived() ] >+ PropertyName() >+ [ PropertyType() ] >+ [ Multiplicity() ] >+ [ DefaultValue() ] >+ [ PropertyModifiers() ] >+ ) <EOF> >+} >+ >+void PropertyName() : >+{ >+ String name; >+} >+{ >+ name = NameWithSpaces() >+ { >+ mySubject.setName(name); >+ } >+} >+ >+void Visibility() : >+{ >+ VisibilityKind kind; >+} >+{ >+ ( >+ <PLUS> { kind = VisibilityKind.PUBLIC_LITERAL; } >+ | >+ <MINUS> { kind = VisibilityKind.PRIVATE_LITERAL; } >+ | >+ <NUMBER_SIGN> { kind = VisibilityKind.PROTECTED_LITERAL; } >+ | >+ <TILDE> { kind = VisibilityKind.PACKAGE_LITERAL; } >+ ) >+ { >+ mySubject.setVisibility(kind); >+ } >+} >+ >+void Multiplicity() : >+{} >+{ >+ MultiplicityRange() >+ /* XXX: Parse conflict in case of empty DefaultValue, consider "a:int[5]{unique}" >+ [ MultiplicityDesignator() ] >+ */ >+} >+ >+/* XXX: Parse conflict in case of empty default value >+void MultiplicityDesignator() : >+{ } >+{ >+ <LCURLY> >+ ( >+ ( MultiplicityUnique() [ MultiplicityOrdered() ] ) >+ | >+ ( MultiplicityOrdered() [ MultiplicityUnique() ] ) >+ ) >+ <RCURLY> >+} >+ >+void MultiplicityUnique() : >+{} >+{ >+ <UNIQUE> { mySubject.setIsUnique(true); } >+ | >+ <NON_UNIQUE> { mySubject.setIsUnique(false); } >+} >+ >+void MultiplicityOrdered() : >+{} >+{ >+ <ORDERED> { mySubject.setIsOrdered(true); } >+ | >+ <UNORDERED> { mySubject.setIsOrdered(false); } >+} >+ >+*/ >+ >+/* XXX: ValueSpecification -- how to parse */ >+void MultiplicityRange() : >+{ >+ Token tLower = null; >+ Token tUpper; >+} >+{ >+ <LBRACKET> >+ ( >+ [ LOOKAHEAD(2) tLower = <INTEGER_LITERAL> <DOT> <DOT> { mySubject.setLower(parseInt(tLower)); } ] >+ ( >+ tUpper = <STAR> >+ { >+ if (tLower == null){ >+ mySubject.setLower(0); >+ } >+ mySubject.setUpper(LiteralUnlimitedNatural.UNLIMITED); >+ } >+ | >+ tUpper = <INTEGER_LITERAL> >+ { >+ if (tLower == null){ >+ mySubject.setLower(parseInt(tUpper)); >+ } >+ mySubject.setUpper(parseInt(tUpper)); >+ } >+ ) >+ ) >+ <RBRACKET> >+} >+ >+void IsDerived() : >+{} >+{ >+ <SLASH> { mySubject.setIsDerived(true); } >+} >+ >+void PropertyType() : >+{ >+ String type; >+} >+{ >+ <COLON> type = NameWithSpaces() { applyLookup(Type.class, type, new TypeLookupCallback(mySubject)); } >+} >+ >+String NameWithSpaces() : >+{ >+ StringBuffer result = new StringBuffer(); >+ Token t; >+} >+{ >+ ( >+ t = <IDENTIFIER> { result.append(t.image); } >+ ( t = <IDENTIFIER> { result.append(' '); result.append(t.image); } ) * >+ ) >+ { >+ return result.toString(); >+ } >+} >+ >+void DefaultValue() : >+{ >+ Token t; >+} >+{ >+ ( >+ <EQUALS> ( t = <IDENTIFIER> | t = <INTEGER_LITERAL> { /* XXX: Should be Expression */ } ) >+ ) >+ { >+ mySubject.setDefault(t.image); >+ } >+} >+ >+void SimpleTokenPropertyModifier() : >+{} >+{ >+ ( >+ <READ_ONLY> { mySubject.setIsReadOnly(true); } >+ | >+ <UNION> { mySubject.setIsDerivedUnion(true); } >+ | >+ <ORDERED> { mySubject.setIsOrdered(true); } >+ | >+ <UNORDERED> { mySubject.setIsOrdered(false); } >+ | >+ <UNIQUE> { mySubject.setIsUnique(true); } >+ | >+ <NON_UNIQUE> { mySubject.setIsUnique(false); } >+ ) >+} >+ >+void ReferencingPropertyModifier() : >+{ >+ String name; >+} >+{ >+ ( >+ <SUBSETS> name = NameWithSpaces() >+ { >+ Property subsets = lookup(Property.class, name); >+ if (subsets != null) { >+ mySubject.getSubsettedProperties().add(subsets); >+ } >+ } >+ | >+ <REDEFINES> name = NameWithSpaces() >+ { >+ RedefinableElement redefines = lookup(RedefinableElement.class, name); >+ if (redefines != null) { >+ mySubject.getRedefinedElements().add(redefines); >+ } >+ } >+ ) >+} >+ >+void PropertyModifiers() : >+{} >+{ >+ <LCURLY> >+ ( SimpleTokenPropertyModifier() | ReferencingPropertyModifier() ) >+ ( <COMMA> ( SimpleTokenPropertyModifier() | ReferencingPropertyModifier() ) )* >+ <RCURLY> >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PortNameViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PortNameViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PortNameViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PortNameViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; >+import org.eclipse.gmf.runtime.notation.Location; >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class PortNameViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { >+ Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint); >+ Location location = (Location) view.getLayoutConstraint(); >+ IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit()); >+ location.setX(mapMode.DPtoLP(0)); >+ location.setY(mapMode.DPtoLP(5)); >+ return view; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecificationViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecificationViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecificationViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecificationViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class InstanceSpecificationViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotParserTokenManager.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotParserTokenManager.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotParserTokenManager.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotParserTokenManager.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,728 @@ >+/* Generated By:JavaCC: Do not edit this line. SlotParserTokenManager.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.slot; >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class SlotParserTokenManager implements SlotParserConstants >+{ >+ public java.io.PrintStream debugStream = System.out; >+ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } >+private final int jjStopStringLiteralDfa_0(int pos, long active0) >+{ >+ switch (pos) >+ { >+ case 0: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ return 2; >+ } >+ return -1; >+ case 1: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 1; >+ return 2; >+ } >+ return -1; >+ case 2: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 2; >+ return 2; >+ } >+ return -1; >+ case 3: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 3; >+ return 2; >+ } >+ return -1; >+ case 4: >+ if ((active0 & 0x40000L) != 0L) >+ return 2; >+ if ((active0 & 0x1fa0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 4; >+ return 2; >+ } >+ return -1; >+ case 5: >+ if ((active0 & 0x800000L) != 0L) >+ return 2; >+ if ((active0 & 0x17a0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 5; >+ return 2; >+ } >+ return -1; >+ case 6: >+ if ((active0 & 0x280000L) != 0L) >+ return 2; >+ if ((active0 & 0x1520000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 6; >+ return 2; >+ } >+ return -1; >+ case 7: >+ if ((active0 & 0x20000L) != 0L) >+ return 2; >+ if ((active0 & 0x1500000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 7; >+ return 2; >+ } >+ return -1; >+ default : >+ return -1; >+ } >+} >+private final int jjStartNfa_0(int pos, long active0) >+{ >+ return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); >+} >+private final int jjStopAtPos(int pos, int kind) >+{ >+ jjmatchedKind = kind; >+ jjmatchedPos = pos; >+ return pos + 1; >+} >+private final int jjStartNfaWithStates_0(int pos, int kind, int state) >+{ >+ jjmatchedKind = kind; >+ jjmatchedPos = pos; >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { return pos + 1; } >+ return jjMoveNfa_0(state, pos + 1); >+} >+private final int jjMoveStringLiteralDfa0_0() >+{ >+ switch(curChar) >+ { >+ case 9: >+ return jjStopAtPos(0, 2); >+ case 32: >+ return jjStopAtPos(0, 1); >+ case 34: >+ return jjStopAtPos(0, 29); >+ case 35: >+ return jjStopAtPos(0, 13); >+ case 42: >+ return jjStopAtPos(0, 16); >+ case 43: >+ return jjStopAtPos(0, 11); >+ case 44: >+ return jjStopAtPos(0, 10); >+ case 45: >+ return jjStopAtPos(0, 12); >+ case 46: >+ return jjStopAtPos(0, 15); >+ case 47: >+ return jjStopAtPos(0, 3); >+ case 58: >+ return jjStopAtPos(0, 4); >+ case 61: >+ return jjStopAtPos(0, 5); >+ case 91: >+ return jjStopAtPos(0, 6); >+ case 93: >+ return jjStopAtPos(0, 7); >+ case 110: >+ return jjMoveStringLiteralDfa1_0(0x1000000L); >+ case 111: >+ return jjMoveStringLiteralDfa1_0(0x200000L); >+ case 114: >+ return jjMoveStringLiteralDfa1_0(0x120000L); >+ case 115: >+ return jjMoveStringLiteralDfa1_0(0x80000L); >+ case 117: >+ return jjMoveStringLiteralDfa1_0(0xc40000L); >+ case 123: >+ return jjStopAtPos(0, 8); >+ case 125: >+ return jjStopAtPos(0, 9); >+ case 126: >+ return jjStopAtPos(0, 14); >+ default : >+ return jjMoveNfa_0(1, 0); >+ } >+} >+private final int jjMoveStringLiteralDfa1_0(long active0) >+{ >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(0, active0); >+ return 1; >+ } >+ switch(curChar) >+ { >+ case 101: >+ return jjMoveStringLiteralDfa2_0(active0, 0x120000L); >+ case 110: >+ return jjMoveStringLiteralDfa2_0(active0, 0xc40000L); >+ case 111: >+ return jjMoveStringLiteralDfa2_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa2_0(active0, 0x200000L); >+ case 117: >+ return jjMoveStringLiteralDfa2_0(active0, 0x80000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(0, active0); >+} >+private final int jjMoveStringLiteralDfa2_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(0, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(1, active0); >+ return 2; >+ } >+ switch(curChar) >+ { >+ case 97: >+ return jjMoveStringLiteralDfa3_0(active0, 0x20000L); >+ case 98: >+ return jjMoveStringLiteralDfa3_0(active0, 0x80000L); >+ case 100: >+ return jjMoveStringLiteralDfa3_0(active0, 0x300000L); >+ case 105: >+ return jjMoveStringLiteralDfa3_0(active0, 0x840000L); >+ case 110: >+ return jjMoveStringLiteralDfa3_0(active0, 0x1000000L); >+ case 111: >+ return jjMoveStringLiteralDfa3_0(active0, 0x400000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(1, active0); >+} >+private final int jjMoveStringLiteralDfa3_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(1, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(2, active0); >+ return 3; >+ } >+ switch(curChar) >+ { >+ case 100: >+ return jjMoveStringLiteralDfa4_0(active0, 0x20000L); >+ case 101: >+ return jjMoveStringLiteralDfa4_0(active0, 0x300000L); >+ case 111: >+ return jjMoveStringLiteralDfa4_0(active0, 0x40000L); >+ case 113: >+ return jjMoveStringLiteralDfa4_0(active0, 0x800000L); >+ case 114: >+ return jjMoveStringLiteralDfa4_0(active0, 0x400000L); >+ case 115: >+ return jjMoveStringLiteralDfa4_0(active0, 0x80000L); >+ case 117: >+ return jjMoveStringLiteralDfa4_0(active0, 0x1000000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(2, active0); >+} >+private final int jjMoveStringLiteralDfa4_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(2, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(3, active0); >+ return 4; >+ } >+ switch(curChar) >+ { >+ case 79: >+ return jjMoveStringLiteralDfa5_0(active0, 0x20000L); >+ case 100: >+ return jjMoveStringLiteralDfa5_0(active0, 0x400000L); >+ case 101: >+ return jjMoveStringLiteralDfa5_0(active0, 0x80000L); >+ case 102: >+ return jjMoveStringLiteralDfa5_0(active0, 0x100000L); >+ case 110: >+ if ((active0 & 0x40000L) != 0L) >+ return jjStartNfaWithStates_0(4, 18, 2); >+ return jjMoveStringLiteralDfa5_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa5_0(active0, 0x200000L); >+ case 117: >+ return jjMoveStringLiteralDfa5_0(active0, 0x800000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(3, active0); >+} >+private final int jjMoveStringLiteralDfa5_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(3, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(4, active0); >+ return 5; >+ } >+ switch(curChar) >+ { >+ case 101: >+ if ((active0 & 0x800000L) != 0L) >+ return jjStartNfaWithStates_0(5, 23, 2); >+ return jjMoveStringLiteralDfa6_0(active0, 0x600000L); >+ case 105: >+ return jjMoveStringLiteralDfa6_0(active0, 0x1100000L); >+ case 110: >+ return jjMoveStringLiteralDfa6_0(active0, 0x20000L); >+ case 116: >+ return jjMoveStringLiteralDfa6_0(active0, 0x80000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(4, active0); >+} >+private final int jjMoveStringLiteralDfa6_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(4, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(5, active0); >+ return 6; >+ } >+ switch(curChar) >+ { >+ case 100: >+ if ((active0 & 0x200000L) != 0L) >+ return jjStartNfaWithStates_0(6, 21, 2); >+ break; >+ case 108: >+ return jjMoveStringLiteralDfa7_0(active0, 0x20000L); >+ case 110: >+ return jjMoveStringLiteralDfa7_0(active0, 0x100000L); >+ case 113: >+ return jjMoveStringLiteralDfa7_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa7_0(active0, 0x400000L); >+ case 115: >+ if ((active0 & 0x80000L) != 0L) >+ return jjStartNfaWithStates_0(6, 19, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(5, active0); >+} >+private final int jjMoveStringLiteralDfa7_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(5, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(6, active0); >+ return 7; >+ } >+ switch(curChar) >+ { >+ case 101: >+ return jjMoveStringLiteralDfa8_0(active0, 0x500000L); >+ case 117: >+ return jjMoveStringLiteralDfa8_0(active0, 0x1000000L); >+ case 121: >+ if ((active0 & 0x20000L) != 0L) >+ return jjStartNfaWithStates_0(7, 17, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(6, active0); >+} >+private final int jjMoveStringLiteralDfa8_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(6, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(7, active0); >+ return 8; >+ } >+ switch(curChar) >+ { >+ case 100: >+ if ((active0 & 0x400000L) != 0L) >+ return jjStartNfaWithStates_0(8, 22, 2); >+ break; >+ case 101: >+ if ((active0 & 0x1000000L) != 0L) >+ return jjStartNfaWithStates_0(8, 24, 2); >+ break; >+ case 115: >+ if ((active0 & 0x100000L) != 0L) >+ return jjStartNfaWithStates_0(8, 20, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(7, active0); >+} >+private final void jjCheckNAdd(int state) >+{ >+ if (jjrounds[state] != jjround) >+ { >+ jjstateSet[jjnewStateCnt++] = state; >+ jjrounds[state] = jjround; >+ } >+} >+private final void jjAddStates(int start, int end) >+{ >+ do { >+ jjstateSet[jjnewStateCnt++] = jjnextStates[start]; >+ } while (start++ != end); >+} >+private final void jjCheckNAddTwoStates(int state1, int state2) >+{ >+ jjCheckNAdd(state1); >+ jjCheckNAdd(state2); >+} >+private final void jjCheckNAddStates(int start, int end) >+{ >+ do { >+ jjCheckNAdd(jjnextStates[start]); >+ } while (start++ != end); >+} >+private final void jjCheckNAddStates(int start) >+{ >+ jjCheckNAdd(jjnextStates[start]); >+ jjCheckNAdd(jjnextStates[start + 1]); >+} >+static final long[] jjbitVec0 = { >+ 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L >+}; >+static final long[] jjbitVec2 = { >+ 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL >+}; >+static final long[] jjbitVec3 = { >+ 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL >+}; >+static final long[] jjbitVec4 = { >+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L >+}; >+static final long[] jjbitVec5 = { >+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L >+}; >+static final long[] jjbitVec6 = { >+ 0x3fffffffffffL, 0x0L, 0x0L, 0x0L >+}; >+private final int jjMoveNfa_0(int startState, int curPos) >+{ >+ int[] nextStates; >+ int startsAt = 0; >+ jjnewStateCnt = 3; >+ int i = 1; >+ jjstateSet[0] = startState; >+ int j, kind = 0x7fffffff; >+ for (;;) >+ { >+ if (++jjround == 0x7fffffff) >+ ReInitRounds(); >+ if (curChar < 64) >+ { >+ long l = 1L << curChar; >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ if ((0x3ff000000000000L & l) != 0L) >+ { >+ if (kind > 25) >+ kind = 25; >+ jjCheckNAdd(0); >+ } >+ else if (curChar == 36) >+ { >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ } >+ break; >+ case 0: >+ if ((0x3ff000000000000L & l) == 0L) >+ break; >+ if (kind > 25) >+ kind = 25; >+ jjCheckNAdd(0); >+ break; >+ case 2: >+ if ((0x3ff001000000000L & l) == 0L) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ else if (curChar < 128) >+ { >+ long l = 1L << (curChar & 077); >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ case 2: >+ if ((0x7fffffe87fffffeL & l) == 0L) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ else >+ { >+ int hiByte = (int)(curChar >> 8); >+ int i1 = hiByte >> 6; >+ long l1 = 1L << (hiByte & 077); >+ int i2 = (curChar & 0xff) >> 6; >+ long l2 = 1L << (curChar & 077); >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ case 2: >+ if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ if (kind != 0x7fffffff) >+ { >+ jjmatchedKind = kind; >+ jjmatchedPos = curPos; >+ kind = 0x7fffffff; >+ } >+ ++curPos; >+ if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) >+ return curPos; >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { return curPos; } >+ } >+} >+static final int[] jjnextStates = { >+}; >+private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) >+{ >+ switch(hiByte) >+ { >+ case 0: >+ return ((jjbitVec2[i2] & l2) != 0L); >+ case 48: >+ return ((jjbitVec3[i2] & l2) != 0L); >+ case 49: >+ return ((jjbitVec4[i2] & l2) != 0L); >+ case 51: >+ return ((jjbitVec5[i2] & l2) != 0L); >+ case 61: >+ return ((jjbitVec6[i2] & l2) != 0L); >+ default : >+ if ((jjbitVec0[i1] & l1) != 0L) >+ return true; >+ return false; >+ } >+} >+public static final String[] jjstrLiteralImages = { >+"", null, null, "\57", "\72", "\75", "\133", "\135", "\173", "\175", "\54", >+"\53", "\55", "\43", "\176", "\56", "\52", "\162\145\141\144\117\156\154\171", >+"\165\156\151\157\156", "\163\165\142\163\145\164\163", "\162\145\144\145\146\151\156\145\163", >+"\157\162\144\145\162\145\144", "\165\156\157\162\144\145\162\145\144", "\165\156\151\161\165\145", >+"\156\157\156\165\156\151\161\165\145", null, null, null, null, "\42", }; >+public static final String[] lexStateNames = { >+ "DEFAULT", >+}; >+static final long[] jjtoToken = { >+ 0x27fffff9L, >+}; >+static final long[] jjtoSkip = { >+ 0x6L, >+}; >+static final long[] jjtoSpecial = { >+ 0x6L, >+}; >+protected JavaCharStream input_stream; >+private final int[] jjrounds = new int[3]; >+private final int[] jjstateSet = new int[6]; >+protected char curChar; >+public SlotParserTokenManager(JavaCharStream stream) >+{ >+ if (JavaCharStream.staticFlag) >+ throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); >+ input_stream = stream; >+} >+public SlotParserTokenManager(JavaCharStream stream, int lexState) >+{ >+ this(stream); >+ SwitchTo(lexState); >+} >+public void ReInit(JavaCharStream stream) >+{ >+ jjmatchedPos = jjnewStateCnt = 0; >+ curLexState = defaultLexState; >+ input_stream = stream; >+ ReInitRounds(); >+} >+private final void ReInitRounds() >+{ >+ int i; >+ jjround = 0x80000001; >+ for (i = 3; i-- > 0;) >+ jjrounds[i] = 0x80000000; >+} >+public void ReInit(JavaCharStream stream, int lexState) >+{ >+ ReInit(stream); >+ SwitchTo(lexState); >+} >+public void SwitchTo(int lexState) >+{ >+ if (lexState >= 1 || lexState < 0) >+ throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); >+ else >+ curLexState = lexState; >+} >+ >+protected Token jjFillToken() >+{ >+ Token t = Token.newToken(jjmatchedKind); >+ t.kind = jjmatchedKind; >+ String im = jjstrLiteralImages[jjmatchedKind]; >+ t.image = (im == null) ? input_stream.GetImage() : im; >+ t.beginLine = input_stream.getBeginLine(); >+ t.beginColumn = input_stream.getBeginColumn(); >+ t.endLine = input_stream.getEndLine(); >+ t.endColumn = input_stream.getEndColumn(); >+ return t; >+} >+ >+int curLexState = 0; >+int defaultLexState = 0; >+int jjnewStateCnt; >+int jjround; >+int jjmatchedPos; >+int jjmatchedKind; >+ >+public Token getNextToken() >+{ >+ int kind; >+ Token specialToken = null; >+ Token matchedToken; >+ int curPos = 0; >+ >+ EOFLoop : >+ for (;;) >+ { >+ try >+ { >+ curChar = input_stream.BeginToken(); >+ } >+ catch(java.io.IOException e) >+ { >+ jjmatchedKind = 0; >+ matchedToken = jjFillToken(); >+ matchedToken.specialToken = specialToken; >+ return matchedToken; >+ } >+ >+ jjmatchedKind = 0x7fffffff; >+ jjmatchedPos = 0; >+ curPos = jjMoveStringLiteralDfa0_0(); >+ if (jjmatchedKind != 0x7fffffff) >+ { >+ if (jjmatchedPos + 1 < curPos) >+ input_stream.backup(curPos - jjmatchedPos - 1); >+ if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) >+ { >+ matchedToken = jjFillToken(); >+ matchedToken.specialToken = specialToken; >+ return matchedToken; >+ } >+ else >+ { >+ if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) >+ { >+ matchedToken = jjFillToken(); >+ if (specialToken == null) >+ specialToken = matchedToken; >+ else >+ { >+ matchedToken.specialToken = specialToken; >+ specialToken = (specialToken.next = matchedToken); >+ } >+ } >+ continue EOFLoop; >+ } >+ } >+ int error_line = input_stream.getEndLine(); >+ int error_column = input_stream.getEndColumn(); >+ String error_after = null; >+ boolean EOFSeen = false; >+ try { input_stream.readChar(); input_stream.backup(1); } >+ catch (java.io.IOException e1) { >+ EOFSeen = true; >+ error_after = curPos <= 1 ? "" : input_stream.GetImage(); >+ if (curChar == '\n' || curChar == '\r') { >+ error_line++; >+ error_column = 0; >+ } >+ else >+ error_column++; >+ } >+ if (!EOFSeen) { >+ input_stream.backup(1); >+ error_after = curPos <= 1 ? "" : input_stream.GetImage(); >+ } >+ throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); >+ } >+} >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLCreationWizard.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLCreationWizard.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLCreationWizard.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLCreationWizard.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,128 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import java.lang.reflect.InvocationTargetException; >+ >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.emf.common.util.URI; >+import org.eclipse.jface.dialogs.ErrorDialog; >+import org.eclipse.jface.operation.IRunnableWithProgress; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.jface.wizard.Wizard; >+import org.eclipse.ui.INewWizard; >+import org.eclipse.ui.IWorkbench; >+import org.eclipse.ui.actions.WorkspaceModifyOperation; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+ >+/** >+ * @generated >+ */ >+public class UMLCreationWizard extends Wizard implements INewWizard { >+ >+ /** >+ * @generated >+ */ >+ private IWorkbench workbench; >+ >+ /** >+ * @generated >+ */ >+ protected IStructuredSelection selection; >+ >+ /** >+ * @generated >+ */ >+ protected UMLCreationWizardPage page; >+ >+ /** >+ * @generated >+ */ >+ protected URI diagramURI; >+ >+ /** >+ * @generated >+ */ >+ private boolean openNewlyCreatedDiagramEditor = true; >+ >+ /** >+ * @generated >+ */ >+ public IWorkbench getWorkbench() { >+ return workbench; >+ } >+ >+ /** >+ * @generated >+ */ >+ public IStructuredSelection getSelection() { >+ return selection; >+ } >+ >+ /** >+ * @generated >+ */ >+ public final URI getDiagramURI() { >+ return diagramURI; >+ } >+ >+ /** >+ * @generated >+ */ >+ public final boolean isOpenNewlyCreatedDiagramEditor() { >+ return openNewlyCreatedDiagramEditor; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setOpenNewlyCreatedDiagramEditor(boolean openNewlyCreatedDiagramEditor) { >+ this.openNewlyCreatedDiagramEditor = openNewlyCreatedDiagramEditor; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void init(IWorkbench workbench, IStructuredSelection selection) { >+ this.workbench = workbench; >+ this.selection = selection; >+ setWindowTitle("New UMLClass Diagram"); >+ setDefaultPageImageDescriptor(UMLDiagramEditorPlugin.getBundledImageDescriptor("icons/wizban/NewUMLWizard.gif")); //$NON-NLS-1$ >+ setNeedsProgressMonitor(true); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void addPages() { >+ page = new UMLCreationWizardPage("CreationWizardPage", getSelection()); //$NON-NLS-1$ >+ page.setTitle("Create UMLClass Diagram"); >+ page.setDescription("Create a new UMLClass diagram."); >+ addPage(page); >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean performFinish() { >+ IRunnableWithProgress op = new WorkspaceModifyOperation(null) { >+ >+ protected void execute(IProgressMonitor monitor) throws CoreException, InterruptedException { >+ diagramURI = UMLDiagramEditorUtil.createAndOpenDiagram(page.getContainerFullPath(), page.getFileName(), getWorkbench().getActiveWorkbenchWindow(), monitor, >+ isOpenNewlyCreatedDiagramEditor(), true); >+ } >+ }; >+ try { >+ getContainer().run(false, true, op); >+ } catch (InterruptedException e) { >+ return false; >+ } catch (InvocationTargetException e) { >+ if (e.getTargetException() instanceof CoreException) { >+ ErrorDialog.openError(getContainer().getShell(), "Creation Problems", null, ((CoreException) e.getTargetException()).getStatus()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Error creating diagram", e.getTargetException()); //$NON-NLS-1$ >+ } >+ return false; >+ } >+ return diagramURI != null; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Operation4ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Operation4ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Operation4ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Operation4ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Operation4ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Operation4EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/InterfaceEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/InterfaceEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/InterfaceEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/InterfaceEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class InterfaceEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/providers/UMLStructuralFeatureParser.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/providers/UMLStructuralFeatureParser.java >diff -N src/org/eclipse/uml2/diagram/clazz/providers/UMLStructuralFeatureParser.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/providers/UMLStructuralFeatureParser.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,132 @@ >+package org.eclipse.uml2.diagram.clazz.providers; >+ >+import java.text.FieldPosition; >+import java.text.MessageFormat; >+import java.util.Collections; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.common.notify.Notification; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.emf.transaction.TransactionalEditingDomain; >+import org.eclipse.emf.transaction.util.TransactionUtil; >+import org.eclipse.gmf.runtime.common.core.command.ICommand; >+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand; >+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; >+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus; >+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand; >+import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorPlugin; >+ >+/** >+ * @generated >+ */ >+public class UMLStructuralFeatureParser extends UMLAbstractParser { >+ >+ /** >+ * @generated >+ */ >+ public static final MessageFormat DEFAULT_PROCESSOR = new MessageFormat("{0}"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ private EStructuralFeature feature; >+ >+ /** >+ * @generated >+ */ >+ public UMLStructuralFeatureParser(EStructuralFeature feature) { >+ this.feature = feature; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected MessageFormat getViewProcessor() { >+ MessageFormat processor = super.getViewProcessor(); >+ return processor == null ? DEFAULT_PROCESSOR : processor; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected MessageFormat getEditProcessor() { >+ MessageFormat processor = super.getEditProcessor(); >+ return processor == null ? DEFAULT_PROCESSOR : processor; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected EObject getDomainElement(EObject element) { >+ return element; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected String getStringByPattern(IAdaptable adapter, int flags, String pattern, MessageFormat processor) { >+ EObject element = (EObject) adapter.getAdapter(EObject.class); >+ element = getDomainElement(element); >+ return getStringByPattern(element, feature, processor); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected String getStringByPattern(EObject element, EStructuralFeature feature, MessageFormat processor) { >+ Object value = element == null ? null : element.eGet(feature); >+ value = getValidValue(feature, value); >+ return processor.format(new Object[] { value }, new StringBuffer(), new FieldPosition(0)).toString(); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParserEditStatus validateValues(Object[] values) { >+ if (values.length > 1) { >+ return ParserEditStatus.UNEDITABLE_STATUS; >+ } >+ Object value = values.length == 1 ? values[0] : null; >+ value = getValidNewValue(feature, value); >+ if (value instanceof InvalidValue) { >+ return new ParserEditStatus(UMLDiagramEditorPlugin.ID, IParserEditStatus.UNEDITABLE, value.toString()); >+ } >+ return ParserEditStatus.EDITABLE_STATUS; >+ } >+ >+ /** >+ * @generated >+ */ >+ public ICommand getParseCommand(IAdaptable adapter, Object[] values) { >+ EObject element = (EObject) adapter.getAdapter(EObject.class); >+ element = getDomainElement(element); >+ if (element == null) { >+ return UnexecutableCommand.INSTANCE; >+ } >+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(element); >+ if (editingDomain == null) { >+ return UnexecutableCommand.INSTANCE; >+ } >+ Object value = values.length == 1 ? values[0] : null; >+ ICommand command = getModificationCommand(element, feature, value); >+ return new CompositeTransactionalCommand(editingDomain, command.getLabel(), Collections.singletonList(command)); >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean isAffectingEvent(Object event, int flags) { >+ if (event instanceof Notification) { >+ return isAffectingFeature(((Notification) event).getFeature()); >+ } >+ return false; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected boolean isAffectingFeature(Object eventFeature) { >+ return feature == eventFeature; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property5EditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property5EditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property5EditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/Property5EditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class Property5EditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: icons/outgoingLinksNavigatorGroup.gif >=================================================================== >RCS file: icons/outgoingLinksNavigatorGroup.gif >diff -N icons/outgoingLinksNavigatorGroup.gif >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ icons/outgoingLinksNavigatorGroup.gif 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,5 @@ >+GIF89aÕÿÿr/GøØf'øÐxøàøÐf>2èÆøè°èÐøðÈÿÿÿÃ6úöºøà øØ?]FøèÒ«üößãϹ´2àÀxr+ðØ?¥l$yO@_l$?R¼2ï߯¼ 2à 6!ù,s@pH,?È#âèh:¨T0ô4® >+à?p©Ñd¢Y`B¡p8G AØ%%HÁçW¶ _B???B¥¦¥ B®©C³´µI·¸FA;Content-Type: image/gif >+ >+GIF89aÕÿÿr/GøØf'øÐxøàøÐf>2èÆøè°èÐøðÈÿÿÿÃ6úöºøà øØ?]FøèÒ«üößãϹ´2àÀxr+ðØ?¥l$yO@_l$?R¼2ï߯¼ 2à 6!ù,s@pH,?È#âèh:¨T0ô4® >+à?p©Ñd¢Y`B¡p8G AØ%%HÁçW¶ _B???B¥¦¥ B®©C³´µI·¸FA; >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameParserTokenManager.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameParserTokenManager.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameParserTokenManager.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameParserTokenManager.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,726 @@ >+/* Generated By:JavaCC: Do not edit this line. AssociationNameParserTokenManager.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.name; >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class AssociationNameParserTokenManager implements AssociationNameParserConstants >+{ >+ public java.io.PrintStream debugStream = System.out; >+ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } >+private final int jjStopStringLiteralDfa_0(int pos, long active0) >+{ >+ switch (pos) >+ { >+ case 0: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ return 2; >+ } >+ return -1; >+ case 1: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 1; >+ return 2; >+ } >+ return -1; >+ case 2: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 2; >+ return 2; >+ } >+ return -1; >+ case 3: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 3; >+ return 2; >+ } >+ return -1; >+ case 4: >+ if ((active0 & 0x40000L) != 0L) >+ return 2; >+ if ((active0 & 0x1fa0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 4; >+ return 2; >+ } >+ return -1; >+ case 5: >+ if ((active0 & 0x800000L) != 0L) >+ return 2; >+ if ((active0 & 0x17a0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 5; >+ return 2; >+ } >+ return -1; >+ case 6: >+ if ((active0 & 0x280000L) != 0L) >+ return 2; >+ if ((active0 & 0x1520000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 6; >+ return 2; >+ } >+ return -1; >+ case 7: >+ if ((active0 & 0x20000L) != 0L) >+ return 2; >+ if ((active0 & 0x1500000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 7; >+ return 2; >+ } >+ return -1; >+ default : >+ return -1; >+ } >+} >+private final int jjStartNfa_0(int pos, long active0) >+{ >+ return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); >+} >+private final int jjStopAtPos(int pos, int kind) >+{ >+ jjmatchedKind = kind; >+ jjmatchedPos = pos; >+ return pos + 1; >+} >+private final int jjStartNfaWithStates_0(int pos, int kind, int state) >+{ >+ jjmatchedKind = kind; >+ jjmatchedPos = pos; >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { return pos + 1; } >+ return jjMoveNfa_0(state, pos + 1); >+} >+private final int jjMoveStringLiteralDfa0_0() >+{ >+ switch(curChar) >+ { >+ case 9: >+ return jjStopAtPos(0, 2); >+ case 32: >+ return jjStopAtPos(0, 1); >+ case 35: >+ return jjStopAtPos(0, 13); >+ case 42: >+ return jjStopAtPos(0, 16); >+ case 43: >+ return jjStopAtPos(0, 11); >+ case 44: >+ return jjStopAtPos(0, 10); >+ case 45: >+ return jjStopAtPos(0, 12); >+ case 46: >+ return jjStopAtPos(0, 15); >+ case 47: >+ return jjStopAtPos(0, 3); >+ case 58: >+ return jjStopAtPos(0, 4); >+ case 61: >+ return jjStopAtPos(0, 5); >+ case 91: >+ return jjStopAtPos(0, 6); >+ case 93: >+ return jjStopAtPos(0, 7); >+ case 110: >+ return jjMoveStringLiteralDfa1_0(0x1000000L); >+ case 111: >+ return jjMoveStringLiteralDfa1_0(0x200000L); >+ case 114: >+ return jjMoveStringLiteralDfa1_0(0x120000L); >+ case 115: >+ return jjMoveStringLiteralDfa1_0(0x80000L); >+ case 117: >+ return jjMoveStringLiteralDfa1_0(0xc40000L); >+ case 123: >+ return jjStopAtPos(0, 8); >+ case 125: >+ return jjStopAtPos(0, 9); >+ case 126: >+ return jjStopAtPos(0, 14); >+ default : >+ return jjMoveNfa_0(1, 0); >+ } >+} >+private final int jjMoveStringLiteralDfa1_0(long active0) >+{ >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(0, active0); >+ return 1; >+ } >+ switch(curChar) >+ { >+ case 101: >+ return jjMoveStringLiteralDfa2_0(active0, 0x120000L); >+ case 110: >+ return jjMoveStringLiteralDfa2_0(active0, 0xc40000L); >+ case 111: >+ return jjMoveStringLiteralDfa2_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa2_0(active0, 0x200000L); >+ case 117: >+ return jjMoveStringLiteralDfa2_0(active0, 0x80000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(0, active0); >+} >+private final int jjMoveStringLiteralDfa2_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(0, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(1, active0); >+ return 2; >+ } >+ switch(curChar) >+ { >+ case 97: >+ return jjMoveStringLiteralDfa3_0(active0, 0x20000L); >+ case 98: >+ return jjMoveStringLiteralDfa3_0(active0, 0x80000L); >+ case 100: >+ return jjMoveStringLiteralDfa3_0(active0, 0x300000L); >+ case 105: >+ return jjMoveStringLiteralDfa3_0(active0, 0x840000L); >+ case 110: >+ return jjMoveStringLiteralDfa3_0(active0, 0x1000000L); >+ case 111: >+ return jjMoveStringLiteralDfa3_0(active0, 0x400000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(1, active0); >+} >+private final int jjMoveStringLiteralDfa3_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(1, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(2, active0); >+ return 3; >+ } >+ switch(curChar) >+ { >+ case 100: >+ return jjMoveStringLiteralDfa4_0(active0, 0x20000L); >+ case 101: >+ return jjMoveStringLiteralDfa4_0(active0, 0x300000L); >+ case 111: >+ return jjMoveStringLiteralDfa4_0(active0, 0x40000L); >+ case 113: >+ return jjMoveStringLiteralDfa4_0(active0, 0x800000L); >+ case 114: >+ return jjMoveStringLiteralDfa4_0(active0, 0x400000L); >+ case 115: >+ return jjMoveStringLiteralDfa4_0(active0, 0x80000L); >+ case 117: >+ return jjMoveStringLiteralDfa4_0(active0, 0x1000000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(2, active0); >+} >+private final int jjMoveStringLiteralDfa4_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(2, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(3, active0); >+ return 4; >+ } >+ switch(curChar) >+ { >+ case 79: >+ return jjMoveStringLiteralDfa5_0(active0, 0x20000L); >+ case 100: >+ return jjMoveStringLiteralDfa5_0(active0, 0x400000L); >+ case 101: >+ return jjMoveStringLiteralDfa5_0(active0, 0x80000L); >+ case 102: >+ return jjMoveStringLiteralDfa5_0(active0, 0x100000L); >+ case 110: >+ if ((active0 & 0x40000L) != 0L) >+ return jjStartNfaWithStates_0(4, 18, 2); >+ return jjMoveStringLiteralDfa5_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa5_0(active0, 0x200000L); >+ case 117: >+ return jjMoveStringLiteralDfa5_0(active0, 0x800000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(3, active0); >+} >+private final int jjMoveStringLiteralDfa5_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(3, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(4, active0); >+ return 5; >+ } >+ switch(curChar) >+ { >+ case 101: >+ if ((active0 & 0x800000L) != 0L) >+ return jjStartNfaWithStates_0(5, 23, 2); >+ return jjMoveStringLiteralDfa6_0(active0, 0x600000L); >+ case 105: >+ return jjMoveStringLiteralDfa6_0(active0, 0x1100000L); >+ case 110: >+ return jjMoveStringLiteralDfa6_0(active0, 0x20000L); >+ case 116: >+ return jjMoveStringLiteralDfa6_0(active0, 0x80000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(4, active0); >+} >+private final int jjMoveStringLiteralDfa6_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(4, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(5, active0); >+ return 6; >+ } >+ switch(curChar) >+ { >+ case 100: >+ if ((active0 & 0x200000L) != 0L) >+ return jjStartNfaWithStates_0(6, 21, 2); >+ break; >+ case 108: >+ return jjMoveStringLiteralDfa7_0(active0, 0x20000L); >+ case 110: >+ return jjMoveStringLiteralDfa7_0(active0, 0x100000L); >+ case 113: >+ return jjMoveStringLiteralDfa7_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa7_0(active0, 0x400000L); >+ case 115: >+ if ((active0 & 0x80000L) != 0L) >+ return jjStartNfaWithStates_0(6, 19, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(5, active0); >+} >+private final int jjMoveStringLiteralDfa7_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(5, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(6, active0); >+ return 7; >+ } >+ switch(curChar) >+ { >+ case 101: >+ return jjMoveStringLiteralDfa8_0(active0, 0x500000L); >+ case 117: >+ return jjMoveStringLiteralDfa8_0(active0, 0x1000000L); >+ case 121: >+ if ((active0 & 0x20000L) != 0L) >+ return jjStartNfaWithStates_0(7, 17, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(6, active0); >+} >+private final int jjMoveStringLiteralDfa8_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(6, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(7, active0); >+ return 8; >+ } >+ switch(curChar) >+ { >+ case 100: >+ if ((active0 & 0x400000L) != 0L) >+ return jjStartNfaWithStates_0(8, 22, 2); >+ break; >+ case 101: >+ if ((active0 & 0x1000000L) != 0L) >+ return jjStartNfaWithStates_0(8, 24, 2); >+ break; >+ case 115: >+ if ((active0 & 0x100000L) != 0L) >+ return jjStartNfaWithStates_0(8, 20, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(7, active0); >+} >+private final void jjCheckNAdd(int state) >+{ >+ if (jjrounds[state] != jjround) >+ { >+ jjstateSet[jjnewStateCnt++] = state; >+ jjrounds[state] = jjround; >+ } >+} >+private final void jjAddStates(int start, int end) >+{ >+ do { >+ jjstateSet[jjnewStateCnt++] = jjnextStates[start]; >+ } while (start++ != end); >+} >+private final void jjCheckNAddTwoStates(int state1, int state2) >+{ >+ jjCheckNAdd(state1); >+ jjCheckNAdd(state2); >+} >+private final void jjCheckNAddStates(int start, int end) >+{ >+ do { >+ jjCheckNAdd(jjnextStates[start]); >+ } while (start++ != end); >+} >+private final void jjCheckNAddStates(int start) >+{ >+ jjCheckNAdd(jjnextStates[start]); >+ jjCheckNAdd(jjnextStates[start + 1]); >+} >+static final long[] jjbitVec0 = { >+ 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L >+}; >+static final long[] jjbitVec2 = { >+ 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL >+}; >+static final long[] jjbitVec3 = { >+ 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL >+}; >+static final long[] jjbitVec4 = { >+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L >+}; >+static final long[] jjbitVec5 = { >+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L >+}; >+static final long[] jjbitVec6 = { >+ 0x3fffffffffffL, 0x0L, 0x0L, 0x0L >+}; >+private final int jjMoveNfa_0(int startState, int curPos) >+{ >+ int[] nextStates; >+ int startsAt = 0; >+ jjnewStateCnt = 3; >+ int i = 1; >+ jjstateSet[0] = startState; >+ int j, kind = 0x7fffffff; >+ for (;;) >+ { >+ if (++jjround == 0x7fffffff) >+ ReInitRounds(); >+ if (curChar < 64) >+ { >+ long l = 1L << curChar; >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ if ((0x3ff000000000000L & l) != 0L) >+ { >+ if (kind > 25) >+ kind = 25; >+ jjCheckNAdd(0); >+ } >+ else if (curChar == 36) >+ { >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ } >+ break; >+ case 0: >+ if ((0x3ff000000000000L & l) == 0L) >+ break; >+ if (kind > 25) >+ kind = 25; >+ jjCheckNAdd(0); >+ break; >+ case 2: >+ if ((0x3ff001000000000L & l) == 0L) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ else if (curChar < 128) >+ { >+ long l = 1L << (curChar & 077); >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ case 2: >+ if ((0x7fffffe87fffffeL & l) == 0L) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ else >+ { >+ int hiByte = (int)(curChar >> 8); >+ int i1 = hiByte >> 6; >+ long l1 = 1L << (hiByte & 077); >+ int i2 = (curChar & 0xff) >> 6; >+ long l2 = 1L << (curChar & 077); >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ case 2: >+ if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ if (kind != 0x7fffffff) >+ { >+ jjmatchedKind = kind; >+ jjmatchedPos = curPos; >+ kind = 0x7fffffff; >+ } >+ ++curPos; >+ if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) >+ return curPos; >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { return curPos; } >+ } >+} >+static final int[] jjnextStates = { >+}; >+private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) >+{ >+ switch(hiByte) >+ { >+ case 0: >+ return ((jjbitVec2[i2] & l2) != 0L); >+ case 48: >+ return ((jjbitVec3[i2] & l2) != 0L); >+ case 49: >+ return ((jjbitVec4[i2] & l2) != 0L); >+ case 51: >+ return ((jjbitVec5[i2] & l2) != 0L); >+ case 61: >+ return ((jjbitVec6[i2] & l2) != 0L); >+ default : >+ if ((jjbitVec0[i1] & l1) != 0L) >+ return true; >+ return false; >+ } >+} >+public static final String[] jjstrLiteralImages = { >+"", null, null, "\57", "\72", "\75", "\133", "\135", "\173", "\175", "\54", >+"\53", "\55", "\43", "\176", "\56", "\52", "\162\145\141\144\117\156\154\171", >+"\165\156\151\157\156", "\163\165\142\163\145\164\163", "\162\145\144\145\146\151\156\145\163", >+"\157\162\144\145\162\145\144", "\165\156\157\162\144\145\162\145\144", "\165\156\151\161\165\145", >+"\156\157\156\165\156\151\161\165\145", null, null, null, null, }; >+public static final String[] lexStateNames = { >+ "DEFAULT", >+}; >+static final long[] jjtoToken = { >+ 0x7fffff9L, >+}; >+static final long[] jjtoSkip = { >+ 0x6L, >+}; >+static final long[] jjtoSpecial = { >+ 0x6L, >+}; >+protected JavaCharStream input_stream; >+private final int[] jjrounds = new int[3]; >+private final int[] jjstateSet = new int[6]; >+protected char curChar; >+public AssociationNameParserTokenManager(JavaCharStream stream) >+{ >+ if (JavaCharStream.staticFlag) >+ throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); >+ input_stream = stream; >+} >+public AssociationNameParserTokenManager(JavaCharStream stream, int lexState) >+{ >+ this(stream); >+ SwitchTo(lexState); >+} >+public void ReInit(JavaCharStream stream) >+{ >+ jjmatchedPos = jjnewStateCnt = 0; >+ curLexState = defaultLexState; >+ input_stream = stream; >+ ReInitRounds(); >+} >+private final void ReInitRounds() >+{ >+ int i; >+ jjround = 0x80000001; >+ for (i = 3; i-- > 0;) >+ jjrounds[i] = 0x80000000; >+} >+public void ReInit(JavaCharStream stream, int lexState) >+{ >+ ReInit(stream); >+ SwitchTo(lexState); >+} >+public void SwitchTo(int lexState) >+{ >+ if (lexState >= 1 || lexState < 0) >+ throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); >+ else >+ curLexState = lexState; >+} >+ >+protected Token jjFillToken() >+{ >+ Token t = Token.newToken(jjmatchedKind); >+ t.kind = jjmatchedKind; >+ String im = jjstrLiteralImages[jjmatchedKind]; >+ t.image = (im == null) ? input_stream.GetImage() : im; >+ t.beginLine = input_stream.getBeginLine(); >+ t.beginColumn = input_stream.getBeginColumn(); >+ t.endLine = input_stream.getEndLine(); >+ t.endColumn = input_stream.getEndColumn(); >+ return t; >+} >+ >+int curLexState = 0; >+int defaultLexState = 0; >+int jjnewStateCnt; >+int jjround; >+int jjmatchedPos; >+int jjmatchedKind; >+ >+public Token getNextToken() >+{ >+ int kind; >+ Token specialToken = null; >+ Token matchedToken; >+ int curPos = 0; >+ >+ EOFLoop : >+ for (;;) >+ { >+ try >+ { >+ curChar = input_stream.BeginToken(); >+ } >+ catch(java.io.IOException e) >+ { >+ jjmatchedKind = 0; >+ matchedToken = jjFillToken(); >+ matchedToken.specialToken = specialToken; >+ return matchedToken; >+ } >+ >+ jjmatchedKind = 0x7fffffff; >+ jjmatchedPos = 0; >+ curPos = jjMoveStringLiteralDfa0_0(); >+ if (jjmatchedKind != 0x7fffffff) >+ { >+ if (jjmatchedPos + 1 < curPos) >+ input_stream.backup(curPos - jjmatchedPos - 1); >+ if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) >+ { >+ matchedToken = jjFillToken(); >+ matchedToken.specialToken = specialToken; >+ return matchedToken; >+ } >+ else >+ { >+ if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) >+ { >+ matchedToken = jjFillToken(); >+ if (specialToken == null) >+ specialToken = matchedToken; >+ else >+ { >+ matchedToken.specialToken = specialToken; >+ specialToken = (specialToken.next = matchedToken); >+ } >+ } >+ continue EOFLoop; >+ } >+ } >+ int error_line = input_stream.getEndLine(); >+ int error_column = input_stream.getEndColumn(); >+ String error_after = null; >+ boolean EOFSeen = false; >+ try { input_stream.readChar(); input_stream.backup(1); } >+ catch (java.io.IOException e1) { >+ EOFSeen = true; >+ error_after = curPos <= 1 ? "" : input_stream.GetImage(); >+ if (curChar == '\n' || curChar == '\r') { >+ error_line++; >+ error_column = 0; >+ } >+ else >+ error_column++; >+ } >+ if (!EOFSeen) { >+ input_stream.backup(1); >+ error_after = curPos <= 1 ? "" : input_stream.GetImage(); >+ } >+ throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); >+ } >+} >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorActionProvider.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorActionProvider.java >diff -N src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorActionProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorActionProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,154 @@ >+package org.eclipse.uml2.diagram.clazz.navigator; >+ >+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorInput; >+ >+import org.eclipse.gmf.runtime.notation.Diagram; >+ >+import org.eclipse.jface.action.Action; >+import org.eclipse.jface.action.IMenuManager; >+ >+import org.eclipse.jface.viewers.IStructuredSelection; >+ >+import org.eclipse.ui.IActionBars; >+import org.eclipse.ui.IWorkbenchPage; >+import org.eclipse.ui.PartInitException; >+ >+import org.eclipse.ui.navigator.CommonActionProvider; >+import org.eclipse.ui.navigator.ICommonActionConstants; >+import org.eclipse.ui.navigator.ICommonActionExtensionSite; >+import org.eclipse.ui.navigator.ICommonMenuConstants; >+import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite; >+ >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+ >+import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditor; >+import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorPlugin; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class UMLNavigatorActionProvider extends CommonActionProvider { >+ >+ /** >+ * @generated >+ */ >+ private boolean myContribute; >+ >+ /** >+ * @generated >+ */ >+ private OpenDiagramAction myOpenDiagramAction; >+ >+ /** >+ * @generated >+ */ >+ public void init(ICommonActionExtensionSite aSite) { >+ super.init(aSite); >+ if (aSite.getViewSite() instanceof ICommonViewerWorkbenchSite) { >+ myContribute = true; >+ makeActions((ICommonViewerWorkbenchSite) aSite.getViewSite()); >+ } else { >+ myContribute = false; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private void makeActions(ICommonViewerWorkbenchSite viewerSite) { >+ myOpenDiagramAction = new OpenDiagramAction(viewerSite); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void fillActionBars(IActionBars actionBars) { >+ if (!myContribute) { >+ return; >+ } >+ IStructuredSelection selection = (IStructuredSelection) getContext().getSelection(); >+ myOpenDiagramAction.selectionChanged(selection); >+ if (myOpenDiagramAction.isEnabled()) { >+ actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, myOpenDiagramAction); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ public void fillContextMenu(IMenuManager menu) { >+ /* if (!myContribute || getContext().getSelection().isEmpty()) { >+ return; >+ } >+ >+ IStructuredSelection selection = (IStructuredSelection) getContext().getSelection(); >+ >+ myOpenDiagramAction.selectionChanged(selection); >+ if (myOpenDiagramAction.isEnabled()) { >+ menu.insertAfter(ICommonMenuConstants.GROUP_OPEN, myOpenDiagramAction); >+ }*/ >+ } >+ >+ /** >+ * @generated >+ */ >+ private class OpenDiagramAction extends Action { >+ >+ /** >+ * @generated >+ */ >+ private Diagram myDiagram; >+ >+ /** >+ * @generated >+ */ >+ private ICommonViewerWorkbenchSite myViewerSite; >+ >+ /** >+ * @generated >+ */ >+ public OpenDiagramAction(ICommonViewerWorkbenchSite viewerSite) { >+ super("Open Diagram"); >+ myViewerSite = viewerSite; >+ } >+ >+ /** >+ * @generated >+ */ >+ public final void selectionChanged(IStructuredSelection selection) { >+ myDiagram = null; >+ if (selection.size() == 1) { >+ Object selectedElement = selection.getFirstElement(); >+ if (selectedElement instanceof UMLNavigatorItem) { >+ selectedElement = ((UMLNavigatorItem) selectedElement).getView(); >+ } >+ if (selectedElement instanceof Diagram) { >+ Diagram diagram = (Diagram) selectedElement; >+ if (PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(diagram))) { >+ myDiagram = diagram; >+ } >+ } >+ } >+ setEnabled(myDiagram != null); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void run() { >+ if (myDiagram == null) { >+ return; >+ } >+ DiagramEditorInput editorInput = new DiagramEditorInput(myDiagram); >+ IWorkbenchPage page = myViewerSite.getPage(); >+ try { >+ page.openEditor(editorInput, UMLDiagramEditor.ID); >+ } catch (PartInitException e) { >+ UMLDiagramEditorPlugin.getInstance().logError("Exception while openning diagram", e); >+ } >+ } >+ >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLMatchingStrategy.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLMatchingStrategy.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLMatchingStrategy.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLMatchingStrategy.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,64 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import org.eclipse.emf.common.util.URI; >+ >+import org.eclipse.emf.ecore.resource.Resource; >+ >+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorInput; >+ >+import org.eclipse.gmf.runtime.notation.Diagram; >+ >+import org.eclipse.ui.IEditorInput; >+import org.eclipse.ui.IEditorMatchingStrategy; >+import org.eclipse.ui.IEditorPart; >+import org.eclipse.ui.IEditorReference; >+import org.eclipse.ui.PartInitException; >+ >+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditorMatchingStrategy; >+ >+/** >+ * @generated >+ */ >+public class UMLMatchingStrategy implements IEditorMatchingStrategy { >+ >+ /** >+ * @generated >+ */ >+ public boolean matches(IEditorReference editorRef, IEditorInput input) { >+ IEditorInput editorInput; >+ try { >+ editorInput = editorRef.getEditorInput(); >+ } catch (PartInitException e) { >+ return false; >+ } >+ >+ if (editorInput.equals(input)) { >+ return true; >+ } >+ >+ IEditorPart editor = editorRef.getEditor(false); >+ if (input instanceof DiagramEditorInput && editor instanceof UMLDiagramEditor) { >+ Diagram editorDiagram = ((UMLDiagramEditor) editor).getDiagram(); >+ Diagram otherDiagram = ((DiagramEditorInput) input).getDiagram(); >+ return equals(editorDiagram, otherDiagram); >+ } >+ return false; >+ } >+ >+ /** >+ * @generated >+ */ >+ private boolean equals(Diagram editorDiagram, Diagram otherDiagram) { >+ Resource editorResource = editorDiagram.eResource(); >+ Resource otherResource = otherDiagram.eResource(); >+ if (editorResource != null && otherResource != null) { >+ URI editorURI = editorResource.getURI(); >+ URI otherURI = otherResource.getURI(); >+ String editorURIFragment = editorResource.getURIFragment(editorDiagram); >+ String otherURIFragment = otherResource.getURIFragment(otherDiagram); >+ return editorURI.equals(otherURI) && editorURIFragment.equals(otherURIFragment); >+ } >+ return false; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Operation5ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Operation5ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Operation5ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Operation5ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Operation5ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Operation5EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/ParseException.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/ParseException.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/ParseException.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/ParseException.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,205 @@ >+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.name; >+ >+import org.eclipse.uml2.diagram.parser.ExternalParserException; >+ >+/** >+ * This exception is thrown when parse errors are encountered. >+ * You can explicitly create objects of this exception type by >+ * calling the method generateParseException in the generated >+ * parser. >+ * >+ * You can modify this class to customize your error reporting >+ * mechanisms so long as you retain the public fields. >+ */ >+public class ParseException extends ExternalParserException { >+ >+ /** >+ * This constructor is used by the method "generateParseException" >+ * in the generated parser. Calling this constructor generates >+ * a new object of this type with the fields "currentToken", >+ * "expectedTokenSequences", and "tokenImage" set. The boolean >+ * flag "specialConstructor" is also set to true to indicate that >+ * this constructor was used to create this object. >+ * This constructor calls its super class with the empty string >+ * to force the "toString" method of parent class "Throwable" to >+ * print the error message in the form: >+ * ParseException: <result of getMessage> >+ */ >+ public ParseException(Token currentTokenVal, >+ int[][] expectedTokenSequencesVal, >+ String[] tokenImageVal >+ ) >+ { >+ super(""); >+ specialConstructor = true; >+ currentToken = currentTokenVal; >+ expectedTokenSequences = expectedTokenSequencesVal; >+ tokenImage = tokenImageVal; >+ } >+ >+ /** >+ * The following constructors are for use by you for whatever >+ * purpose you can think of. Constructing the exception in this >+ * manner makes the exception behave in the normal way - i.e., as >+ * documented in the class "Throwable". The fields "errorToken", >+ * "expectedTokenSequences", and "tokenImage" do not contain >+ * relevant information. The JavaCC generated code does not use >+ * these constructors. >+ */ >+ >+ public ParseException() { >+ super(); >+ specialConstructor = false; >+ } >+ >+ public ParseException(String message) { >+ super(message); >+ specialConstructor = false; >+ } >+ >+ /** >+ * This variable determines which constructor was used to create >+ * this object and thereby affects the semantics of the >+ * "getMessage" method (see below). >+ */ >+ protected boolean specialConstructor; >+ >+ /** >+ * This is the last token that has been consumed successfully. If >+ * this object has been created due to a parse error, the token >+ * followng this token will (therefore) be the first error token. >+ */ >+ public Token currentToken; >+ >+ /** >+ * Each entry in this array is an array of integers. Each array >+ * of integers represents a sequence of tokens (by their ordinal >+ * values) that is expected at this point of the parse. >+ */ >+ public int[][] expectedTokenSequences; >+ >+ /** >+ * This is a reference to the "tokenImage" array of the generated >+ * parser within which the parse error occurred. This array is >+ * defined in the generated ...Constants interface. >+ */ >+ public String[] tokenImage; >+ >+ /** >+ * This method has the standard behavior when this object has been >+ * created using the standard constructors. Otherwise, it uses >+ * "currentToken" and "expectedTokenSequences" to generate a parse >+ * error message and returns it. If this object has been created >+ * due to a parse error, and you do not catch it (it gets thrown >+ * from the parser), then this method is called during the printing >+ * of the final stack trace, and hence the correct error message >+ * gets displayed. >+ */ >+ public String getMessage() { >+ if (!specialConstructor) { >+ return super.getMessage(); >+ } >+ String expected = ""; >+ int maxSize = 0; >+ for (int i = 0; i < expectedTokenSequences.length; i++) { >+ if (maxSize < expectedTokenSequences[i].length) { >+ maxSize = expectedTokenSequences[i].length; >+ } >+ for (int j = 0; j < expectedTokenSequences[i].length; j++) { >+ expected += tokenImage[expectedTokenSequences[i][j]] + " "; >+ } >+ if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { >+ expected += "..."; >+ } >+ expected += eol + " "; >+ } >+ String retval = "Encountered \""; >+ Token tok = currentToken.next; >+ for (int i = 0; i < maxSize; i++) { >+ if (i != 0) retval += " "; >+ if (tok.kind == 0) { >+ retval += tokenImage[0]; >+ break; >+ } >+ retval += add_escapes(tok.image); >+ tok = tok.next; >+ } >+ retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; >+ retval += "." + eol; >+ if (expectedTokenSequences.length == 1) { >+ retval += "Was expecting:" + eol + " "; >+ } else { >+ retval += "Was expecting one of:" + eol + " "; >+ } >+ retval += expected; >+ return retval; >+ } >+ >+ /** >+ * The end of line string for this machine. >+ */ >+ protected String eol = System.getProperty("line.separator", "\n"); >+ >+ /** >+ * Used to convert raw characters to their escaped version >+ * when these raw version cannot be used as part of an ASCII >+ * string literal. >+ */ >+ protected String add_escapes(String str) { >+ StringBuffer retval = new StringBuffer(); >+ char ch; >+ for (int i = 0; i < str.length(); i++) { >+ switch (str.charAt(i)) >+ { >+ case 0 : >+ continue; >+ case '\b': >+ retval.append("\\b"); >+ continue; >+ case '\t': >+ retval.append("\\t"); >+ continue; >+ case '\n': >+ retval.append("\\n"); >+ continue; >+ case '\f': >+ retval.append("\\f"); >+ continue; >+ case '\r': >+ retval.append("\\r"); >+ continue; >+ case '\"': >+ retval.append("\\\""); >+ continue; >+ case '\'': >+ retval.append("\\\'"); >+ continue; >+ case '\\': >+ retval.append("\\\\"); >+ continue; >+ default: >+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { >+ String s = "0000" + Integer.toString(ch, 16); >+ retval.append("\\u" + s.substring(s.length() - 4, s.length())); >+ } else { >+ retval.append(ch); >+ } >+ continue; >+ } >+ } >+ return retval.toString(); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecificationNameViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecificationNameViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecificationNameViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecificationNameViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class InstanceSpecificationNameViewFactory extends BasicNodeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName5ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName5ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName5ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName5ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; >+import org.eclipse.gmf.runtime.notation.Location; >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class AssociationName5ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { >+ Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint); >+ Location location = (Location) view.getLayoutConstraint(); >+ IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit()); >+ location.setX(mapMode.DPtoLP(0)); >+ location.setY(mapMode.DPtoLP(-30)); >+ return view; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/JavaCharStream.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/JavaCharStream.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/JavaCharStream.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/JavaCharStream.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,558 @@ >+/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.slot; >+ >+/** >+ * An implementation of interface CharStream, where the stream is assumed to >+ * contain only ASCII characters (with java-like unicode escape processing). >+ */ >+ >+public class JavaCharStream >+{ >+ public static final boolean staticFlag = false; >+ static final int hexval(char c) throws java.io.IOException { >+ switch(c) >+ { >+ case '0' : >+ return 0; >+ case '1' : >+ return 1; >+ case '2' : >+ return 2; >+ case '3' : >+ return 3; >+ case '4' : >+ return 4; >+ case '5' : >+ return 5; >+ case '6' : >+ return 6; >+ case '7' : >+ return 7; >+ case '8' : >+ return 8; >+ case '9' : >+ return 9; >+ >+ case 'a' : >+ case 'A' : >+ return 10; >+ case 'b' : >+ case 'B' : >+ return 11; >+ case 'c' : >+ case 'C' : >+ return 12; >+ case 'd' : >+ case 'D' : >+ return 13; >+ case 'e' : >+ case 'E' : >+ return 14; >+ case 'f' : >+ case 'F' : >+ return 15; >+ } >+ >+ throw new java.io.IOException(); // Should never come here >+ } >+ >+ public int bufpos = -1; >+ int bufsize; >+ int available; >+ int tokenBegin; >+ protected int bufline[]; >+ protected int bufcolumn[]; >+ >+ protected int column = 0; >+ protected int line = 1; >+ >+ protected boolean prevCharIsCR = false; >+ protected boolean prevCharIsLF = false; >+ >+ protected java.io.Reader inputStream; >+ >+ protected char[] nextCharBuf; >+ protected char[] buffer; >+ protected int maxNextCharInd = 0; >+ protected int nextCharInd = -1; >+ protected int inBuf = 0; >+ >+ protected void ExpandBuff(boolean wrapAround) >+ { >+ char[] newbuffer = new char[bufsize + 2048]; >+ int newbufline[] = new int[bufsize + 2048]; >+ int newbufcolumn[] = new int[bufsize + 2048]; >+ >+ try >+ { >+ if (wrapAround) >+ { >+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); >+ System.arraycopy(buffer, 0, newbuffer, >+ bufsize - tokenBegin, bufpos); >+ buffer = newbuffer; >+ >+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); >+ System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); >+ bufline = newbufline; >+ >+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); >+ System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); >+ bufcolumn = newbufcolumn; >+ >+ bufpos += (bufsize - tokenBegin); >+ } >+ else >+ { >+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); >+ buffer = newbuffer; >+ >+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); >+ bufline = newbufline; >+ >+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); >+ bufcolumn = newbufcolumn; >+ >+ bufpos -= tokenBegin; >+ } >+ } >+ catch (Throwable t) >+ { >+ throw new Error(t.getMessage()); >+ } >+ >+ available = (bufsize += 2048); >+ tokenBegin = 0; >+ } >+ >+ protected void FillBuff() throws java.io.IOException >+ { >+ int i; >+ if (maxNextCharInd == 4096) >+ maxNextCharInd = nextCharInd = 0; >+ >+ try { >+ if ((i = inputStream.read(nextCharBuf, maxNextCharInd, >+ 4096 - maxNextCharInd)) == -1) >+ { >+ inputStream.close(); >+ throw new java.io.IOException(); >+ } >+ else >+ maxNextCharInd += i; >+ return; >+ } >+ catch(java.io.IOException e) { >+ if (bufpos != 0) >+ { >+ --bufpos; >+ backup(0); >+ } >+ else >+ { >+ bufline[bufpos] = line; >+ bufcolumn[bufpos] = column; >+ } >+ throw e; >+ } >+ } >+ >+ protected char ReadByte() throws java.io.IOException >+ { >+ if (++nextCharInd >= maxNextCharInd) >+ FillBuff(); >+ >+ return nextCharBuf[nextCharInd]; >+ } >+ >+ public char BeginToken() throws java.io.IOException >+ { >+ if (inBuf > 0) >+ { >+ --inBuf; >+ >+ if (++bufpos == bufsize) >+ bufpos = 0; >+ >+ tokenBegin = bufpos; >+ return buffer[bufpos]; >+ } >+ >+ tokenBegin = 0; >+ bufpos = -1; >+ >+ return readChar(); >+ } >+ >+ protected void AdjustBuffSize() >+ { >+ if (available == bufsize) >+ { >+ if (tokenBegin > 2048) >+ { >+ bufpos = 0; >+ available = tokenBegin; >+ } >+ else >+ ExpandBuff(false); >+ } >+ else if (available > tokenBegin) >+ available = bufsize; >+ else if ((tokenBegin - available) < 2048) >+ ExpandBuff(true); >+ else >+ available = tokenBegin; >+ } >+ >+ protected void UpdateLineColumn(char c) >+ { >+ column++; >+ >+ if (prevCharIsLF) >+ { >+ prevCharIsLF = false; >+ line += (column = 1); >+ } >+ else if (prevCharIsCR) >+ { >+ prevCharIsCR = false; >+ if (c == '\n') >+ { >+ prevCharIsLF = true; >+ } >+ else >+ line += (column = 1); >+ } >+ >+ switch (c) >+ { >+ case '\r' : >+ prevCharIsCR = true; >+ break; >+ case '\n' : >+ prevCharIsLF = true; >+ break; >+ case '\t' : >+ column--; >+ column += (8 - (column & 07)); >+ break; >+ default : >+ break; >+ } >+ >+ bufline[bufpos] = line; >+ bufcolumn[bufpos] = column; >+ } >+ >+ public char readChar() throws java.io.IOException >+ { >+ if (inBuf > 0) >+ { >+ --inBuf; >+ >+ if (++bufpos == bufsize) >+ bufpos = 0; >+ >+ return buffer[bufpos]; >+ } >+ >+ char c; >+ >+ if (++bufpos == available) >+ AdjustBuffSize(); >+ >+ if ((buffer[bufpos] = c = ReadByte()) == '\\') >+ { >+ UpdateLineColumn(c); >+ >+ int backSlashCnt = 1; >+ >+ for (;;) // Read all the backslashes >+ { >+ if (++bufpos == available) >+ AdjustBuffSize(); >+ >+ try >+ { >+ if ((buffer[bufpos] = c = ReadByte()) != '\\') >+ { >+ UpdateLineColumn(c); >+ // found a non-backslash char. >+ if ((c == 'u') && ((backSlashCnt & 1) == 1)) >+ { >+ if (--bufpos < 0) >+ bufpos = bufsize - 1; >+ >+ break; >+ } >+ >+ backup(backSlashCnt); >+ return '\\'; >+ } >+ } >+ catch(java.io.IOException e) >+ { >+ if (backSlashCnt > 1) >+ backup(backSlashCnt); >+ >+ return '\\'; >+ } >+ >+ UpdateLineColumn(c); >+ backSlashCnt++; >+ } >+ >+ // Here, we have seen an odd number of backslash's followed by a 'u' >+ try >+ { >+ while ((c = ReadByte()) == 'u') >+ ++column; >+ >+ buffer[bufpos] = c = (char)(hexval(c) << 12 | >+ hexval(ReadByte()) << 8 | >+ hexval(ReadByte()) << 4 | >+ hexval(ReadByte())); >+ >+ column += 4; >+ } >+ catch(java.io.IOException e) >+ { >+ throw new Error("Invalid escape character at line " + line + >+ " column " + column + "."); >+ } >+ >+ if (backSlashCnt == 1) >+ return c; >+ else >+ { >+ backup(backSlashCnt - 1); >+ return '\\'; >+ } >+ } >+ else >+ { >+ UpdateLineColumn(c); >+ return (c); >+ } >+ } >+ >+ /** >+ * @deprecated >+ * @see #getEndColumn >+ */ >+ >+ public int getColumn() { >+ return bufcolumn[bufpos]; >+ } >+ >+ /** >+ * @deprecated >+ * @see #getEndLine >+ */ >+ >+ public int getLine() { >+ return bufline[bufpos]; >+ } >+ >+ public int getEndColumn() { >+ return bufcolumn[bufpos]; >+ } >+ >+ public int getEndLine() { >+ return bufline[bufpos]; >+ } >+ >+ public int getBeginColumn() { >+ return bufcolumn[tokenBegin]; >+ } >+ >+ public int getBeginLine() { >+ return bufline[tokenBegin]; >+ } >+ >+ public void backup(int amount) { >+ >+ inBuf += amount; >+ if ((bufpos -= amount) < 0) >+ bufpos += bufsize; >+ } >+ >+ public JavaCharStream(java.io.Reader dstream, >+ int startline, int startcolumn, int buffersize) >+ { >+ inputStream = dstream; >+ line = startline; >+ column = startcolumn - 1; >+ >+ available = bufsize = buffersize; >+ buffer = new char[buffersize]; >+ bufline = new int[buffersize]; >+ bufcolumn = new int[buffersize]; >+ nextCharBuf = new char[4096]; >+ } >+ >+ public JavaCharStream(java.io.Reader dstream, >+ int startline, int startcolumn) >+ { >+ this(dstream, startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.Reader dstream) >+ { >+ this(dstream, 1, 1, 4096); >+ } >+ public void ReInit(java.io.Reader dstream, >+ int startline, int startcolumn, int buffersize) >+ { >+ inputStream = dstream; >+ line = startline; >+ column = startcolumn - 1; >+ >+ if (buffer == null || buffersize != buffer.length) >+ { >+ available = bufsize = buffersize; >+ buffer = new char[buffersize]; >+ bufline = new int[buffersize]; >+ bufcolumn = new int[buffersize]; >+ nextCharBuf = new char[4096]; >+ } >+ prevCharIsLF = prevCharIsCR = false; >+ tokenBegin = inBuf = maxNextCharInd = 0; >+ nextCharInd = bufpos = -1; >+ } >+ >+ public void ReInit(java.io.Reader dstream, >+ int startline, int startcolumn) >+ { >+ ReInit(dstream, startline, startcolumn, 4096); >+ } >+ >+ public void ReInit(java.io.Reader dstream) >+ { >+ ReInit(dstream, 1, 1, 4096); >+ } >+ public JavaCharStream(java.io.InputStream dstream, int startline, >+ int startcolumn, int buffersize) >+ { >+ this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.InputStream dstream, int startline, >+ int startcolumn) >+ { >+ this(dstream, startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.InputStream dstream) >+ { >+ this(dstream, 1, 1, 4096); >+ } >+ >+ public void ReInit(java.io.InputStream dstream, int startline, >+ int startcolumn, int buffersize) >+ { >+ ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); >+ } >+ public void ReInit(java.io.InputStream dstream, int startline, >+ int startcolumn) >+ { >+ ReInit(dstream, startline, startcolumn, 4096); >+ } >+ public void ReInit(java.io.InputStream dstream) >+ { >+ ReInit(dstream, 1, 1, 4096); >+ } >+ >+ public String GetImage() >+ { >+ if (bufpos >= tokenBegin) >+ return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); >+ else >+ return new String(buffer, tokenBegin, bufsize - tokenBegin) + >+ new String(buffer, 0, bufpos + 1); >+ } >+ >+ public char[] GetSuffix(int len) >+ { >+ char[] ret = new char[len]; >+ >+ if ((bufpos + 1) >= len) >+ System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); >+ else >+ { >+ System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, >+ len - bufpos - 1); >+ System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); >+ } >+ >+ return ret; >+ } >+ >+ public void Done() >+ { >+ nextCharBuf = null; >+ buffer = null; >+ bufline = null; >+ bufcolumn = null; >+ } >+ >+ /** >+ * Method to adjust line and column numbers for the start of a token. >+ */ >+ public void adjustBeginLineColumn(int newLine, int newCol) >+ { >+ int start = tokenBegin; >+ int len; >+ >+ if (bufpos >= tokenBegin) >+ { >+ len = bufpos - tokenBegin + inBuf + 1; >+ } >+ else >+ { >+ len = bufsize - tokenBegin + bufpos + 1 + inBuf; >+ } >+ >+ int i = 0, j = 0, k = 0; >+ int nextColDiff = 0, columnDiff = 0; >+ >+ while (i < len && >+ bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) >+ { >+ bufline[j] = newLine; >+ nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; >+ bufcolumn[j] = newCol + columnDiff; >+ columnDiff = nextColDiff; >+ i++; >+ } >+ >+ if (i < len) >+ { >+ bufline[j] = newLine++; >+ bufcolumn[j] = newCol + columnDiff; >+ >+ while (i++ < len) >+ { >+ if (bufline[j = start % bufsize] != bufline[++start % bufsize]) >+ bufline[j] = newLine++; >+ else >+ bufline[j] = newLine; >+ } >+ } >+ >+ line = bufline[j]; >+ column = bufcolumn[j]; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLDocumentProvider.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLDocumentProvider.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLDocumentProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLDocumentProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,204 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import java.io.IOException; >+import java.util.ArrayList; >+import java.util.Collection; >+import java.util.Collections; >+import java.util.Iterator; >+import java.util.List; >+ >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.resources.IResource; >+import org.eclipse.core.resources.IStorage; >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.SubProgressMonitor; >+import org.eclipse.core.runtime.jobs.ISchedulingRule; >+import org.eclipse.core.runtime.jobs.MultiRule; >+import org.eclipse.emf.common.notify.Notification; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.resource.Resource; >+import org.eclipse.emf.transaction.DemultiplexingListener; >+import org.eclipse.emf.transaction.NotificationFilter; >+import org.eclipse.emf.transaction.TransactionalEditingDomain; >+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer; >+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramDocument; >+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramModificationListener; >+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument; >+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument; >+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.document.FileDiagramDocumentProvider; >+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.document.FileDiagramModificationListener; >+import org.eclipse.gmf.runtime.notation.Diagram; >+import org.eclipse.ui.IFileEditorInput; >+ >+/** >+ * @generated >+ */ >+public class UMLDocumentProvider extends FileDiagramDocumentProvider { >+ >+ /** >+ * @generated >+ */ >+ private final String contentObjectURI; >+ >+ /** >+ * @generated >+ */ >+ public UMLDocumentProvider() { >+ this(null); >+ } >+ >+ /** >+ * @generated >+ */ >+ public UMLDocumentProvider(String rootObjectURI) { >+ this.contentObjectURI = rootObjectURI; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setDocumentContentFromStorage(IDocument document, IStorage storage) throws CoreException { >+ super.setDocumentContentFromStorage(document, storage); >+ if (contentObjectURI == null || false == document.getContent() instanceof EObject) { >+ return; >+ } >+ EObject currentContent = (EObject) document.getContent(); >+ if (currentContent.eResource().getURIFragment(currentContent) == contentObjectURI) { >+ return; // already there >+ } >+ EObject anotherContentObject = currentContent.eResource().getEObject(contentObjectURI); >+ document.setContent(anotherContentObject); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void saveDocumentToFile(IDocument document, IFile file, boolean overwrite, IProgressMonitor monitor) throws CoreException { >+ Diagram diagram = (Diagram) document.getContent(); >+ Resource diagramResource = diagram.eResource(); >+ IDiagramDocument diagramDocument = (IDiagramDocument) document; >+ TransactionalEditingDomain domain = diagramDocument.getEditingDomain(); >+ List resources = domain.getResourceSet().getResources(); >+ >+ monitor.beginTask("Saving diagram", resources.size() + 1); //$NON-NLS-1$ >+ super.saveDocumentToFile(document, file, overwrite, new SubProgressMonitor(monitor, 1)); >+ for (Iterator it = resources.iterator(); it.hasNext();) { >+ Resource nextResource = (Resource) it.next(); >+ monitor.setTaskName("Saving " + nextResource.getURI()); //$NON-NLS-1$ >+ if (nextResource != diagramResource && nextResource.isLoaded() && (!nextResource.isTrackingModification() || nextResource.isModified())) { >+ try { >+ nextResource.save(Collections.EMPTY_MAP); >+ } catch (IOException e) { >+ UMLDiagramEditorPlugin.getInstance().logError("Unable to save resource: " + nextResource.getURI(), e); //$NON-NLS-1$ >+ } >+ } >+ monitor.worked(1); >+ } >+ monitor.done(); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected ISchedulingRule getSaveRule(Object element) { >+ IDiagramDocument diagramDocument = getDiagramDocument(element); >+ if (diagramDocument != null) { >+ Diagram diagram = diagramDocument.getDiagram(); >+ if (diagram != null) { >+ Collection rules = new ArrayList(); >+ for (Iterator it = diagramDocument.getEditingDomain().getResourceSet().getResources().iterator(); it.hasNext();) { >+ IFile nextFile = WorkspaceSynchronizer.getFile((Resource) it.next()); >+ if (nextFile != null) { >+ rules.add(computeSaveSchedulingRule(nextFile)); >+ } >+ } >+ return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()])); >+ } >+ } >+ return super.getSaveRule(element); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected FileInfo createFileInfo(IDocument document, FileSynchronizer synchronizer, IFileEditorInput input) { >+ assert document instanceof DiagramDocument; >+ >+ DiagramModificationListener diagramListener = new CustomModificationListener(this, (DiagramDocument) document, input); >+ DiagramFileInfo info = new DiagramFileInfo(document, synchronizer, diagramListener); >+ >+ diagramListener.startListening(); >+ return info; >+ } >+ >+ /** >+ * @generated >+ */ >+ private ISchedulingRule computeSaveSchedulingRule(IResource toCreateOrModify) { >+ if (toCreateOrModify.exists() && toCreateOrModify.isSynchronized(IResource.DEPTH_ZERO)) >+ return fResourceRuleFactory.modifyRule(toCreateOrModify); >+ >+ IResource parent = toCreateOrModify; >+ do { >+ /* >+ * XXX This is a workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=67601 >+ * IResourceRuleFactory.createRule should iterate the hierarchy itself. >+ */ >+ toCreateOrModify = parent; >+ parent = toCreateOrModify.getParent(); >+ } while (parent != null && !parent.exists() && !parent.isSynchronized(IResource.DEPTH_ZERO)); >+ >+ return fResourceRuleFactory.createRule(toCreateOrModify); >+ } >+ >+ /** >+ * @generated >+ */ >+ private class CustomModificationListener extends FileDiagramModificationListener { >+ >+ /** >+ * @generated >+ */ >+ private DemultiplexingListener myListener = null; >+ >+ /** >+ * @generated >+ */ >+ public CustomModificationListener(UMLDocumentProvider documentProviderParameter, DiagramDocument documentParameter, IFileEditorInput inputParameter) { >+ super(documentProviderParameter, documentParameter, inputParameter); >+ final DiagramDocument document = documentParameter; >+ NotificationFilter diagramResourceModifiedFilter = NotificationFilter.createEventTypeFilter(Notification.SET); >+ myListener = new DemultiplexingListener(diagramResourceModifiedFilter) { >+ >+ protected void handleNotification(TransactionalEditingDomain domain, Notification notification) { >+ if (notification.getNotifier() instanceof EObject) { >+ Resource modifiedResource = ((EObject) notification.getNotifier()).eResource(); >+ if (modifiedResource != document.getDiagram().eResource()) { >+ document.setContent(document.getContent()); >+ } >+ } >+ >+ } >+ }; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void startListening() { >+ super.startListening(); >+ getEditingDomain().addResourceSetListener(myListener); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void stopListening() { >+ getEditingDomain().removeResourceSetListener(myListener); >+ super.stopListening(); >+ } >+ >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/expressions/UMLOCLFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/expressions/UMLOCLFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/expressions/UMLOCLFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/expressions/UMLOCLFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,193 @@ >+package org.eclipse.uml2.diagram.clazz.expressions; >+ >+import java.util.Collections; >+import java.util.Iterator; >+import java.util.Map; >+ >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.emf.ecore.EClassifier; >+import org.eclipse.emf.ecore.EEnum; >+import org.eclipse.emf.ecore.EEnumLiteral; >+import org.eclipse.emf.ecore.ETypedElement; >+import org.eclipse.emf.ocl.expressions.ExpressionsFactory; >+import org.eclipse.emf.ocl.expressions.OCLExpression; >+import org.eclipse.emf.ocl.expressions.OperationCallExp; >+import org.eclipse.emf.ocl.expressions.Variable; >+import org.eclipse.emf.ocl.expressions.util.AbstractVisitor; >+import org.eclipse.emf.ocl.helper.HelperUtil; >+import org.eclipse.emf.ocl.helper.IOCLHelper; >+import org.eclipse.emf.ocl.helper.OCLParsingException; >+import org.eclipse.emf.ocl.parser.EcoreEnvironment; >+import org.eclipse.emf.ocl.parser.EcoreEnvironmentFactory; >+import org.eclipse.emf.ocl.parser.Environment; >+import org.eclipse.emf.ocl.parser.EvaluationEnvironment; >+import org.eclipse.emf.ocl.query.Query; >+import org.eclipse.emf.ocl.query.QueryFactory; >+import org.eclipse.emf.ocl.types.util.Types; >+import org.eclipse.emf.ocl.utilities.PredefinedType; >+import org.eclipse.uml2.diagram.parser.lookup.OCLLookup; >+ >+/** >+ * @generated >+ */ >+public class UMLOCLFactory { >+ >+ /** >+ * @generated >+ */ >+ public static OCLLookup.Expression getOCLLookupExpression(String body, EClassifier context) { >+ final UMLAbstractExpression expression = getExpression(body, context); >+ if (!expression.getStatus().isOK()) { >+ throw new IllegalArgumentException("Bad OCL:" + body); >+ } >+ return new OCLLookup.Expression() { >+ >+ public Object evaluate(Object context) { >+ return expression.evaluate(context); >+ } >+ }; >+ } >+ >+ /** >+ * @generated >+ */ >+ private UMLOCLFactory() { >+ } >+ >+ /** >+ * @generated >+ */ >+ public static UMLAbstractExpression getExpression(String body, EClassifier context, Map environment) { >+ return new Expression(body, context, environment); >+ } >+ >+ /** >+ * @generated >+ */ >+ public static UMLAbstractExpression getExpression(String body, EClassifier context) { >+ return getExpression(body, context, Collections.EMPTY_MAP); >+ } >+ >+ /** >+ * @generated >+ */ >+ private static class Expression extends UMLAbstractExpression { >+ >+ /** >+ * @generated >+ */ >+ private Query query; >+ >+ /** >+ * @generated >+ */ >+ public Expression(String body, EClassifier context, Map environment) { >+ super(body, context, environment); >+ >+ IOCLHelper oclHelper = (environment.isEmpty()) ? HelperUtil.createOCLHelper() : HelperUtil.createOCLHelper(createCustomEnv(environment)); >+ oclHelper.setContext(context()); >+ try { >+ OCLExpression oclExpression = oclHelper.createQuery(body); >+ this.query = QueryFactory.eINSTANCE.createQuery(oclExpression); >+ } catch (OCLParsingException e) { >+ setStatus(IStatus.ERROR, e.getMessage(), e); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected Object doEvaluate(Object context, Map env) { >+ if (query == null) { >+ return null; >+ } >+ EvaluationEnvironment evalEnv = query.getEvaluationEnvironment(); >+ // init environment >+ for (Iterator it = env.entrySet().iterator(); it.hasNext();) { >+ Map.Entry nextEntry = (Map.Entry) it.next(); >+ evalEnv.replace((String) nextEntry.getKey(), nextEntry.getValue()); >+ } >+ >+ try { >+ initExtentMap(context); >+ Object result = query.evaluate(context); >+ return (result != Types.OCL_INVALID) ? result : null; >+ } finally { >+ evalEnv.clear(); >+ query.setExtentMap(Collections.EMPTY_MAP); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected Object performCast(Object value, ETypedElement targetType) { >+ if (targetType.getEType() instanceof EEnum) { >+ if (value instanceof EEnumLiteral) { >+ EEnumLiteral literal = (EEnumLiteral) value; >+ return (literal.getInstance() != null) ? literal.getInstance() : literal; >+ } >+ } >+ return super.performCast(value, targetType); >+ } >+ >+ /** >+ * @generated >+ */ >+ private void initExtentMap(Object context) { >+ if (query == null || context == null) { >+ return; >+ } >+ final Query queryToInit = query; >+ final Object extentContext = context; >+ >+ queryToInit.setExtentMap(Collections.EMPTY_MAP); >+ if (queryToInit.queryText() != null && queryToInit.queryText().indexOf("allInstances") >= 0) { >+ AbstractVisitor visitior = new AbstractVisitor() { >+ >+ private boolean usesAllInstances = false; >+ >+ public Object visitOperationCallExp(OperationCallExp oc) { >+ if (!usesAllInstances) { >+ usesAllInstances = PredefinedType.ALL_INSTANCES == oc.getOperationCode(); >+ if (usesAllInstances) { >+ queryToInit.setExtentMap(EcoreEnvironmentFactory.ECORE_INSTANCE.createExtentMap(extentContext)); >+ } >+ } >+ return super.visitOperationCallExp(oc); >+ } >+ }; >+ queryToInit.getExpression().accept(visitior); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private static EcoreEnvironmentFactory createCustomEnv(Map environment) { >+ final Map env = environment; >+ return new EcoreEnvironmentFactory() { >+ >+ public Environment createClassifierContext(Object context) { >+ Environment ecoreEnv = super.createClassifierContext(context); >+ for (Iterator it = env.keySet().iterator(); it.hasNext();) { >+ String varName = (String) it.next(); >+ EClassifier varType = (EClassifier) env.get(varName); >+ ecoreEnv.addElement(varName, createVar(varName, varType), false); >+ } >+ return ecoreEnv; >+ } >+ }; >+ } >+ >+ /** >+ * @generated >+ */ >+ private static Variable createVar(String name, EClassifier type) { >+ Variable var = ExpressionsFactory.eINSTANCE.createVariable(); >+ var.setName(name); >+ var.setType(EcoreEnvironment.getOCLType(type)); >+ return var; >+ } >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyParserTokenManager.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyParserTokenManager.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyParserTokenManager.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyParserTokenManager.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,727 @@ >+/* Generated By:JavaCC: Do not edit this line. PropertyParserTokenManager.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.property; >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupResolver; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class PropertyParserTokenManager implements PropertyParserConstants >+{ >+ public java.io.PrintStream debugStream = System.out; >+ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } >+private final int jjStopStringLiteralDfa_0(int pos, long active0) >+{ >+ switch (pos) >+ { >+ case 0: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ return 2; >+ } >+ return -1; >+ case 1: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 1; >+ return 2; >+ } >+ return -1; >+ case 2: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 2; >+ return 2; >+ } >+ return -1; >+ case 3: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 3; >+ return 2; >+ } >+ return -1; >+ case 4: >+ if ((active0 & 0x40000L) != 0L) >+ return 2; >+ if ((active0 & 0x1fa0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 4; >+ return 2; >+ } >+ return -1; >+ case 5: >+ if ((active0 & 0x800000L) != 0L) >+ return 2; >+ if ((active0 & 0x17a0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 5; >+ return 2; >+ } >+ return -1; >+ case 6: >+ if ((active0 & 0x280000L) != 0L) >+ return 2; >+ if ((active0 & 0x1520000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 6; >+ return 2; >+ } >+ return -1; >+ case 7: >+ if ((active0 & 0x20000L) != 0L) >+ return 2; >+ if ((active0 & 0x1500000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 7; >+ return 2; >+ } >+ return -1; >+ default : >+ return -1; >+ } >+} >+private final int jjStartNfa_0(int pos, long active0) >+{ >+ return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); >+} >+private final int jjStopAtPos(int pos, int kind) >+{ >+ jjmatchedKind = kind; >+ jjmatchedPos = pos; >+ return pos + 1; >+} >+private final int jjStartNfaWithStates_0(int pos, int kind, int state) >+{ >+ jjmatchedKind = kind; >+ jjmatchedPos = pos; >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { return pos + 1; } >+ return jjMoveNfa_0(state, pos + 1); >+} >+private final int jjMoveStringLiteralDfa0_0() >+{ >+ switch(curChar) >+ { >+ case 9: >+ return jjStopAtPos(0, 2); >+ case 32: >+ return jjStopAtPos(0, 1); >+ case 35: >+ return jjStopAtPos(0, 13); >+ case 42: >+ return jjStopAtPos(0, 16); >+ case 43: >+ return jjStopAtPos(0, 11); >+ case 44: >+ return jjStopAtPos(0, 10); >+ case 45: >+ return jjStopAtPos(0, 12); >+ case 46: >+ return jjStopAtPos(0, 15); >+ case 47: >+ return jjStopAtPos(0, 3); >+ case 58: >+ return jjStopAtPos(0, 4); >+ case 61: >+ return jjStopAtPos(0, 5); >+ case 91: >+ return jjStopAtPos(0, 6); >+ case 93: >+ return jjStopAtPos(0, 7); >+ case 110: >+ return jjMoveStringLiteralDfa1_0(0x1000000L); >+ case 111: >+ return jjMoveStringLiteralDfa1_0(0x200000L); >+ case 114: >+ return jjMoveStringLiteralDfa1_0(0x120000L); >+ case 115: >+ return jjMoveStringLiteralDfa1_0(0x80000L); >+ case 117: >+ return jjMoveStringLiteralDfa1_0(0xc40000L); >+ case 123: >+ return jjStopAtPos(0, 8); >+ case 125: >+ return jjStopAtPos(0, 9); >+ case 126: >+ return jjStopAtPos(0, 14); >+ default : >+ return jjMoveNfa_0(1, 0); >+ } >+} >+private final int jjMoveStringLiteralDfa1_0(long active0) >+{ >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(0, active0); >+ return 1; >+ } >+ switch(curChar) >+ { >+ case 101: >+ return jjMoveStringLiteralDfa2_0(active0, 0x120000L); >+ case 110: >+ return jjMoveStringLiteralDfa2_0(active0, 0xc40000L); >+ case 111: >+ return jjMoveStringLiteralDfa2_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa2_0(active0, 0x200000L); >+ case 117: >+ return jjMoveStringLiteralDfa2_0(active0, 0x80000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(0, active0); >+} >+private final int jjMoveStringLiteralDfa2_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(0, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(1, active0); >+ return 2; >+ } >+ switch(curChar) >+ { >+ case 97: >+ return jjMoveStringLiteralDfa3_0(active0, 0x20000L); >+ case 98: >+ return jjMoveStringLiteralDfa3_0(active0, 0x80000L); >+ case 100: >+ return jjMoveStringLiteralDfa3_0(active0, 0x300000L); >+ case 105: >+ return jjMoveStringLiteralDfa3_0(active0, 0x840000L); >+ case 110: >+ return jjMoveStringLiteralDfa3_0(active0, 0x1000000L); >+ case 111: >+ return jjMoveStringLiteralDfa3_0(active0, 0x400000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(1, active0); >+} >+private final int jjMoveStringLiteralDfa3_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(1, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(2, active0); >+ return 3; >+ } >+ switch(curChar) >+ { >+ case 100: >+ return jjMoveStringLiteralDfa4_0(active0, 0x20000L); >+ case 101: >+ return jjMoveStringLiteralDfa4_0(active0, 0x300000L); >+ case 111: >+ return jjMoveStringLiteralDfa4_0(active0, 0x40000L); >+ case 113: >+ return jjMoveStringLiteralDfa4_0(active0, 0x800000L); >+ case 114: >+ return jjMoveStringLiteralDfa4_0(active0, 0x400000L); >+ case 115: >+ return jjMoveStringLiteralDfa4_0(active0, 0x80000L); >+ case 117: >+ return jjMoveStringLiteralDfa4_0(active0, 0x1000000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(2, active0); >+} >+private final int jjMoveStringLiteralDfa4_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(2, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(3, active0); >+ return 4; >+ } >+ switch(curChar) >+ { >+ case 79: >+ return jjMoveStringLiteralDfa5_0(active0, 0x20000L); >+ case 100: >+ return jjMoveStringLiteralDfa5_0(active0, 0x400000L); >+ case 101: >+ return jjMoveStringLiteralDfa5_0(active0, 0x80000L); >+ case 102: >+ return jjMoveStringLiteralDfa5_0(active0, 0x100000L); >+ case 110: >+ if ((active0 & 0x40000L) != 0L) >+ return jjStartNfaWithStates_0(4, 18, 2); >+ return jjMoveStringLiteralDfa5_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa5_0(active0, 0x200000L); >+ case 117: >+ return jjMoveStringLiteralDfa5_0(active0, 0x800000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(3, active0); >+} >+private final int jjMoveStringLiteralDfa5_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(3, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(4, active0); >+ return 5; >+ } >+ switch(curChar) >+ { >+ case 101: >+ if ((active0 & 0x800000L) != 0L) >+ return jjStartNfaWithStates_0(5, 23, 2); >+ return jjMoveStringLiteralDfa6_0(active0, 0x600000L); >+ case 105: >+ return jjMoveStringLiteralDfa6_0(active0, 0x1100000L); >+ case 110: >+ return jjMoveStringLiteralDfa6_0(active0, 0x20000L); >+ case 116: >+ return jjMoveStringLiteralDfa6_0(active0, 0x80000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(4, active0); >+} >+private final int jjMoveStringLiteralDfa6_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(4, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(5, active0); >+ return 6; >+ } >+ switch(curChar) >+ { >+ case 100: >+ if ((active0 & 0x200000L) != 0L) >+ return jjStartNfaWithStates_0(6, 21, 2); >+ break; >+ case 108: >+ return jjMoveStringLiteralDfa7_0(active0, 0x20000L); >+ case 110: >+ return jjMoveStringLiteralDfa7_0(active0, 0x100000L); >+ case 113: >+ return jjMoveStringLiteralDfa7_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa7_0(active0, 0x400000L); >+ case 115: >+ if ((active0 & 0x80000L) != 0L) >+ return jjStartNfaWithStates_0(6, 19, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(5, active0); >+} >+private final int jjMoveStringLiteralDfa7_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(5, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(6, active0); >+ return 7; >+ } >+ switch(curChar) >+ { >+ case 101: >+ return jjMoveStringLiteralDfa8_0(active0, 0x500000L); >+ case 117: >+ return jjMoveStringLiteralDfa8_0(active0, 0x1000000L); >+ case 121: >+ if ((active0 & 0x20000L) != 0L) >+ return jjStartNfaWithStates_0(7, 17, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(6, active0); >+} >+private final int jjMoveStringLiteralDfa8_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(6, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(7, active0); >+ return 8; >+ } >+ switch(curChar) >+ { >+ case 100: >+ if ((active0 & 0x400000L) != 0L) >+ return jjStartNfaWithStates_0(8, 22, 2); >+ break; >+ case 101: >+ if ((active0 & 0x1000000L) != 0L) >+ return jjStartNfaWithStates_0(8, 24, 2); >+ break; >+ case 115: >+ if ((active0 & 0x100000L) != 0L) >+ return jjStartNfaWithStates_0(8, 20, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(7, active0); >+} >+private final void jjCheckNAdd(int state) >+{ >+ if (jjrounds[state] != jjround) >+ { >+ jjstateSet[jjnewStateCnt++] = state; >+ jjrounds[state] = jjround; >+ } >+} >+private final void jjAddStates(int start, int end) >+{ >+ do { >+ jjstateSet[jjnewStateCnt++] = jjnextStates[start]; >+ } while (start++ != end); >+} >+private final void jjCheckNAddTwoStates(int state1, int state2) >+{ >+ jjCheckNAdd(state1); >+ jjCheckNAdd(state2); >+} >+private final void jjCheckNAddStates(int start, int end) >+{ >+ do { >+ jjCheckNAdd(jjnextStates[start]); >+ } while (start++ != end); >+} >+private final void jjCheckNAddStates(int start) >+{ >+ jjCheckNAdd(jjnextStates[start]); >+ jjCheckNAdd(jjnextStates[start + 1]); >+} >+static final long[] jjbitVec0 = { >+ 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L >+}; >+static final long[] jjbitVec2 = { >+ 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL >+}; >+static final long[] jjbitVec3 = { >+ 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL >+}; >+static final long[] jjbitVec4 = { >+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L >+}; >+static final long[] jjbitVec5 = { >+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L >+}; >+static final long[] jjbitVec6 = { >+ 0x3fffffffffffL, 0x0L, 0x0L, 0x0L >+}; >+private final int jjMoveNfa_0(int startState, int curPos) >+{ >+ int[] nextStates; >+ int startsAt = 0; >+ jjnewStateCnt = 3; >+ int i = 1; >+ jjstateSet[0] = startState; >+ int j, kind = 0x7fffffff; >+ for (;;) >+ { >+ if (++jjround == 0x7fffffff) >+ ReInitRounds(); >+ if (curChar < 64) >+ { >+ long l = 1L << curChar; >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ if ((0x3ff000000000000L & l) != 0L) >+ { >+ if (kind > 25) >+ kind = 25; >+ jjCheckNAdd(0); >+ } >+ else if (curChar == 36) >+ { >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ } >+ break; >+ case 0: >+ if ((0x3ff000000000000L & l) == 0L) >+ break; >+ if (kind > 25) >+ kind = 25; >+ jjCheckNAdd(0); >+ break; >+ case 2: >+ if ((0x3ff001000000000L & l) == 0L) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ else if (curChar < 128) >+ { >+ long l = 1L << (curChar & 077); >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ case 2: >+ if ((0x7fffffe87fffffeL & l) == 0L) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ else >+ { >+ int hiByte = (int)(curChar >> 8); >+ int i1 = hiByte >> 6; >+ long l1 = 1L << (hiByte & 077); >+ int i2 = (curChar & 0xff) >> 6; >+ long l2 = 1L << (curChar & 077); >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ case 2: >+ if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ if (kind != 0x7fffffff) >+ { >+ jjmatchedKind = kind; >+ jjmatchedPos = curPos; >+ kind = 0x7fffffff; >+ } >+ ++curPos; >+ if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) >+ return curPos; >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { return curPos; } >+ } >+} >+static final int[] jjnextStates = { >+}; >+private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) >+{ >+ switch(hiByte) >+ { >+ case 0: >+ return ((jjbitVec2[i2] & l2) != 0L); >+ case 48: >+ return ((jjbitVec3[i2] & l2) != 0L); >+ case 49: >+ return ((jjbitVec4[i2] & l2) != 0L); >+ case 51: >+ return ((jjbitVec5[i2] & l2) != 0L); >+ case 61: >+ return ((jjbitVec6[i2] & l2) != 0L); >+ default : >+ if ((jjbitVec0[i1] & l1) != 0L) >+ return true; >+ return false; >+ } >+} >+public static final String[] jjstrLiteralImages = { >+"", null, null, "\57", "\72", "\75", "\133", "\135", "\173", "\175", "\54", >+"\53", "\55", "\43", "\176", "\56", "\52", "\162\145\141\144\117\156\154\171", >+"\165\156\151\157\156", "\163\165\142\163\145\164\163", "\162\145\144\145\146\151\156\145\163", >+"\157\162\144\145\162\145\144", "\165\156\157\162\144\145\162\145\144", "\165\156\151\161\165\145", >+"\156\157\156\165\156\151\161\165\145", null, null, null, null, }; >+public static final String[] lexStateNames = { >+ "DEFAULT", >+}; >+static final long[] jjtoToken = { >+ 0x7fffff9L, >+}; >+static final long[] jjtoSkip = { >+ 0x6L, >+}; >+static final long[] jjtoSpecial = { >+ 0x6L, >+}; >+protected JavaCharStream input_stream; >+private final int[] jjrounds = new int[3]; >+private final int[] jjstateSet = new int[6]; >+protected char curChar; >+public PropertyParserTokenManager(JavaCharStream stream) >+{ >+ if (JavaCharStream.staticFlag) >+ throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); >+ input_stream = stream; >+} >+public PropertyParserTokenManager(JavaCharStream stream, int lexState) >+{ >+ this(stream); >+ SwitchTo(lexState); >+} >+public void ReInit(JavaCharStream stream) >+{ >+ jjmatchedPos = jjnewStateCnt = 0; >+ curLexState = defaultLexState; >+ input_stream = stream; >+ ReInitRounds(); >+} >+private final void ReInitRounds() >+{ >+ int i; >+ jjround = 0x80000001; >+ for (i = 3; i-- > 0;) >+ jjrounds[i] = 0x80000000; >+} >+public void ReInit(JavaCharStream stream, int lexState) >+{ >+ ReInit(stream); >+ SwitchTo(lexState); >+} >+public void SwitchTo(int lexState) >+{ >+ if (lexState >= 1 || lexState < 0) >+ throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); >+ else >+ curLexState = lexState; >+} >+ >+protected Token jjFillToken() >+{ >+ Token t = Token.newToken(jjmatchedKind); >+ t.kind = jjmatchedKind; >+ String im = jjstrLiteralImages[jjmatchedKind]; >+ t.image = (im == null) ? input_stream.GetImage() : im; >+ t.beginLine = input_stream.getBeginLine(); >+ t.beginColumn = input_stream.getBeginColumn(); >+ t.endLine = input_stream.getEndLine(); >+ t.endColumn = input_stream.getEndColumn(); >+ return t; >+} >+ >+int curLexState = 0; >+int defaultLexState = 0; >+int jjnewStateCnt; >+int jjround; >+int jjmatchedPos; >+int jjmatchedKind; >+ >+public Token getNextToken() >+{ >+ int kind; >+ Token specialToken = null; >+ Token matchedToken; >+ int curPos = 0; >+ >+ EOFLoop : >+ for (;;) >+ { >+ try >+ { >+ curChar = input_stream.BeginToken(); >+ } >+ catch(java.io.IOException e) >+ { >+ jjmatchedKind = 0; >+ matchedToken = jjFillToken(); >+ matchedToken.specialToken = specialToken; >+ return matchedToken; >+ } >+ >+ jjmatchedKind = 0x7fffffff; >+ jjmatchedPos = 0; >+ curPos = jjMoveStringLiteralDfa0_0(); >+ if (jjmatchedKind != 0x7fffffff) >+ { >+ if (jjmatchedPos + 1 < curPos) >+ input_stream.backup(curPos - jjmatchedPos - 1); >+ if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) >+ { >+ matchedToken = jjFillToken(); >+ matchedToken.specialToken = specialToken; >+ return matchedToken; >+ } >+ else >+ { >+ if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) >+ { >+ matchedToken = jjFillToken(); >+ if (specialToken == null) >+ specialToken = matchedToken; >+ else >+ { >+ matchedToken.specialToken = specialToken; >+ specialToken = (specialToken.next = matchedToken); >+ } >+ } >+ continue EOFLoop; >+ } >+ } >+ int error_line = input_stream.getEndLine(); >+ int error_column = input_stream.getEndColumn(); >+ String error_after = null; >+ boolean EOFSeen = false; >+ try { input_stream.readChar(); input_stream.backup(1); } >+ catch (java.io.IOException e1) { >+ EOFSeen = true; >+ error_after = curPos <= 1 ? "" : input_stream.GetImage(); >+ if (curChar == '\n' || curChar == '\r') { >+ error_line++; >+ error_column = 0; >+ } >+ else >+ error_column++; >+ } >+ if (!EOFSeen) { >+ input_stream.backup(1); >+ error_after = curPos <= 1 ? "" : input_stream.GetImage(); >+ } >+ throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); >+ } >+} >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationToString.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationToString.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationToString.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationToString.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,171 @@ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+ >+package org.eclipse.uml2.diagram.clazz.parser.operation; >+ >+import java.util.Arrays; >+import java.util.Iterator; >+import java.util.LinkedList; >+import java.util.List; >+ >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.uml2.diagram.parser.AbstractToString; >+import org.eclipse.uml2.uml.Operation; >+import org.eclipse.uml2.uml.Parameter; >+import org.eclipse.uml2.uml.ParameterDirectionKind; >+import org.eclipse.uml2.uml.UMLPackage; >+ >+public abstract class OperationToString extends AbstractToString { >+ public static class EDIT extends OperationToString { >+ public String getToString(EObject object, int flags) { >+ return getToString(object, true); >+ } >+ >+ public boolean isAffectingFeature(EStructuralFeature feature) { >+ throw new UnsupportedOperationException(); >+ } >+ } >+ >+ public static class VIEW extends OperationToString implements WithReferences { >+ private static final List AFFECTING = Arrays.asList(new EStructuralFeature[] { >+ UMLPackage.eINSTANCE.getNamedElement_Visibility(), >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLPackage.eINSTANCE.getBehavior_OwnedParameter(), >+ UMLPackage.eINSTANCE.getParameter_Direction(), >+ UMLPackage.eINSTANCE.getTypedElement_Type(), >+ UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue(), >+ UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue(), >+ UMLPackage.eINSTANCE.getLiteralUnlimitedNatural_Value(), >+ UMLPackage.eINSTANCE.getLiteralInteger_Value(), >+ }); >+ >+ public String getToString(EObject object, int flags) { >+ return getToString(object, false); >+ } >+ >+ public boolean isAffectingFeature(EStructuralFeature feature) { >+ return AFFECTING.contains(feature); >+ } >+ >+ public List getAdditionalReferencedElements(EObject object) { >+ Operation operation = asOperation(object); >+ List result = new LinkedList(){ >+ public boolean add(Object data) { >+ return (data != null) && super.add(data); >+ } >+ }; >+ result.add(operation); >+ for (Iterator params = operation.getOwnedParameters().iterator(); params.hasNext();){ >+ Parameter next = (Parameter)params.next(); >+ result.add(next.getType()); >+ result.add(next); >+ result.add(next.getLowerValue()); >+ result.add(next.getUpperValue()); >+ } >+ return result; >+ } >+ } >+ >+ protected String getToString(EObject object, boolean editNotView) { >+ Operation operation = asOperation(object); >+ StringBuffer result = new StringBuffer(); >+ >+ result.append(getVisibility(operation)); >+ appendName(result, operation); >+ result.append("( "); >+ >+ Parameter ret = operation.getReturnResult(); >+ boolean firstWritten = false; >+ for (Iterator parameters = operation.getOwnedParameters().iterator(); parameters.hasNext();){ >+ Parameter next = (Parameter)parameters.next(); >+ if (next.equals(ret)){ >+ continue; >+ } >+ if (firstWritten){ >+ result.append(", "); >+ } >+ firstWritten = true; >+ result.append(getDirection(next)); >+ appendName(result, next); >+ appendType(result, next); >+ appendMultiplicity(result, next); >+ if (editNotView){ >+ appendDefaultParameterValue(result, next); >+ } >+ >+ } >+ result.append(" )"); >+ >+ if (ret != null){ >+ appendType(result, ret); >+ } >+ if (editNotView){ >+ appendModifiers(result, operation); >+ } >+ return result.toString(); >+ } >+ >+ protected void appendDefaultParameterValue(StringBuffer result, Parameter parameter){ >+ String def = parameter.getDefault(); >+ if (!isEmpty(def)){ >+ result.append(" = "); >+ result.append(def); >+ } >+ } >+ >+ protected String getDirection(Parameter parameter){ >+ ParameterDirectionKind direction = parameter.getDirection(); >+ switch(direction.getValue()){ >+ case ParameterDirectionKind.IN : >+ return ""; //default is omitted >+ case ParameterDirectionKind.OUT: >+ return "out "; >+ case ParameterDirectionKind.INOUT: >+ return "inout "; >+ case ParameterDirectionKind.RETURN: >+ throw new IllegalStateException("Return parameter should not be included into parameters list"); >+ } >+ >+ throw new IllegalStateException("Unknown parameter direction kind: " + direction + " for parameter: " + parameter); >+ } >+ >+ protected Operation asOperation(EObject object){ >+ if (false == object instanceof Operation){ >+ throw new IllegalStateException("I can not provide toString for: " + object); >+ } >+ return (Operation)object; >+ } >+ >+ public void appendModifiers(StringBuffer result, Operation operation) { >+ ModifiersBuilder builder = new ModifiersBuilder(); >+ if (operation.isQuery()){ >+ builder.appendModifier("query"); >+ } >+ if (operation.isOrdered()){ >+ builder.appendModifier("ordered"); >+ } >+ if (operation.isUnique()){ >+ builder.appendModifier("unique"); >+ } >+ for (Iterator redefines = operation.getRedefinedOperations().iterator(); redefines.hasNext();){ >+ Operation next = (Operation) redefines.next(); >+ String nextName = next.getName(); >+ if (!isEmpty(nextName)){ >+ builder.appendModifier("redefines " + nextName); >+ } >+ } >+ >+ builder.writeInto(result); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyClientViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyClientViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyClientViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyClientViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,47 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ConnectionViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class DependencyClientViewFactory extends ConnectionViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createRoutingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.DependencyClientEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PackageEditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PackageEditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/PackageEditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/PackageEditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class PackageEditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class DataTypeViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/JavaCharStream.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/JavaCharStream.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/JavaCharStream.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/JavaCharStream.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,558 @@ >+/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.instance; >+ >+/** >+ * An implementation of interface CharStream, where the stream is assumed to >+ * contain only ASCII characters (with java-like unicode escape processing). >+ */ >+ >+public class JavaCharStream >+{ >+ public static final boolean staticFlag = false; >+ static final int hexval(char c) throws java.io.IOException { >+ switch(c) >+ { >+ case '0' : >+ return 0; >+ case '1' : >+ return 1; >+ case '2' : >+ return 2; >+ case '3' : >+ return 3; >+ case '4' : >+ return 4; >+ case '5' : >+ return 5; >+ case '6' : >+ return 6; >+ case '7' : >+ return 7; >+ case '8' : >+ return 8; >+ case '9' : >+ return 9; >+ >+ case 'a' : >+ case 'A' : >+ return 10; >+ case 'b' : >+ case 'B' : >+ return 11; >+ case 'c' : >+ case 'C' : >+ return 12; >+ case 'd' : >+ case 'D' : >+ return 13; >+ case 'e' : >+ case 'E' : >+ return 14; >+ case 'f' : >+ case 'F' : >+ return 15; >+ } >+ >+ throw new java.io.IOException(); // Should never come here >+ } >+ >+ public int bufpos = -1; >+ int bufsize; >+ int available; >+ int tokenBegin; >+ protected int bufline[]; >+ protected int bufcolumn[]; >+ >+ protected int column = 0; >+ protected int line = 1; >+ >+ protected boolean prevCharIsCR = false; >+ protected boolean prevCharIsLF = false; >+ >+ protected java.io.Reader inputStream; >+ >+ protected char[] nextCharBuf; >+ protected char[] buffer; >+ protected int maxNextCharInd = 0; >+ protected int nextCharInd = -1; >+ protected int inBuf = 0; >+ >+ protected void ExpandBuff(boolean wrapAround) >+ { >+ char[] newbuffer = new char[bufsize + 2048]; >+ int newbufline[] = new int[bufsize + 2048]; >+ int newbufcolumn[] = new int[bufsize + 2048]; >+ >+ try >+ { >+ if (wrapAround) >+ { >+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); >+ System.arraycopy(buffer, 0, newbuffer, >+ bufsize - tokenBegin, bufpos); >+ buffer = newbuffer; >+ >+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); >+ System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); >+ bufline = newbufline; >+ >+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); >+ System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); >+ bufcolumn = newbufcolumn; >+ >+ bufpos += (bufsize - tokenBegin); >+ } >+ else >+ { >+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); >+ buffer = newbuffer; >+ >+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); >+ bufline = newbufline; >+ >+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); >+ bufcolumn = newbufcolumn; >+ >+ bufpos -= tokenBegin; >+ } >+ } >+ catch (Throwable t) >+ { >+ throw new Error(t.getMessage()); >+ } >+ >+ available = (bufsize += 2048); >+ tokenBegin = 0; >+ } >+ >+ protected void FillBuff() throws java.io.IOException >+ { >+ int i; >+ if (maxNextCharInd == 4096) >+ maxNextCharInd = nextCharInd = 0; >+ >+ try { >+ if ((i = inputStream.read(nextCharBuf, maxNextCharInd, >+ 4096 - maxNextCharInd)) == -1) >+ { >+ inputStream.close(); >+ throw new java.io.IOException(); >+ } >+ else >+ maxNextCharInd += i; >+ return; >+ } >+ catch(java.io.IOException e) { >+ if (bufpos != 0) >+ { >+ --bufpos; >+ backup(0); >+ } >+ else >+ { >+ bufline[bufpos] = line; >+ bufcolumn[bufpos] = column; >+ } >+ throw e; >+ } >+ } >+ >+ protected char ReadByte() throws java.io.IOException >+ { >+ if (++nextCharInd >= maxNextCharInd) >+ FillBuff(); >+ >+ return nextCharBuf[nextCharInd]; >+ } >+ >+ public char BeginToken() throws java.io.IOException >+ { >+ if (inBuf > 0) >+ { >+ --inBuf; >+ >+ if (++bufpos == bufsize) >+ bufpos = 0; >+ >+ tokenBegin = bufpos; >+ return buffer[bufpos]; >+ } >+ >+ tokenBegin = 0; >+ bufpos = -1; >+ >+ return readChar(); >+ } >+ >+ protected void AdjustBuffSize() >+ { >+ if (available == bufsize) >+ { >+ if (tokenBegin > 2048) >+ { >+ bufpos = 0; >+ available = tokenBegin; >+ } >+ else >+ ExpandBuff(false); >+ } >+ else if (available > tokenBegin) >+ available = bufsize; >+ else if ((tokenBegin - available) < 2048) >+ ExpandBuff(true); >+ else >+ available = tokenBegin; >+ } >+ >+ protected void UpdateLineColumn(char c) >+ { >+ column++; >+ >+ if (prevCharIsLF) >+ { >+ prevCharIsLF = false; >+ line += (column = 1); >+ } >+ else if (prevCharIsCR) >+ { >+ prevCharIsCR = false; >+ if (c == '\n') >+ { >+ prevCharIsLF = true; >+ } >+ else >+ line += (column = 1); >+ } >+ >+ switch (c) >+ { >+ case '\r' : >+ prevCharIsCR = true; >+ break; >+ case '\n' : >+ prevCharIsLF = true; >+ break; >+ case '\t' : >+ column--; >+ column += (8 - (column & 07)); >+ break; >+ default : >+ break; >+ } >+ >+ bufline[bufpos] = line; >+ bufcolumn[bufpos] = column; >+ } >+ >+ public char readChar() throws java.io.IOException >+ { >+ if (inBuf > 0) >+ { >+ --inBuf; >+ >+ if (++bufpos == bufsize) >+ bufpos = 0; >+ >+ return buffer[bufpos]; >+ } >+ >+ char c; >+ >+ if (++bufpos == available) >+ AdjustBuffSize(); >+ >+ if ((buffer[bufpos] = c = ReadByte()) == '\\') >+ { >+ UpdateLineColumn(c); >+ >+ int backSlashCnt = 1; >+ >+ for (;;) // Read all the backslashes >+ { >+ if (++bufpos == available) >+ AdjustBuffSize(); >+ >+ try >+ { >+ if ((buffer[bufpos] = c = ReadByte()) != '\\') >+ { >+ UpdateLineColumn(c); >+ // found a non-backslash char. >+ if ((c == 'u') && ((backSlashCnt & 1) == 1)) >+ { >+ if (--bufpos < 0) >+ bufpos = bufsize - 1; >+ >+ break; >+ } >+ >+ backup(backSlashCnt); >+ return '\\'; >+ } >+ } >+ catch(java.io.IOException e) >+ { >+ if (backSlashCnt > 1) >+ backup(backSlashCnt); >+ >+ return '\\'; >+ } >+ >+ UpdateLineColumn(c); >+ backSlashCnt++; >+ } >+ >+ // Here, we have seen an odd number of backslash's followed by a 'u' >+ try >+ { >+ while ((c = ReadByte()) == 'u') >+ ++column; >+ >+ buffer[bufpos] = c = (char)(hexval(c) << 12 | >+ hexval(ReadByte()) << 8 | >+ hexval(ReadByte()) << 4 | >+ hexval(ReadByte())); >+ >+ column += 4; >+ } >+ catch(java.io.IOException e) >+ { >+ throw new Error("Invalid escape character at line " + line + >+ " column " + column + "."); >+ } >+ >+ if (backSlashCnt == 1) >+ return c; >+ else >+ { >+ backup(backSlashCnt - 1); >+ return '\\'; >+ } >+ } >+ else >+ { >+ UpdateLineColumn(c); >+ return (c); >+ } >+ } >+ >+ /** >+ * @deprecated >+ * @see #getEndColumn >+ */ >+ >+ public int getColumn() { >+ return bufcolumn[bufpos]; >+ } >+ >+ /** >+ * @deprecated >+ * @see #getEndLine >+ */ >+ >+ public int getLine() { >+ return bufline[bufpos]; >+ } >+ >+ public int getEndColumn() { >+ return bufcolumn[bufpos]; >+ } >+ >+ public int getEndLine() { >+ return bufline[bufpos]; >+ } >+ >+ public int getBeginColumn() { >+ return bufcolumn[tokenBegin]; >+ } >+ >+ public int getBeginLine() { >+ return bufline[tokenBegin]; >+ } >+ >+ public void backup(int amount) { >+ >+ inBuf += amount; >+ if ((bufpos -= amount) < 0) >+ bufpos += bufsize; >+ } >+ >+ public JavaCharStream(java.io.Reader dstream, >+ int startline, int startcolumn, int buffersize) >+ { >+ inputStream = dstream; >+ line = startline; >+ column = startcolumn - 1; >+ >+ available = bufsize = buffersize; >+ buffer = new char[buffersize]; >+ bufline = new int[buffersize]; >+ bufcolumn = new int[buffersize]; >+ nextCharBuf = new char[4096]; >+ } >+ >+ public JavaCharStream(java.io.Reader dstream, >+ int startline, int startcolumn) >+ { >+ this(dstream, startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.Reader dstream) >+ { >+ this(dstream, 1, 1, 4096); >+ } >+ public void ReInit(java.io.Reader dstream, >+ int startline, int startcolumn, int buffersize) >+ { >+ inputStream = dstream; >+ line = startline; >+ column = startcolumn - 1; >+ >+ if (buffer == null || buffersize != buffer.length) >+ { >+ available = bufsize = buffersize; >+ buffer = new char[buffersize]; >+ bufline = new int[buffersize]; >+ bufcolumn = new int[buffersize]; >+ nextCharBuf = new char[4096]; >+ } >+ prevCharIsLF = prevCharIsCR = false; >+ tokenBegin = inBuf = maxNextCharInd = 0; >+ nextCharInd = bufpos = -1; >+ } >+ >+ public void ReInit(java.io.Reader dstream, >+ int startline, int startcolumn) >+ { >+ ReInit(dstream, startline, startcolumn, 4096); >+ } >+ >+ public void ReInit(java.io.Reader dstream) >+ { >+ ReInit(dstream, 1, 1, 4096); >+ } >+ public JavaCharStream(java.io.InputStream dstream, int startline, >+ int startcolumn, int buffersize) >+ { >+ this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.InputStream dstream, int startline, >+ int startcolumn) >+ { >+ this(dstream, startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.InputStream dstream) >+ { >+ this(dstream, 1, 1, 4096); >+ } >+ >+ public void ReInit(java.io.InputStream dstream, int startline, >+ int startcolumn, int buffersize) >+ { >+ ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); >+ } >+ public void ReInit(java.io.InputStream dstream, int startline, >+ int startcolumn) >+ { >+ ReInit(dstream, startline, startcolumn, 4096); >+ } >+ public void ReInit(java.io.InputStream dstream) >+ { >+ ReInit(dstream, 1, 1, 4096); >+ } >+ >+ public String GetImage() >+ { >+ if (bufpos >= tokenBegin) >+ return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); >+ else >+ return new String(buffer, tokenBegin, bufsize - tokenBegin) + >+ new String(buffer, 0, bufpos + 1); >+ } >+ >+ public char[] GetSuffix(int len) >+ { >+ char[] ret = new char[len]; >+ >+ if ((bufpos + 1) >= len) >+ System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); >+ else >+ { >+ System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, >+ len - bufpos - 1); >+ System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); >+ } >+ >+ return ret; >+ } >+ >+ public void Done() >+ { >+ nextCharBuf = null; >+ buffer = null; >+ bufline = null; >+ bufcolumn = null; >+ } >+ >+ /** >+ * Method to adjust line and column numbers for the start of a token. >+ */ >+ public void adjustBeginLineColumn(int newLine, int newCol) >+ { >+ int start = tokenBegin; >+ int len; >+ >+ if (bufpos >= tokenBegin) >+ { >+ len = bufpos - tokenBegin + inBuf + 1; >+ } >+ else >+ { >+ len = bufsize - tokenBegin + bufpos + 1 + inBuf; >+ } >+ >+ int i = 0, j = 0, k = 0; >+ int nextColDiff = 0, columnDiff = 0; >+ >+ while (i < len && >+ bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) >+ { >+ bufline[j] = newLine; >+ nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; >+ bufcolumn[j] = newCol + columnDiff; >+ columnDiff = nextColDiff; >+ i++; >+ } >+ >+ if (i < len) >+ { >+ bufline[j] = newLine++; >+ bufcolumn[j] = newCol + columnDiff; >+ >+ while (i++ < len) >+ { >+ if (bufline[j = start % bufsize] != bufline[++start % bufsize]) >+ bufline[j] = newLine++; >+ else >+ bufline[j] = newLine; >+ } >+ } >+ >+ line = bufline[j]; >+ column = bufcolumn[j]; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/DataTypeEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/DataTypeEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/DataTypeEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/DataTypeEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class DataTypeEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/InstanceSpecificationEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/InstanceSpecificationEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/InstanceSpecificationEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/InstanceSpecificationEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class InstanceSpecificationEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationNameViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationNameViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationNameViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationNameViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; >+import org.eclipse.gmf.runtime.notation.Location; >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class AssociationNameViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { >+ Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint); >+ Location location = (Location) view.getLayoutConstraint(); >+ IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit()); >+ location.setX(mapMode.DPtoLP(0)); >+ location.setY(mapMode.DPtoLP(40)); >+ return view; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PropertyViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PropertyViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PropertyViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PropertyViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class PropertyViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.PropertyEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Enumeration2ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Enumeration2ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Enumeration2ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Enumeration2ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,58 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationLiteralsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Enumeration2ViewFactory extends AbstractShapeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createDescriptionStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFillStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Enumeration2EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(EnumerationNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(EnumerationLiteralsEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(EnumerationAttributesEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(EnumerationOperationsEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/association-end.jj >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/association-end.jj >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/association-end.jj >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/association-end.jj 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,350 @@ >+options { >+ JAVA_UNICODE_ESCAPE = true; >+ STATIC=false; >+} >+ >+PARSER_BEGIN(AssociationEndParser) >+ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.end; >+ >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class AssociationEndParser extends ExternalParserBase { >+ private Property mySubject; >+ >+ public AssociationEndParser(){ >+ this(new StringReader("")); >+ } >+ >+ public AssociationEndParser(LookupSuite lookup){ >+ this(); >+ setLookupSuite(lookup); >+ } >+ >+ public EClass getSubjectClass(){ >+ // though we expects the Property instance, the input object is still Association >+ // @see createSubjectPrototype() >+ return UMLPackage.eINSTANCE.getAssociation(); >+ } >+ >+ public EObject createSubjectPrototype() { >+ return UMLFactory.eINSTANCE.createProperty(); >+ } >+ >+ public void parse(EObject target, String text) throws ExternalParserException { >+ checkContext(); >+ ReInit(new StringReader(text)); >+ mySubject = (Property)target; >+ Declaration(); >+ mySubject = null; >+ } >+ >+ protected static int parseInt(Token t) throws ParseException { >+ if (t.kind != AssociationEndParserConstants.INTEGER_LITERAL){ >+ throw new IllegalStateException("Token: " + t + ", image: " + t.image); >+ } >+ try { >+ return Integer.parseInt(t.image); //XXX: "0005", "99999999999999999999999" >+ } catch (NumberFormatException e){ >+ throw new ParseException("Not supported integer value:" + t.image); >+ } >+ } >+ >+} >+ >+PARSER_END(AssociationEndParser) >+ >+/* WHITE SPACE */ >+ >+SPECIAL_TOKEN : >+{ >+ " " >+| "\t" >+} >+ >+/* SEPARATORS */ >+TOKEN : >+{ >+ < SLASH: "/" > >+| < COLON: ":" > >+| < EQUALS: "=" > >+| < LBRACKET: "[" > >+| < RBRACKET: "]" > >+| < LCURLY: "{" > >+| < RCURLY: "}" > >+| < COMMA: "," > >+} >+ >+/* SPECIAL_MEANING */ >+TOKEN : >+{ >+ < PLUS: "+" > >+| < MINUS: "-" > >+| < NUMBER_SIGN: "#" > >+| < TILDE: "~" > >+| < DOT: "." > >+| < STAR: "*" > >+} >+ >+/* MODIFIERS */ >+TOKEN : >+{ >+ < READ_ONLY: "readOnly" > >+| < UNION: "union" > >+| < SUBSETS: "subsets" > >+| < REDEFINES: "redefines" > >+| < ORDERED: "ordered" > >+| < UNORDERED: "unordered" > >+| < UNIQUE: "unique" > >+| < NON_UNIQUE: "nonunique" > >+} >+ >+/* LITERALS */ >+TOKEN: >+{ >+ < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])* > >+} >+ >+TOKEN : >+{ >+ < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)* > >+| >+ < #LETTER: >+ [ >+ "\u0024", >+ "\u0041"-"\u005a", >+ "\u005f", >+ "\u0061"-"\u007a", >+ "\u00c0"-"\u00d6", >+ "\u00d8"-"\u00f6", >+ "\u00f8"-"\u00ff", >+ "\u0100"-"\u1fff", >+ "\u3040"-"\u318f", >+ "\u3300"-"\u337f", >+ "\u3400"-"\u3d2d", >+ "\u4e00"-"\u9fff", >+ "\uf900"-"\ufaff" >+ ] >+ > >+| >+ < #DIGIT: >+ [ >+ "\u0030"-"\u0039", >+ "\u0660"-"\u0669", >+ "\u06f0"-"\u06f9", >+ "\u0966"-"\u096f", >+ "\u09e6"-"\u09ef", >+ "\u0a66"-"\u0a6f", >+ "\u0ae6"-"\u0aef", >+ "\u0b66"-"\u0b6f", >+ "\u0be7"-"\u0bef", >+ "\u0c66"-"\u0c6f", >+ "\u0ce6"-"\u0cef", >+ "\u0d66"-"\u0d6f", >+ "\u0e50"-"\u0e59", >+ "\u0ed0"-"\u0ed9", >+ "\u1040"-"\u1049" >+ ] >+ > >+} >+ >+void Declaration() : >+{} >+{ >+ ( >+ [ Visibility() ] >+ [ IsDerived() ] >+ PropertyName() >+ [ Multiplicity() ] >+ [ PropertyModifiers() ] >+ ) <EOF> >+} >+ >+void PropertyName() : >+{ >+ String name; >+} >+{ >+ name = NameWithSpaces() >+ { >+ mySubject.setName(name); >+ } >+} >+ >+void Visibility() : >+{ >+ VisibilityKind kind; >+} >+{ >+ ( >+ <PLUS> { kind = VisibilityKind.PUBLIC_LITERAL; } >+ | >+ <MINUS> { kind = VisibilityKind.PRIVATE_LITERAL; } >+ | >+ <NUMBER_SIGN> { kind = VisibilityKind.PROTECTED_LITERAL; } >+ | >+ <TILDE> { kind = VisibilityKind.PACKAGE_LITERAL; } >+ ) >+ { >+ mySubject.setVisibility(kind); >+ } >+} >+ >+void Multiplicity() : >+{} >+{ >+ MultiplicityRange() >+ /* XXX: Parse conflict in case of empty DefaultValue, consider "a:int[5]{unique}" >+ [ MultiplicityDesignator() ] >+ */ >+} >+ >+/* XXX: Parse conflict in case of empty default value >+void MultiplicityDesignator() : >+{ } >+{ >+ <LCURLY> >+ ( >+ ( MultiplicityUnique() [ MultiplicityOrdered() ] ) >+ | >+ ( MultiplicityOrdered() [ MultiplicityUnique() ] ) >+ ) >+ <RCURLY> >+} >+ >+void MultiplicityUnique() : >+{} >+{ >+ <UNIQUE> { mySubject.setIsUnique(true); } >+ | >+ <NON_UNIQUE> { mySubject.setIsUnique(false); } >+} >+ >+void MultiplicityOrdered() : >+{} >+{ >+ <ORDERED> { mySubject.setIsOrdered(true); } >+ | >+ <UNORDERED> { mySubject.setIsOrdered(false); } >+} >+ >+*/ >+ >+/* XXX: ValueSpecification -- how to parse */ >+void MultiplicityRange() : >+{ >+ Token tLower = null; >+ Token tUpper; >+} >+{ >+ <LBRACKET> >+ ( >+ [ LOOKAHEAD(2) tLower = <INTEGER_LITERAL> <DOT> <DOT> { mySubject.setLower(parseInt(tLower)); } ] >+ ( >+ tUpper = <STAR> >+ { >+ if (tLower == null){ >+ mySubject.setLower(0); >+ } >+ mySubject.setUpper(LiteralUnlimitedNatural.UNLIMITED); >+ } >+ | >+ tUpper = <INTEGER_LITERAL> >+ { >+ if (tLower == null){ >+ mySubject.setLower(parseInt(tUpper)); >+ } >+ mySubject.setUpper(parseInt(tUpper)); >+ } >+ ) >+ ) >+ <RBRACKET> >+} >+ >+void IsDerived() : >+{} >+{ >+ <SLASH> { mySubject.setIsDerived(true); } >+} >+ >+String NameWithSpaces() : >+{ >+ StringBuffer result = new StringBuffer(); >+ Token t; >+} >+{ >+ ( >+ t = <IDENTIFIER> { result.append(t.image); } >+ ( t = <IDENTIFIER> { result.append(' '); result.append(t.image); } ) * >+ ) >+ { >+ return result.toString(); >+ } >+} >+ >+void SimpleTokenPropertyModifier() : >+{} >+{ >+ ( >+ <READ_ONLY> { mySubject.setIsReadOnly(true); } >+ | >+ <UNION> { mySubject.setIsDerivedUnion(true); } >+ | >+ <ORDERED> { mySubject.setIsOrdered(true); } >+ | >+ <UNORDERED> { mySubject.setIsOrdered(false); } >+ | >+ <UNIQUE> { mySubject.setIsUnique(true); } >+ | >+ <NON_UNIQUE> { mySubject.setIsUnique(false); } >+ ) >+} >+ >+void ReferencingPropertyModifier() : >+{ >+ String name; >+} >+{ >+ ( >+ <SUBSETS> name = NameWithSpaces() >+ { >+ Property subsets = lookup(Property.class, name); >+ if (subsets != null) { >+ mySubject.getSubsettedProperties().add(subsets); >+ } >+ } >+ | >+ <REDEFINES> name = NameWithSpaces() >+ { >+ RedefinableElement redefines = lookup(RedefinableElement.class, name); >+ if (redefines != null) { >+ mySubject.getRedefinedElements().add(redefines); >+ } >+ } >+ ) >+} >+ >+void PropertyModifiers() : >+{} >+{ >+ <LCURLY> >+ ( SimpleTokenPropertyModifier() | ReferencingPropertyModifier() ) >+ ( <COMMA> ( SimpleTokenPropertyModifier() | ReferencingPropertyModifier() ) )* >+ <RCURLY> >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/Token.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/Token.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/Token.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/Token.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,92 @@ >+/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.instance; >+ >+/** >+ * Describes the input token stream. >+ */ >+ >+public class Token { >+ >+ /** >+ * An integer that describes the kind of this token. This numbering >+ * system is determined by JavaCCParser, and a table of these numbers is >+ * stored in the file ...Constants.java. >+ */ >+ public int kind; >+ >+ /** >+ * beginLine and beginColumn describe the position of the first character >+ * of this token; endLine and endColumn describe the position of the >+ * last character of this token. >+ */ >+ public int beginLine, beginColumn, endLine, endColumn; >+ >+ /** >+ * The string image of the token. >+ */ >+ public String image; >+ >+ /** >+ * A reference to the next regular (non-special) token from the input >+ * stream. If this is the last token from the input stream, or if the >+ * token manager has not read tokens beyond this one, this field is >+ * set to null. This is true only if this token is also a regular >+ * token. Otherwise, see below for a description of the contents of >+ * this field. >+ */ >+ public Token next; >+ >+ /** >+ * This field is used to access special tokens that occur prior to this >+ * token, but after the immediately preceding regular (non-special) token. >+ * If there are no such special tokens, this field is set to null. >+ * When there are more than one such special token, this field refers >+ * to the last of these special tokens, which in turn refers to the next >+ * previous special token through its specialToken field, and so on >+ * until the first special token (whose specialToken field is null). >+ * The next fields of special tokens refer to other special tokens that >+ * immediately follow it (without an intervening regular token). If there >+ * is no such token, this field is null. >+ */ >+ public Token specialToken; >+ >+ /** >+ * Returns the image. >+ */ >+ public String toString() >+ { >+ return image; >+ } >+ >+ /** >+ * Returns a new Token object, by default. However, if you want, you >+ * can create and return subclass objects based on the value of ofKind. >+ * Simply add the cases to the switch for all those special cases. >+ * For example, if you have a subclass of Token called IDToken that >+ * you want to create if ofKind is ID, simlpy add something like : >+ * >+ * case MyParserConstants.ID : return new IDToken(); >+ * >+ * to the following switch statement. Then you can cast matchedToken >+ * variable to the appropriate type and use it in your lexical actions. >+ */ >+ public static final Token newToken(int ofKind) >+ { >+ switch(ofKind) >+ { >+ default : return new Token(); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Property2ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Property2ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Property2ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Property2ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Property2ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Property2EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PropertyEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PropertyEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/PropertyEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/PropertyEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class PropertyEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PackageOtherViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PackageOtherViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PackageOtherViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PackageOtherViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class PackageOtherViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.PackageOtherEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyNameViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyNameViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyNameViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyNameViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; >+import org.eclipse.gmf.runtime.notation.Location; >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class DependencyNameViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { >+ Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint); >+ Location location = (Location) view.getLayoutConstraint(); >+ IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit()); >+ location.setX(mapMode.DPtoLP(0)); >+ location.setY(mapMode.DPtoLP(5)); >+ return view; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndParser.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndParser.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndParser.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndParser.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,618 @@ >+/* Generated By:JavaCC: Do not edit this line. AssociationEndParser.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.end; >+ >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class AssociationEndParser extends ExternalParserBase implements AssociationEndParserConstants { >+ private Property mySubject; >+ >+ public AssociationEndParser(){ >+ this(new StringReader("")); >+ } >+ >+ public AssociationEndParser(LookupSuite lookup){ >+ this(); >+ setLookupSuite(lookup); >+ } >+ >+ public EClass getSubjectClass(){ >+ // though we expects the Property instance, the input object is still Association >+ // @see createSubjectPrototype() >+ return UMLPackage.eINSTANCE.getAssociation(); >+ } >+ >+ public EObject createSubjectPrototype() { >+ return UMLFactory.eINSTANCE.createProperty(); >+ } >+ >+ public void parse(EObject target, String text) throws ExternalParserException { >+ checkContext(); >+ ReInit(new StringReader(text)); >+ mySubject = (Property)target; >+ Declaration(); >+ mySubject = null; >+ } >+ >+ protected static int parseInt(Token t) throws ParseException { >+ if (t.kind != AssociationEndParserConstants.INTEGER_LITERAL){ >+ throw new IllegalStateException("Token: " + t + ", image: " + t.image); >+ } >+ try { >+ return Integer.parseInt(t.image); //XXX: "0005", "99999999999999999999999" >+ } catch (NumberFormatException e){ >+ throw new ParseException("Not supported integer value:" + t.image); >+ } >+ } >+ >+ final public void Declaration() throws ParseException { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case PLUS: >+ case MINUS: >+ case NUMBER_SIGN: >+ case TILDE: >+ Visibility(); >+ break; >+ default: >+ jj_la1[0] = jj_gen; >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case SLASH: >+ IsDerived(); >+ break; >+ default: >+ jj_la1[1] = jj_gen; >+ ; >+ } >+ PropertyName(); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case LBRACKET: >+ Multiplicity(); >+ break; >+ default: >+ jj_la1[2] = jj_gen; >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case LCURLY: >+ PropertyModifiers(); >+ break; >+ default: >+ jj_la1[3] = jj_gen; >+ ; >+ } >+ jj_consume_token(0); >+ } >+ >+ final public void PropertyName() throws ParseException { >+ String name; >+ name = NameWithSpaces(); >+ mySubject.setName(name); >+ } >+ >+ final public void Visibility() throws ParseException { >+ VisibilityKind kind; >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case PLUS: >+ jj_consume_token(PLUS); >+ kind = VisibilityKind.PUBLIC_LITERAL; >+ break; >+ case MINUS: >+ jj_consume_token(MINUS); >+ kind = VisibilityKind.PRIVATE_LITERAL; >+ break; >+ case NUMBER_SIGN: >+ jj_consume_token(NUMBER_SIGN); >+ kind = VisibilityKind.PROTECTED_LITERAL; >+ break; >+ case TILDE: >+ jj_consume_token(TILDE); >+ kind = VisibilityKind.PACKAGE_LITERAL; >+ break; >+ default: >+ jj_la1[4] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ mySubject.setVisibility(kind); >+ } >+ >+ final public void Multiplicity() throws ParseException { >+ MultiplicityRange(); >+ } >+ >+/* XXX: Parse conflict in case of empty default value >+void MultiplicityDesignator() : >+{ } >+{ >+ <LCURLY> >+ ( >+ ( MultiplicityUnique() [ MultiplicityOrdered() ] ) >+ | >+ ( MultiplicityOrdered() [ MultiplicityUnique() ] ) >+ ) >+ <RCURLY> >+} >+ >+void MultiplicityUnique() : >+{} >+{ >+ <UNIQUE> { mySubject.setIsUnique(true); } >+ | >+ <NON_UNIQUE> { mySubject.setIsUnique(false); } >+} >+ >+void MultiplicityOrdered() : >+{} >+{ >+ <ORDERED> { mySubject.setIsOrdered(true); } >+ | >+ <UNORDERED> { mySubject.setIsOrdered(false); } >+} >+ >+*/ >+ >+/* XXX: ValueSpecification -- how to parse */ >+ final public void MultiplicityRange() throws ParseException { >+ Token tLower = null; >+ Token tUpper; >+ jj_consume_token(LBRACKET); >+ if (jj_2_1(2)) { >+ tLower = jj_consume_token(INTEGER_LITERAL); >+ jj_consume_token(DOT); >+ jj_consume_token(DOT); >+ mySubject.setLower(parseInt(tLower)); >+ } else { >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case STAR: >+ tUpper = jj_consume_token(STAR); >+ if (tLower == null){ >+ mySubject.setLower(0); >+ } >+ mySubject.setUpper(LiteralUnlimitedNatural.UNLIMITED); >+ break; >+ case INTEGER_LITERAL: >+ tUpper = jj_consume_token(INTEGER_LITERAL); >+ if (tLower == null){ >+ mySubject.setLower(parseInt(tUpper)); >+ } >+ mySubject.setUpper(parseInt(tUpper)); >+ break; >+ default: >+ jj_la1[5] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ jj_consume_token(RBRACKET); >+ } >+ >+ final public void IsDerived() throws ParseException { >+ jj_consume_token(SLASH); >+ mySubject.setIsDerived(true); >+ } >+ >+ final public String NameWithSpaces() throws ParseException { >+ StringBuffer result = new StringBuffer(); >+ Token t; >+ t = jj_consume_token(IDENTIFIER); >+ result.append(t.image); >+ label_1: >+ while (true) { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case IDENTIFIER: >+ ; >+ break; >+ default: >+ jj_la1[6] = jj_gen; >+ break label_1; >+ } >+ t = jj_consume_token(IDENTIFIER); >+ result.append(' '); result.append(t.image); >+ } >+ {if (true) return result.toString();} >+ throw new Error("Missing return statement in function"); >+ } >+ >+ final public void SimpleTokenPropertyModifier() throws ParseException { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case READ_ONLY: >+ jj_consume_token(READ_ONLY); >+ mySubject.setIsReadOnly(true); >+ break; >+ case UNION: >+ jj_consume_token(UNION); >+ mySubject.setIsDerivedUnion(true); >+ break; >+ case ORDERED: >+ jj_consume_token(ORDERED); >+ mySubject.setIsOrdered(true); >+ break; >+ case UNORDERED: >+ jj_consume_token(UNORDERED); >+ mySubject.setIsOrdered(false); >+ break; >+ case UNIQUE: >+ jj_consume_token(UNIQUE); >+ mySubject.setIsUnique(true); >+ break; >+ case NON_UNIQUE: >+ jj_consume_token(NON_UNIQUE); >+ mySubject.setIsUnique(false); >+ break; >+ default: >+ jj_la1[7] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ } >+ >+ final public void ReferencingPropertyModifier() throws ParseException { >+ String name; >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case SUBSETS: >+ jj_consume_token(SUBSETS); >+ name = NameWithSpaces(); >+ Property subsets = lookup(Property.class, name); >+ if (subsets != null) { >+ mySubject.getSubsettedProperties().add(subsets); >+ } >+ break; >+ case REDEFINES: >+ jj_consume_token(REDEFINES); >+ name = NameWithSpaces(); >+ RedefinableElement redefines = lookup(RedefinableElement.class, name); >+ if (redefines != null) { >+ mySubject.getRedefinedElements().add(redefines); >+ } >+ break; >+ default: >+ jj_la1[8] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ } >+ >+ final public void PropertyModifiers() throws ParseException { >+ jj_consume_token(LCURLY); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case READ_ONLY: >+ case UNION: >+ case ORDERED: >+ case UNORDERED: >+ case UNIQUE: >+ case NON_UNIQUE: >+ SimpleTokenPropertyModifier(); >+ break; >+ case SUBSETS: >+ case REDEFINES: >+ ReferencingPropertyModifier(); >+ break; >+ default: >+ jj_la1[9] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ label_2: >+ while (true) { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case COMMA: >+ ; >+ break; >+ default: >+ jj_la1[10] = jj_gen; >+ break label_2; >+ } >+ jj_consume_token(COMMA); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case READ_ONLY: >+ case UNION: >+ case ORDERED: >+ case UNORDERED: >+ case UNIQUE: >+ case NON_UNIQUE: >+ SimpleTokenPropertyModifier(); >+ break; >+ case SUBSETS: >+ case REDEFINES: >+ ReferencingPropertyModifier(); >+ break; >+ default: >+ jj_la1[11] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ } >+ jj_consume_token(RCURLY); >+ } >+ >+ final private boolean jj_2_1(int xla) { >+ jj_la = xla; jj_lastpos = jj_scanpos = token; >+ try { return !jj_3_1(); } >+ catch(LookaheadSuccess ls) { return true; } >+ finally { jj_save(0, xla); } >+ } >+ >+ final private boolean jj_3_1() { >+ if (jj_scan_token(INTEGER_LITERAL)) return true; >+ if (jj_scan_token(DOT)) return true; >+ return false; >+ } >+ >+ public AssociationEndParserTokenManager token_source; >+ JavaCharStream jj_input_stream; >+ public Token token, jj_nt; >+ private int jj_ntk; >+ private Token jj_scanpos, jj_lastpos; >+ private int jj_la; >+ public boolean lookingAhead = false; >+ private boolean jj_semLA; >+ private int jj_gen; >+ final private int[] jj_la1 = new int[12]; >+ static private int[] jj_la1_0; >+ static { >+ jj_la1_0(); >+ } >+ private static void jj_la1_0() { >+ jj_la1_0 = new int[] {0x7800,0x8,0x40,0x100,0x7800,0x2010000,0x4000000,0x1e60000,0x180000,0x1fe0000,0x400,0x1fe0000,}; >+ } >+ final private JJCalls[] jj_2_rtns = new JJCalls[1]; >+ private boolean jj_rescan = false; >+ private int jj_gc = 0; >+ >+ public AssociationEndParser(java.io.InputStream stream) { >+ jj_input_stream = new JavaCharStream(stream, 1, 1); >+ token_source = new AssociationEndParserTokenManager(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 12; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public void ReInit(java.io.InputStream stream) { >+ jj_input_stream.ReInit(stream, 1, 1); >+ token_source.ReInit(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 12; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public AssociationEndParser(java.io.Reader stream) { >+ jj_input_stream = new JavaCharStream(stream, 1, 1); >+ token_source = new AssociationEndParserTokenManager(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 12; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public void ReInit(java.io.Reader stream) { >+ jj_input_stream.ReInit(stream, 1, 1); >+ token_source.ReInit(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 12; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public AssociationEndParser(AssociationEndParserTokenManager tm) { >+ token_source = tm; >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 12; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public void ReInit(AssociationEndParserTokenManager tm) { >+ token_source = tm; >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 12; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ final private Token jj_consume_token(int kind) throws ParseException { >+ Token oldToken; >+ if ((oldToken = token).next != null) token = token.next; >+ else token = token.next = token_source.getNextToken(); >+ jj_ntk = -1; >+ if (token.kind == kind) { >+ jj_gen++; >+ if (++jj_gc > 100) { >+ jj_gc = 0; >+ for (int i = 0; i < jj_2_rtns.length; i++) { >+ JJCalls c = jj_2_rtns[i]; >+ while (c != null) { >+ if (c.gen < jj_gen) c.first = null; >+ c = c.next; >+ } >+ } >+ } >+ return token; >+ } >+ token = oldToken; >+ jj_kind = kind; >+ throw generateParseException(); >+ } >+ >+ static private final class LookaheadSuccess extends java.lang.Error { } >+ final private LookaheadSuccess jj_ls = new LookaheadSuccess(); >+ final private boolean jj_scan_token(int kind) { >+ if (jj_scanpos == jj_lastpos) { >+ jj_la--; >+ if (jj_scanpos.next == null) { >+ jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); >+ } else { >+ jj_lastpos = jj_scanpos = jj_scanpos.next; >+ } >+ } else { >+ jj_scanpos = jj_scanpos.next; >+ } >+ if (jj_rescan) { >+ int i = 0; Token tok = token; >+ while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } >+ if (tok != null) jj_add_error_token(kind, i); >+ } >+ if (jj_scanpos.kind != kind) return true; >+ if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; >+ return false; >+ } >+ >+ final public Token getNextToken() { >+ if (token.next != null) token = token.next; >+ else token = token.next = token_source.getNextToken(); >+ jj_ntk = -1; >+ jj_gen++; >+ return token; >+ } >+ >+ final public Token getToken(int index) { >+ Token t = lookingAhead ? jj_scanpos : token; >+ for (int i = 0; i < index; i++) { >+ if (t.next != null) t = t.next; >+ else t = t.next = token_source.getNextToken(); >+ } >+ return t; >+ } >+ >+ final private int jj_ntk() { >+ if ((jj_nt=token.next) == null) >+ return (jj_ntk = (token.next=token_source.getNextToken()).kind); >+ else >+ return (jj_ntk = jj_nt.kind); >+ } >+ >+ private java.util.Vector jj_expentries = new java.util.Vector(); >+ private int[] jj_expentry; >+ private int jj_kind = -1; >+ private int[] jj_lasttokens = new int[100]; >+ private int jj_endpos; >+ >+ private void jj_add_error_token(int kind, int pos) { >+ if (pos >= 100) return; >+ if (pos == jj_endpos + 1) { >+ jj_lasttokens[jj_endpos++] = kind; >+ } else if (jj_endpos != 0) { >+ jj_expentry = new int[jj_endpos]; >+ for (int i = 0; i < jj_endpos; i++) { >+ jj_expentry[i] = jj_lasttokens[i]; >+ } >+ boolean exists = false; >+ for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) { >+ int[] oldentry = (int[])(e.nextElement()); >+ if (oldentry.length == jj_expentry.length) { >+ exists = true; >+ for (int i = 0; i < jj_expentry.length; i++) { >+ if (oldentry[i] != jj_expentry[i]) { >+ exists = false; >+ break; >+ } >+ } >+ if (exists) break; >+ } >+ } >+ if (!exists) jj_expentries.addElement(jj_expentry); >+ if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; >+ } >+ } >+ >+ public ParseException generateParseException() { >+ jj_expentries.removeAllElements(); >+ boolean[] la1tokens = new boolean[29]; >+ for (int i = 0; i < 29; i++) { >+ la1tokens[i] = false; >+ } >+ if (jj_kind >= 0) { >+ la1tokens[jj_kind] = true; >+ jj_kind = -1; >+ } >+ for (int i = 0; i < 12; i++) { >+ if (jj_la1[i] == jj_gen) { >+ for (int j = 0; j < 32; j++) { >+ if ((jj_la1_0[i] & (1<<j)) != 0) { >+ la1tokens[j] = true; >+ } >+ } >+ } >+ } >+ for (int i = 0; i < 29; i++) { >+ if (la1tokens[i]) { >+ jj_expentry = new int[1]; >+ jj_expentry[0] = i; >+ jj_expentries.addElement(jj_expentry); >+ } >+ } >+ jj_endpos = 0; >+ jj_rescan_token(); >+ jj_add_error_token(0, 0); >+ int[][] exptokseq = new int[jj_expentries.size()][]; >+ for (int i = 0; i < jj_expentries.size(); i++) { >+ exptokseq[i] = (int[])jj_expentries.elementAt(i); >+ } >+ return new ParseException(token, exptokseq, tokenImage); >+ } >+ >+ final public void enable_tracing() { >+ } >+ >+ final public void disable_tracing() { >+ } >+ >+ final private void jj_rescan_token() { >+ jj_rescan = true; >+ for (int i = 0; i < 1; i++) { >+ JJCalls p = jj_2_rtns[i]; >+ do { >+ if (p.gen > jj_gen) { >+ jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; >+ switch (i) { >+ case 0: jj_3_1(); break; >+ } >+ } >+ p = p.next; >+ } while (p != null); >+ } >+ jj_rescan = false; >+ } >+ >+ final private void jj_save(int index, int xla) { >+ JJCalls p = jj_2_rtns[index]; >+ while (p.gen > jj_gen) { >+ if (p.next == null) { p = p.next = new JJCalls(); break; } >+ p = p.next; >+ } >+ p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; >+ } >+ >+ static final class JJCalls { >+ int gen; >+ Token first; >+ int arg; >+ JJCalls next; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,62 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ConnectionViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName6EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName7EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class AssociationViewFactory extends ConnectionViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createRoutingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.AssociationEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(AssociationNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(AssociationName2EditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(AssociationName3EditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(AssociationName4EditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(AssociationName5EditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(AssociationName6EditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(AssociationName7EditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndApplyStrategy.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndApplyStrategy.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndApplyStrategy.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndApplyStrategy.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+ >+package org.eclipse.uml2.diagram.clazz.parser.association.end; >+ >+import java.util.List; >+ >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.clazz.association.AssociationEndConvention; >+import org.eclipse.uml2.diagram.parser.BasicApplyStrategy; >+import org.eclipse.uml2.uml.Association; >+ >+public class AssociationEndApplyStrategy extends BasicApplyStrategy { >+ private final boolean mySourceNotTarget; >+ >+ public AssociationEndApplyStrategy(boolean sourceNotTarget){ >+ mySourceNotTarget = sourceNotTarget; >+ } >+ >+ @Override >+ public List apply(EObject modelObject, EObject parsedObject) { >+ if (false == modelObject instanceof Association){ >+ throw new IllegalStateException("Can not apply, association expected: " + modelObject); >+ } >+ Association association = (Association)modelObject; >+ EObject end = AssociationEndConvention.getMemberEnd(association, mySourceNotTarget); >+ return super.apply(end, parsedObject); >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationParser.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationParser.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationParser.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationParser.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,869 @@ >+/* Generated By:JavaCC: Do not edit this line. OperationParser.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.operation; >+ >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+/** >+ * JavaCC does not support any "include" construct. >+ * This parser shares a lot of delcrations (mainly at the tokens level) >+ * with other parsers (see PropertyParser, etc) >+ * but we do not yet know how to avoid duplication of the delarations. >+ */ >+public class OperationParser extends ExternalParserBase implements OperationParserConstants { >+ private OperationAdapter myOperation; >+ private ParameterAdapter myCurrentParameter; >+ >+ private static interface TypeGate { >+ public void setType(Type type); >+ public void setName(String name); >+ } >+ >+ private static interface MultiplicityGate { >+ public void setIsOrdered(boolean ordered); >+ public void setIsUnique(boolean unique); >+ public void setLower(int lower); >+ public void setUpper(int upper); >+ } >+ >+ private static class ParameterAdapter implements TypeGate, MultiplicityGate { >+ private final Parameter myParameter; >+ >+ public ParameterAdapter(){ >+ myParameter = UMLFactory.eINSTANCE.createParameter(); >+ } >+ >+ public Parameter getParameter(){ >+ return myParameter; >+ } >+ >+ public void setType(Type type){ >+ myParameter.setType(type); >+ } >+ >+ public void setName(String name){ >+ myParameter.setName(name); >+ } >+ >+ public void setIsOrdered(boolean value) { >+ myParameter.setIsOrdered(value); >+ } >+ >+ public void setIsUnique(boolean value) { >+ myParameter.setIsUnique(value); >+ } >+ >+ public void setLower(int value) { >+ myParameter.setLower(value); >+ } >+ >+ public void setUpper(int value) { >+ myParameter.setUpper(value); >+ } >+ } >+ >+ private static class OperationAdapter implements TypeGate, MultiplicityGate { >+ private final Operation myOperation; >+ >+ public OperationAdapter(Operation operation){ >+ myOperation = operation; >+ if (myOperation.getReturnResult() == null){ >+ myOperation.createReturnResult(null, null); >+ } >+ } >+ >+ public Operation getOperation(){ >+ return myOperation; >+ } >+ >+ public void setType(Type type) { >+ myOperation.setType(type); >+ } >+ >+ public void setName(String name){ >+ myOperation.setName(name); >+ } >+ >+ public void setIsOrdered(boolean ordered) { >+ myOperation.setIsOrdered(ordered); >+ } >+ >+ public void setIsUnique(boolean value) { >+ myOperation.setIsUnique(value); >+ } >+ >+ public void setLower(int value) { >+ myOperation.setLower(value); >+ } >+ >+ public void setUpper(int value) { >+ myOperation.setUpper(value); >+ } >+ >+ } >+ >+ public OperationParser(){ >+ this(new StringReader("")); >+ } >+ >+ public OperationParser(LookupSuite lookup){ >+ this(); >+ setLookupSuite(lookup); >+ } >+ >+ public EClass getSubjectClass(){ >+ return UMLPackage.eINSTANCE.getOperation(); >+ } >+ >+ public void parse(EObject target, String text) throws ExternalParserException { >+ checkContext(); >+ ReInit(new StringReader(text)); >+ myOperation = new OperationAdapter((Operation)target); >+ myCurrentParameter = null; >+ Declaration(); >+ myOperation = null; >+ } >+ >+ protected static int parseInt(Token t) throws ParseException { >+ if (t.kind != OperationParserConstants.INTEGER_LITERAL){ >+ throw new IllegalStateException("Token: " + t + ", image: " + t.image); >+ } >+ try { >+ return Integer.parseInt(t.image); //XXX: "0005", "99999999999999999999999" >+ } catch (NumberFormatException e){ >+ throw new ParseException("Not supported integer value:" + t.image); >+ } >+ } >+ >+ private MultiplicityGate getCurrentMultiplicityElement(){ >+ return myCurrentParameter != null ? myCurrentParameter : (MultiplicityGate)myOperation; >+ } >+ >+ private TypeGate getCurrentTypedElement(){ >+ return myCurrentParameter != null ? myCurrentParameter : (TypeGate)myOperation; >+ } >+ >+ private Operation getOperation(){ >+ return myOperation.getOperation(); >+ } >+ >+ private Parameter getCurrentParameter(){ >+ if (myCurrentParameter == null){ >+ throw new IllegalStateException("We are not in the parameter list. Check BNF"); >+ } >+ return myCurrentParameter.getParameter(); >+ } >+ >+ private void registerParameter() { >+ getOperation().getOwnedParameters().add(getCurrentParameter()); >+ myCurrentParameter = null; >+ } >+ >+ private void startParameter() { >+ myCurrentParameter = new ParameterAdapter(); >+ } >+ >+ final public void Declaration() throws ParseException { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case PLUS: >+ case MINUS: >+ case NUMBER_SIGN: >+ case TILDE: >+ Visibility(); >+ break; >+ default: >+ jj_la1[0] = jj_gen; >+ ; >+ } >+ Name(); >+ jj_consume_token(LPAREN); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case IN: >+ case OUT: >+ case IN_OUT: >+ case IDENTIFIER: >+ ParametersList(); >+ break; >+ default: >+ jj_la1[1] = jj_gen; >+ ; >+ } >+ jj_consume_token(RPAREN); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case COLON: >+ Type(); >+ break; >+ default: >+ jj_la1[2] = jj_gen; >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case LCURLY: >+ OperationModifiers(); >+ break; >+ default: >+ jj_la1[3] = jj_gen; >+ ; >+ } >+ jj_consume_token(0); >+ } >+ >+ final public void ParametersList() throws ParseException { >+ Parameter(); >+ label_1: >+ while (true) { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case COMMA: >+ ; >+ break; >+ default: >+ jj_la1[4] = jj_gen; >+ break label_1; >+ } >+ jj_consume_token(COMMA); >+ Parameter(); >+ } >+ } >+ >+ final public void Parameter() throws ParseException { >+ startParameter(); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case IN: >+ case OUT: >+ case IN_OUT: >+ ParameterDirection(); >+ break; >+ default: >+ jj_la1[5] = jj_gen; >+ ; >+ } >+ Name(); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case COLON: >+ Type(); >+ break; >+ default: >+ jj_la1[6] = jj_gen; >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case LBRACKET: >+ Multiplicity(); >+ break; >+ default: >+ jj_la1[7] = jj_gen; >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case EQUALS: >+ DefaultValue(); >+ break; >+ default: >+ jj_la1[8] = jj_gen; >+ ; >+ } >+ registerParameter(); >+ } >+ >+ final public void ParameterDirection() throws ParseException { >+ ParameterDirectionKind kind; >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case IN: >+ jj_consume_token(IN); >+ kind = ParameterDirectionKind.IN_LITERAL; >+ break; >+ case OUT: >+ jj_consume_token(OUT); >+ kind = ParameterDirectionKind.OUT_LITERAL; >+ break; >+ case IN_OUT: >+ jj_consume_token(IN_OUT); >+ kind = ParameterDirectionKind.INOUT_LITERAL; >+ break; >+ default: >+ jj_la1[9] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ getCurrentParameter().setDirection(kind); >+ } >+ >+ final public void Visibility() throws ParseException { >+ VisibilityKind kind; >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case PLUS: >+ jj_consume_token(PLUS); >+ kind = VisibilityKind.PUBLIC_LITERAL; >+ break; >+ case MINUS: >+ jj_consume_token(MINUS); >+ kind = VisibilityKind.PRIVATE_LITERAL; >+ break; >+ case NUMBER_SIGN: >+ jj_consume_token(NUMBER_SIGN); >+ kind = VisibilityKind.PROTECTED_LITERAL; >+ break; >+ case TILDE: >+ jj_consume_token(TILDE); >+ kind = VisibilityKind.PACKAGE_LITERAL; >+ break; >+ default: >+ jj_la1[10] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ getOperation().setVisibility(kind); >+ } >+ >+ final public void Name() throws ParseException { >+ String name; >+ name = NameWithSpaces(); >+ getCurrentTypedElement().setName(name); >+ } >+ >+ final public void Multiplicity() throws ParseException { >+ MultiplicityRange(); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case LCURLY: >+ MultiplicityDesignator(); >+ break; >+ default: >+ jj_la1[11] = jj_gen; >+ ; >+ } >+ } >+ >+ final public void MultiplicityDesignator() throws ParseException { >+ jj_consume_token(LCURLY); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case UNIQUE: >+ case NON_UNIQUE: >+ MultiplicityUnique(); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case ORDERED: >+ case UNORDERED: >+ MultiplicityOrdered(); >+ break; >+ default: >+ jj_la1[12] = jj_gen; >+ ; >+ } >+ break; >+ case ORDERED: >+ case UNORDERED: >+ MultiplicityOrdered(); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case UNIQUE: >+ case NON_UNIQUE: >+ MultiplicityUnique(); >+ break; >+ default: >+ jj_la1[13] = jj_gen; >+ ; >+ } >+ break; >+ default: >+ jj_la1[14] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ jj_consume_token(RCURLY); >+ } >+ >+ final public void MultiplicityUnique() throws ParseException { >+ MultiplicityGate multiplicity = getCurrentMultiplicityElement(); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case UNIQUE: >+ jj_consume_token(UNIQUE); >+ multiplicity.setIsUnique(true); >+ break; >+ case NON_UNIQUE: >+ jj_consume_token(NON_UNIQUE); >+ multiplicity.setIsUnique(false); >+ break; >+ default: >+ jj_la1[15] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ } >+ >+ final public void MultiplicityOrdered() throws ParseException { >+ MultiplicityGate multiplicity = getCurrentMultiplicityElement(); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case ORDERED: >+ jj_consume_token(ORDERED); >+ multiplicity.setIsOrdered(true); >+ break; >+ case UNORDERED: >+ jj_consume_token(UNORDERED); >+ multiplicity.setIsOrdered(false); >+ break; >+ default: >+ jj_la1[16] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ } >+ >+/* XXX: ValueSpecification -- how to parse */ >+ final public void MultiplicityRange() throws ParseException { >+ Token tLower = null; >+ Token tUpper; >+ MultiplicityGate multiplicity = getCurrentMultiplicityElement(); >+ jj_consume_token(LBRACKET); >+ if (jj_2_1(2)) { >+ tLower = jj_consume_token(INTEGER_LITERAL); >+ jj_consume_token(DOT); >+ jj_consume_token(DOT); >+ multiplicity.setLower(parseInt(tLower)); >+ } else { >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case STAR: >+ tUpper = jj_consume_token(STAR); >+ if (tLower == null){ >+ multiplicity.setLower(0); >+ } >+ multiplicity.setUpper(LiteralUnlimitedNatural.UNLIMITED); >+ break; >+ case INTEGER_LITERAL: >+ tUpper = jj_consume_token(INTEGER_LITERAL); >+ if (tLower == null){ >+ multiplicity.setLower(parseInt(tUpper)); >+ } >+ multiplicity.setUpper(parseInt(tUpper)); >+ break; >+ default: >+ jj_la1[17] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ jj_consume_token(RBRACKET); >+ } >+ >+ final public void Type() throws ParseException { >+ String type; >+ jj_consume_token(COLON); >+ type = NameWithSpaces(); >+ getCurrentTypedElement().setType(lookup(Type.class, type)); >+ } >+ >+ final public String NameWithSpaces() throws ParseException { >+ StringBuffer result = new StringBuffer(); >+ Token t; >+ t = jj_consume_token(IDENTIFIER); >+ result.append(t.image); >+ label_2: >+ while (true) { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case IDENTIFIER: >+ ; >+ break; >+ default: >+ jj_la1[18] = jj_gen; >+ break label_2; >+ } >+ t = jj_consume_token(IDENTIFIER); >+ result.append(' '); result.append(t.image); >+ } >+ {if (true) return result.toString();} >+ throw new Error("Missing return statement in function"); >+ } >+ >+ final public void DefaultValue() throws ParseException { >+ Token t; >+ jj_consume_token(EQUALS); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case IDENTIFIER: >+ t = jj_consume_token(IDENTIFIER); >+ break; >+ case INTEGER_LITERAL: >+ t = jj_consume_token(INTEGER_LITERAL); >+ >+ break; >+ default: >+ jj_la1[19] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ getCurrentParameter().setDefault(t.image); >+ } >+ >+ final public void SimpleTokenPropertyModifier() throws ParseException { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case QUERY: >+ jj_consume_token(QUERY); >+ getOperation().setIsQuery(true); >+ break; >+ case ORDERED: >+ jj_consume_token(ORDERED); >+ getOperation().setIsOrdered(true); >+ break; >+ case UNORDERED: >+ jj_consume_token(UNORDERED); >+ getOperation().setIsOrdered(false); >+ break; >+ case UNIQUE: >+ jj_consume_token(UNIQUE); >+ getOperation().setIsUnique(true); >+ break; >+ case NON_UNIQUE: >+ jj_consume_token(NON_UNIQUE); >+ getOperation().setIsUnique(false); >+ break; >+ default: >+ jj_la1[20] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ } >+ >+ final public void ReferencingPropertyModifier() throws ParseException { >+ String name; >+ jj_consume_token(REDEFINES); >+ name = NameWithSpaces(); >+ RedefinableElement redefines = lookup(RedefinableElement.class, name); >+ if (redefines != null) { >+ getOperation().getRedefinedElements().add(redefines); >+ } >+ } >+ >+ final public void OperationModifiers() throws ParseException { >+ jj_consume_token(LCURLY); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case ORDERED: >+ case UNORDERED: >+ case UNIQUE: >+ case NON_UNIQUE: >+ case QUERY: >+ SimpleTokenPropertyModifier(); >+ break; >+ case REDEFINES: >+ ReferencingPropertyModifier(); >+ break; >+ default: >+ jj_la1[21] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ label_3: >+ while (true) { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case COMMA: >+ ; >+ break; >+ default: >+ jj_la1[22] = jj_gen; >+ break label_3; >+ } >+ jj_consume_token(COMMA); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case ORDERED: >+ case UNORDERED: >+ case UNIQUE: >+ case NON_UNIQUE: >+ case QUERY: >+ SimpleTokenPropertyModifier(); >+ break; >+ case REDEFINES: >+ ReferencingPropertyModifier(); >+ break; >+ default: >+ jj_la1[23] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ } >+ jj_consume_token(RCURLY); >+ } >+ >+ final private boolean jj_2_1(int xla) { >+ jj_la = xla; jj_lastpos = jj_scanpos = token; >+ try { return !jj_3_1(); } >+ catch(LookaheadSuccess ls) { return true; } >+ finally { jj_save(0, xla); } >+ } >+ >+ final private boolean jj_3_1() { >+ if (jj_scan_token(INTEGER_LITERAL)) return true; >+ if (jj_scan_token(DOT)) return true; >+ return false; >+ } >+ >+ public OperationParserTokenManager token_source; >+ JavaCharStream jj_input_stream; >+ public Token token, jj_nt; >+ private int jj_ntk; >+ private Token jj_scanpos, jj_lastpos; >+ private int jj_la; >+ public boolean lookingAhead = false; >+ private boolean jj_semLA; >+ private int jj_gen; >+ final private int[] jj_la1 = new int[24]; >+ static private int[] jj_la1_0; >+ static { >+ jj_la1_0(); >+ } >+ private static void jj_la1_0() { >+ jj_la1_0 = new int[] {0x1e000,0x2e000000,0x10,0x100,0x1000,0xe000000,0x10,0x40,0x20,0xe000000,0x1e000,0x100,0x300000,0xc00000,0xf00000,0xc00000,0x300000,0x10040000,0x20000000,0x30000000,0x1f00000,0x1f80000,0x1000,0x1f80000,}; >+ } >+ final private JJCalls[] jj_2_rtns = new JJCalls[1]; >+ private boolean jj_rescan = false; >+ private int jj_gc = 0; >+ >+ public OperationParser(java.io.InputStream stream) { >+ jj_input_stream = new JavaCharStream(stream, 1, 1); >+ token_source = new OperationParserTokenManager(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 24; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public void ReInit(java.io.InputStream stream) { >+ jj_input_stream.ReInit(stream, 1, 1); >+ token_source.ReInit(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 24; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public OperationParser(java.io.Reader stream) { >+ jj_input_stream = new JavaCharStream(stream, 1, 1); >+ token_source = new OperationParserTokenManager(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 24; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public void ReInit(java.io.Reader stream) { >+ jj_input_stream.ReInit(stream, 1, 1); >+ token_source.ReInit(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 24; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public OperationParser(OperationParserTokenManager tm) { >+ token_source = tm; >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 24; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public void ReInit(OperationParserTokenManager tm) { >+ token_source = tm; >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 24; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ final private Token jj_consume_token(int kind) throws ParseException { >+ Token oldToken; >+ if ((oldToken = token).next != null) token = token.next; >+ else token = token.next = token_source.getNextToken(); >+ jj_ntk = -1; >+ if (token.kind == kind) { >+ jj_gen++; >+ if (++jj_gc > 100) { >+ jj_gc = 0; >+ for (int i = 0; i < jj_2_rtns.length; i++) { >+ JJCalls c = jj_2_rtns[i]; >+ while (c != null) { >+ if (c.gen < jj_gen) c.first = null; >+ c = c.next; >+ } >+ } >+ } >+ return token; >+ } >+ token = oldToken; >+ jj_kind = kind; >+ throw generateParseException(); >+ } >+ >+ static private final class LookaheadSuccess extends java.lang.Error { } >+ final private LookaheadSuccess jj_ls = new LookaheadSuccess(); >+ final private boolean jj_scan_token(int kind) { >+ if (jj_scanpos == jj_lastpos) { >+ jj_la--; >+ if (jj_scanpos.next == null) { >+ jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); >+ } else { >+ jj_lastpos = jj_scanpos = jj_scanpos.next; >+ } >+ } else { >+ jj_scanpos = jj_scanpos.next; >+ } >+ if (jj_rescan) { >+ int i = 0; Token tok = token; >+ while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } >+ if (tok != null) jj_add_error_token(kind, i); >+ } >+ if (jj_scanpos.kind != kind) return true; >+ if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; >+ return false; >+ } >+ >+ final public Token getNextToken() { >+ if (token.next != null) token = token.next; >+ else token = token.next = token_source.getNextToken(); >+ jj_ntk = -1; >+ jj_gen++; >+ return token; >+ } >+ >+ final public Token getToken(int index) { >+ Token t = lookingAhead ? jj_scanpos : token; >+ for (int i = 0; i < index; i++) { >+ if (t.next != null) t = t.next; >+ else t = t.next = token_source.getNextToken(); >+ } >+ return t; >+ } >+ >+ final private int jj_ntk() { >+ if ((jj_nt=token.next) == null) >+ return (jj_ntk = (token.next=token_source.getNextToken()).kind); >+ else >+ return (jj_ntk = jj_nt.kind); >+ } >+ >+ private java.util.Vector jj_expentries = new java.util.Vector(); >+ private int[] jj_expentry; >+ private int jj_kind = -1; >+ private int[] jj_lasttokens = new int[100]; >+ private int jj_endpos; >+ >+ private void jj_add_error_token(int kind, int pos) { >+ if (pos >= 100) return; >+ if (pos == jj_endpos + 1) { >+ jj_lasttokens[jj_endpos++] = kind; >+ } else if (jj_endpos != 0) { >+ jj_expentry = new int[jj_endpos]; >+ for (int i = 0; i < jj_endpos; i++) { >+ jj_expentry[i] = jj_lasttokens[i]; >+ } >+ boolean exists = false; >+ for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) { >+ int[] oldentry = (int[])(e.nextElement()); >+ if (oldentry.length == jj_expentry.length) { >+ exists = true; >+ for (int i = 0; i < jj_expentry.length; i++) { >+ if (oldentry[i] != jj_expentry[i]) { >+ exists = false; >+ break; >+ } >+ } >+ if (exists) break; >+ } >+ } >+ if (!exists) jj_expentries.addElement(jj_expentry); >+ if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; >+ } >+ } >+ >+ public ParseException generateParseException() { >+ jj_expentries.removeAllElements(); >+ boolean[] la1tokens = new boolean[32]; >+ for (int i = 0; i < 32; i++) { >+ la1tokens[i] = false; >+ } >+ if (jj_kind >= 0) { >+ la1tokens[jj_kind] = true; >+ jj_kind = -1; >+ } >+ for (int i = 0; i < 24; i++) { >+ if (jj_la1[i] == jj_gen) { >+ for (int j = 0; j < 32; j++) { >+ if ((jj_la1_0[i] & (1<<j)) != 0) { >+ la1tokens[j] = true; >+ } >+ } >+ } >+ } >+ for (int i = 0; i < 32; i++) { >+ if (la1tokens[i]) { >+ jj_expentry = new int[1]; >+ jj_expentry[0] = i; >+ jj_expentries.addElement(jj_expentry); >+ } >+ } >+ jj_endpos = 0; >+ jj_rescan_token(); >+ jj_add_error_token(0, 0); >+ int[][] exptokseq = new int[jj_expentries.size()][]; >+ for (int i = 0; i < jj_expentries.size(); i++) { >+ exptokseq[i] = (int[])jj_expentries.elementAt(i); >+ } >+ return new ParseException(token, exptokseq, tokenImage); >+ } >+ >+ final public void enable_tracing() { >+ } >+ >+ final public void disable_tracing() { >+ } >+ >+ final private void jj_rescan_token() { >+ jj_rescan = true; >+ for (int i = 0; i < 1; i++) { >+ JJCalls p = jj_2_rtns[i]; >+ do { >+ if (p.gen > jj_gen) { >+ jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; >+ switch (i) { >+ case 0: jj_3_1(); break; >+ } >+ } >+ p = p.next; >+ } while (p != null); >+ } >+ jj_rescan = false; >+ } >+ >+ final private void jj_save(int index, int xla) { >+ JJCalls p = jj_2_rtns[index]; >+ while (p.gen > jj_gen) { >+ if (p.next == null) { p = p.next = new JJCalls(); break; } >+ p = p.next; >+ } >+ p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; >+ } >+ >+ static final class JJCalls { >+ int gen; >+ Token first; >+ int arg; >+ JJCalls next; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Operation2ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Operation2ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Operation2ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Operation2ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Operation2ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Operation2EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: META-INF/MANIFEST.MF >diff -N META-INF/MANIFEST.MF >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ META-INF/MANIFEST.MF 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,48 @@ >+Manifest-Version: 1.0 >+Bundle-ManifestVersion: 2 >+Bundle-Name: %pluginName >+Bundle-SymbolicName: org.eclipse.uml2.diagram.clazz; singleton:=true >+Bundle-Version: 1.0.0.qualifier >+Bundle-ClassPath: . >+Bundle-Activator: org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorPlugin >+Bundle-Vendor: %providerName >+Bundle-Localization: plugin >+Export-Package: org.eclipse.uml2.diagram.clazz.edit.parts, >+ org.eclipse.uml2.diagram.clazz.parser.operation;x-friends:="org.eclipse.uml2.diagram.clazz.test", >+ org.eclipse.uml2.diagram.clazz.parser.property;x-friends:="org.eclipse.uml2.diagram.clazz.test", >+ org.eclipse.uml2.diagram.clazz.part, >+ org.eclipse.uml2.diagram.clazz.providers >+Require-Bundle: org.eclipse.core.runtime, >+ org.eclipse.core.resources, >+ org.eclipse.jface, >+ org.eclipse.ui.ide, >+ org.eclipse.ui.views, >+ org.eclipse.ui.workbench, >+ org.eclipse.ui.workbench.texteditor, >+ org.eclipse.ui.navigator, >+ org.eclipse.emf.ecore, >+ org.eclipse.emf.ecore.xmi, >+ org.eclipse.emf.edit.ui, >+ org.eclipse.gef;visibility:=reexport, >+ org.eclipse.gmf.runtime.emf.core, >+ org.eclipse.gmf.runtime.emf.commands.core, >+ org.eclipse.gmf.runtime.emf.ui.properties, >+ org.eclipse.gmf.runtime.diagram.ui, >+ org.eclipse.gmf.runtime.diagram.ui.properties, >+ org.eclipse.gmf.runtime.diagram.ui.providers, >+ org.eclipse.gmf.runtime.diagram.ui.providers.ide, >+ org.eclipse.gmf.runtime.diagram.ui.render, >+ org.eclipse.gmf.runtime.diagram.ui.resources.editor, >+ org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide, >+ org.eclipse.gmf.runtime.notation.providers, >+ org.eclipse.uml2.uml;visibility:=reexport, >+ org.eclipse.uml2.uml.edit;visibility:=reexport, >+ org.eclipse.emf.ecore;visibility:=reexport, >+ org.eclipse.emf.ecore.edit;visibility:=reexport, >+ org.eclipse.emf.query.ocl;visibility:=reexport, >+ org.eclipse.emf.ocl;visibility:=reexport, >+ org.eclipse.gmf.runtime.draw2d.ui;visibility:=reexport, >+ org.eclipse.draw2d;visibility:=reexport, >+ org.eclipse.uml2.diagram.common;visibility:=reexport, >+ org.eclipse.uml2.diagram.parser >+Eclipse-LazyStart: true >Index: src/org/eclipse/uml2/diagram/clazz/providers/UMLViewProvider.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/providers/UMLViewProvider.java >diff -N src/org/eclipse/uml2/diagram/clazz/providers/UMLViewProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/providers/UMLViewProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,401 @@ >+package org.eclipse.uml2.diagram.clazz.providers; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider; >+import org.eclipse.gmf.runtime.emf.type.core.IElementType; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClass2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassClassesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName6EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName7EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Class2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Class3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassClassesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintCompartmentEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataType2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Dependency2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyName2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Enumeration2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationLiteralEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationLiteralsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.GeneralizationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecification2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationSlotsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceRealizationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.LiteralStringEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.OperationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Package2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Package3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageClassifiersEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageOtherEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackagePackagesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PortEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PortNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveType2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property6EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PropertyEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PropertyNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.SlotEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.UsageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationClass2ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationClassAttributesViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationClassClassesViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationClassNameViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationClassOperationsViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationClassViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationName2ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationName3ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationName4ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationName5ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationName6ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationName7ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationNameViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.AssociationViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Class2ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Class3ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.ClassAttributesViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.ClassClassesViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.ClassNameViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.ClassOperationsViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.ClassViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.ConstraintCompartmentViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.ConstraintConstrainedElementViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.ConstraintNameViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.ConstraintViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.DataType2ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.DataTypeAttributesViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.DataTypeNameViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.DataTypeOperationsViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.DataTypeViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Dependency2ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.DependencyClientViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.DependencyName2ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.DependencyNameViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.DependencySupplierViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.DependencyViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Enumeration2ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.EnumerationAttributesViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.EnumerationLiteralViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.EnumerationLiteralsViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.EnumerationNameViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.EnumerationOperationsViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.EnumerationViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.GeneralizationViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.InstanceSpecification2ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.InstanceSpecificationNameViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.InstanceSpecificationSlotsViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.InstanceSpecificationViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.InterfaceNameViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.InterfaceRealizationViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.InterfaceViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.LiteralStringViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Operation2ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Operation3ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Operation4ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Operation5ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.OperationViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Package2ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Package3ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PackageClassifiersViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PackageNameViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PackageOtherViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PackagePackagesViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PackageViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PortNameViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PortViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PrimitiveType2ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PrimitiveTypeAttributesViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PrimitiveTypeNameViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PrimitiveTypeOperationsViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PrimitiveTypeViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Property2ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Property3ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Property4ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Property5ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.Property6ViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PropertyNameViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.PropertyViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.SlotViewFactory; >+import org.eclipse.uml2.diagram.clazz.view.factories.UsageViewFactory; >+ >+/** >+ * @generated >+ */ >+public class UMLViewProvider extends AbstractViewProvider { >+ >+ /** >+ * @generated >+ */ >+ protected Class getDiagramViewClass(IAdaptable semanticAdapter, String diagramKind) { >+ EObject semanticElement = getSemanticElement(semanticAdapter); >+ if (PackageEditPart.MODEL_ID.equals(diagramKind) && UMLVisualIDRegistry.getDiagramVisualID(semanticElement) != -1) { >+ return PackageViewFactory.class; >+ } >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected Class getNodeViewClass(IAdaptable semanticAdapter, View containerView, String semanticHint) { >+ if (containerView == null) { >+ return null; >+ } >+ IElementType elementType = getSemanticElementType(semanticAdapter); >+ if (elementType != null && !UMLElementTypes.isKnownElementType(elementType)) { >+ return null; >+ } >+ EClass semanticType = getSemanticEClass(semanticAdapter); >+ EObject semanticElement = getSemanticElement(semanticAdapter); >+ int nodeVID = UMLVisualIDRegistry.getNodeVisualID(containerView, semanticElement, semanticType, semanticHint); >+ switch (nodeVID) { >+ case Package2EditPart.VISUAL_ID: >+ return Package2ViewFactory.class; >+ case PackageNameEditPart.VISUAL_ID: >+ return PackageNameViewFactory.class; >+ case Class2EditPart.VISUAL_ID: >+ return Class2ViewFactory.class; >+ case ClassNameEditPart.VISUAL_ID: >+ return ClassNameViewFactory.class; >+ case AssociationClass2EditPart.VISUAL_ID: >+ return AssociationClass2ViewFactory.class; >+ case AssociationClassNameEditPart.VISUAL_ID: >+ return AssociationClassNameViewFactory.class; >+ case DataType2EditPart.VISUAL_ID: >+ return DataType2ViewFactory.class; >+ case DataTypeNameEditPart.VISUAL_ID: >+ return DataTypeNameViewFactory.class; >+ case PrimitiveType2EditPart.VISUAL_ID: >+ return PrimitiveType2ViewFactory.class; >+ case PrimitiveTypeNameEditPart.VISUAL_ID: >+ return PrimitiveTypeNameViewFactory.class; >+ case Enumeration2EditPart.VISUAL_ID: >+ return Enumeration2ViewFactory.class; >+ case EnumerationNameEditPart.VISUAL_ID: >+ return EnumerationNameViewFactory.class; >+ case InterfaceEditPart.VISUAL_ID: >+ return InterfaceViewFactory.class; >+ case InterfaceNameEditPart.VISUAL_ID: >+ return InterfaceNameViewFactory.class; >+ case ConstraintEditPart.VISUAL_ID: >+ return ConstraintViewFactory.class; >+ case ConstraintNameEditPart.VISUAL_ID: >+ return ConstraintNameViewFactory.class; >+ case InstanceSpecification2EditPart.VISUAL_ID: >+ return InstanceSpecification2ViewFactory.class; >+ case InstanceSpecificationNameEditPart.VISUAL_ID: >+ return InstanceSpecificationNameViewFactory.class; >+ case DependencyEditPart.VISUAL_ID: >+ return DependencyViewFactory.class; >+ case DependencyNameEditPart.VISUAL_ID: >+ return DependencyNameViewFactory.class; >+ case Package3EditPart.VISUAL_ID: >+ return Package3ViewFactory.class; >+ case ClassEditPart.VISUAL_ID: >+ return ClassViewFactory.class; >+ case DataTypeEditPart.VISUAL_ID: >+ return DataTypeViewFactory.class; >+ case PrimitiveTypeEditPart.VISUAL_ID: >+ return PrimitiveTypeViewFactory.class; >+ case EnumerationEditPart.VISUAL_ID: >+ return EnumerationViewFactory.class; >+ case AssociationClassEditPart.VISUAL_ID: >+ return AssociationClassViewFactory.class; >+ case InstanceSpecificationEditPart.VISUAL_ID: >+ return InstanceSpecificationViewFactory.class; >+ case PropertyEditPart.VISUAL_ID: >+ return PropertyViewFactory.class; >+ case OperationEditPart.VISUAL_ID: >+ return OperationViewFactory.class; >+ case Class3EditPart.VISUAL_ID: >+ return Class3ViewFactory.class; >+ case PortEditPart.VISUAL_ID: >+ return PortViewFactory.class; >+ case PortNameEditPart.VISUAL_ID: >+ return PortNameViewFactory.class; >+ case Property2EditPart.VISUAL_ID: >+ return Property2ViewFactory.class; >+ case Operation2EditPart.VISUAL_ID: >+ return Operation2ViewFactory.class; >+ case Property3EditPart.VISUAL_ID: >+ return Property3ViewFactory.class; >+ case Operation3EditPart.VISUAL_ID: >+ return Operation3ViewFactory.class; >+ case Property4EditPart.VISUAL_ID: >+ return Property4ViewFactory.class; >+ case Operation4EditPart.VISUAL_ID: >+ return Operation4ViewFactory.class; >+ case EnumerationLiteralEditPart.VISUAL_ID: >+ return EnumerationLiteralViewFactory.class; >+ case Property5EditPart.VISUAL_ID: >+ return Property5ViewFactory.class; >+ case Operation5EditPart.VISUAL_ID: >+ return Operation5ViewFactory.class; >+ case LiteralStringEditPart.VISUAL_ID: >+ return LiteralStringViewFactory.class; >+ case SlotEditPart.VISUAL_ID: >+ return SlotViewFactory.class; >+ case PackagePackagesEditPart.VISUAL_ID: >+ return PackagePackagesViewFactory.class; >+ case PackageClassifiersEditPart.VISUAL_ID: >+ return PackageClassifiersViewFactory.class; >+ case PackageOtherEditPart.VISUAL_ID: >+ return PackageOtherViewFactory.class; >+ case ClassAttributesEditPart.VISUAL_ID: >+ return ClassAttributesViewFactory.class; >+ case ClassOperationsEditPart.VISUAL_ID: >+ return ClassOperationsViewFactory.class; >+ case ClassClassesEditPart.VISUAL_ID: >+ return ClassClassesViewFactory.class; >+ case AssociationClassAttributesEditPart.VISUAL_ID: >+ return AssociationClassAttributesViewFactory.class; >+ case AssociationClassOperationsEditPart.VISUAL_ID: >+ return AssociationClassOperationsViewFactory.class; >+ case AssociationClassClassesEditPart.VISUAL_ID: >+ return AssociationClassClassesViewFactory.class; >+ case DataTypeAttributesEditPart.VISUAL_ID: >+ return DataTypeAttributesViewFactory.class; >+ case DataTypeOperationsEditPart.VISUAL_ID: >+ return DataTypeOperationsViewFactory.class; >+ case PrimitiveTypeAttributesEditPart.VISUAL_ID: >+ return PrimitiveTypeAttributesViewFactory.class; >+ case PrimitiveTypeOperationsEditPart.VISUAL_ID: >+ return PrimitiveTypeOperationsViewFactory.class; >+ case EnumerationLiteralsEditPart.VISUAL_ID: >+ return EnumerationLiteralsViewFactory.class; >+ case EnumerationAttributesEditPart.VISUAL_ID: >+ return EnumerationAttributesViewFactory.class; >+ case EnumerationOperationsEditPart.VISUAL_ID: >+ return EnumerationOperationsViewFactory.class; >+ case ConstraintCompartmentEditPart.VISUAL_ID: >+ return ConstraintCompartmentViewFactory.class; >+ case InstanceSpecificationSlotsEditPart.VISUAL_ID: >+ return InstanceSpecificationSlotsViewFactory.class; >+ case DependencyName2EditPart.VISUAL_ID: >+ return DependencyName2ViewFactory.class; >+ case PropertyNameEditPart.VISUAL_ID: >+ return PropertyNameViewFactory.class; >+ case AssociationNameEditPart.VISUAL_ID: >+ return AssociationNameViewFactory.class; >+ case AssociationName2EditPart.VISUAL_ID: >+ return AssociationName2ViewFactory.class; >+ case AssociationName3EditPart.VISUAL_ID: >+ return AssociationName3ViewFactory.class; >+ case AssociationName4EditPart.VISUAL_ID: >+ return AssociationName4ViewFactory.class; >+ case AssociationName5EditPart.VISUAL_ID: >+ return AssociationName5ViewFactory.class; >+ case AssociationName6EditPart.VISUAL_ID: >+ return AssociationName6ViewFactory.class; >+ case AssociationName7EditPart.VISUAL_ID: >+ return AssociationName7ViewFactory.class; >+ } >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected Class getEdgeViewClass(IAdaptable semanticAdapter, View containerView, String semanticHint) { >+ IElementType elementType = getSemanticElementType(semanticAdapter); >+ if (elementType != null && !UMLElementTypes.isKnownElementType(elementType)) { >+ return null; >+ } >+ if (UMLElementTypes.ConstraintConstrainedElement_4004.equals(elementType)) { >+ return ConstraintConstrainedElementViewFactory.class; >+ } >+ if (UMLElementTypes.DependencySupplier_4006.equals(elementType)) { >+ return DependencySupplierViewFactory.class; >+ } >+ if (UMLElementTypes.DependencyClient_4007.equals(elementType)) { >+ return DependencyClientViewFactory.class; >+ } >+ EClass semanticType = getSemanticEClass(semanticAdapter); >+ if (semanticType == null) { >+ return null; >+ } >+ EObject semanticElement = getSemanticElement(semanticAdapter); >+ int linkVID = UMLVisualIDRegistry.getLinkWithClassVisualID(semanticElement, semanticType); >+ switch (linkVID) { >+ case GeneralizationEditPart.VISUAL_ID: >+ return GeneralizationViewFactory.class; >+ case Dependency2EditPart.VISUAL_ID: >+ return Dependency2ViewFactory.class; >+ case Property6EditPart.VISUAL_ID: >+ return Property6ViewFactory.class; >+ case AssociationEditPart.VISUAL_ID: >+ return AssociationViewFactory.class; >+ case InterfaceRealizationEditPart.VISUAL_ID: >+ return InterfaceRealizationViewFactory.class; >+ case UsageEditPart.VISUAL_ID: >+ return UsageViewFactory.class; >+ } >+ return getUnrecognizedConnectorViewClass(semanticAdapter, containerView, semanticHint); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IElementType getSemanticElementType(IAdaptable semanticAdapter) { >+ if (semanticAdapter == null) { >+ return null; >+ } >+ return (IElementType) semanticAdapter.getAdapter(IElementType.class); >+ } >+ >+ /** >+ * @generated >+ */ >+ private Class getUnrecognizedConnectorViewClass(IAdaptable semanticAdapter, View containerView, String semanticHint) { >+ // Handle unrecognized child node classes here >+ return null; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramFileCreator.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramFileCreator.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramFileCreator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramFileCreator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,118 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import java.io.ByteArrayInputStream; >+import java.io.InputStream; >+ >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.resources.IResource; >+import org.eclipse.core.resources.IResourceStatus; >+import org.eclipse.core.resources.ResourcesPlugin; >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.jface.dialogs.ErrorDialog; >+import org.eclipse.swt.widgets.Shell; >+ >+/** >+ * @generated >+ */ >+public class UMLDiagramFileCreator { >+ >+ /** >+ * @generated >+ */ >+ private static UMLDiagramFileCreator INSTANCE = new UMLDiagramFileCreator(); >+ >+ /** >+ * @generated >+ */ >+ public static UMLDiagramFileCreator getInstance() { >+ return INSTANCE; >+ } >+ >+ /** >+ * @generated >+ */ >+ public static boolean exists(IPath path) { >+ return ResourcesPlugin.getWorkspace().getRoot().exists(path); >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getExtension() { >+ return ".umlclass_diagram"; //$NON-NLS-1$ >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getUniqueFileName(IPath containerPath, String fileName) { >+ int nFileNumber = 1; >+ fileName = removeExtensionFromFileName(fileName); >+ String newFileName = fileName; >+ IPath diagramFilePath = containerPath.append(appendExtensionToFileName(newFileName)); >+ IPath modelFilePath = containerPath.append(newFileName + ".uml"); //$NON-NLS-1$ >+ while (exists(diagramFilePath) || exists(modelFilePath)) { >+ nFileNumber++; >+ newFileName = fileName + nFileNumber; >+ diagramFilePath = containerPath.append(appendExtensionToFileName(newFileName)); >+ modelFilePath = containerPath.append(newFileName + ".uml"); //$NON-NLS-1$ >+ } >+ return newFileName; >+ } >+ >+ /** >+ * @generated >+ */ >+ public String appendExtensionToFileName(String fileName) { >+ if (!fileName.endsWith(getExtension())) { >+ return fileName + getExtension(); >+ } >+ return fileName; >+ } >+ >+ /** >+ * @generated >+ */ >+ private String removeExtensionFromFileName(String fileName) { >+ if (fileName.endsWith(getExtension())) { >+ return fileName.substring(0, fileName.length() - getExtension().length()); >+ } >+ return fileName; >+ } >+ >+ /** >+ * @generated >+ */ >+ public IFile createNewFile(IPath containerPath, String fileName, InputStream initialContents, Shell shell) { >+ IPath newFilePath = containerPath.append(appendExtensionToFileName(fileName)); >+ IFile newFileHandle = ResourcesPlugin.getWorkspace().getRoot().getFile(newFilePath); >+ try { >+ createFile(newFileHandle, initialContents); >+ } catch (CoreException e) { >+ ErrorDialog.openError(shell, "Creation Problems", null, e.getStatus()); >+ return null; >+ } >+ return newFileHandle; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void createFile(IFile fileHandle, InputStream contents) throws CoreException { >+ try { >+ if (contents == null) { >+ contents = new ByteArrayInputStream(new byte[0]); >+ } >+ fileHandle.create(contents, false, new NullProgressMonitor()); >+ } catch (CoreException e) { >+ // If the file already existed locally, just refresh to get contents >+ if (e.getStatus().getCode() == IResourceStatus.PATH_OCCUPIED) { >+ fileHandle.refreshLocal(IResource.DEPTH_ZERO, null); >+ } else { >+ throw e; >+ } >+ } >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PropertyNameViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PropertyNameViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PropertyNameViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PropertyNameViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; >+import org.eclipse.gmf.runtime.notation.Location; >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class PropertyNameViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { >+ Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint); >+ Location location = (Location) view.getLayoutConstraint(); >+ IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit()); >+ location.setX(mapMode.DPtoLP(0)); >+ location.setY(mapMode.DPtoLP(40)); >+ return view; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/DependencySupplierViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/DependencySupplierViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/DependencySupplierViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/DependencySupplierViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,47 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ConnectionViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class DependencySupplierViewFactory extends ConnectionViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createRoutingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.DependencySupplierEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/JavaCharStream.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/JavaCharStream.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/JavaCharStream.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/JavaCharStream.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,558 @@ >+/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.operation; >+ >+/** >+ * An implementation of interface CharStream, where the stream is assumed to >+ * contain only ASCII characters (with java-like unicode escape processing). >+ */ >+ >+public class JavaCharStream >+{ >+ public static final boolean staticFlag = false; >+ static final int hexval(char c) throws java.io.IOException { >+ switch(c) >+ { >+ case '0' : >+ return 0; >+ case '1' : >+ return 1; >+ case '2' : >+ return 2; >+ case '3' : >+ return 3; >+ case '4' : >+ return 4; >+ case '5' : >+ return 5; >+ case '6' : >+ return 6; >+ case '7' : >+ return 7; >+ case '8' : >+ return 8; >+ case '9' : >+ return 9; >+ >+ case 'a' : >+ case 'A' : >+ return 10; >+ case 'b' : >+ case 'B' : >+ return 11; >+ case 'c' : >+ case 'C' : >+ return 12; >+ case 'd' : >+ case 'D' : >+ return 13; >+ case 'e' : >+ case 'E' : >+ return 14; >+ case 'f' : >+ case 'F' : >+ return 15; >+ } >+ >+ throw new java.io.IOException(); // Should never come here >+ } >+ >+ public int bufpos = -1; >+ int bufsize; >+ int available; >+ int tokenBegin; >+ protected int bufline[]; >+ protected int bufcolumn[]; >+ >+ protected int column = 0; >+ protected int line = 1; >+ >+ protected boolean prevCharIsCR = false; >+ protected boolean prevCharIsLF = false; >+ >+ protected java.io.Reader inputStream; >+ >+ protected char[] nextCharBuf; >+ protected char[] buffer; >+ protected int maxNextCharInd = 0; >+ protected int nextCharInd = -1; >+ protected int inBuf = 0; >+ >+ protected void ExpandBuff(boolean wrapAround) >+ { >+ char[] newbuffer = new char[bufsize + 2048]; >+ int newbufline[] = new int[bufsize + 2048]; >+ int newbufcolumn[] = new int[bufsize + 2048]; >+ >+ try >+ { >+ if (wrapAround) >+ { >+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); >+ System.arraycopy(buffer, 0, newbuffer, >+ bufsize - tokenBegin, bufpos); >+ buffer = newbuffer; >+ >+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); >+ System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); >+ bufline = newbufline; >+ >+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); >+ System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); >+ bufcolumn = newbufcolumn; >+ >+ bufpos += (bufsize - tokenBegin); >+ } >+ else >+ { >+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); >+ buffer = newbuffer; >+ >+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); >+ bufline = newbufline; >+ >+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); >+ bufcolumn = newbufcolumn; >+ >+ bufpos -= tokenBegin; >+ } >+ } >+ catch (Throwable t) >+ { >+ throw new Error(t.getMessage()); >+ } >+ >+ available = (bufsize += 2048); >+ tokenBegin = 0; >+ } >+ >+ protected void FillBuff() throws java.io.IOException >+ { >+ int i; >+ if (maxNextCharInd == 4096) >+ maxNextCharInd = nextCharInd = 0; >+ >+ try { >+ if ((i = inputStream.read(nextCharBuf, maxNextCharInd, >+ 4096 - maxNextCharInd)) == -1) >+ { >+ inputStream.close(); >+ throw new java.io.IOException(); >+ } >+ else >+ maxNextCharInd += i; >+ return; >+ } >+ catch(java.io.IOException e) { >+ if (bufpos != 0) >+ { >+ --bufpos; >+ backup(0); >+ } >+ else >+ { >+ bufline[bufpos] = line; >+ bufcolumn[bufpos] = column; >+ } >+ throw e; >+ } >+ } >+ >+ protected char ReadByte() throws java.io.IOException >+ { >+ if (++nextCharInd >= maxNextCharInd) >+ FillBuff(); >+ >+ return nextCharBuf[nextCharInd]; >+ } >+ >+ public char BeginToken() throws java.io.IOException >+ { >+ if (inBuf > 0) >+ { >+ --inBuf; >+ >+ if (++bufpos == bufsize) >+ bufpos = 0; >+ >+ tokenBegin = bufpos; >+ return buffer[bufpos]; >+ } >+ >+ tokenBegin = 0; >+ bufpos = -1; >+ >+ return readChar(); >+ } >+ >+ protected void AdjustBuffSize() >+ { >+ if (available == bufsize) >+ { >+ if (tokenBegin > 2048) >+ { >+ bufpos = 0; >+ available = tokenBegin; >+ } >+ else >+ ExpandBuff(false); >+ } >+ else if (available > tokenBegin) >+ available = bufsize; >+ else if ((tokenBegin - available) < 2048) >+ ExpandBuff(true); >+ else >+ available = tokenBegin; >+ } >+ >+ protected void UpdateLineColumn(char c) >+ { >+ column++; >+ >+ if (prevCharIsLF) >+ { >+ prevCharIsLF = false; >+ line += (column = 1); >+ } >+ else if (prevCharIsCR) >+ { >+ prevCharIsCR = false; >+ if (c == '\n') >+ { >+ prevCharIsLF = true; >+ } >+ else >+ line += (column = 1); >+ } >+ >+ switch (c) >+ { >+ case '\r' : >+ prevCharIsCR = true; >+ break; >+ case '\n' : >+ prevCharIsLF = true; >+ break; >+ case '\t' : >+ column--; >+ column += (8 - (column & 07)); >+ break; >+ default : >+ break; >+ } >+ >+ bufline[bufpos] = line; >+ bufcolumn[bufpos] = column; >+ } >+ >+ public char readChar() throws java.io.IOException >+ { >+ if (inBuf > 0) >+ { >+ --inBuf; >+ >+ if (++bufpos == bufsize) >+ bufpos = 0; >+ >+ return buffer[bufpos]; >+ } >+ >+ char c; >+ >+ if (++bufpos == available) >+ AdjustBuffSize(); >+ >+ if ((buffer[bufpos] = c = ReadByte()) == '\\') >+ { >+ UpdateLineColumn(c); >+ >+ int backSlashCnt = 1; >+ >+ for (;;) // Read all the backslashes >+ { >+ if (++bufpos == available) >+ AdjustBuffSize(); >+ >+ try >+ { >+ if ((buffer[bufpos] = c = ReadByte()) != '\\') >+ { >+ UpdateLineColumn(c); >+ // found a non-backslash char. >+ if ((c == 'u') && ((backSlashCnt & 1) == 1)) >+ { >+ if (--bufpos < 0) >+ bufpos = bufsize - 1; >+ >+ break; >+ } >+ >+ backup(backSlashCnt); >+ return '\\'; >+ } >+ } >+ catch(java.io.IOException e) >+ { >+ if (backSlashCnt > 1) >+ backup(backSlashCnt); >+ >+ return '\\'; >+ } >+ >+ UpdateLineColumn(c); >+ backSlashCnt++; >+ } >+ >+ // Here, we have seen an odd number of backslash's followed by a 'u' >+ try >+ { >+ while ((c = ReadByte()) == 'u') >+ ++column; >+ >+ buffer[bufpos] = c = (char)(hexval(c) << 12 | >+ hexval(ReadByte()) << 8 | >+ hexval(ReadByte()) << 4 | >+ hexval(ReadByte())); >+ >+ column += 4; >+ } >+ catch(java.io.IOException e) >+ { >+ throw new Error("Invalid escape character at line " + line + >+ " column " + column + "."); >+ } >+ >+ if (backSlashCnt == 1) >+ return c; >+ else >+ { >+ backup(backSlashCnt - 1); >+ return '\\'; >+ } >+ } >+ else >+ { >+ UpdateLineColumn(c); >+ return (c); >+ } >+ } >+ >+ /** >+ * @deprecated >+ * @see #getEndColumn >+ */ >+ >+ public int getColumn() { >+ return bufcolumn[bufpos]; >+ } >+ >+ /** >+ * @deprecated >+ * @see #getEndLine >+ */ >+ >+ public int getLine() { >+ return bufline[bufpos]; >+ } >+ >+ public int getEndColumn() { >+ return bufcolumn[bufpos]; >+ } >+ >+ public int getEndLine() { >+ return bufline[bufpos]; >+ } >+ >+ public int getBeginColumn() { >+ return bufcolumn[tokenBegin]; >+ } >+ >+ public int getBeginLine() { >+ return bufline[tokenBegin]; >+ } >+ >+ public void backup(int amount) { >+ >+ inBuf += amount; >+ if ((bufpos -= amount) < 0) >+ bufpos += bufsize; >+ } >+ >+ public JavaCharStream(java.io.Reader dstream, >+ int startline, int startcolumn, int buffersize) >+ { >+ inputStream = dstream; >+ line = startline; >+ column = startcolumn - 1; >+ >+ available = bufsize = buffersize; >+ buffer = new char[buffersize]; >+ bufline = new int[buffersize]; >+ bufcolumn = new int[buffersize]; >+ nextCharBuf = new char[4096]; >+ } >+ >+ public JavaCharStream(java.io.Reader dstream, >+ int startline, int startcolumn) >+ { >+ this(dstream, startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.Reader dstream) >+ { >+ this(dstream, 1, 1, 4096); >+ } >+ public void ReInit(java.io.Reader dstream, >+ int startline, int startcolumn, int buffersize) >+ { >+ inputStream = dstream; >+ line = startline; >+ column = startcolumn - 1; >+ >+ if (buffer == null || buffersize != buffer.length) >+ { >+ available = bufsize = buffersize; >+ buffer = new char[buffersize]; >+ bufline = new int[buffersize]; >+ bufcolumn = new int[buffersize]; >+ nextCharBuf = new char[4096]; >+ } >+ prevCharIsLF = prevCharIsCR = false; >+ tokenBegin = inBuf = maxNextCharInd = 0; >+ nextCharInd = bufpos = -1; >+ } >+ >+ public void ReInit(java.io.Reader dstream, >+ int startline, int startcolumn) >+ { >+ ReInit(dstream, startline, startcolumn, 4096); >+ } >+ >+ public void ReInit(java.io.Reader dstream) >+ { >+ ReInit(dstream, 1, 1, 4096); >+ } >+ public JavaCharStream(java.io.InputStream dstream, int startline, >+ int startcolumn, int buffersize) >+ { >+ this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.InputStream dstream, int startline, >+ int startcolumn) >+ { >+ this(dstream, startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.InputStream dstream) >+ { >+ this(dstream, 1, 1, 4096); >+ } >+ >+ public void ReInit(java.io.InputStream dstream, int startline, >+ int startcolumn, int buffersize) >+ { >+ ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); >+ } >+ public void ReInit(java.io.InputStream dstream, int startline, >+ int startcolumn) >+ { >+ ReInit(dstream, startline, startcolumn, 4096); >+ } >+ public void ReInit(java.io.InputStream dstream) >+ { >+ ReInit(dstream, 1, 1, 4096); >+ } >+ >+ public String GetImage() >+ { >+ if (bufpos >= tokenBegin) >+ return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); >+ else >+ return new String(buffer, tokenBegin, bufsize - tokenBegin) + >+ new String(buffer, 0, bufpos + 1); >+ } >+ >+ public char[] GetSuffix(int len) >+ { >+ char[] ret = new char[len]; >+ >+ if ((bufpos + 1) >= len) >+ System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); >+ else >+ { >+ System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, >+ len - bufpos - 1); >+ System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); >+ } >+ >+ return ret; >+ } >+ >+ public void Done() >+ { >+ nextCharBuf = null; >+ buffer = null; >+ bufline = null; >+ bufcolumn = null; >+ } >+ >+ /** >+ * Method to adjust line and column numbers for the start of a token. >+ */ >+ public void adjustBeginLineColumn(int newLine, int newCol) >+ { >+ int start = tokenBegin; >+ int len; >+ >+ if (bufpos >= tokenBegin) >+ { >+ len = bufpos - tokenBegin + inBuf + 1; >+ } >+ else >+ { >+ len = bufsize - tokenBegin + bufpos + 1 + inBuf; >+ } >+ >+ int i = 0, j = 0, k = 0; >+ int nextColDiff = 0, columnDiff = 0; >+ >+ while (i < len && >+ bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) >+ { >+ bufline[j] = newLine; >+ nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; >+ bufcolumn[j] = newCol + columnDiff; >+ columnDiff = nextColDiff; >+ i++; >+ } >+ >+ if (i < len) >+ { >+ bufline[j] = newLine++; >+ bufcolumn[j] = newCol + columnDiff; >+ >+ while (i++ < len) >+ { >+ if (bufline[j = start % bufsize] != bufline[++start % bufsize]) >+ bufline[j] = newLine++; >+ else >+ bufline[j] = newLine; >+ } >+ } >+ >+ line = bufline[j]; >+ column = bufcolumn[j]; >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/JavaCharStream.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/JavaCharStream.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/property/JavaCharStream.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/property/JavaCharStream.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,547 @@ >+/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 3.0 */ >+package org.eclipse.uml2.diagram.clazz.parser.property; >+ >+/** >+ * An implementation of interface CharStream, where the stream is assumed to >+ * contain only ASCII characters (with java-like unicode escape processing). >+ */ >+ >+public class JavaCharStream >+{ >+ public static final boolean staticFlag = false; >+ static final int hexval(char c) throws java.io.IOException { >+ switch(c) >+ { >+ case '0' : >+ return 0; >+ case '1' : >+ return 1; >+ case '2' : >+ return 2; >+ case '3' : >+ return 3; >+ case '4' : >+ return 4; >+ case '5' : >+ return 5; >+ case '6' : >+ return 6; >+ case '7' : >+ return 7; >+ case '8' : >+ return 8; >+ case '9' : >+ return 9; >+ >+ case 'a' : >+ case 'A' : >+ return 10; >+ case 'b' : >+ case 'B' : >+ return 11; >+ case 'c' : >+ case 'C' : >+ return 12; >+ case 'd' : >+ case 'D' : >+ return 13; >+ case 'e' : >+ case 'E' : >+ return 14; >+ case 'f' : >+ case 'F' : >+ return 15; >+ } >+ >+ throw new java.io.IOException(); // Should never come here >+ } >+ >+ public int bufpos = -1; >+ int bufsize; >+ int available; >+ int tokenBegin; >+ protected int bufline[]; >+ protected int bufcolumn[]; >+ >+ protected int column = 0; >+ protected int line = 1; >+ >+ protected boolean prevCharIsCR = false; >+ protected boolean prevCharIsLF = false; >+ >+ protected java.io.Reader inputStream; >+ >+ protected char[] nextCharBuf; >+ protected char[] buffer; >+ protected int maxNextCharInd = 0; >+ protected int nextCharInd = -1; >+ protected int inBuf = 0; >+ >+ protected void ExpandBuff(boolean wrapAround) >+ { >+ char[] newbuffer = new char[bufsize + 2048]; >+ int newbufline[] = new int[bufsize + 2048]; >+ int newbufcolumn[] = new int[bufsize + 2048]; >+ >+ try >+ { >+ if (wrapAround) >+ { >+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); >+ System.arraycopy(buffer, 0, newbuffer, >+ bufsize - tokenBegin, bufpos); >+ buffer = newbuffer; >+ >+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); >+ System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); >+ bufline = newbufline; >+ >+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); >+ System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); >+ bufcolumn = newbufcolumn; >+ >+ bufpos += (bufsize - tokenBegin); >+ } >+ else >+ { >+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); >+ buffer = newbuffer; >+ >+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); >+ bufline = newbufline; >+ >+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); >+ bufcolumn = newbufcolumn; >+ >+ bufpos -= tokenBegin; >+ } >+ } >+ catch (Throwable t) >+ { >+ throw new Error(t.getMessage()); >+ } >+ >+ available = (bufsize += 2048); >+ tokenBegin = 0; >+ } >+ >+ protected void FillBuff() throws java.io.IOException >+ { >+ int i; >+ if (maxNextCharInd == 4096) >+ maxNextCharInd = nextCharInd = 0; >+ >+ try { >+ if ((i = inputStream.read(nextCharBuf, maxNextCharInd, >+ 4096 - maxNextCharInd)) == -1) >+ { >+ inputStream.close(); >+ throw new java.io.IOException(); >+ } >+ else >+ maxNextCharInd += i; >+ return; >+ } >+ catch(java.io.IOException e) { >+ if (bufpos != 0) >+ { >+ --bufpos; >+ backup(0); >+ } >+ else >+ { >+ bufline[bufpos] = line; >+ bufcolumn[bufpos] = column; >+ } >+ throw e; >+ } >+ } >+ >+ protected char ReadByte() throws java.io.IOException >+ { >+ if (++nextCharInd >= maxNextCharInd) >+ FillBuff(); >+ >+ return nextCharBuf[nextCharInd]; >+ } >+ >+ public char BeginToken() throws java.io.IOException >+ { >+ if (inBuf > 0) >+ { >+ --inBuf; >+ >+ if (++bufpos == bufsize) >+ bufpos = 0; >+ >+ tokenBegin = bufpos; >+ return buffer[bufpos]; >+ } >+ >+ tokenBegin = 0; >+ bufpos = -1; >+ >+ return readChar(); >+ } >+ >+ protected void AdjustBuffSize() >+ { >+ if (available == bufsize) >+ { >+ if (tokenBegin > 2048) >+ { >+ bufpos = 0; >+ available = tokenBegin; >+ } >+ else >+ ExpandBuff(false); >+ } >+ else if (available > tokenBegin) >+ available = bufsize; >+ else if ((tokenBegin - available) < 2048) >+ ExpandBuff(true); >+ else >+ available = tokenBegin; >+ } >+ >+ protected void UpdateLineColumn(char c) >+ { >+ column++; >+ >+ if (prevCharIsLF) >+ { >+ prevCharIsLF = false; >+ line += (column = 1); >+ } >+ else if (prevCharIsCR) >+ { >+ prevCharIsCR = false; >+ if (c == '\n') >+ { >+ prevCharIsLF = true; >+ } >+ else >+ line += (column = 1); >+ } >+ >+ switch (c) >+ { >+ case '\r' : >+ prevCharIsCR = true; >+ break; >+ case '\n' : >+ prevCharIsLF = true; >+ break; >+ case '\t' : >+ column--; >+ column += (8 - (column & 07)); >+ break; >+ default : >+ break; >+ } >+ >+ bufline[bufpos] = line; >+ bufcolumn[bufpos] = column; >+ } >+ >+ public char readChar() throws java.io.IOException >+ { >+ if (inBuf > 0) >+ { >+ --inBuf; >+ >+ if (++bufpos == bufsize) >+ bufpos = 0; >+ >+ return buffer[bufpos]; >+ } >+ >+ char c; >+ >+ if (++bufpos == available) >+ AdjustBuffSize(); >+ >+ if ((buffer[bufpos] = c = ReadByte()) == '\\') >+ { >+ UpdateLineColumn(c); >+ >+ int backSlashCnt = 1; >+ >+ for (;;) // Read all the backslashes >+ { >+ if (++bufpos == available) >+ AdjustBuffSize(); >+ >+ try >+ { >+ if ((buffer[bufpos] = c = ReadByte()) != '\\') >+ { >+ UpdateLineColumn(c); >+ // found a non-backslash char. >+ if ((c == 'u') && ((backSlashCnt & 1) == 1)) >+ { >+ if (--bufpos < 0) >+ bufpos = bufsize - 1; >+ >+ break; >+ } >+ >+ backup(backSlashCnt); >+ return '\\'; >+ } >+ } >+ catch(java.io.IOException e) >+ { >+ if (backSlashCnt > 1) >+ backup(backSlashCnt); >+ >+ return '\\'; >+ } >+ >+ UpdateLineColumn(c); >+ backSlashCnt++; >+ } >+ >+ // Here, we have seen an odd number of backslash's followed by a 'u' >+ try >+ { >+ while ((c = ReadByte()) == 'u') >+ ++column; >+ >+ buffer[bufpos] = c = (char)(hexval(c) << 12 | >+ hexval(ReadByte()) << 8 | >+ hexval(ReadByte()) << 4 | >+ hexval(ReadByte())); >+ >+ column += 4; >+ } >+ catch(java.io.IOException e) >+ { >+ throw new Error("Invalid escape character at line " + line + >+ " column " + column + "."); >+ } >+ >+ if (backSlashCnt == 1) >+ return c; >+ else >+ { >+ backup(backSlashCnt - 1); >+ return '\\'; >+ } >+ } >+ else >+ { >+ UpdateLineColumn(c); >+ return (c); >+ } >+ } >+ >+ /** >+ * @deprecated >+ * @see #getEndColumn >+ */ >+ >+ public int getColumn() { >+ return bufcolumn[bufpos]; >+ } >+ >+ /** >+ * @deprecated >+ * @see #getEndLine >+ */ >+ >+ public int getLine() { >+ return bufline[bufpos]; >+ } >+ >+ public int getEndColumn() { >+ return bufcolumn[bufpos]; >+ } >+ >+ public int getEndLine() { >+ return bufline[bufpos]; >+ } >+ >+ public int getBeginColumn() { >+ return bufcolumn[tokenBegin]; >+ } >+ >+ public int getBeginLine() { >+ return bufline[tokenBegin]; >+ } >+ >+ public void backup(int amount) { >+ >+ inBuf += amount; >+ if ((bufpos -= amount) < 0) >+ bufpos += bufsize; >+ } >+ >+ public JavaCharStream(java.io.Reader dstream, >+ int startline, int startcolumn, int buffersize) >+ { >+ inputStream = dstream; >+ line = startline; >+ column = startcolumn - 1; >+ >+ available = bufsize = buffersize; >+ buffer = new char[buffersize]; >+ bufline = new int[buffersize]; >+ bufcolumn = new int[buffersize]; >+ nextCharBuf = new char[4096]; >+ } >+ >+ public JavaCharStream(java.io.Reader dstream, >+ int startline, int startcolumn) >+ { >+ this(dstream, startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.Reader dstream) >+ { >+ this(dstream, 1, 1, 4096); >+ } >+ public void ReInit(java.io.Reader dstream, >+ int startline, int startcolumn, int buffersize) >+ { >+ inputStream = dstream; >+ line = startline; >+ column = startcolumn - 1; >+ >+ if (buffer == null || buffersize != buffer.length) >+ { >+ available = bufsize = buffersize; >+ buffer = new char[buffersize]; >+ bufline = new int[buffersize]; >+ bufcolumn = new int[buffersize]; >+ nextCharBuf = new char[4096]; >+ } >+ prevCharIsLF = prevCharIsCR = false; >+ tokenBegin = inBuf = maxNextCharInd = 0; >+ nextCharInd = bufpos = -1; >+ } >+ >+ public void ReInit(java.io.Reader dstream, >+ int startline, int startcolumn) >+ { >+ ReInit(dstream, startline, startcolumn, 4096); >+ } >+ >+ public void ReInit(java.io.Reader dstream) >+ { >+ ReInit(dstream, 1, 1, 4096); >+ } >+ public JavaCharStream(java.io.InputStream dstream, int startline, >+ int startcolumn, int buffersize) >+ { >+ this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.InputStream dstream, int startline, >+ int startcolumn) >+ { >+ this(dstream, startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.InputStream dstream) >+ { >+ this(dstream, 1, 1, 4096); >+ } >+ >+ public void ReInit(java.io.InputStream dstream, int startline, >+ int startcolumn, int buffersize) >+ { >+ ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); >+ } >+ public void ReInit(java.io.InputStream dstream, int startline, >+ int startcolumn) >+ { >+ ReInit(dstream, startline, startcolumn, 4096); >+ } >+ public void ReInit(java.io.InputStream dstream) >+ { >+ ReInit(dstream, 1, 1, 4096); >+ } >+ >+ public String GetImage() >+ { >+ if (bufpos >= tokenBegin) >+ return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); >+ else >+ return new String(buffer, tokenBegin, bufsize - tokenBegin) + >+ new String(buffer, 0, bufpos + 1); >+ } >+ >+ public char[] GetSuffix(int len) >+ { >+ char[] ret = new char[len]; >+ >+ if ((bufpos + 1) >= len) >+ System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); >+ else >+ { >+ System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, >+ len - bufpos - 1); >+ System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); >+ } >+ >+ return ret; >+ } >+ >+ public void Done() >+ { >+ nextCharBuf = null; >+ buffer = null; >+ bufline = null; >+ bufcolumn = null; >+ } >+ >+ /** >+ * Method to adjust line and column numbers for the start of a token. >+ */ >+ public void adjustBeginLineColumn(int newLine, int newCol) >+ { >+ int start = tokenBegin; >+ int len; >+ >+ if (bufpos >= tokenBegin) >+ { >+ len = bufpos - tokenBegin + inBuf + 1; >+ } >+ else >+ { >+ len = bufsize - tokenBegin + bufpos + 1 + inBuf; >+ } >+ >+ int i = 0, j = 0, k = 0; >+ int nextColDiff = 0, columnDiff = 0; >+ >+ while (i < len && >+ bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) >+ { >+ bufline[j] = newLine; >+ nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; >+ bufcolumn[j] = newCol + columnDiff; >+ columnDiff = nextColDiff; >+ i++; >+ } >+ >+ if (i < len) >+ { >+ bufline[j] = newLine++; >+ bufcolumn[j] = newCol + columnDiff; >+ >+ while (i++ < len) >+ { >+ if (bufline[j = start % bufsize] != bufline[++start % bufsize]) >+ bufline[j] = newLine++; >+ else >+ bufline[j] = newLine; >+ } >+ } >+ >+ line = bufline[j]; >+ column = bufcolumn[j]; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/AssociationClassEditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/AssociationClassEditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/AssociationClassEditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/AssociationClassEditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class AssociationClassEditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotToString.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotToString.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotToString.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotToString.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,116 @@ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+ >+package org.eclipse.uml2.diagram.clazz.parser.slot; >+ >+import java.util.Arrays; >+import java.util.Iterator; >+import java.util.LinkedList; >+import java.util.List; >+ >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.uml2.diagram.parser.AbstractToString; >+import org.eclipse.uml2.uml.Expression; >+import org.eclipse.uml2.uml.LiteralInteger; >+import org.eclipse.uml2.uml.LiteralString; >+import org.eclipse.uml2.uml.Slot; >+import org.eclipse.uml2.uml.StructuralFeature; >+import org.eclipse.uml2.uml.UMLPackage; >+import org.eclipse.uml2.uml.ValueSpecification; >+ >+public abstract class SlotToString extends AbstractToString { >+ public static class EDIT extends SlotToString { >+ public boolean isAffectingFeature(EStructuralFeature feature) { >+ throw new UnsupportedOperationException("I am edit toString, I am not expected to be asked"); >+ } >+ } >+ >+ public static class VIEW extends SlotToString implements WithReferences { >+ private static final List AFFECTING = Arrays.asList(new EStructuralFeature[] { >+ UMLPackage.eINSTANCE.getSlot_Value(), >+ UMLPackage.eINSTANCE.getSlot_DefiningFeature(), >+ UMLPackage.eINSTANCE.getExpression_Symbol(), >+ UMLPackage.eINSTANCE.getLiteralString_Value(), >+ UMLPackage.eINSTANCE.getLiteralInteger_Value(), >+ }); >+ >+ public boolean isAffectingFeature(EStructuralFeature feature) { >+ return AFFECTING.contains(feature); >+ } >+ >+ public List getAdditionalReferencedElements(EObject object) { >+ Slot slot = asSlot(object); >+ List result = new LinkedList(); >+ result.add(slot); >+ StructuralFeature definingFeature = slot.getDefiningFeature(); >+ if (definingFeature != null){ >+ result.add(definingFeature); >+ } >+ result.addAll(slot.getValues()); >+ return result; >+ } >+ >+ } >+ >+ public String getToString(EObject object, int flags) { >+ Slot slot = asSlot(object); >+ StringBuffer result = new StringBuffer(); >+ appendFeatureName(result, slot); >+ appendSlotValue(result, slot); >+ return result.toString(); >+ } >+ >+ protected void appendFeatureName(StringBuffer result, Slot slot){ >+ StructuralFeature feature = slot.getDefiningFeature(); >+ appendName(result, feature); >+ } >+ >+ /** >+ * FIXME: It is unclear from the spec how multiple values should be shown. For now assuming only one value >+ */ >+ protected void appendSlotValue(StringBuffer result, Slot slot){ >+ for (Iterator values = slot.getValues().iterator(); values.hasNext();){ >+ ValueSpecification next = (ValueSpecification)values.next(); >+ String nextDisplayValue = getSlotValue(next); >+ if (!isEmpty(nextDisplayValue)){ >+ result.append(" = ").append(nextDisplayValue); >+ //FIXME: for now stop on first success >+ break; >+ } >+ } >+ } >+ >+ protected String getSlotValue(ValueSpecification value){ >+ if (value instanceof LiteralString){ >+ LiteralString literal = (LiteralString)value; >+ return "\"" + literal.getValue() + "\""; >+ } >+ if (value instanceof LiteralInteger){ >+ LiteralInteger literal = (LiteralInteger)value; >+ return String.valueOf(literal.getValue()); >+ } >+ if (value instanceof Expression){ >+ Expression expression = (Expression)value; >+ return expression.getSymbol(); >+ } >+ return null; >+ } >+ >+ protected Slot asSlot(EObject object){ >+ if (false == object instanceof Slot){ >+ throw new IllegalStateException("I can not provide toString for: " + object); >+ } >+ return (Slot)object; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/sheet/UMLSheetLabelProvider.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/sheet/UMLSheetLabelProvider.java >diff -N src/org/eclipse/uml2/diagram/clazz/sheet/UMLSheetLabelProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/sheet/UMLSheetLabelProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,78 @@ >+package org.eclipse.uml2.diagram.clazz.sheet; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; >+import org.eclipse.gef.EditPart; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.jface.viewers.DecoratingLabelProvider; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.swt.graphics.Image; >+import org.eclipse.uml2.diagram.clazz.navigator.UMLNavigatorGroup; >+import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorPlugin; >+ >+/** >+ * @generated >+ */ >+public class UMLSheetLabelProvider extends DecoratingLabelProvider { >+ >+ /** >+ * @generated >+ */ >+ public UMLSheetLabelProvider() { >+ super(new AdapterFactoryLabelProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory()), null); >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getText(Object element) { >+ Object selected = unwrap(element); >+ if (selected instanceof UMLNavigatorGroup) { >+ return ((UMLNavigatorGroup) selected).getGroupName(); >+ } >+ return super.getText(selected); >+ } >+ >+ /** >+ * @generated >+ */ >+ public Image getImage(Object element) { >+ return super.getImage(unwrap(element)); >+ } >+ >+ /** >+ * @generated >+ */ >+ private Object unwrap(Object element) { >+ if (element instanceof IStructuredSelection) { >+ return unwrap(((IStructuredSelection) element).getFirstElement()); >+ } >+ if (element instanceof EditPart) { >+ return unwrapEditPart((EditPart) element); >+ } >+ if (element instanceof IAdaptable) { >+ View view = (View) ((IAdaptable) element).getAdapter(View.class); >+ if (view != null) { >+ return unwrapView(view); >+ } >+ } >+ return element; >+ } >+ >+ /** >+ * @generated >+ */ >+ private Object unwrapEditPart(EditPart p) { >+ if (p.getModel() instanceof View) { >+ return unwrapView((View) p.getModel()); >+ } >+ return p.getModel(); >+ } >+ >+ /** >+ * @generated >+ */ >+ private Object unwrapView(View view) { >+ return view.getElement() == null ? view : view.getElement(); >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Class2EditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Class2EditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/Class2EditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/Class2EditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class Class2EditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/providers/UMLEditPartProvider.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/providers/UMLEditPartProvider.java >diff -N src/org/eclipse/uml2/diagram/clazz/providers/UMLEditPartProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/providers/UMLEditPartProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,141 @@ >+package org.eclipse.uml2.diagram.clazz.providers; >+ >+import java.lang.ref.WeakReference; >+ >+import org.eclipse.gef.EditPart; >+import org.eclipse.gef.EditPartFactory; >+import org.eclipse.gmf.runtime.common.core.service.IOperation; >+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; >+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider; >+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation; >+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.UMLEditPartFactory; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class UMLEditPartProvider extends AbstractEditPartProvider { >+ >+ /** >+ * @generated >+ */ >+ private EditPartFactory factory; >+ >+ /** >+ * @generated >+ */ >+ private boolean allowCaching; >+ >+ /** >+ * @generated >+ */ >+ private WeakReference cachedPart; >+ >+ /** >+ * @generated >+ */ >+ private WeakReference cachedView; >+ >+ /** >+ * @generated >+ */ >+ public UMLEditPartProvider() { >+ setFactory(new UMLEditPartFactory()); >+ setAllowCaching(true); >+ } >+ >+ /** >+ * @generated >+ */ >+ public final EditPartFactory getFactory() { >+ return factory; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setFactory(EditPartFactory factory) { >+ this.factory = factory; >+ } >+ >+ /** >+ * @generated >+ */ >+ public final boolean isAllowCaching() { >+ return allowCaching; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected synchronized void setAllowCaching(boolean allowCaching) { >+ this.allowCaching = allowCaching; >+ if (!allowCaching) { >+ cachedPart = null; >+ cachedView = null; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IGraphicalEditPart createEditPart(View view) { >+ EditPart part = factory.createEditPart(null, view); >+ if (part instanceof IGraphicalEditPart) { >+ return (IGraphicalEditPart) part; >+ } >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IGraphicalEditPart getCachedPart(View view) { >+ if (cachedView != null && cachedView.get() == view) { >+ return (IGraphicalEditPart) cachedPart.get(); >+ } >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ public synchronized IGraphicalEditPart createGraphicEditPart(View view) { >+ if (isAllowCaching()) { >+ IGraphicalEditPart part = getCachedPart(view); >+ cachedPart = null; >+ cachedView = null; >+ if (part != null) { >+ return part; >+ } >+ } >+ return createEditPart(view); >+ } >+ >+ /** >+ * @generated >+ */ >+ public synchronized boolean provides(IOperation operation) { >+ if (operation instanceof CreateGraphicEditPartOperation) { >+ View view = ((IEditPartOperation) operation).getView(); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view))) { >+ return false; >+ } >+ if (isAllowCaching() && getCachedPart(view) != null) { >+ return true; >+ } >+ IGraphicalEditPart part = createEditPart(view); >+ if (part != null) { >+ if (isAllowCaching()) { >+ cachedPart = new WeakReference(part); >+ cachedView = new WeakReference(view); >+ } >+ return true; >+ } >+ } >+ return false; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/InterfaceNameViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/InterfaceNameViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/InterfaceNameViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/InterfaceNameViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; >+import org.eclipse.gmf.runtime.notation.Location; >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class InterfaceNameViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { >+ Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint); >+ Location location = (Location) view.getLayoutConstraint(); >+ IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit()); >+ location.setX(mapMode.DPtoLP(0)); >+ location.setY(mapMode.DPtoLP(5)); >+ return view; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassClassesViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassClassesViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassClassesViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassClassesViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class AssociationClassClassesViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassClassesEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: .classpath >=================================================================== >RCS file: .classpath >diff -N .classpath >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ .classpath 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,8 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<classpath> >+ <classpathentry kind="src" path="src"/> >+ <classpathentry kind="src" path="custom-src"/> >+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> >+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> >+ <classpathentry kind="output" path="bin"/> >+</classpath> >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/TokenMgrError.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/TokenMgrError.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/TokenMgrError.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/TokenMgrError.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,144 @@ >+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.slot; >+ >+public class TokenMgrError extends Error >+{ >+ /* >+ * Ordinals for various reasons why an Error of this type can be thrown. >+ */ >+ >+ /** >+ * Lexical error occured. >+ */ >+ static final int LEXICAL_ERROR = 0; >+ >+ /** >+ * An attempt wass made to create a second instance of a static token manager. >+ */ >+ static final int STATIC_LEXER_ERROR = 1; >+ >+ /** >+ * Tried to change to an invalid lexical state. >+ */ >+ static final int INVALID_LEXICAL_STATE = 2; >+ >+ /** >+ * Detected (and bailed out of) an infinite loop in the token manager. >+ */ >+ static final int LOOP_DETECTED = 3; >+ >+ /** >+ * Indicates the reason why the exception is thrown. It will have >+ * one of the above 4 values. >+ */ >+ int errorCode; >+ >+ /** >+ * Replaces unprintable characters by their espaced (or unicode escaped) >+ * equivalents in the given string >+ */ >+ protected static final String addEscapes(String str) { >+ StringBuffer retval = new StringBuffer(); >+ char ch; >+ for (int i = 0; i < str.length(); i++) { >+ switch (str.charAt(i)) >+ { >+ case 0 : >+ continue; >+ case '\b': >+ retval.append("\\b"); >+ continue; >+ case '\t': >+ retval.append("\\t"); >+ continue; >+ case '\n': >+ retval.append("\\n"); >+ continue; >+ case '\f': >+ retval.append("\\f"); >+ continue; >+ case '\r': >+ retval.append("\\r"); >+ continue; >+ case '\"': >+ retval.append("\\\""); >+ continue; >+ case '\'': >+ retval.append("\\\'"); >+ continue; >+ case '\\': >+ retval.append("\\\\"); >+ continue; >+ default: >+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { >+ String s = "0000" + Integer.toString(ch, 16); >+ retval.append("\\u" + s.substring(s.length() - 4, s.length())); >+ } else { >+ retval.append(ch); >+ } >+ continue; >+ } >+ } >+ return retval.toString(); >+ } >+ >+ /** >+ * Returns a detailed message for the Error when it is thrown by the >+ * token manager to indicate a lexical error. >+ * Parameters : >+ * EOFSeen : indicates if EOF caused the lexicl error >+ * curLexState : lexical state in which this error occured >+ * errorLine : line number when the error occured >+ * errorColumn : column number when the error occured >+ * errorAfter : prefix that was seen before this error occured >+ * curchar : the offending character >+ * Note: You can customize the lexical error message by modifying this method. >+ */ >+ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { >+ return("Lexical error at line " + >+ errorLine + ", column " + >+ errorColumn + ". Encountered: " + >+ (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + >+ "after : \"" + addEscapes(errorAfter) + "\""); >+ } >+ >+ /** >+ * You can also modify the body of this method to customize your error messages. >+ * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not >+ * of end-users concern, so you can return something like : >+ * >+ * "Internal Error : Please file a bug report .... " >+ * >+ * from this method for such cases in the release version of your parser. >+ */ >+ public String getMessage() { >+ return super.getMessage(); >+ } >+ >+ /* >+ * Constructors of various flavors follow. >+ */ >+ >+ public TokenMgrError() { >+ } >+ >+ public TokenMgrError(String message, int reason) { >+ super(message); >+ errorCode = reason; >+ } >+ >+ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { >+ this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeNameViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeNameViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeNameViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeNameViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class PrimitiveTypeNameViewFactory extends BasicNodeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndParserConstants.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndParserConstants.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndParserConstants.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndParserConstants.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,79 @@ >+/* Generated By:JavaCC: Do not edit this line. AssociationEndParserConstants.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.end; >+ >+public interface AssociationEndParserConstants { >+ >+ int EOF = 0; >+ int SLASH = 3; >+ int COLON = 4; >+ int EQUALS = 5; >+ int LBRACKET = 6; >+ int RBRACKET = 7; >+ int LCURLY = 8; >+ int RCURLY = 9; >+ int COMMA = 10; >+ int PLUS = 11; >+ int MINUS = 12; >+ int NUMBER_SIGN = 13; >+ int TILDE = 14; >+ int DOT = 15; >+ int STAR = 16; >+ int READ_ONLY = 17; >+ int UNION = 18; >+ int SUBSETS = 19; >+ int REDEFINES = 20; >+ int ORDERED = 21; >+ int UNORDERED = 22; >+ int UNIQUE = 23; >+ int NON_UNIQUE = 24; >+ int INTEGER_LITERAL = 25; >+ int IDENTIFIER = 26; >+ int LETTER = 27; >+ int DIGIT = 28; >+ >+ int DEFAULT = 0; >+ >+ String[] tokenImage = { >+ "<EOF>", >+ "\" \"", >+ "\"\\t\"", >+ "\"/\"", >+ "\":\"", >+ "\"=\"", >+ "\"[\"", >+ "\"]\"", >+ "\"{\"", >+ "\"}\"", >+ "\",\"", >+ "\"+\"", >+ "\"-\"", >+ "\"#\"", >+ "\"~\"", >+ "\".\"", >+ "\"*\"", >+ "\"readOnly\"", >+ "\"union\"", >+ "\"subsets\"", >+ "\"redefines\"", >+ "\"ordered\"", >+ "\"unordered\"", >+ "\"unique\"", >+ "\"nonunique\"", >+ "<INTEGER_LITERAL>", >+ "<IDENTIFIER>", >+ "<LETTER>", >+ "<DIGIT>", >+ }; >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/TokenMgrError.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/TokenMgrError.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/TokenMgrError.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/TokenMgrError.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,144 @@ >+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.end; >+ >+public class TokenMgrError extends Error >+{ >+ /* >+ * Ordinals for various reasons why an Error of this type can be thrown. >+ */ >+ >+ /** >+ * Lexical error occured. >+ */ >+ static final int LEXICAL_ERROR = 0; >+ >+ /** >+ * An attempt wass made to create a second instance of a static token manager. >+ */ >+ static final int STATIC_LEXER_ERROR = 1; >+ >+ /** >+ * Tried to change to an invalid lexical state. >+ */ >+ static final int INVALID_LEXICAL_STATE = 2; >+ >+ /** >+ * Detected (and bailed out of) an infinite loop in the token manager. >+ */ >+ static final int LOOP_DETECTED = 3; >+ >+ /** >+ * Indicates the reason why the exception is thrown. It will have >+ * one of the above 4 values. >+ */ >+ int errorCode; >+ >+ /** >+ * Replaces unprintable characters by their espaced (or unicode escaped) >+ * equivalents in the given string >+ */ >+ protected static final String addEscapes(String str) { >+ StringBuffer retval = new StringBuffer(); >+ char ch; >+ for (int i = 0; i < str.length(); i++) { >+ switch (str.charAt(i)) >+ { >+ case 0 : >+ continue; >+ case '\b': >+ retval.append("\\b"); >+ continue; >+ case '\t': >+ retval.append("\\t"); >+ continue; >+ case '\n': >+ retval.append("\\n"); >+ continue; >+ case '\f': >+ retval.append("\\f"); >+ continue; >+ case '\r': >+ retval.append("\\r"); >+ continue; >+ case '\"': >+ retval.append("\\\""); >+ continue; >+ case '\'': >+ retval.append("\\\'"); >+ continue; >+ case '\\': >+ retval.append("\\\\"); >+ continue; >+ default: >+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { >+ String s = "0000" + Integer.toString(ch, 16); >+ retval.append("\\u" + s.substring(s.length() - 4, s.length())); >+ } else { >+ retval.append(ch); >+ } >+ continue; >+ } >+ } >+ return retval.toString(); >+ } >+ >+ /** >+ * Returns a detailed message for the Error when it is thrown by the >+ * token manager to indicate a lexical error. >+ * Parameters : >+ * EOFSeen : indicates if EOF caused the lexicl error >+ * curLexState : lexical state in which this error occured >+ * errorLine : line number when the error occured >+ * errorColumn : column number when the error occured >+ * errorAfter : prefix that was seen before this error occured >+ * curchar : the offending character >+ * Note: You can customize the lexical error message by modifying this method. >+ */ >+ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { >+ return("Lexical error at line " + >+ errorLine + ", column " + >+ errorColumn + ". Encountered: " + >+ (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + >+ "after : \"" + addEscapes(errorAfter) + "\""); >+ } >+ >+ /** >+ * You can also modify the body of this method to customize your error messages. >+ * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not >+ * of end-users concern, so you can return something like : >+ * >+ * "Internal Error : Please file a bug report .... " >+ * >+ * from this method for such cases in the release version of your parser. >+ */ >+ public String getMessage() { >+ return super.getMessage(); >+ } >+ >+ /* >+ * Constructors of various flavors follow. >+ */ >+ >+ public TokenMgrError() { >+ } >+ >+ public TokenMgrError(String message, int reason) { >+ super(message); >+ errorCode = reason; >+ } >+ >+ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { >+ this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Class2ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Class2ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Class2ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Class2ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,58 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassClassesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Class2ViewFactory extends AbstractShapeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createDescriptionStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFillStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Class2EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(ClassNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(ClassAttributesEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(ClassOperationsEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(ClassClassesEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLNewDiagramFileWizard.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLNewDiagramFileWizard.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLNewDiagramFileWizard.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLNewDiagramFileWizard.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,264 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import java.io.IOException; >+import java.util.Collections; >+import java.util.LinkedList; >+import java.util.List; >+ >+import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.commands.operations.OperationHistoryFactory; >+import org.eclipse.core.resources.IContainer; >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.core.runtime.Path; >+import org.eclipse.emf.common.util.URI; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.resource.Resource; >+import org.eclipse.emf.ecore.resource.ResourceSet; >+import org.eclipse.emf.ecore.util.FeatureMap; >+import org.eclipse.emf.edit.provider.IWrapperItemProvider; >+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; >+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; >+import org.eclipse.emf.transaction.TransactionalEditingDomain; >+import org.eclipse.gmf.runtime.common.core.command.CommandResult; >+import org.eclipse.gmf.runtime.diagram.core.services.ViewService; >+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation; >+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; >+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; >+import org.eclipse.gmf.runtime.notation.Diagram; >+import org.eclipse.jface.viewers.ISelectionChangedListener; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.jface.viewers.SelectionChangedEvent; >+import org.eclipse.jface.viewers.StructuredSelection; >+import org.eclipse.jface.viewers.TreeViewer; >+import org.eclipse.jface.wizard.Wizard; >+import org.eclipse.jface.wizard.WizardPage; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.layout.GridData; >+import org.eclipse.swt.layout.GridLayout; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Label; >+import org.eclipse.ui.IWorkbenchPage; >+import org.eclipse.ui.PartInitException; >+import org.eclipse.ui.dialogs.WizardNewFileCreationPage; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+ >+/** >+ * @generated >+ */ >+public class UMLNewDiagramFileWizard extends Wizard { >+ >+ /** >+ * @generated >+ */ >+ private TransactionalEditingDomain myEditingDomain; >+ >+ /** >+ * @generated >+ */ >+ private WizardNewFileCreationPage myFileCreationPage; >+ >+ /** >+ * @generated >+ */ >+ private IFile mySelectedModelFile; >+ >+ /** >+ * @generated >+ */ >+ private IWorkbenchPage myWorkbenchPage; >+ >+ /** >+ * @generated >+ */ >+ private IStructuredSelection mySelection; >+ >+ /** >+ * @generated >+ */ >+ private EObject myDiagramRoot; >+ >+ /** >+ * @generated >+ */ >+ public UMLNewDiagramFileWizard(IFile selectedModelFile, IWorkbenchPage workbenchPage, IStructuredSelection selection, EObject diagramRoot, TransactionalEditingDomain editingDomain) { >+ assert selectedModelFile != null : "Null selectedModelFile in UMLNewDiagramFileWizard constructor"; //$NON-NLS-1$ >+ assert workbenchPage != null : "Null workbenchPage in UMLNewDiagramFileWizard constructor"; //$NON-NLS-1$ >+ assert selection != null : "Null selection in UMLNewDiagramFileWizard constructor"; //$NON-NLS-1$ >+ assert diagramRoot != null : "Null diagramRoot in UMLNewDiagramFileWizard constructor"; //$NON-NLS-1$ >+ assert editingDomain != null : "Null editingDomain in UMLNewDiagramFileWizard constructor"; //$NON-NLS-1$ >+ >+ mySelectedModelFile = selectedModelFile; >+ myWorkbenchPage = workbenchPage; >+ mySelection = selection; >+ myDiagramRoot = diagramRoot; >+ myEditingDomain = editingDomain; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void addPages() { >+ myFileCreationPage = new WizardNewFileCreationPage("Initialize new Ecore diagram file", mySelection) { >+ >+ public void createControl(Composite parent) { >+ super.createControl(parent); >+ >+ IContainer parentContainer = mySelectedModelFile.getParent(); >+ String originalFileName = mySelectedModelFile.getProjectRelativePath().removeFileExtension().lastSegment(); >+ String fileExtension = ".umlclass_diagram"; //$NON-NLS-1$ >+ String fileName = originalFileName + fileExtension; >+ for (int i = 1; parentContainer.getFile(new Path(fileName)).exists(); i++) { >+ fileName = originalFileName + i + fileExtension; >+ } >+ setFileName(fileName); >+ } >+ >+ }; >+ myFileCreationPage.setTitle("Diagram file"); >+ myFileCreationPage.setDescription("Create new diagram based on " + PackageEditPart.MODEL_ID + " model content"); >+ addPage(myFileCreationPage); >+ addPage(new RootElementSelectorPage()); >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean performFinish() { >+ IFile diagramFile = myFileCreationPage.createNewFile(); >+ try { >+ diagramFile.setCharset("UTF-8", new NullProgressMonitor()); //$NON-NLS-1$ >+ } catch (CoreException e) { >+ UMLDiagramEditorPlugin.getInstance().logError("Unable to set charset for diagram file", e); //$NON-NLS-1$ >+ } >+ >+ ResourceSet resourceSet = myEditingDomain.getResourceSet(); >+ final Resource diagramResource = resourceSet.createResource(URI.createPlatformResourceURI(diagramFile.getFullPath().toString())); >+ >+ List affectedFiles = new LinkedList(); >+ affectedFiles.add(mySelectedModelFile); >+ affectedFiles.add(diagramFile); >+ >+ AbstractTransactionalCommand command = new AbstractTransactionalCommand(myEditingDomain, "Initializing diagram contents", affectedFiles) { //$NON-NLS-1$ >+ >+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { >+ int diagramVID = UMLVisualIDRegistry.getDiagramVisualID(myDiagramRoot); >+ if (diagramVID != PackageEditPart.VISUAL_ID) { >+ return CommandResult.newErrorCommandResult("Incorrect model object stored as a root resource object"); //$NON-NLS-1$ >+ } >+ Diagram diagram = ViewService.createDiagram(myDiagramRoot, PackageEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT); >+ diagramResource.getContents().add(diagram); >+ return CommandResult.newOKCommandResult(); >+ } >+ }; >+ >+ try { >+ OperationHistoryFactory.getOperationHistory().execute(command, new NullProgressMonitor(), null); >+ diagramResource.save(Collections.EMPTY_MAP); >+ UMLDiagramEditorUtil.openDiagramEditor(myWorkbenchPage, diagramFile); >+ } catch (ExecutionException e) { >+ UMLDiagramEditorPlugin.getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$ >+ } catch (IOException ex) { >+ UMLDiagramEditorPlugin.getInstance().logError("Save operation failed for: " + diagramFile.getFullPath().toString(), ex); //$NON-NLS-1$ >+ } catch (PartInitException ex) { >+ UMLDiagramEditorPlugin.getInstance().logError("Unable to open editor", ex); //$NON-NLS-1$ >+ } >+ return true; >+ } >+ >+ /** >+ * @generated >+ */ >+ private class RootElementSelectorPage extends WizardPage implements ISelectionChangedListener { >+ >+ /** >+ * @generated >+ */ >+ protected RootElementSelectorPage() { >+ super("Select diagram root element"); >+ setTitle("Diagram root element"); >+ setDescription("Select semantic model element to be depicted on diagram"); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void createControl(Composite parent) { >+ initializeDialogUnits(parent); >+ Composite topLevel = new Composite(parent, SWT.NONE); >+ topLevel.setLayout(new GridLayout()); >+ topLevel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); >+ topLevel.setFont(parent.getFont()); >+ setControl(topLevel); >+ createModelBrowser(topLevel); >+ setPageComplete(validatePage()); >+ } >+ >+ /** >+ * @generated >+ */ >+ private void createModelBrowser(Composite parent) { >+ Composite panel = new Composite(parent, SWT.NONE); >+ panel.setLayoutData(new GridData(GridData.FILL_BOTH)); >+ GridLayout layout = new GridLayout(); >+ layout.marginWidth = 0; >+ panel.setLayout(layout); >+ >+ Label label = new Label(panel, SWT.NONE); >+ label.setText("Select diagram root element:"); >+ label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); >+ >+ TreeViewer treeViewer = new TreeViewer(panel, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); >+ GridData layoutData = new GridData(GridData.FILL_BOTH); >+ layoutData.heightHint = 300; >+ layoutData.widthHint = 300; >+ treeViewer.getTree().setLayoutData(layoutData); >+ treeViewer.setContentProvider(new AdapterFactoryContentProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory())); >+ treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory())); >+ treeViewer.setInput(myDiagramRoot.eResource()); >+ treeViewer.setSelection(new StructuredSelection(myDiagramRoot)); >+ treeViewer.addSelectionChangedListener(this); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void selectionChanged(SelectionChangedEvent event) { >+ myDiagramRoot = null; >+ if (event.getSelection() instanceof IStructuredSelection) { >+ IStructuredSelection selection = (IStructuredSelection) event.getSelection(); >+ if (selection.size() == 1) { >+ Object selectedElement = selection.getFirstElement(); >+ if (selectedElement instanceof IWrapperItemProvider) { >+ selectedElement = ((IWrapperItemProvider) selectedElement).getValue(); >+ } >+ if (selectedElement instanceof FeatureMap.Entry) { >+ selectedElement = ((FeatureMap.Entry) selectedElement).getValue(); >+ } >+ if (selectedElement instanceof EObject) { >+ myDiagramRoot = (EObject) selectedElement; >+ } >+ } >+ } >+ setPageComplete(validatePage()); >+ } >+ >+ /** >+ * @generated >+ */ >+ private boolean validatePage() { >+ if (myDiagramRoot == null) { >+ setErrorMessage("No diagram root element selected"); >+ return false; >+ } >+ boolean result = ViewService.getInstance().provides( >+ new CreateDiagramViewOperation(new EObjectAdapter(myDiagramRoot), PackageEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT)); >+ setErrorMessage(result ? null : "Invalid diagram root element was selected"); >+ return result; >+ } >+ >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,54 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintCompartmentEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class ConstraintViewFactory extends AbstractShapeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createDescriptionStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFillStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(ConstraintCompartmentEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PackagePackagesViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PackagePackagesViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PackagePackagesViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PackagePackagesViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class PackagePackagesViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.PackagePackagesEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeOperationsViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeOperationsViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeOperationsViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeOperationsViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class PrimitiveTypeOperationsViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeOperationsEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PrimitiveTypeEditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PrimitiveTypeEditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/PrimitiveTypeEditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/PrimitiveTypeEditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class PrimitiveTypeEditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: build.properties >=================================================================== >RCS file: build.properties >diff -N build.properties >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ build.properties 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+bin.includes = .,\ >+ META-INF/,\ >+ plugin.xml,\ >+ plugin.properties >+jars.compile.order = . >+source.. = src/ >+output.. = bin/ >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/ConstraintEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/ConstraintEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/ConstraintEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/ConstraintEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class ConstraintEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/providers/UMLParserProvider.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/providers/UMLParserProvider.java >diff -N src/org/eclipse/uml2/diagram/clazz/providers/UMLParserProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/providers/UMLParserProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,1185 @@ >+package org.eclipse.uml2.diagram.clazz.providers; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; >+import org.eclipse.gmf.runtime.common.core.service.IOperation; >+import org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation; >+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; >+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider; >+import org.eclipse.gmf.runtime.emf.type.core.IElementType; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName6EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName7EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Class3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyName2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationLiteralEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.LiteralStringEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.OperationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Package3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PortNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PropertyEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PropertyNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.SlotEditPart; >+import org.eclipse.uml2.diagram.clazz.expressions.UMLOCLFactory; >+import org.eclipse.uml2.diagram.clazz.parser.association.end.AssociationEndApplyStrategy; >+import org.eclipse.uml2.diagram.clazz.parser.association.end.AssociationEndParser; >+import org.eclipse.uml2.diagram.clazz.parser.association.end.AssociationEndToString; >+import org.eclipse.uml2.diagram.clazz.parser.association.name.AssociationNameParser; >+import org.eclipse.uml2.diagram.clazz.parser.association.name.AssociationNameToString; >+import org.eclipse.uml2.diagram.clazz.parser.instance.InstanceSpecificationParser; >+import org.eclipse.uml2.diagram.clazz.parser.instance.InstanceSpecificationToString; >+import org.eclipse.uml2.diagram.clazz.parser.operation.OperationInplaceApplier; >+import org.eclipse.uml2.diagram.clazz.parser.operation.OperationParser; >+import org.eclipse.uml2.diagram.clazz.parser.operation.OperationToString; >+import org.eclipse.uml2.diagram.clazz.parser.property.PropertyParser; >+import org.eclipse.uml2.diagram.clazz.parser.property.PropertyToString; >+import org.eclipse.uml2.diagram.clazz.parser.slot.SlotParser; >+import org.eclipse.uml2.diagram.clazz.parser.slot.SlotToString; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+import org.eclipse.uml2.diagram.common.parser.port.PortParser; >+import org.eclipse.uml2.diagram.common.parser.port.PortToString; >+import org.eclipse.uml2.diagram.parser.BasicApplyStrategy; >+import org.eclipse.uml2.diagram.parser.ParserAdapter; >+import org.eclipse.uml2.diagram.parser.SemanticParserAdapter; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuiteImpl; >+import org.eclipse.uml2.diagram.parser.lookup.OCLLookup; >+import org.eclipse.uml2.uml.Type; >+import org.eclipse.uml2.uml.UMLPackage; >+ >+/** >+ * @generated >+ */ >+public class UMLParserProvider extends AbstractProvider implements IParserProvider { >+ >+ public static final OCLLookup<Type> TYPE_LOOKUP = new OCLLookup<Type>(// >+ UMLOCLFactory.getOCLLookupExpression("self.getNearestPackage().ownedType", UMLPackage.eINSTANCE.getNamedElement()), // >+ new IElementType[] { // >+ /* >+ UMLElementTypes.Class_2001, // >+ UMLElementTypes.DataType_2004, // >+ UMLElementTypes.Enumeration_2003, // >+ UMLElementTypes.PrimitiveType_2005, // >+ */ >+ }); >+ >+ /** >+ * @generated >+ */ >+ private IParser propertyProperty_3001Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getPropertyProperty_3001Parser() { >+ if (propertyProperty_3001Parser == null) { >+ propertyProperty_3001Parser = createPropertyProperty_3001Parser(); >+ } >+ return propertyProperty_3001Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createPropertyProperty_3001Parser() { >+ LookupSuiteImpl lookupSuite = new LookupSuiteImpl(); >+ lookupSuite.addLookup(Type.class, TYPE_LOOKUP); >+ >+ return new SemanticParserAdapter(new PropertyParser(lookupSuite), new BasicApplyStrategy(), new PropertyToString.VIEW(), new PropertyToString.EDIT()); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser operationOperation_3002Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getOperationOperation_3002Parser() { >+ if (operationOperation_3002Parser == null) { >+ operationOperation_3002Parser = createOperationOperation_3002Parser(); >+ } >+ return operationOperation_3002Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createOperationOperation_3002Parser() { >+ return createOperationParser(); >+ } >+ >+ protected IParser createOperationParser() { >+ LookupSuiteImpl lookupSuite = new LookupSuiteImpl(); >+ lookupSuite.addLookup(Type.class, TYPE_LOOKUP); >+ >+ return new SemanticParserAdapter(new OperationParser(lookupSuite), new OperationInplaceApplier(), new OperationToString.VIEW(), new OperationToString.EDIT()); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser classClass_3003Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getClassClass_3003Parser() { >+ if (classClass_3003Parser == null) { >+ classClass_3003Parser = createClassClass_3003Parser(); >+ } >+ return classClass_3003Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createClassClass_3003Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser portPortName_5013Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getPortPortName_5013Parser() { >+ if (portPortName_5013Parser == null) { >+ portPortName_5013Parser = createPortPortName_5013Parser(); >+ } >+ return portPortName_5013Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createPortPortName_5013Parser() { >+ LookupSuiteImpl lookupSuite = new LookupSuiteImpl(); >+ lookupSuite.addLookup(Type.class, TYPE_LOOKUP); >+ >+ return new SemanticParserAdapter(new PortParser(lookupSuite), new BasicApplyStrategy(), new PortToString()); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser literalStringLiteralString_3005Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getLiteralStringLiteralString_3005Parser() { >+ if (literalStringLiteralString_3005Parser == null) { >+ literalStringLiteralString_3005Parser = createLiteralStringLiteralString_3005Parser(); >+ } >+ return literalStringLiteralString_3005Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createLiteralStringLiteralString_3005Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getLiteralString_Value()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser propertyProperty_3019Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getPropertyProperty_3019Parser() { >+ if (propertyProperty_3019Parser == null) { >+ propertyProperty_3019Parser = createPropertyProperty_3019Parser(); >+ } >+ return propertyProperty_3019Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createPropertyProperty_3019Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser operationOperation_3020Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getOperationOperation_3020Parser() { >+ if (operationOperation_3020Parser == null) { >+ operationOperation_3020Parser = createOperationOperation_3020Parser(); >+ } >+ return operationOperation_3020Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createOperationOperation_3020Parser() { >+ return createOperationParser(); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser packagePackage_3006Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getPackagePackage_3006Parser() { >+ if (packagePackage_3006Parser == null) { >+ packagePackage_3006Parser = createPackagePackage_3006Parser(); >+ } >+ return packagePackage_3006Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createPackagePackage_3006Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser classClass_3007Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getClassClass_3007Parser() { >+ if (classClass_3007Parser == null) { >+ classClass_3007Parser = createClassClass_3007Parser(); >+ } >+ return classClass_3007Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createClassClass_3007Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser dataTypeDataType_3008Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getDataTypeDataType_3008Parser() { >+ if (dataTypeDataType_3008Parser == null) { >+ dataTypeDataType_3008Parser = createDataTypeDataType_3008Parser(); >+ } >+ return dataTypeDataType_3008Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createDataTypeDataType_3008Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser primitiveTypePrimitiveType_3009Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getPrimitiveTypePrimitiveType_3009Parser() { >+ if (primitiveTypePrimitiveType_3009Parser == null) { >+ primitiveTypePrimitiveType_3009Parser = createPrimitiveTypePrimitiveType_3009Parser(); >+ } >+ return primitiveTypePrimitiveType_3009Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createPrimitiveTypePrimitiveType_3009Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser enumerationEnumeration_3011Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getEnumerationEnumeration_3011Parser() { >+ if (enumerationEnumeration_3011Parser == null) { >+ enumerationEnumeration_3011Parser = createEnumerationEnumeration_3011Parser(); >+ } >+ return enumerationEnumeration_3011Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createEnumerationEnumeration_3011Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser associationClassAssociationClass_3012Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getAssociationClassAssociationClass_3012Parser() { >+ if (associationClassAssociationClass_3012Parser == null) { >+ associationClassAssociationClass_3012Parser = createAssociationClassAssociationClass_3012Parser(); >+ } >+ return associationClassAssociationClass_3012Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createAssociationClassAssociationClass_3012Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser instanceSpecificationInstanceSpecification_3013Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getInstanceSpecificationInstanceSpecification_3013Parser() { >+ if (instanceSpecificationInstanceSpecification_3013Parser == null) { >+ instanceSpecificationInstanceSpecification_3013Parser = createInstanceSpecificationInstanceSpecification_3013Parser(); >+ } >+ return instanceSpecificationInstanceSpecification_3013Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createInstanceSpecificationInstanceSpecification_3013Parser() { >+ return createInstanceSpecificationParser(); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser propertyProperty_3014Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getPropertyProperty_3014Parser() { >+ if (propertyProperty_3014Parser == null) { >+ propertyProperty_3014Parser = createPropertyProperty_3014Parser(); >+ } >+ return propertyProperty_3014Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createPropertyProperty_3014Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser operationOperation_3015Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getOperationOperation_3015Parser() { >+ if (operationOperation_3015Parser == null) { >+ operationOperation_3015Parser = createOperationOperation_3015Parser(); >+ } >+ return operationOperation_3015Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createOperationOperation_3015Parser() { >+ return createOperationParser(); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser propertyProperty_3021Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getPropertyProperty_3021Parser() { >+ if (propertyProperty_3021Parser == null) { >+ propertyProperty_3021Parser = createPropertyProperty_3021Parser(); >+ } >+ return propertyProperty_3021Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createPropertyProperty_3021Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser operationOperation_3022Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getOperationOperation_3022Parser() { >+ if (operationOperation_3022Parser == null) { >+ operationOperation_3022Parser = createOperationOperation_3022Parser(); >+ } >+ return operationOperation_3022Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createOperationOperation_3022Parser() { >+ return createOperationParser(); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser enumerationLiteralEnumerationLiteral_3016Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getEnumerationLiteralEnumerationLiteral_3016Parser() { >+ if (enumerationLiteralEnumerationLiteral_3016Parser == null) { >+ enumerationLiteralEnumerationLiteral_3016Parser = createEnumerationLiteralEnumerationLiteral_3016Parser(); >+ } >+ return enumerationLiteralEnumerationLiteral_3016Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createEnumerationLiteralEnumerationLiteral_3016Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser propertyProperty_3023Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getPropertyProperty_3023Parser() { >+ if (propertyProperty_3023Parser == null) { >+ propertyProperty_3023Parser = createPropertyProperty_3023Parser(); >+ } >+ return propertyProperty_3023Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createPropertyProperty_3023Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser operationOperation_3024Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getOperationOperation_3024Parser() { >+ if (operationOperation_3024Parser == null) { >+ operationOperation_3024Parser = createOperationOperation_3024Parser(); >+ } >+ return operationOperation_3024Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createOperationOperation_3024Parser() { >+ return createOperationParser(); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser slotSlot_3017Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getSlotSlot_3017Parser() { >+ if (slotSlot_3017Parser == null) { >+ slotSlot_3017Parser = createSlotSlot_3017Parser(); >+ } >+ return slotSlot_3017Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createSlotSlot_3017Parser() { >+ return new SemanticParserAdapter(new SlotParser(), new BasicApplyStrategy(), new SlotToString.VIEW(), new SlotToString.EDIT()); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser classClassName_5003Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getClassClassName_5003Parser() { >+ if (classClassName_5003Parser == null) { >+ classClassName_5003Parser = createClassClassName_5003Parser(); >+ } >+ return classClassName_5003Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createClassClassName_5003Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser packagePackageName_5004Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getPackagePackageName_5004Parser() { >+ if (packagePackageName_5004Parser == null) { >+ packagePackageName_5004Parser = createPackagePackageName_5004Parser(); >+ } >+ return packagePackageName_5004Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createPackagePackageName_5004Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser enumerationEnumerationName_5005Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getEnumerationEnumerationName_5005Parser() { >+ if (enumerationEnumerationName_5005Parser == null) { >+ enumerationEnumerationName_5005Parser = createEnumerationEnumerationName_5005Parser(); >+ } >+ return enumerationEnumerationName_5005Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createEnumerationEnumerationName_5005Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser dataTypeDataTypeName_5006Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getDataTypeDataTypeName_5006Parser() { >+ if (dataTypeDataTypeName_5006Parser == null) { >+ dataTypeDataTypeName_5006Parser = createDataTypeDataTypeName_5006Parser(); >+ } >+ return dataTypeDataTypeName_5006Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createDataTypeDataTypeName_5006Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser primitiveTypePrimitiveTypeName_5007Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getPrimitiveTypePrimitiveTypeName_5007Parser() { >+ if (primitiveTypePrimitiveTypeName_5007Parser == null) { >+ primitiveTypePrimitiveTypeName_5007Parser = createPrimitiveTypePrimitiveTypeName_5007Parser(); >+ } >+ return primitiveTypePrimitiveTypeName_5007Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createPrimitiveTypePrimitiveTypeName_5007Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser constraintConstraintName_5008Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getConstraintConstraintName_5008Parser() { >+ if (constraintConstraintName_5008Parser == null) { >+ constraintConstraintName_5008Parser = createConstraintConstraintName_5008Parser(); >+ } >+ return constraintConstraintName_5008Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createConstraintConstraintName_5008Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser associationClassAssociationClassName_5009Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getAssociationClassAssociationClassName_5009Parser() { >+ if (associationClassAssociationClassName_5009Parser == null) { >+ associationClassAssociationClassName_5009Parser = createAssociationClassAssociationClassName_5009Parser(); >+ } >+ return associationClassAssociationClassName_5009Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createAssociationClassAssociationClassName_5009Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser instanceSpecificationInstanceSpecificationName_5010Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getInstanceSpecificationInstanceSpecificationName_5010Parser() { >+ if (instanceSpecificationInstanceSpecificationName_5010Parser == null) { >+ instanceSpecificationInstanceSpecificationName_5010Parser = createInstanceSpecificationInstanceSpecificationName_5010Parser(); >+ } >+ return instanceSpecificationInstanceSpecificationName_5010Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createInstanceSpecificationInstanceSpecificationName_5010Parser() { >+ return createInstanceSpecificationParser(); >+ } >+ >+ protected IParser createInstanceSpecificationParser() { >+ LookupSuiteImpl lookupSuite = new LookupSuiteImpl(); >+ lookupSuite.addLookup(Type.class, TYPE_LOOKUP); >+ return new SemanticParserAdapter(new InstanceSpecificationParser(lookupSuite), new BasicApplyStrategy(), new InstanceSpecificationToString.VIEW(), new InstanceSpecificationToString.EDIT()); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser dependencyDependencyName_5011Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getDependencyDependencyName_5011Parser() { >+ if (dependencyDependencyName_5011Parser == null) { >+ dependencyDependencyName_5011Parser = createDependencyDependencyName_5011Parser(); >+ } >+ return dependencyDependencyName_5011Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createDependencyDependencyName_5011Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser interfaceInterfaceName_5012Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getInterfaceInterfaceName_5012Parser() { >+ if (interfaceInterfaceName_5012Parser == null) { >+ interfaceInterfaceName_5012Parser = createInterfaceInterfaceName_5012Parser(); >+ } >+ return interfaceInterfaceName_5012Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createInterfaceInterfaceName_5012Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser dependencyDependencyName_6001Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getDependencyDependencyName_6001Parser() { >+ if (dependencyDependencyName_6001Parser == null) { >+ dependencyDependencyName_6001Parser = createDependencyDependencyName_6001Parser(); >+ } >+ return dependencyDependencyName_6001Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createDependencyDependencyName_6001Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser propertyPropertyName_6002Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getPropertyPropertyName_6002Parser() { >+ if (propertyPropertyName_6002Parser == null) { >+ propertyPropertyName_6002Parser = createPropertyPropertyName_6002Parser(); >+ } >+ return propertyPropertyName_6002Parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser createPropertyPropertyName_6002Parser() { >+ UMLStructuralFeatureParser parser = new UMLStructuralFeatureParser(UMLPackage.eINSTANCE.getNamedElement_Name()); >+ return parser; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser associationAssociationName_6003Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getAssociationAssociationName_6003Parser() { >+ if (associationAssociationName_6003Parser == null) { >+ associationAssociationName_6003Parser = createAssociationAssociationName_6003Parser(); >+ } >+ return associationAssociationName_6003Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createAssociationAssociationName_6003Parser() { >+ LookupSuite lookupSuite = LookupSuite.NULL_SUITE; >+ return new ParserAdapter(new AssociationNameParser(lookupSuite), new BasicApplyStrategy(), new AssociationNameToString.VIEW(), new AssociationNameToString.EDIT()); >+ } >+ >+ /** >+ * Different view's but shared common edit. >+ */ >+ protected IParser createAssocationRoleParser(boolean sourceNotTarget) { >+ LookupSuite lookupSuite = getAssociationLookupSuite(); >+ return new SemanticParserAdapter(new AssociationEndParser(lookupSuite), new AssociationEndApplyStrategy(sourceNotTarget), new AssociationEndToString.ROLE_VIEW(sourceNotTarget), >+ new AssociationEndToString.EDIT(sourceNotTarget)); >+ } >+ >+ protected IParser createAssocationModifiersParser(boolean sourceNotTarget) { >+ LookupSuite lookupSuite = getAssociationLookupSuite(); >+ return new SemanticParserAdapter(new AssociationEndParser(lookupSuite), new AssociationEndApplyStrategy(sourceNotTarget), new AssociationEndToString.MODIFIERS_VIEW(sourceNotTarget), >+ new AssociationEndToString.EDIT(sourceNotTarget)); >+ } >+ >+ protected IParser createAssocationMultiplicityParser(boolean sourceNotTarget) { >+ LookupSuite lookupSuite = getAssociationLookupSuite(); >+ return new SemanticParserAdapter(new AssociationEndParser(lookupSuite), new AssociationEndApplyStrategy(sourceNotTarget), new AssociationEndToString.MULTIPLICITY_VIEW(sourceNotTarget), >+ new AssociationEndToString.EDIT(sourceNotTarget)); >+ } >+ >+ protected LookupSuite getAssociationLookupSuite() { >+ return LookupSuite.NULL_SUITE; >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser associationAssociationName_6004Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getAssociationAssociationName_6004Parser() { >+ if (associationAssociationName_6004Parser == null) { >+ associationAssociationName_6004Parser = createAssociationAssociationName_6004Parser(); >+ } >+ return associationAssociationName_6004Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createAssociationAssociationName_6004Parser() { >+ return createAssocationRoleParser(true); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser associationAssociationName_6005Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getAssociationAssociationName_6005Parser() { >+ if (associationAssociationName_6005Parser == null) { >+ associationAssociationName_6005Parser = createAssociationAssociationName_6005Parser(); >+ } >+ return associationAssociationName_6005Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createAssociationAssociationName_6005Parser() { >+ return createAssocationRoleParser(false); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser associationAssociationName_6006Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getAssociationAssociationName_6006Parser() { >+ if (associationAssociationName_6006Parser == null) { >+ associationAssociationName_6006Parser = createAssociationAssociationName_6006Parser(); >+ } >+ return associationAssociationName_6006Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createAssociationAssociationName_6006Parser() { >+ return createAssocationModifiersParser(true); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser associationAssociationName_6007Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getAssociationAssociationName_6007Parser() { >+ if (associationAssociationName_6007Parser == null) { >+ associationAssociationName_6007Parser = createAssociationAssociationName_6007Parser(); >+ } >+ return associationAssociationName_6007Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createAssociationAssociationName_6007Parser() { >+ return createAssocationModifiersParser(false); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser associationAssociationName_6008Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getAssociationAssociationName_6008Parser() { >+ if (associationAssociationName_6008Parser == null) { >+ associationAssociationName_6008Parser = createAssociationAssociationName_6008Parser(); >+ } >+ return associationAssociationName_6008Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createAssociationAssociationName_6008Parser() { >+ return createAssocationMultiplicityParser(true); >+ } >+ >+ /** >+ * @generated >+ */ >+ private IParser associationAssociationName_6009Parser; >+ >+ /** >+ * @generated >+ */ >+ private IParser getAssociationAssociationName_6009Parser() { >+ if (associationAssociationName_6009Parser == null) { >+ associationAssociationName_6009Parser = createAssociationAssociationName_6009Parser(); >+ } >+ return associationAssociationName_6009Parser; >+ } >+ >+ /** >+ * @generated NOT >+ */ >+ protected IParser createAssociationAssociationName_6009Parser() { >+ return createAssocationMultiplicityParser(false); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParser getParser(int visualID) { >+ switch (visualID) { >+ case Package3EditPart.VISUAL_ID: >+ return getPackagePackage_3006Parser(); >+ case ClassEditPart.VISUAL_ID: >+ return getClassClass_3007Parser(); >+ case DataTypeEditPart.VISUAL_ID: >+ return getDataTypeDataType_3008Parser(); >+ case PrimitiveTypeEditPart.VISUAL_ID: >+ return getPrimitiveTypePrimitiveType_3009Parser(); >+ case EnumerationEditPart.VISUAL_ID: >+ return getEnumerationEnumeration_3011Parser(); >+ case AssociationClassEditPart.VISUAL_ID: >+ return getAssociationClassAssociationClass_3012Parser(); >+ case InstanceSpecificationEditPart.VISUAL_ID: >+ return getInstanceSpecificationInstanceSpecification_3013Parser(); >+ case PropertyEditPart.VISUAL_ID: >+ return getPropertyProperty_3001Parser(); >+ case OperationEditPart.VISUAL_ID: >+ return getOperationOperation_3002Parser(); >+ case Class3EditPart.VISUAL_ID: >+ return getClassClass_3003Parser(); >+ case PortNameEditPart.VISUAL_ID: >+ return getPortPortName_5013Parser(); >+ case Property2EditPart.VISUAL_ID: >+ return getPropertyProperty_3019Parser(); >+ case Operation2EditPart.VISUAL_ID: >+ return getOperationOperation_3020Parser(); >+ case Property3EditPart.VISUAL_ID: >+ return getPropertyProperty_3014Parser(); >+ case Operation3EditPart.VISUAL_ID: >+ return getOperationOperation_3015Parser(); >+ case Property4EditPart.VISUAL_ID: >+ return getPropertyProperty_3021Parser(); >+ case Operation4EditPart.VISUAL_ID: >+ return getOperationOperation_3022Parser(); >+ case EnumerationLiteralEditPart.VISUAL_ID: >+ return getEnumerationLiteralEnumerationLiteral_3016Parser(); >+ case Property5EditPart.VISUAL_ID: >+ return getPropertyProperty_3023Parser(); >+ case Operation5EditPart.VISUAL_ID: >+ return getOperationOperation_3024Parser(); >+ case LiteralStringEditPart.VISUAL_ID: >+ return getLiteralStringLiteralString_3005Parser(); >+ case SlotEditPart.VISUAL_ID: >+ return getSlotSlot_3017Parser(); >+ case PackageNameEditPart.VISUAL_ID: >+ return getPackagePackageName_5004Parser(); >+ case ClassNameEditPart.VISUAL_ID: >+ return getClassClassName_5003Parser(); >+ case AssociationClassNameEditPart.VISUAL_ID: >+ return getAssociationClassAssociationClassName_5009Parser(); >+ case DataTypeNameEditPart.VISUAL_ID: >+ return getDataTypeDataTypeName_5006Parser(); >+ case PrimitiveTypeNameEditPart.VISUAL_ID: >+ return getPrimitiveTypePrimitiveTypeName_5007Parser(); >+ case EnumerationNameEditPart.VISUAL_ID: >+ return getEnumerationEnumerationName_5005Parser(); >+ case InterfaceNameEditPart.VISUAL_ID: >+ return getInterfaceInterfaceName_5012Parser(); >+ case ConstraintNameEditPart.VISUAL_ID: >+ return getConstraintConstraintName_5008Parser(); >+ case InstanceSpecificationNameEditPart.VISUAL_ID: >+ return getInstanceSpecificationInstanceSpecificationName_5010Parser(); >+ case DependencyNameEditPart.VISUAL_ID: >+ return getDependencyDependencyName_5011Parser(); >+ case DependencyName2EditPart.VISUAL_ID: >+ return getDependencyDependencyName_6001Parser(); >+ case PropertyNameEditPart.VISUAL_ID: >+ return getPropertyPropertyName_6002Parser(); >+ case AssociationNameEditPart.VISUAL_ID: >+ return getAssociationAssociationName_6003Parser(); >+ case AssociationName2EditPart.VISUAL_ID: >+ return getAssociationAssociationName_6004Parser(); >+ case AssociationName3EditPart.VISUAL_ID: >+ return getAssociationAssociationName_6005Parser(); >+ case AssociationName4EditPart.VISUAL_ID: >+ return getAssociationAssociationName_6006Parser(); >+ case AssociationName5EditPart.VISUAL_ID: >+ return getAssociationAssociationName_6007Parser(); >+ case AssociationName6EditPart.VISUAL_ID: >+ return getAssociationAssociationName_6008Parser(); >+ case AssociationName7EditPart.VISUAL_ID: >+ return getAssociationAssociationName_6009Parser(); >+ } >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ public IParser getParser(IAdaptable hint) { >+ String vid = (String) hint.getAdapter(String.class); >+ if (vid != null) { >+ return getParser(UMLVisualIDRegistry.getVisualID(vid)); >+ } >+ View view = (View) hint.getAdapter(View.class); >+ if (view != null) { >+ return getParser(UMLVisualIDRegistry.getVisualID(view)); >+ } >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean provides(IOperation operation) { >+ if (operation instanceof GetParserOperation) { >+ IAdaptable hint = ((GetParserOperation) operation).getHint(); >+ if (UMLElementTypes.getElement(hint) == null) { >+ return false; >+ } >+ return getParser(hint) != null; >+ } >+ return false; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationAttributesViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationAttributesViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationAttributesViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationAttributesViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class EnumerationAttributesViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationAttributesEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencyClientEditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencyClientEditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencyClientEditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencyClientEditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class DependencyClientEditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/GeneralizationViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/GeneralizationViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/GeneralizationViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/GeneralizationViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,48 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ConnectionViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class GeneralizationViewFactory extends ConnectionViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createRoutingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.GeneralizationEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/Token.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/Token.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/Token.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/Token.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,92 @@ >+/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.name; >+ >+/** >+ * Describes the input token stream. >+ */ >+ >+public class Token { >+ >+ /** >+ * An integer that describes the kind of this token. This numbering >+ * system is determined by JavaCCParser, and a table of these numbers is >+ * stored in the file ...Constants.java. >+ */ >+ public int kind; >+ >+ /** >+ * beginLine and beginColumn describe the position of the first character >+ * of this token; endLine and endColumn describe the position of the >+ * last character of this token. >+ */ >+ public int beginLine, beginColumn, endLine, endColumn; >+ >+ /** >+ * The string image of the token. >+ */ >+ public String image; >+ >+ /** >+ * A reference to the next regular (non-special) token from the input >+ * stream. If this is the last token from the input stream, or if the >+ * token manager has not read tokens beyond this one, this field is >+ * set to null. This is true only if this token is also a regular >+ * token. Otherwise, see below for a description of the contents of >+ * this field. >+ */ >+ public Token next; >+ >+ /** >+ * This field is used to access special tokens that occur prior to this >+ * token, but after the immediately preceding regular (non-special) token. >+ * If there are no such special tokens, this field is set to null. >+ * When there are more than one such special token, this field refers >+ * to the last of these special tokens, which in turn refers to the next >+ * previous special token through its specialToken field, and so on >+ * until the first special token (whose specialToken field is null). >+ * The next fields of special tokens refer to other special tokens that >+ * immediately follow it (without an intervening regular token). If there >+ * is no such token, this field is null. >+ */ >+ public Token specialToken; >+ >+ /** >+ * Returns the image. >+ */ >+ public String toString() >+ { >+ return image; >+ } >+ >+ /** >+ * Returns a new Token object, by default. However, if you want, you >+ * can create and return subclass objects based on the value of ofKind. >+ * Simply add the cases to the switch for all those special cases. >+ * For example, if you have a subclass of Token called IDToken that >+ * you want to create if ofKind is ID, simlpy add something like : >+ * >+ * case MyParserConstants.ID : return new IDToken(); >+ * >+ * to the following switch statement. Then you can cast matchedToken >+ * variable to the appropriate type and use it in your lexical actions. >+ */ >+ public static final Token newToken(int ofKind) >+ { >+ switch(ofKind) >+ { >+ default : return new Token(); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintConstrainedElementViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintConstrainedElementViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintConstrainedElementViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintConstrainedElementViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,48 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ConnectionViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class ConstraintConstrainedElementViewFactory extends ConnectionViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createRoutingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintConstrainedElementEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/AssociationClassEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/AssociationClassEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/AssociationClassEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/AssociationClassEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class AssociationClassEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Operation2EditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Operation2EditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/Operation2EditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/Operation2EditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class Operation2EditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationParserConstants.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationParserConstants.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationParserConstants.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationParserConstants.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,79 @@ >+/* Generated By:JavaCC: Do not edit this line. InstanceSpecificationParserConstants.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.instance; >+ >+public interface InstanceSpecificationParserConstants { >+ >+ int EOF = 0; >+ int SLASH = 3; >+ int COLON = 4; >+ int EQUALS = 5; >+ int LBRACKET = 6; >+ int RBRACKET = 7; >+ int LCURLY = 8; >+ int RCURLY = 9; >+ int COMMA = 10; >+ int PLUS = 11; >+ int MINUS = 12; >+ int NUMBER_SIGN = 13; >+ int TILDE = 14; >+ int DOT = 15; >+ int STAR = 16; >+ int READ_ONLY = 17; >+ int UNION = 18; >+ int SUBSETS = 19; >+ int REDEFINES = 20; >+ int ORDERED = 21; >+ int UNORDERED = 22; >+ int UNIQUE = 23; >+ int NON_UNIQUE = 24; >+ int INTEGER_LITERAL = 25; >+ int IDENTIFIER = 26; >+ int LETTER = 27; >+ int DIGIT = 28; >+ >+ int DEFAULT = 0; >+ >+ String[] tokenImage = { >+ "<EOF>", >+ "\" \"", >+ "\"\\t\"", >+ "\"/\"", >+ "\":\"", >+ "\"=\"", >+ "\"[\"", >+ "\"]\"", >+ "\"{\"", >+ "\"}\"", >+ "\",\"", >+ "\"+\"", >+ "\"-\"", >+ "\"#\"", >+ "\"~\"", >+ "\".\"", >+ "\"*\"", >+ "\"readOnly\"", >+ "\"union\"", >+ "\"subsets\"", >+ "\"redefines\"", >+ "\"ordered\"", >+ "\"unordered\"", >+ "\"unique\"", >+ "\"nonunique\"", >+ "<INTEGER_LITERAL>", >+ "<IDENTIFIER>", >+ "<LETTER>", >+ "<DIGIT>", >+ }; >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/providers/UMLPaletteProvider.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/providers/UMLPaletteProvider.java >diff -N src/org/eclipse/uml2/diagram/clazz/providers/UMLPaletteProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/providers/UMLPaletteProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.uml2.diagram.clazz.providers; >+ >+import java.util.Map; >+ >+import org.eclipse.core.runtime.IConfigurationElement; >+import org.eclipse.gef.palette.PaletteRoot; >+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; >+import org.eclipse.gmf.runtime.common.core.service.IOperation; >+import org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider; >+import org.eclipse.ui.IEditorPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLPaletteFactory; >+ >+/** >+ * @generated >+ */ >+public class UMLPaletteProvider extends AbstractProvider implements IPaletteProvider { >+ >+ /** >+ * @generated >+ */ >+ public void contributeToPalette(IEditorPart editor, Object content, PaletteRoot root, Map predefinedEntries) { >+ UMLPaletteFactory factory = new UMLPaletteFactory(); >+ factory.fillPalette(root); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setContributions(IConfigurationElement configElement) { >+ // no configuration >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean provides(IOperation operation) { >+ return false; // all logic is done in the service >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorContentProvider.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorContentProvider.java >diff -N src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorContentProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorContentProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,1403 @@ >+package org.eclipse.uml2.diagram.clazz.navigator; >+ >+import java.util.ArrayList; >+import java.util.Collection; >+import java.util.HashMap; >+import java.util.HashSet; >+import java.util.Iterator; >+import java.util.List; >+import java.util.Set; >+ >+import org.eclipse.core.resources.IFile; >+import org.eclipse.emf.common.util.URI; >+import org.eclipse.emf.ecore.resource.Resource; >+import org.eclipse.emf.ecore.resource.ResourceSet; >+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; >+import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory; >+import org.eclipse.gmf.runtime.notation.Edge; >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.jface.viewers.Viewer; >+import org.eclipse.ui.IMemento; >+import org.eclipse.ui.navigator.ICommonContentExtensionSite; >+import org.eclipse.ui.navigator.ICommonContentProvider; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClass2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Class2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Class3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintConstrainedElementEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataType2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Dependency2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyClientEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencySupplierEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Enumeration2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationLiteralEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.GeneralizationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecification2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceRealizationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.LiteralStringEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.OperationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Package2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Package3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PortEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveType2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property6EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PropertyEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.SlotEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.UsageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class UMLNavigatorContentProvider implements ICommonContentProvider { >+ >+ /** >+ * @generated >+ */ >+ private static final Object[] EMPTY_ARRAY = new Object[0]; >+ >+ /** >+ * @generated >+ */ >+ public void dispose() { >+ } >+ >+ /** >+ * @generated >+ */ >+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { >+ } >+ >+ /** >+ * @generated >+ */ >+ public Object[] getElements(Object inputElement) { >+ return getChildren(inputElement); >+ } >+ >+ /** >+ * @generated >+ */ >+ public Object[] getChildren(Object parentElement) { >+ if (parentElement instanceof UMLAbstractNavigatorItem) { >+ UMLAbstractNavigatorItem abstractNavigatorItem = (UMLAbstractNavigatorItem) parentElement; >+ if (!PackageEditPart.MODEL_ID.equals(abstractNavigatorItem.getModelID())) { >+ return EMPTY_ARRAY; >+ } >+ >+ if (abstractNavigatorItem instanceof UMLNavigatorItem) { >+ UMLNavigatorItem navigatorItem = (UMLNavigatorItem) abstractNavigatorItem; >+ switch (navigatorItem.getVisualID()) { >+ case Package2EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Package3EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(InstanceSpecificationEditPart.VISUAL_ID), navigatorItem)); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case Class2EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(PropertyEditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(OperationEditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(PortEditPart.VISUAL_ID), navigatorItem)); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceRealizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case AssociationClass2EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Property2EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Operation2EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), navigatorItem)); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceRealizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case DataType2EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Property3EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Operation3EditPart.VISUAL_ID), navigatorItem)); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case PrimitiveType2EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Property4EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Operation4EditPart.VISUAL_ID), navigatorItem)); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case Enumeration2EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(EnumerationLiteralEditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Property5EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Operation5EditPart.VISUAL_ID), navigatorItem)); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case InterfaceEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceRealizationEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case ConstraintEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(LiteralStringEditPart.VISUAL_ID), navigatorItem)); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case InstanceSpecification2EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(SlotEditPart.VISUAL_ID), navigatorItem)); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case DependencyEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case Package3EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case ClassEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceRealizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case DataTypeEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case PrimitiveTypeEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case EnumerationEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case AssociationClassEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceRealizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case InstanceSpecificationEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case PropertyEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case OperationEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case Class3EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceRealizationEditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case PortEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case Property2EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case Operation2EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case Property3EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case Operation3EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case Property4EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case Operation4EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case EnumerationLiteralEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case Property5EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case Operation5EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case LiteralStringEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), false, incominglinks)); >+ UMLNavigatorGroup outgoinglinks = new UMLNavigatorGroup("outgoing links", "icons/outgoingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), true, outgoinglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), false, incominglinks)); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), false, incominglinks)); >+ outgoinglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), true, outgoinglinks)); >+ if (!outgoinglinks.isEmpty()) { >+ result.add(outgoinglinks); >+ } >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case SlotEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup incominglinks = new UMLNavigatorGroup("incoming links", "icons/incomingLinksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ incominglinks.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), false, incominglinks)); >+ if (!incominglinks.isEmpty()) { >+ result.add(incominglinks); >+ } >+ return result.toArray(); >+ } >+ case PackageEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Package2EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(DataType2EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(PrimitiveType2EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(Enumeration2EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(InstanceSpecification2EditPart.VISUAL_ID), navigatorItem)); >+ result.addAll(getChildByType(navigatorItem.getView().getChildren(), UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID), navigatorItem)); >+ UMLNavigatorGroup links = new UMLNavigatorGroup("links", "icons/linksNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ links.addChildren(getViewByType(navigatorItem.getView().getDiagram().getEdges(), UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID), links)); >+ links.addChildren(getViewByType(navigatorItem.getView().getDiagram().getEdges(), UMLVisualIDRegistry.getType(Dependency2EditPart.VISUAL_ID), links)); >+ links.addChildren(getViewByType(navigatorItem.getView().getDiagram().getEdges(), UMLVisualIDRegistry.getType(Property6EditPart.VISUAL_ID), links)); >+ links.addChildren(getViewByType(navigatorItem.getView().getDiagram().getEdges(), UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID), links)); >+ links.addChildren(getViewByType(navigatorItem.getView().getDiagram().getEdges(), UMLVisualIDRegistry.getType(AssociationEditPart.VISUAL_ID), links)); >+ links.addChildren(getViewByType(navigatorItem.getView().getDiagram().getEdges(), UMLVisualIDRegistry.getType(DependencySupplierEditPart.VISUAL_ID), links)); >+ links.addChildren(getViewByType(navigatorItem.getView().getDiagram().getEdges(), UMLVisualIDRegistry.getType(DependencyClientEditPart.VISUAL_ID), links)); >+ links.addChildren(getViewByType(navigatorItem.getView().getDiagram().getEdges(), UMLVisualIDRegistry.getType(InterfaceRealizationEditPart.VISUAL_ID), links)); >+ links.addChildren(getViewByType(navigatorItem.getView().getDiagram().getEdges(), UMLVisualIDRegistry.getType(UsageEditPart.VISUAL_ID), links)); >+ if (!links.isEmpty()) { >+ result.add(links); >+ } >+ return result.toArray(); >+ } >+ case GeneralizationEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup target = new UMLNavigatorGroup("target", "icons/linkTargetNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Enumeration2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), true, target)); >+ UMLNavigatorGroup source = new UMLNavigatorGroup("source", "icons/linkSourceNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataType2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveType2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Enumeration2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), false, source)); >+ if (!target.isEmpty()) { >+ result.add(target); >+ } >+ if (!source.isEmpty()) { >+ result.add(source); >+ } >+ return result.toArray(); >+ } >+ case Dependency2EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup target = new UMLNavigatorGroup("target", "icons/linkTargetNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Enumeration2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecification2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecificationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PropertyEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(OperationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PortEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property4EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation4EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationLiteralEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property5EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation5EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(LiteralStringEditPart.VISUAL_ID), true, target)); >+ UMLNavigatorGroup source = new UMLNavigatorGroup("source", "icons/linkSourceNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataType2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveType2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Enumeration2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecification2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package3EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecificationEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PropertyEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(OperationEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PortEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property3EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation3EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property4EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation4EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationLiteralEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property5EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation5EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(LiteralStringEditPart.VISUAL_ID), false, source)); >+ if (!target.isEmpty()) { >+ result.add(target); >+ } >+ if (!source.isEmpty()) { >+ result.add(source); >+ } >+ return result.toArray(); >+ } >+ case Property6EditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup target = new UMLNavigatorGroup("target", "icons/linkTargetNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Enumeration2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), true, target)); >+ UMLNavigatorGroup source = new UMLNavigatorGroup("source", "icons/linkSourceNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), false, source)); >+ if (!target.isEmpty()) { >+ result.add(target); >+ } >+ if (!source.isEmpty()) { >+ result.add(source); >+ } >+ return result.toArray(); >+ } >+ case ConstraintConstrainedElementEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup target = new UMLNavigatorGroup("target", "icons/linkTargetNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Enumeration2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecification2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecificationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PropertyEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(OperationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PortEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property4EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation4EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationLiteralEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property5EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation5EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(LiteralStringEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(SlotEditPart.VISUAL_ID), true, target)); >+ UMLNavigatorGroup source = new UMLNavigatorGroup("source", "icons/linkSourceNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID), false, source)); >+ if (!target.isEmpty()) { >+ result.add(target); >+ } >+ if (!source.isEmpty()) { >+ result.add(source); >+ } >+ return result.toArray(); >+ } >+ case AssociationEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup target = new UMLNavigatorGroup("target", "icons/linkTargetNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Enumeration2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), true, target)); >+ UMLNavigatorGroup source = new UMLNavigatorGroup("source", "icons/linkSourceNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataType2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveType2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Enumeration2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), false, source)); >+ if (!target.isEmpty()) { >+ result.add(target); >+ } >+ if (!source.isEmpty()) { >+ result.add(source); >+ } >+ return result.toArray(); >+ } >+ case DependencySupplierEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup target = new UMLNavigatorGroup("target", "icons/linkTargetNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Enumeration2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecification2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecificationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PropertyEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(OperationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PortEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property4EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation4EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationLiteralEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property5EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation5EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(LiteralStringEditPart.VISUAL_ID), true, target)); >+ UMLNavigatorGroup source = new UMLNavigatorGroup("source", "icons/linkSourceNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID), false, source)); >+ if (!target.isEmpty()) { >+ result.add(target); >+ } >+ if (!source.isEmpty()) { >+ result.add(source); >+ } >+ return result.toArray(); >+ } >+ case DependencyClientEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup target = new UMLNavigatorGroup("target", "icons/linkTargetNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Enumeration2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecification2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecificationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PropertyEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(OperationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PortEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property4EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation4EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationLiteralEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property5EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation5EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(LiteralStringEditPart.VISUAL_ID), true, target)); >+ UMLNavigatorGroup source = new UMLNavigatorGroup("source", "icons/linkSourceNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID), false, source)); >+ if (!target.isEmpty()) { >+ result.add(target); >+ } >+ if (!source.isEmpty()) { >+ result.add(source); >+ } >+ return result.toArray(); >+ } >+ case InterfaceRealizationEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup target = new UMLNavigatorGroup("target", "icons/linkTargetNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), true, target)); >+ UMLNavigatorGroup source = new UMLNavigatorGroup("source", "icons/linkSourceNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), false, source)); >+ if (!target.isEmpty()) { >+ result.add(target); >+ } >+ if (!source.isEmpty()) { >+ result.add(source); >+ } >+ return result.toArray(); >+ } >+ case UsageEditPart.VISUAL_ID: { >+ Collection result = new ArrayList(); >+ UMLNavigatorGroup target = new UMLNavigatorGroup("target", "icons/linkTargetNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveType2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Enumeration2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecification2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecificationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PropertyEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(OperationEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PortEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation2EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation3EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property4EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation4EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationLiteralEditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property5EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation5EditPart.VISUAL_ID), true, target)); >+ target.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(LiteralStringEditPart.VISUAL_ID), true, target)); >+ UMLNavigatorGroup source = new UMLNavigatorGroup("source", "icons/linkSourceNavigatorGroup.gif", PackageEditPart.MODEL_ID, navigatorItem); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClass2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataType2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveType2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Enumeration2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecification2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Package3EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(InstanceSpecificationEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PropertyEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(OperationEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(PortEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation2EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property3EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation3EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property4EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation4EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(EnumerationLiteralEditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Property5EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(Operation5EditPart.VISUAL_ID), false, source)); >+ source.addChildren(getConnectedViews(navigatorItem.getView(), UMLVisualIDRegistry.getType(LiteralStringEditPart.VISUAL_ID), false, source)); >+ if (!target.isEmpty()) { >+ result.add(target); >+ } >+ if (!source.isEmpty()) { >+ result.add(source); >+ } >+ return result.toArray(); >+ } >+ } >+ } else if (abstractNavigatorItem instanceof UMLNavigatorGroup) { >+ UMLNavigatorGroup group = (UMLNavigatorGroup) parentElement; >+ return group.getChildren(); >+ } >+ } else if (parentElement instanceof IFile) { >+ IFile file = (IFile) parentElement; >+ AdapterFactoryEditingDomain editingDomain = (AdapterFactoryEditingDomain) GMFEditingDomainFactory.INSTANCE.createEditingDomain(); >+ editingDomain.setResourceToReadOnlyMap(new HashMap() { >+ >+ public Object get(Object key) { >+ if (!containsKey(key)) { >+ put(key, Boolean.TRUE); >+ } >+ return super.get(key); >+ } >+ }); >+ ResourceSet resourceSet = editingDomain.getResourceSet(); >+ >+ URI fileURI = URI.createPlatformResourceURI(file.getFullPath().toString()); >+ Resource resource = resourceSet.getResource(fileURI, true); >+ >+ Collection result = new ArrayList(); >+ result.addAll(getViewByType(resource.getContents(), PackageEditPart.MODEL_ID, file)); >+ return result.toArray(); >+ } >+ return EMPTY_ARRAY; >+ } >+ >+ /** >+ * @generated >+ */ >+ public Object getParent(Object element) { >+ if (element instanceof UMLAbstractNavigatorItem) { >+ UMLAbstractNavigatorItem abstractNavigatorItem = (UMLAbstractNavigatorItem) element; >+ if (!PackageEditPart.MODEL_ID.equals(abstractNavigatorItem.getModelID())) { >+ return null; >+ } >+ return abstractNavigatorItem.getParent(); >+ } >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean hasChildren(Object element) { >+ return element instanceof IFile || getChildren(element).length > 0; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void init(ICommonContentExtensionSite aConfig) { >+ } >+ >+ /** >+ * @generated >+ */ >+ public void restoreState(IMemento aMemento) { >+ } >+ >+ /** >+ * @generated >+ */ >+ public void saveState(IMemento aMemento) { >+ } >+ >+ /** >+ * @generated >+ */ >+ private Collection getViewByType(Collection childViews, String type, Object parent) { >+ Collection result = new ArrayList(); >+ for (Iterator it = childViews.iterator(); it.hasNext();) { >+ Object next = it.next(); >+ if (false == next instanceof View) { >+ continue; >+ } >+ View nextView = (View) next; >+ if (type.equals(nextView.getType())) { >+ result.add(new UMLNavigatorItem(nextView, parent)); >+ } >+ } >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private Collection getChildByType(Collection childViews, String type, Object parent) { >+ Collection result = new ArrayList(); >+ List children = new ArrayList(childViews); >+ for (int i = 0; i < children.size(); i++) { >+ if (false == children.get(i) instanceof View) { >+ continue; >+ } >+ View nextChild = (View) children.get(i); >+ if (type.equals(nextChild.getType())) { >+ result.add(new UMLNavigatorItem(nextChild, parent)); >+ } else if (!stopGettingChildren(nextChild, type)) { >+ children.addAll(nextChild.getChildren()); >+ } >+ } >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private boolean stopGettingChildren(View child, String type) { >+ return false; >+ } >+ >+ /** >+ * @generated >+ */ >+ private Collection getConnectedViews(View rootView, String type, boolean isOutTarget, Object parent) { >+ Collection result = new ArrayList(); >+ List connectedViews = new ArrayList(); >+ connectedViews.add(rootView); >+ Set visitedViews = new HashSet(); >+ for (int i = 0; i < connectedViews.size(); i++) { >+ View nextView = (View) connectedViews.get(i); >+ if (visitedViews.contains(nextView)) { >+ continue; >+ } >+ visitedViews.add(nextView); >+ if (type.equals(nextView.getType()) && nextView != rootView) { >+ result.add(new UMLNavigatorItem(nextView, parent)); >+ } else { >+ if (isOutTarget && !stopGettingOutTarget(nextView, rootView, type)) { >+ connectedViews.addAll(nextView.getSourceEdges()); >+ if (nextView instanceof Edge) { >+ connectedViews.add(((Edge) nextView).getTarget()); >+ } >+ } >+ if (!isOutTarget && !stopGettingInSource(nextView, rootView, type)) { >+ connectedViews.addAll(nextView.getTargetEdges()); >+ if (nextView instanceof Edge) { >+ connectedViews.add(((Edge) nextView).getSource()); >+ } >+ } >+ } >+ } >+ return result; >+ } >+ >+ /** >+ * @generated >+ */ >+ private boolean stopGettingInSource(View nextView, View rootView, String type) { >+ return !isOneHopConnection(nextView, rootView); >+ } >+ >+ /** >+ * @generated >+ */ >+ private boolean stopGettingOutTarget(View nextView, View rootView, String type) { >+ return !isOneHopConnection(nextView, rootView); >+ } >+ >+ /** >+ * @generated >+ */ >+ private boolean isOneHopConnection(View targetView, View sourceView) { >+ if (sourceView == targetView) { >+ return true; >+ } >+ if (sourceView instanceof Node) { >+ return targetView instanceof Edge; >+ } >+ if (sourceView instanceof Edge) { >+ return targetView instanceof Node; >+ } >+ return false; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLCreationWizardPage.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLCreationWizardPage.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLCreationWizardPage.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLCreationWizardPage.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,111 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import java.io.ByteArrayInputStream; >+import java.io.InputStream; >+ >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.ui.dialogs.WizardNewFileCreationPage; >+ >+import org.eclipse.core.resources.ResourcesPlugin; >+ >+/** >+ * @generated >+ */ >+public class UMLCreationWizardPage extends WizardNewFileCreationPage { >+ >+ /** >+ * @generated >+ */ >+ private static final String DOMAIN_EXT = ".uml"; //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ private static final String DIAGRAM_EXT = ".umlclass_diagram"; //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public UMLCreationWizardPage(String pageName, IStructuredSelection selection) { >+ super(pageName, selection); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected String getDefaultFileName() { >+ return "default"; //$NON-NLS-1$ >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getFileName() { >+ String fileName = super.getFileName(); >+ if (fileName != null && !fileName.endsWith(DIAGRAM_EXT)) { >+ fileName += DIAGRAM_EXT; >+ } >+ return fileName; >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getUniqueFileName(IPath containerPath, String fileName) { >+ String newFileName = fileName; >+ IPath diagramFilePath = containerPath.append(newFileName + DIAGRAM_EXT); >+ IPath modelFilePath = containerPath.append(newFileName + DOMAIN_EXT); >+ int i = 1; >+ while (exists(diagramFilePath) || exists(modelFilePath)) { >+ i++; >+ newFileName = fileName + i; >+ diagramFilePath = containerPath.append(newFileName + DIAGRAM_EXT); >+ modelFilePath = containerPath.append(newFileName + DOMAIN_EXT); >+ } >+ return newFileName; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void createControl(Composite parent) { >+ super.createControl(parent); >+ IPath path = getContainerFullPath(); >+ if (path != null) { >+ String fileName = getUniqueFileName(path, getDefaultFileName()); >+ setFileName(fileName); >+ } else { >+ setFileName(getDefaultFileName()); >+ } >+ setPageComplete(validatePage()); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected boolean validatePage() { >+ if (super.validatePage()) { >+ String fileName = getFileName(); >+ if (fileName == null) { >+ return false; >+ } >+ fileName = fileName.substring(0, fileName.length() - DIAGRAM_EXT.length()) + DOMAIN_EXT; >+ IPath path = getContainerFullPath().append(fileName); >+ if (exists(path)) { >+ setErrorMessage("Model file already exists: " + path.lastSegment()); >+ return false; >+ } >+ return true; >+ } >+ return false; >+ } >+ >+ /** >+ * @generated >+ */ >+ public static boolean exists(IPath path) { >+ return ResourcesPlugin.getWorkspace().getRoot().exists(path); >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/association-name.jj >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/association-name.jj >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/association-name.jj >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/association-name.jj 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,201 @@ >+options { >+ JAVA_UNICODE_ESCAPE = true; >+ STATIC=false; >+} >+ >+PARSER_BEGIN(AssociationNameParser) >+ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.name; >+ >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class AssociationNameParser extends ExternalParserBase { >+ private Association mySubject; >+ >+ public AssociationNameParser(){ >+ this(new StringReader("")); >+ } >+ >+ public AssociationNameParser(LookupSuite lookup){ >+ this(); >+ setLookupSuite(lookup); >+ } >+ >+ public EClass getSubjectClass(){ >+ return UMLPackage.eINSTANCE.getAssociation(); >+ } >+ >+ public void parse(EObject target, String text) throws ExternalParserException { >+ checkContext(); >+ ReInit(new StringReader(text)); >+ mySubject = (Association)target; >+ Declaration(); >+ mySubject = null; >+ } >+ >+ protected static int parseInt(Token t) throws ParseException { >+ if (t.kind != AssociationNameParserConstants.INTEGER_LITERAL){ >+ throw new IllegalStateException("Token: " + t + ", image: " + t.image); >+ } >+ try { >+ return Integer.parseInt(t.image); //XXX: "0005", "99999999999999999999999" >+ } catch (NumberFormatException e){ >+ throw new ParseException("Not supported integer value:" + t.image); >+ } >+ } >+ >+} >+ >+PARSER_END(AssociationNameParser) >+ >+/* WHITE SPACE */ >+ >+SPECIAL_TOKEN : >+{ >+ " " >+| "\t" >+} >+ >+/* SEPARATORS */ >+TOKEN : >+{ >+ < SLASH: "/" > >+| < COLON: ":" > >+| < EQUALS: "=" > >+| < LBRACKET: "[" > >+| < RBRACKET: "]" > >+| < LCURLY: "{" > >+| < RCURLY: "}" > >+| < COMMA: "," > >+} >+ >+/* SPECIAL_MEANING */ >+TOKEN : >+{ >+ < PLUS: "+" > >+| < MINUS: "-" > >+| < NUMBER_SIGN: "#" > >+| < TILDE: "~" > >+| < DOT: "." > >+| < STAR: "*" > >+} >+ >+/* MODIFIERS */ >+TOKEN : >+{ >+ < READ_ONLY: "readOnly" > >+| < UNION: "union" > >+| < SUBSETS: "subsets" > >+| < REDEFINES: "redefines" > >+| < ORDERED: "ordered" > >+| < UNORDERED: "unordered" > >+| < UNIQUE: "unique" > >+| < NON_UNIQUE: "nonunique" > >+} >+ >+/* LITERALS */ >+TOKEN: >+{ >+ < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])* > >+} >+ >+TOKEN : >+{ >+ < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)* > >+| >+ < #LETTER: >+ [ >+ "\u0024", >+ "\u0041"-"\u005a", >+ "\u005f", >+ "\u0061"-"\u007a", >+ "\u00c0"-"\u00d6", >+ "\u00d8"-"\u00f6", >+ "\u00f8"-"\u00ff", >+ "\u0100"-"\u1fff", >+ "\u3040"-"\u318f", >+ "\u3300"-"\u337f", >+ "\u3400"-"\u3d2d", >+ "\u4e00"-"\u9fff", >+ "\uf900"-"\ufaff" >+ ] >+ > >+| >+ < #DIGIT: >+ [ >+ "\u0030"-"\u0039", >+ "\u0660"-"\u0669", >+ "\u06f0"-"\u06f9", >+ "\u0966"-"\u096f", >+ "\u09e6"-"\u09ef", >+ "\u0a66"-"\u0a6f", >+ "\u0ae6"-"\u0aef", >+ "\u0b66"-"\u0b6f", >+ "\u0be7"-"\u0bef", >+ "\u0c66"-"\u0c6f", >+ "\u0ce6"-"\u0cef", >+ "\u0d66"-"\u0d6f", >+ "\u0e50"-"\u0e59", >+ "\u0ed0"-"\u0ed9", >+ "\u1040"-"\u1049" >+ ] >+ > >+} >+ >+void Declaration() : >+{} >+{ >+ ( >+ [ IsDerived() ] >+ AssociationName() >+ ) <EOF> >+} >+ >+void AssociationName() : >+{ >+ String name; >+} >+{ >+ name = NameWithSpaces() >+ { >+ mySubject.setName(name); >+ } >+} >+ >+void IsDerived() : >+{} >+{ >+ <SLASH> { mySubject.setIsDerived(true); } >+} >+ >+String NameWithSpaces() : >+{ >+ StringBuffer result = new StringBuffer(); >+ Token t; >+} >+{ >+ ( >+ t = <IDENTIFIER> { result.append(t.image); } >+ ( t = <IDENTIFIER> { result.append(' '); result.append(t.image); } ) * >+ ) >+ { >+ return result.toString(); >+ } >+} >+ >Index: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorGroup.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorGroup.java >diff -N src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorGroup.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorGroup.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,103 @@ >+package org.eclipse.uml2.diagram.clazz.navigator; >+ >+import java.util.Collection; >+import java.util.LinkedList; >+ >+/** >+ * @generated >+ */ >+public class UMLNavigatorGroup extends UMLAbstractNavigatorItem { >+ >+ /** >+ * @generated >+ */ >+ private String myGroupName; >+ >+ /** >+ * @generated >+ */ >+ private String myIcon; >+ >+ /** >+ * @generated >+ */ >+ private String myModelID; >+ >+ /** >+ * @generated >+ */ >+ private Collection myChildren = new LinkedList(); >+ >+ /** >+ * @generated >+ */ >+ UMLNavigatorGroup(String groupName, String icon, String modelID, Object parent) { >+ super(parent); >+ myGroupName = groupName; >+ myIcon = icon; >+ myModelID = modelID; >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getGroupName() { >+ return myGroupName; >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getIcon() { >+ return myIcon; >+ } >+ >+ /** >+ * @generated >+ */ >+ public Object[] getChildren() { >+ return myChildren.toArray(); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void addChildren(Collection children) { >+ myChildren.addAll(children); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void addChild(Object child) { >+ myChildren.add(child); >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean isEmpty() { >+ return myChildren.size() == 0; >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getModelID() { >+ return myModelID; >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean equals(Object obj) { >+ if (obj instanceof UMLNavigatorGroup) { >+ UMLNavigatorGroup anotherGroup = (UMLNavigatorGroup) obj; >+ if (getGroupName().equals(anotherGroup.getGroupName())) { >+ return getParent().equals(anotherGroup.getParent()); >+ } >+ } >+ return super.equals(obj); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecification2ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecification2ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecification2ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecification2ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,54 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationSlotsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class InstanceSpecification2ViewFactory extends AbstractShapeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createDescriptionStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFillStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecification2EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(InstanceSpecificationNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(InstanceSpecificationSlotsEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencyEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencyEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencyEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencyEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class DependencyEditHelper extends UMLBaseEditHelper { >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationToString.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationToString.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationToString.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationToString.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,91 @@ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+ >+package org.eclipse.uml2.diagram.clazz.parser.instance; >+ >+import java.util.Arrays; >+import java.util.Iterator; >+import java.util.LinkedList; >+import java.util.List; >+ >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.uml2.diagram.parser.AbstractToString; >+import org.eclipse.uml2.uml.Classifier; >+import org.eclipse.uml2.uml.InstanceSpecification; >+import org.eclipse.uml2.uml.UMLPackage; >+ >+public abstract class InstanceSpecificationToString extends AbstractToString { >+ >+ public String getToString(EObject object, int flags) { >+ InstanceSpecification instance = asInstanceSpecification(object); >+ StringBuffer result = new StringBuffer(); >+ appendName(result, instance); >+ appendType(result, getClassifiers(instance)); >+ >+ //anonymous unnamed, see 7.3.22 "Notation" at page 85, 06-04-02 >+ if (result.length() == 0){ >+ result.append(":"); >+ } >+ return result.toString(); >+ } >+ >+ protected final String getClassifiers(InstanceSpecification instance) { >+ StringBuffer result = new StringBuffer(); >+ boolean atLeastOneClassifier = false; >+ for (Iterator classifiers = instance.getClassifiers().iterator(); classifiers.hasNext();){ >+ Classifier next = (Classifier)classifiers.next(); >+ if (atLeastOneClassifier){ >+ result.append(", "); >+ } >+ String nextName = next.getName(); >+ if (!isEmpty(nextName)){ >+ atLeastOneClassifier = true; >+ result.append(nextName); >+ } >+ } >+ return result.toString(); >+ } >+ >+ protected InstanceSpecification asInstanceSpecification(EObject object){ >+ if (false == object instanceof InstanceSpecification){ >+ throw new IllegalStateException("I can not provide toString for: " + object); >+ } >+ return (InstanceSpecification)object; >+ } >+ >+ public static class EDIT extends InstanceSpecificationToString { >+ public boolean isAffectingFeature(EStructuralFeature feature) { >+ throw new UnsupportedOperationException("I am edit toString, I am not expected to be asked"); >+ } >+ } >+ >+ public static class VIEW extends InstanceSpecificationToString implements WithReferences { >+ private static final List AFFECTING = Arrays.asList(new EStructuralFeature[] { >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLPackage.eINSTANCE.getInstanceSpecification_Classifier(), >+ }); >+ >+ public boolean isAffectingFeature(EStructuralFeature feature) { >+ return AFFECTING.contains(feature); >+ } >+ >+ public List getAdditionalReferencedElements(EObject object) { >+ InstanceSpecification instance = asInstanceSpecification(object); >+ List result = new LinkedList(); >+ result.add(instance); >+ result.addAll(instance.getClassifiers()); >+ return result; >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/TokenMgrError.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/TokenMgrError.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/TokenMgrError.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/TokenMgrError.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,144 @@ >+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.name; >+ >+public class TokenMgrError extends Error >+{ >+ /* >+ * Ordinals for various reasons why an Error of this type can be thrown. >+ */ >+ >+ /** >+ * Lexical error occured. >+ */ >+ static final int LEXICAL_ERROR = 0; >+ >+ /** >+ * An attempt wass made to create a second instance of a static token manager. >+ */ >+ static final int STATIC_LEXER_ERROR = 1; >+ >+ /** >+ * Tried to change to an invalid lexical state. >+ */ >+ static final int INVALID_LEXICAL_STATE = 2; >+ >+ /** >+ * Detected (and bailed out of) an infinite loop in the token manager. >+ */ >+ static final int LOOP_DETECTED = 3; >+ >+ /** >+ * Indicates the reason why the exception is thrown. It will have >+ * one of the above 4 values. >+ */ >+ int errorCode; >+ >+ /** >+ * Replaces unprintable characters by their espaced (or unicode escaped) >+ * equivalents in the given string >+ */ >+ protected static final String addEscapes(String str) { >+ StringBuffer retval = new StringBuffer(); >+ char ch; >+ for (int i = 0; i < str.length(); i++) { >+ switch (str.charAt(i)) >+ { >+ case 0 : >+ continue; >+ case '\b': >+ retval.append("\\b"); >+ continue; >+ case '\t': >+ retval.append("\\t"); >+ continue; >+ case '\n': >+ retval.append("\\n"); >+ continue; >+ case '\f': >+ retval.append("\\f"); >+ continue; >+ case '\r': >+ retval.append("\\r"); >+ continue; >+ case '\"': >+ retval.append("\\\""); >+ continue; >+ case '\'': >+ retval.append("\\\'"); >+ continue; >+ case '\\': >+ retval.append("\\\\"); >+ continue; >+ default: >+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { >+ String s = "0000" + Integer.toString(ch, 16); >+ retval.append("\\u" + s.substring(s.length() - 4, s.length())); >+ } else { >+ retval.append(ch); >+ } >+ continue; >+ } >+ } >+ return retval.toString(); >+ } >+ >+ /** >+ * Returns a detailed message for the Error when it is thrown by the >+ * token manager to indicate a lexical error. >+ * Parameters : >+ * EOFSeen : indicates if EOF caused the lexicl error >+ * curLexState : lexical state in which this error occured >+ * errorLine : line number when the error occured >+ * errorColumn : column number when the error occured >+ * errorAfter : prefix that was seen before this error occured >+ * curchar : the offending character >+ * Note: You can customize the lexical error message by modifying this method. >+ */ >+ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { >+ return("Lexical error at line " + >+ errorLine + ", column " + >+ errorColumn + ". Encountered: " + >+ (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + >+ "after : \"" + addEscapes(errorAfter) + "\""); >+ } >+ >+ /** >+ * You can also modify the body of this method to customize your error messages. >+ * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not >+ * of end-users concern, so you can return something like : >+ * >+ * "Internal Error : Please file a bug report .... " >+ * >+ * from this method for such cases in the release version of your parser. >+ */ >+ public String getMessage() { >+ return super.getMessage(); >+ } >+ >+ /* >+ * Constructors of various flavors follow. >+ */ >+ >+ public TokenMgrError() { >+ } >+ >+ public TokenMgrError(String message, int reason) { >+ super(message); >+ errorCode = reason; >+ } >+ >+ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { >+ this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Property4ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Property4ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Property4ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Property4ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Property4ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Property4EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassNameViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassNameViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassNameViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassNameViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class AssociationClassNameViewFactory extends BasicNodeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/Token.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/Token.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/property/Token.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/property/Token.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,81 @@ >+/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ >+package org.eclipse.uml2.diagram.clazz.parser.property; >+ >+/** >+ * Describes the input token stream. >+ */ >+ >+public class Token { >+ >+ /** >+ * An integer that describes the kind of this token. This numbering >+ * system is determined by JavaCCParser, and a table of these numbers is >+ * stored in the file ...Constants.java. >+ */ >+ public int kind; >+ >+ /** >+ * beginLine and beginColumn describe the position of the first character >+ * of this token; endLine and endColumn describe the position of the >+ * last character of this token. >+ */ >+ public int beginLine, beginColumn, endLine, endColumn; >+ >+ /** >+ * The string image of the token. >+ */ >+ public String image; >+ >+ /** >+ * A reference to the next regular (non-special) token from the input >+ * stream. If this is the last token from the input stream, or if the >+ * token manager has not read tokens beyond this one, this field is >+ * set to null. This is true only if this token is also a regular >+ * token. Otherwise, see below for a description of the contents of >+ * this field. >+ */ >+ public Token next; >+ >+ /** >+ * This field is used to access special tokens that occur prior to this >+ * token, but after the immediately preceding regular (non-special) token. >+ * If there are no such special tokens, this field is set to null. >+ * When there are more than one such special token, this field refers >+ * to the last of these special tokens, which in turn refers to the next >+ * previous special token through its specialToken field, and so on >+ * until the first special token (whose specialToken field is null). >+ * The next fields of special tokens refer to other special tokens that >+ * immediately follow it (without an intervening regular token). If there >+ * is no such token, this field is null. >+ */ >+ public Token specialToken; >+ >+ /** >+ * Returns the image. >+ */ >+ public String toString() >+ { >+ return image; >+ } >+ >+ /** >+ * Returns a new Token object, by default. However, if you want, you >+ * can create and return subclass objects based on the value of ofKind. >+ * Simply add the cases to the switch for all those special cases. >+ * For example, if you have a subclass of Token called IDToken that >+ * you want to create if ofKind is ID, simlpy add something like : >+ * >+ * case MyParserConstants.ID : return new IDToken(); >+ * >+ * to the following switch statement. Then you can cast matchedToken >+ * variable to the appropriate type and use it in your lexical actions. >+ */ >+ public static final Token newToken(int ofKind) >+ { >+ switch(ofKind) >+ { >+ default : return new Token(); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PackageNameViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PackageNameViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PackageNameViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PackageNameViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class PackageNameViewFactory extends BasicNodeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/Token.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/Token.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/Token.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/Token.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,92 @@ >+/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.slot; >+ >+/** >+ * Describes the input token stream. >+ */ >+ >+public class Token { >+ >+ /** >+ * An integer that describes the kind of this token. This numbering >+ * system is determined by JavaCCParser, and a table of these numbers is >+ * stored in the file ...Constants.java. >+ */ >+ public int kind; >+ >+ /** >+ * beginLine and beginColumn describe the position of the first character >+ * of this token; endLine and endColumn describe the position of the >+ * last character of this token. >+ */ >+ public int beginLine, beginColumn, endLine, endColumn; >+ >+ /** >+ * The string image of the token. >+ */ >+ public String image; >+ >+ /** >+ * A reference to the next regular (non-special) token from the input >+ * stream. If this is the last token from the input stream, or if the >+ * token manager has not read tokens beyond this one, this field is >+ * set to null. This is true only if this token is also a regular >+ * token. Otherwise, see below for a description of the contents of >+ * this field. >+ */ >+ public Token next; >+ >+ /** >+ * This field is used to access special tokens that occur prior to this >+ * token, but after the immediately preceding regular (non-special) token. >+ * If there are no such special tokens, this field is set to null. >+ * When there are more than one such special token, this field refers >+ * to the last of these special tokens, which in turn refers to the next >+ * previous special token through its specialToken field, and so on >+ * until the first special token (whose specialToken field is null). >+ * The next fields of special tokens refer to other special tokens that >+ * immediately follow it (without an intervening regular token). If there >+ * is no such token, this field is null. >+ */ >+ public Token specialToken; >+ >+ /** >+ * Returns the image. >+ */ >+ public String toString() >+ { >+ return image; >+ } >+ >+ /** >+ * Returns a new Token object, by default. However, if you want, you >+ * can create and return subclass objects based on the value of ofKind. >+ * Simply add the cases to the switch for all those special cases. >+ * For example, if you have a subclass of Token called IDToken that >+ * you want to create if ofKind is ID, simlpy add something like : >+ * >+ * case MyParserConstants.ID : return new IDToken(); >+ * >+ * to the following switch statement. Then you can cast matchedToken >+ * variable to the appropriate type and use it in your lexical actions. >+ */ >+ public static final Token newToken(int ofKind) >+ { >+ switch(ofKind) >+ { >+ default : return new Token(); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PrimitiveTypeEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PrimitiveTypeEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/PrimitiveTypeEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/PrimitiveTypeEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class PrimitiveTypeEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Property3ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Property3ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Property3ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Property3ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Property3ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Property3EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/ClassClassesViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/ClassClassesViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/ClassClassesViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/ClassClassesViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class ClassClassesViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.ClassClassesEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Property6ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Property6ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Property6ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Property6ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,51 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ConnectionViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PropertyNameEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Property6ViewFactory extends ConnectionViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createRoutingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Property6EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(PropertyNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/ParseException.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/ParseException.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/ParseException.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/ParseException.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,205 @@ >+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.slot; >+ >+import org.eclipse.uml2.diagram.parser.ExternalParserException; >+ >+/** >+ * This exception is thrown when parse errors are encountered. >+ * You can explicitly create objects of this exception type by >+ * calling the method generateParseException in the generated >+ * parser. >+ * >+ * You can modify this class to customize your error reporting >+ * mechanisms so long as you retain the public fields. >+ */ >+public class ParseException extends ExternalParserException { >+ >+ /** >+ * This constructor is used by the method "generateParseException" >+ * in the generated parser. Calling this constructor generates >+ * a new object of this type with the fields "currentToken", >+ * "expectedTokenSequences", and "tokenImage" set. The boolean >+ * flag "specialConstructor" is also set to true to indicate that >+ * this constructor was used to create this object. >+ * This constructor calls its super class with the empty string >+ * to force the "toString" method of parent class "Throwable" to >+ * print the error message in the form: >+ * ParseException: <result of getMessage> >+ */ >+ public ParseException(Token currentTokenVal, >+ int[][] expectedTokenSequencesVal, >+ String[] tokenImageVal >+ ) >+ { >+ super(""); >+ specialConstructor = true; >+ currentToken = currentTokenVal; >+ expectedTokenSequences = expectedTokenSequencesVal; >+ tokenImage = tokenImageVal; >+ } >+ >+ /** >+ * The following constructors are for use by you for whatever >+ * purpose you can think of. Constructing the exception in this >+ * manner makes the exception behave in the normal way - i.e., as >+ * documented in the class "Throwable". The fields "errorToken", >+ * "expectedTokenSequences", and "tokenImage" do not contain >+ * relevant information. The JavaCC generated code does not use >+ * these constructors. >+ */ >+ >+ public ParseException() { >+ super(); >+ specialConstructor = false; >+ } >+ >+ public ParseException(String message) { >+ super(message); >+ specialConstructor = false; >+ } >+ >+ /** >+ * This variable determines which constructor was used to create >+ * this object and thereby affects the semantics of the >+ * "getMessage" method (see below). >+ */ >+ protected boolean specialConstructor; >+ >+ /** >+ * This is the last token that has been consumed successfully. If >+ * this object has been created due to a parse error, the token >+ * followng this token will (therefore) be the first error token. >+ */ >+ public Token currentToken; >+ >+ /** >+ * Each entry in this array is an array of integers. Each array >+ * of integers represents a sequence of tokens (by their ordinal >+ * values) that is expected at this point of the parse. >+ */ >+ public int[][] expectedTokenSequences; >+ >+ /** >+ * This is a reference to the "tokenImage" array of the generated >+ * parser within which the parse error occurred. This array is >+ * defined in the generated ...Constants interface. >+ */ >+ public String[] tokenImage; >+ >+ /** >+ * This method has the standard behavior when this object has been >+ * created using the standard constructors. Otherwise, it uses >+ * "currentToken" and "expectedTokenSequences" to generate a parse >+ * error message and returns it. If this object has been created >+ * due to a parse error, and you do not catch it (it gets thrown >+ * from the parser), then this method is called during the printing >+ * of the final stack trace, and hence the correct error message >+ * gets displayed. >+ */ >+ public String getMessage() { >+ if (!specialConstructor) { >+ return super.getMessage(); >+ } >+ String expected = ""; >+ int maxSize = 0; >+ for (int i = 0; i < expectedTokenSequences.length; i++) { >+ if (maxSize < expectedTokenSequences[i].length) { >+ maxSize = expectedTokenSequences[i].length; >+ } >+ for (int j = 0; j < expectedTokenSequences[i].length; j++) { >+ expected += tokenImage[expectedTokenSequences[i][j]] + " "; >+ } >+ if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { >+ expected += "..."; >+ } >+ expected += eol + " "; >+ } >+ String retval = "Encountered \""; >+ Token tok = currentToken.next; >+ for (int i = 0; i < maxSize; i++) { >+ if (i != 0) retval += " "; >+ if (tok.kind == 0) { >+ retval += tokenImage[0]; >+ break; >+ } >+ retval += add_escapes(tok.image); >+ tok = tok.next; >+ } >+ retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; >+ retval += "." + eol; >+ if (expectedTokenSequences.length == 1) { >+ retval += "Was expecting:" + eol + " "; >+ } else { >+ retval += "Was expecting one of:" + eol + " "; >+ } >+ retval += expected; >+ return retval; >+ } >+ >+ /** >+ * The end of line string for this machine. >+ */ >+ protected String eol = System.getProperty("line.separator", "\n"); >+ >+ /** >+ * Used to convert raw characters to their escaped version >+ * when these raw version cannot be used as part of an ASCII >+ * string literal. >+ */ >+ protected String add_escapes(String str) { >+ StringBuffer retval = new StringBuffer(); >+ char ch; >+ for (int i = 0; i < str.length(); i++) { >+ switch (str.charAt(i)) >+ { >+ case 0 : >+ continue; >+ case '\b': >+ retval.append("\\b"); >+ continue; >+ case '\t': >+ retval.append("\\t"); >+ continue; >+ case '\n': >+ retval.append("\\n"); >+ continue; >+ case '\f': >+ retval.append("\\f"); >+ continue; >+ case '\r': >+ retval.append("\\r"); >+ continue; >+ case '\"': >+ retval.append("\\\""); >+ continue; >+ case '\'': >+ retval.append("\\\'"); >+ continue; >+ case '\\': >+ retval.append("\\\\"); >+ continue; >+ default: >+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { >+ String s = "0000" + Integer.toString(ch, 16); >+ retval.append("\\u" + s.substring(s.length() - 4, s.length())); >+ } else { >+ retval.append(ch); >+ } >+ continue; >+ } >+ } >+ return retval.toString(); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Package2EditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Package2EditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/Package2EditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/Package2EditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class Package2EditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/TokenMgrError.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/TokenMgrError.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/property/TokenMgrError.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/property/TokenMgrError.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,133 @@ >+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ >+package org.eclipse.uml2.diagram.clazz.parser.property; >+ >+public class TokenMgrError extends Error >+{ >+ /* >+ * Ordinals for various reasons why an Error of this type can be thrown. >+ */ >+ >+ /** >+ * Lexical error occured. >+ */ >+ static final int LEXICAL_ERROR = 0; >+ >+ /** >+ * An attempt wass made to create a second instance of a static token manager. >+ */ >+ static final int STATIC_LEXER_ERROR = 1; >+ >+ /** >+ * Tried to change to an invalid lexical state. >+ */ >+ static final int INVALID_LEXICAL_STATE = 2; >+ >+ /** >+ * Detected (and bailed out of) an infinite loop in the token manager. >+ */ >+ static final int LOOP_DETECTED = 3; >+ >+ /** >+ * Indicates the reason why the exception is thrown. It will have >+ * one of the above 4 values. >+ */ >+ int errorCode; >+ >+ /** >+ * Replaces unprintable characters by their espaced (or unicode escaped) >+ * equivalents in the given string >+ */ >+ protected static final String addEscapes(String str) { >+ StringBuffer retval = new StringBuffer(); >+ char ch; >+ for (int i = 0; i < str.length(); i++) { >+ switch (str.charAt(i)) >+ { >+ case 0 : >+ continue; >+ case '\b': >+ retval.append("\\b"); >+ continue; >+ case '\t': >+ retval.append("\\t"); >+ continue; >+ case '\n': >+ retval.append("\\n"); >+ continue; >+ case '\f': >+ retval.append("\\f"); >+ continue; >+ case '\r': >+ retval.append("\\r"); >+ continue; >+ case '\"': >+ retval.append("\\\""); >+ continue; >+ case '\'': >+ retval.append("\\\'"); >+ continue; >+ case '\\': >+ retval.append("\\\\"); >+ continue; >+ default: >+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { >+ String s = "0000" + Integer.toString(ch, 16); >+ retval.append("\\u" + s.substring(s.length() - 4, s.length())); >+ } else { >+ retval.append(ch); >+ } >+ continue; >+ } >+ } >+ return retval.toString(); >+ } >+ >+ /** >+ * Returns a detailed message for the Error when it is thrown by the >+ * token manager to indicate a lexical error. >+ * Parameters : >+ * EOFSeen : indicates if EOF caused the lexicl error >+ * curLexState : lexical state in which this error occured >+ * errorLine : line number when the error occured >+ * errorColumn : column number when the error occured >+ * errorAfter : prefix that was seen before this error occured >+ * curchar : the offending character >+ * Note: You can customize the lexical error message by modifying this method. >+ */ >+ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { >+ return("Lexical error at line " + >+ errorLine + ", column " + >+ errorColumn + ". Encountered: " + >+ (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + >+ "after : \"" + addEscapes(errorAfter) + "\""); >+ } >+ >+ /** >+ * You can also modify the body of this method to customize your error messages. >+ * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not >+ * of end-users concern, so you can return something like : >+ * >+ * "Internal Error : Please file a bug report .... " >+ * >+ * from this method for such cases in the release version of your parser. >+ */ >+ public String getMessage() { >+ return super.getMessage(); >+ } >+ >+ /* >+ * Constructors of various flavors follow. >+ */ >+ >+ public TokenMgrError() { >+ } >+ >+ public TokenMgrError(String message, int reason) { >+ super(message); >+ errorCode = reason; >+ } >+ >+ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { >+ this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/providers/UMLElementTypes.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/providers/UMLElementTypes.java >diff -N src/org/eclipse/uml2/diagram/clazz/providers/UMLElementTypes.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/providers/UMLElementTypes.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,1062 @@ >+package org.eclipse.uml2.diagram.clazz.providers; >+ >+import java.util.ArrayList; >+import java.util.Collection; >+import java.util.HashSet; >+import java.util.IdentityHashMap; >+import java.util.List; >+import java.util.Map; >+import java.util.Set; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.ENamedElement; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; >+import org.eclipse.gmf.runtime.emf.type.core.IElementType; >+import org.eclipse.jface.resource.ImageDescriptor; >+import org.eclipse.jface.resource.ImageRegistry; >+import org.eclipse.swt.graphics.Image; >+import org.eclipse.uml2.diagram.clazz.expressions.UMLAbstractExpression; >+import org.eclipse.uml2.diagram.clazz.expressions.UMLOCLFactory; >+import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorPlugin; >+import org.eclipse.uml2.uml.UMLPackage; >+ >+/** >+ * @generated >+ */ >+public class UMLElementTypes { >+ >+ /** >+ * @generated >+ */ >+ private UMLElementTypes() { >+ } >+ >+ /** >+ * @generated >+ */ >+ private static Map elements; >+ >+ /** >+ * @generated >+ */ >+ private static ImageRegistry imageRegistry; >+ >+ /** >+ * @generated >+ */ >+ private static ImageRegistry getImageRegistry() { >+ if (imageRegistry == null) { >+ imageRegistry = new ImageRegistry(); >+ } >+ return imageRegistry; >+ } >+ >+ /** >+ * @generated >+ */ >+ private static String getImageRegistryKey(ENamedElement element) { >+ return element.getName(); >+ } >+ >+ /** >+ * @generated >+ */ >+ private static ImageDescriptor getProvidedImageDescriptor(ENamedElement element) { >+ if (element instanceof EStructuralFeature) { >+ element = ((EStructuralFeature) element).getEContainingClass(); >+ } >+ if (element instanceof EClass) { >+ EClass eClass = (EClass) element; >+ if (!eClass.isAbstract()) { >+ return UMLDiagramEditorPlugin.getInstance().getItemImageDescriptor(eClass.getEPackage().getEFactoryInstance().create(eClass)); >+ } >+ } >+ // TODO : support structural features >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ public static ImageDescriptor getImageDescriptor(ENamedElement element) { >+ String key = getImageRegistryKey(element); >+ ImageDescriptor imageDescriptor = getImageRegistry().getDescriptor(key); >+ if (imageDescriptor == null) { >+ imageDescriptor = getProvidedImageDescriptor(element); >+ if (imageDescriptor == null) { >+ imageDescriptor = ImageDescriptor.getMissingImageDescriptor(); >+ } >+ getImageRegistry().put(key, imageDescriptor); >+ } >+ return imageDescriptor; >+ } >+ >+ /** >+ * @generated >+ */ >+ public static Image getImage(ENamedElement element) { >+ String key = getImageRegistryKey(element); >+ Image image = getImageRegistry().get(key); >+ if (image == null) { >+ ImageDescriptor imageDescriptor = getProvidedImageDescriptor(element); >+ if (imageDescriptor == null) { >+ imageDescriptor = ImageDescriptor.getMissingImageDescriptor(); >+ } >+ getImageRegistry().put(key, imageDescriptor); >+ image = getImageRegistry().get(key); >+ } >+ return image; >+ } >+ >+ /** >+ * @generated >+ */ >+ public static ImageDescriptor getImageDescriptor(IAdaptable hint) { >+ ENamedElement element = getElement(hint); >+ if (element == null) { >+ return null; >+ } >+ return getImageDescriptor(element); >+ } >+ >+ /** >+ * @generated >+ */ >+ public static Image getImage(IAdaptable hint) { >+ ENamedElement element = getElement(hint); >+ if (element == null) { >+ return null; >+ } >+ return getImage(element); >+ } >+ >+ /** >+ * Returns 'type' of the ecore object associated with the hint. >+ * >+ * @generated >+ */ >+ public static ENamedElement getElement(IAdaptable hint) { >+ Object type = hint.getAdapter(IElementType.class); >+ if (elements == null) { >+ elements = new IdentityHashMap(); >+ elements.put(Package_1000, UMLPackage.eINSTANCE.getPackage()); >+ elements.put(Package_3006, UMLPackage.eINSTANCE.getPackage()); >+ elements.put(Class_3007, UMLPackage.eINSTANCE.getClass_()); >+ elements.put(DataType_3008, UMLPackage.eINSTANCE.getDataType()); >+ elements.put(PrimitiveType_3009, UMLPackage.eINSTANCE.getPrimitiveType()); >+ elements.put(Enumeration_3011, UMLPackage.eINSTANCE.getEnumeration()); >+ elements.put(AssociationClass_3012, UMLPackage.eINSTANCE.getAssociationClass()); >+ elements.put(InstanceSpecification_3013, UMLPackage.eINSTANCE.getInstanceSpecification()); >+ elements.put(Property_3001, UMLPackage.eINSTANCE.getProperty()); >+ elements.put(Operation_3002, UMLPackage.eINSTANCE.getOperation()); >+ elements.put(Class_3003, UMLPackage.eINSTANCE.getClass_()); >+ elements.put(Port_3025, UMLPackage.eINSTANCE.getPort()); >+ elements.put(Property_3019, UMLPackage.eINSTANCE.getProperty()); >+ elements.put(Operation_3020, UMLPackage.eINSTANCE.getOperation()); >+ elements.put(Property_3014, UMLPackage.eINSTANCE.getProperty()); >+ elements.put(Operation_3015, UMLPackage.eINSTANCE.getOperation()); >+ elements.put(Property_3021, UMLPackage.eINSTANCE.getProperty()); >+ elements.put(Operation_3022, UMLPackage.eINSTANCE.getOperation()); >+ elements.put(EnumerationLiteral_3016, UMLPackage.eINSTANCE.getEnumerationLiteral()); >+ elements.put(Property_3023, UMLPackage.eINSTANCE.getProperty()); >+ elements.put(Operation_3024, UMLPackage.eINSTANCE.getOperation()); >+ elements.put(LiteralString_3005, UMLPackage.eINSTANCE.getLiteralString()); >+ elements.put(Slot_3017, UMLPackage.eINSTANCE.getSlot()); >+ elements.put(Package_2002, UMLPackage.eINSTANCE.getPackage()); >+ elements.put(Class_2001, UMLPackage.eINSTANCE.getClass_()); >+ elements.put(AssociationClass_2007, UMLPackage.eINSTANCE.getAssociationClass()); >+ elements.put(DataType_2004, UMLPackage.eINSTANCE.getDataType()); >+ elements.put(PrimitiveType_2005, UMLPackage.eINSTANCE.getPrimitiveType()); >+ elements.put(Enumeration_2003, UMLPackage.eINSTANCE.getEnumeration()); >+ elements.put(Interface_2010, UMLPackage.eINSTANCE.getInterface()); >+ elements.put(Constraint_2006, UMLPackage.eINSTANCE.getConstraint()); >+ elements.put(InstanceSpecification_2008, UMLPackage.eINSTANCE.getInstanceSpecification()); >+ elements.put(Dependency_2009, UMLPackage.eINSTANCE.getDependency()); >+ elements.put(Generalization_4001, UMLPackage.eINSTANCE.getGeneralization()); >+ elements.put(Dependency_4002, UMLPackage.eINSTANCE.getDependency()); >+ elements.put(Property_4003, UMLPackage.eINSTANCE.getProperty()); >+ elements.put(ConstraintConstrainedElement_4004, UMLPackage.eINSTANCE.getConstraint_ConstrainedElement()); >+ elements.put(Association_4005, UMLPackage.eINSTANCE.getAssociation()); >+ elements.put(DependencySupplier_4006, UMLPackage.eINSTANCE.getDependency_Supplier()); >+ elements.put(DependencyClient_4007, UMLPackage.eINSTANCE.getDependency_Client()); >+ elements.put(InterfaceRealization_4008, UMLPackage.eINSTANCE.getInterfaceRealization()); >+ elements.put(Usage_4009, UMLPackage.eINSTANCE.getUsage()); >+ } >+ return (ENamedElement) elements.get(type); >+ } >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Package_1000 = getElementType("org.eclipse.uml2.diagram.clazz.Package_1000"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Package_3006 = getElementType("org.eclipse.uml2.diagram.clazz.Package_3006"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Class_3007 = getElementType("org.eclipse.uml2.diagram.clazz.Class_3007"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType DataType_3008 = getElementType("org.eclipse.uml2.diagram.clazz.DataType_3008"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType PrimitiveType_3009 = getElementType("org.eclipse.uml2.diagram.clazz.PrimitiveType_3009"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Enumeration_3011 = getElementType("org.eclipse.uml2.diagram.clazz.Enumeration_3011"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType AssociationClass_3012 = getElementType("org.eclipse.uml2.diagram.clazz.AssociationClass_3012"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType InstanceSpecification_3013 = getElementType("org.eclipse.uml2.diagram.clazz.InstanceSpecification_3013"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Property_3001 = getElementType("org.eclipse.uml2.diagram.clazz.Property_3001"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Operation_3002 = getElementType("org.eclipse.uml2.diagram.clazz.Operation_3002"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Class_3003 = getElementType("org.eclipse.uml2.diagram.clazz.Class_3003"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Port_3025 = getElementType("org.eclipse.uml2.diagram.clazz.Port_3025"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Property_3019 = getElementType("org.eclipse.uml2.diagram.clazz.Property_3019"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Operation_3020 = getElementType("org.eclipse.uml2.diagram.clazz.Operation_3020"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Property_3014 = getElementType("org.eclipse.uml2.diagram.clazz.Property_3014"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Operation_3015 = getElementType("org.eclipse.uml2.diagram.clazz.Operation_3015"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Property_3021 = getElementType("org.eclipse.uml2.diagram.clazz.Property_3021"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Operation_3022 = getElementType("org.eclipse.uml2.diagram.clazz.Operation_3022"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType EnumerationLiteral_3016 = getElementType("org.eclipse.uml2.diagram.clazz.EnumerationLiteral_3016"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Property_3023 = getElementType("org.eclipse.uml2.diagram.clazz.Property_3023"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Operation_3024 = getElementType("org.eclipse.uml2.diagram.clazz.Operation_3024"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType LiteralString_3005 = getElementType("org.eclipse.uml2.diagram.clazz.LiteralString_3005"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Slot_3017 = getElementType("org.eclipse.uml2.diagram.clazz.Slot_3017"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Package_2002 = getElementType("org.eclipse.uml2.diagram.clazz.Package_2002"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Class_2001 = getElementType("org.eclipse.uml2.diagram.clazz.Class_2001"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType AssociationClass_2007 = getElementType("org.eclipse.uml2.diagram.clazz.AssociationClass_2007"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType DataType_2004 = getElementType("org.eclipse.uml2.diagram.clazz.DataType_2004"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType PrimitiveType_2005 = getElementType("org.eclipse.uml2.diagram.clazz.PrimitiveType_2005"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Enumeration_2003 = getElementType("org.eclipse.uml2.diagram.clazz.Enumeration_2003"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Interface_2010 = getElementType("org.eclipse.uml2.diagram.clazz.Interface_2010"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Constraint_2006 = getElementType("org.eclipse.uml2.diagram.clazz.Constraint_2006"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType InstanceSpecification_2008 = getElementType("org.eclipse.uml2.diagram.clazz.InstanceSpecification_2008"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Dependency_2009 = getElementType("org.eclipse.uml2.diagram.clazz.Dependency_2009"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Generalization_4001 = getElementType("org.eclipse.uml2.diagram.clazz.Generalization_4001"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Dependency_4002 = getElementType("org.eclipse.uml2.diagram.clazz.Dependency_4002"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Property_4003 = getElementType("org.eclipse.uml2.diagram.clazz.Property_4003"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType ConstraintConstrainedElement_4004 = getElementType("org.eclipse.uml2.diagram.clazz.ConstraintConstrainedElement_4004"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Association_4005 = getElementType("org.eclipse.uml2.diagram.clazz.Association_4005"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType DependencySupplier_4006 = getElementType("org.eclipse.uml2.diagram.clazz.DependencySupplier_4006"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType DependencyClient_4007 = getElementType("org.eclipse.uml2.diagram.clazz.DependencyClient_4007"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType InterfaceRealization_4008 = getElementType("org.eclipse.uml2.diagram.clazz.InterfaceRealization_4008"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final IElementType Usage_4009 = getElementType("org.eclipse.uml2.diagram.clazz.Usage_4009"); //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ private static IElementType getElementType(String id) { >+ return ElementTypeRegistry.getInstance().getType(id); >+ } >+ >+ /** >+ * @generated >+ */ >+ private static Set KNOWN_ELEMENT_TYPES; >+ >+ /** >+ * @generated >+ */ >+ public static boolean isKnownElementType(IElementType elementType) { >+ if (KNOWN_ELEMENT_TYPES == null) { >+ KNOWN_ELEMENT_TYPES = new HashSet(); >+ KNOWN_ELEMENT_TYPES.add(Package_1000); >+ KNOWN_ELEMENT_TYPES.add(Package_3006); >+ KNOWN_ELEMENT_TYPES.add(Class_3007); >+ KNOWN_ELEMENT_TYPES.add(DataType_3008); >+ KNOWN_ELEMENT_TYPES.add(PrimitiveType_3009); >+ KNOWN_ELEMENT_TYPES.add(Enumeration_3011); >+ KNOWN_ELEMENT_TYPES.add(AssociationClass_3012); >+ KNOWN_ELEMENT_TYPES.add(InstanceSpecification_3013); >+ KNOWN_ELEMENT_TYPES.add(Property_3001); >+ KNOWN_ELEMENT_TYPES.add(Operation_3002); >+ KNOWN_ELEMENT_TYPES.add(Class_3003); >+ KNOWN_ELEMENT_TYPES.add(Port_3025); >+ KNOWN_ELEMENT_TYPES.add(Property_3019); >+ KNOWN_ELEMENT_TYPES.add(Operation_3020); >+ KNOWN_ELEMENT_TYPES.add(Property_3014); >+ KNOWN_ELEMENT_TYPES.add(Operation_3015); >+ KNOWN_ELEMENT_TYPES.add(Property_3021); >+ KNOWN_ELEMENT_TYPES.add(Operation_3022); >+ KNOWN_ELEMENT_TYPES.add(EnumerationLiteral_3016); >+ KNOWN_ELEMENT_TYPES.add(Property_3023); >+ KNOWN_ELEMENT_TYPES.add(Operation_3024); >+ KNOWN_ELEMENT_TYPES.add(LiteralString_3005); >+ KNOWN_ELEMENT_TYPES.add(Slot_3017); >+ KNOWN_ELEMENT_TYPES.add(Package_2002); >+ KNOWN_ELEMENT_TYPES.add(Class_2001); >+ KNOWN_ELEMENT_TYPES.add(AssociationClass_2007); >+ KNOWN_ELEMENT_TYPES.add(DataType_2004); >+ KNOWN_ELEMENT_TYPES.add(PrimitiveType_2005); >+ KNOWN_ELEMENT_TYPES.add(Enumeration_2003); >+ KNOWN_ELEMENT_TYPES.add(Interface_2010); >+ KNOWN_ELEMENT_TYPES.add(Constraint_2006); >+ KNOWN_ELEMENT_TYPES.add(InstanceSpecification_2008); >+ KNOWN_ELEMENT_TYPES.add(Dependency_2009); >+ KNOWN_ELEMENT_TYPES.add(Generalization_4001); >+ KNOWN_ELEMENT_TYPES.add(Dependency_4002); >+ KNOWN_ELEMENT_TYPES.add(Property_4003); >+ KNOWN_ELEMENT_TYPES.add(ConstraintConstrainedElement_4004); >+ KNOWN_ELEMENT_TYPES.add(Association_4005); >+ KNOWN_ELEMENT_TYPES.add(DependencySupplier_4006); >+ KNOWN_ELEMENT_TYPES.add(DependencyClient_4007); >+ KNOWN_ELEMENT_TYPES.add(InterfaceRealization_4008); >+ KNOWN_ELEMENT_TYPES.add(Usage_4009); >+ } >+ return KNOWN_ELEMENT_TYPES.contains(elementType); >+ } >+ >+ /** >+ * @generated >+ */ >+ public static class Initializers { >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Package_2002 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getPackage()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'package\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getPackage()))); >+ } >+ }; // Package_2002 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Class_2001 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getClass_()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ "let base : String = \'Class\' in\r\nlet suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in \r\nlet space : Namespace = self.namespace in\r\nlet allMissed : Sequence(String) = suffixes->\r\n select(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s))\r\n ) in\r\nlet firstMissed : String = allMissed->first() in \r\nlet noMisses : Boolean = firstMissed.oclIsUndefined() in\r\nlet allNames : Set(String) = \r\n if noMisses \r\n then \r\n space.member->collect(e : NamedElement | \r\n if e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base\r\n then \'\' \r\n else e.name \r\n endif)->asSet()->excluding(\'\') else Set{\'not in use\'} \r\n endif in \r\nlet longestName : String = \r\n if noMisses\r\n then allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first() \r\n else \'not in use\' \r\n endif in \r\nif noMisses then \r\n if longestName.oclIsUndefined() \r\n then base \r\n else longestName.concat(\'1\') \r\n endif \r\nelse \r\n base.concat(firstMissed) \r\nendif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getClass_()))); >+ } >+ }; // Class_2001 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer AssociationClass_2007 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getAssociationClass()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'AssociationClass\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getAssociationClass()))); >+ } >+ }; // AssociationClass_2007 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer DataType_2004 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getDataType()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'DataType\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getDataType()))); >+ } >+ }; // DataType_2004 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer PrimitiveType_2005 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getPrimitiveType()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'PrimitiveType\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getPrimitiveType()))); >+ } >+ }; // PrimitiveType_2005 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Enumeration_2003 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getEnumeration()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'Enumeration\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getEnumeration()))); >+ } >+ }; // Enumeration_2003 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Interface_2010 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getInterface()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'Interface\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getInterface()))); >+ } >+ }; // Interface_2010 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Constraint_2006 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getConstraint()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'constraint\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getConstraint()))); >+ } >+ }; // Constraint_2006 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer InstanceSpecification_2008 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getInstanceSpecification()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'instanceSpecification\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getInstanceSpecification()))); >+ } >+ }; // InstanceSpecification_2008 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Dependency_2009 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getDependency()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'dependency\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getDependency()))); >+ } >+ }; // Dependency_2009 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Package_3006 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getPackage()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'package\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getPackage()))); >+ } >+ }; // Package_3006 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Class_3007 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getClass_()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'Class\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getClass_()))); >+ } >+ }; // Class_3007 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer DataType_3008 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getDataType()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'DataType\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getDataType()))); >+ } >+ }; // DataType_3008 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer PrimitiveType_3009 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getPrimitiveType()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'PrimitiveType\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getPrimitiveType()))); >+ } >+ }; // PrimitiveType_3009 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Enumeration_3011 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getEnumeration()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'Enumeration\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getEnumeration()))); >+ } >+ }; // Enumeration_3011 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer AssociationClass_3012 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getAssociationClass()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'AssociationClass\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getAssociationClass()))); >+ } >+ }; // AssociationClass_3012 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer InstanceSpecification_3013 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getInstanceSpecification()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'instanceSpecification\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getInstanceSpecification()))); >+ } >+ }; // InstanceSpecification_3013 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Property_3001 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getProperty()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer(UMLPackage.eINSTANCE.getProperty_Aggregation(), UMLOCLFactory.getExpression("AggregationKind::composite", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getProperty()))); >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'property\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getProperty()))); >+ } >+ }; // Property_3001 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Operation_3002 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getOperation()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'operation\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getOperation()))); >+ } >+ }; // Operation_3002 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Class_3003 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getClass_()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'Class\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getClass_()))); >+ } >+ }; // Class_3003 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Port_3025 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getPort()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer(UMLPackage.eINSTANCE.getProperty_Aggregation(), UMLOCLFactory.getExpression("AggregationKind::composite", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getPort()))); >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'port\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getPort()))); >+ } >+ }; // Port_3025 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Property_3019 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getProperty()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer(UMLPackage.eINSTANCE.getProperty_Aggregation(), UMLOCLFactory.getExpression("AggregationKind::composite", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getProperty()))); >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'property\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getProperty()))); >+ } >+ }; // Property_3019 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Operation_3020 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getOperation()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'operation\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getOperation()))); >+ } >+ }; // Operation_3020 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Property_3014 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getProperty()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer(UMLPackage.eINSTANCE.getProperty_Aggregation(), UMLOCLFactory.getExpression("AggregationKind::composite", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getProperty()))); >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'property\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getProperty()))); >+ } >+ }; // Property_3014 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Operation_3015 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getOperation()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'operation\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getOperation()))); >+ } >+ }; // Operation_3015 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Property_3021 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getProperty()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer(UMLPackage.eINSTANCE.getProperty_Aggregation(), UMLOCLFactory.getExpression("AggregationKind::composite", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getProperty()))); >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'property\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getProperty()))); >+ } >+ }; // Property_3021 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Operation_3022 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getOperation()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'operation\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getOperation()))); >+ } >+ }; // Operation_3022 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer EnumerationLiteral_3016 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getEnumerationLiteral()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'enumerationLiteral\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getEnumerationLiteral()))); >+ } >+ }; // EnumerationLiteral_3016 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Property_3023 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getProperty()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer(UMLPackage.eINSTANCE.getProperty_Aggregation(), UMLOCLFactory.getExpression("AggregationKind::composite", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getProperty()))); >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'property\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getProperty()))); >+ } >+ }; // Property_3023 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer Operation_3024 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getOperation()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'operation\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getOperation()))); >+ } >+ }; // Operation_3024 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ public static final IObjectInitializer LiteralString_3005 = new ObjectInitializer(org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getLiteralString()) { >+ >+ protected void init() { >+ add(createExpressionFeatureInitializer( >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLOCLFactory >+ .getExpression( >+ " let base : String = \'literalString\' in let suffixes : Sequence(String) = Sequence {\'\', \'1\', \'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'10\'} in let space : Namespace = self.namespace in let allMissed : Sequence(String) = suffixes-> \tselect(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s)) ) in let firstMissed : String = allMissed->first() in let noMisses : Boolean = firstMissed.oclIsUndefined() in let allNames : Set(String) = \tif noMisses \t\tthen \t\tspace.member->collect(e : NamedElement | \t\t\tif e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) <> base \t\t\tthen \'\' else e.name \t\t\tendif \t\t)->asSet()->excluding(\'\') \t\telse Set{\'not in use\'} \t\tendif in let longestName : String = \t\tif noMisses \t\tthen allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first()\t\telse \'not in use\' \t\tendif \tin if noMisses then \t\tif longestName.oclIsUndefined() \t\tthen base \t\telse longestName.concat(\'1\') \t\tendif else base.concat(firstMissed) endif ", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getLiteralString()))); >+ } >+ }; // LiteralString_3005 ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ private Initializers() { >+ } >+ >+ /** >+ * @generated >+ */ >+ public static interface IObjectInitializer { >+ >+ /** >+ * @generated >+ */ >+ public void init(EObject instance); >+ } >+ >+ /** >+ * @generated >+ */ >+ public static abstract class ObjectInitializer implements IObjectInitializer { >+ >+ /** >+ * @generated >+ */ >+ final EClass element; >+ >+ /** >+ * @generated >+ */ >+ private List featureInitializers = new ArrayList(); >+ >+ /** >+ * @generated >+ */ >+ ObjectInitializer(EClass element) { >+ this.element = element; >+ init(); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected abstract void init(); >+ >+ /** >+ * @generated >+ */ >+ protected final FeatureInitializer add(FeatureInitializer initializer) { >+ featureInitializers.add(initializer); >+ return initializer; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void init(EObject instance) { >+ for (java.util.Iterator it = featureInitializers.iterator(); it.hasNext();) { >+ FeatureInitializer nextExpr = (FeatureInitializer) it.next(); >+ try { >+ nextExpr.init(instance); >+ } catch (RuntimeException e) { >+ UMLDiagramEditorPlugin.getInstance().logError("Feature initialization failed", e); //$NON-NLS-1$ >+ } >+ } >+ } >+ } // end of ObjectInitializer >+ >+ /** >+ * @generated >+ */ >+ interface FeatureInitializer { >+ >+ /** >+ * @generated >+ */ >+ void init(EObject contextInstance); >+ } >+ >+ /** >+ * @generated >+ */ >+ static FeatureInitializer createNewElementFeatureInitializer(EStructuralFeature initFeature, ObjectInitializer[] newObjectInitializers) { >+ final EStructuralFeature feature = initFeature; >+ final ObjectInitializer[] initializers = newObjectInitializers; >+ return new FeatureInitializer() { >+ >+ public void init(EObject contextInstance) { >+ for (int i = 0; i < initializers.length; i++) { >+ EObject newInstance = initializers[i].element.getEPackage().getEFactoryInstance().create(initializers[i].element); >+ if (feature.isMany()) { >+ ((Collection) contextInstance.eGet(feature)).add(newInstance); >+ } else { >+ contextInstance.eSet(feature, newInstance); >+ } >+ initializers[i].init(newInstance); >+ } >+ } >+ }; >+ } >+ >+ /** >+ * @generated >+ */ >+ static FeatureInitializer createExpressionFeatureInitializer(EStructuralFeature initFeature, UMLAbstractExpression valueExpression) { >+ final EStructuralFeature feature = initFeature; >+ final UMLAbstractExpression expression = valueExpression; >+ return new FeatureInitializer() { >+ >+ public void init(EObject contextInstance) { >+ expression.assignTo(feature, contextInstance); >+ } >+ }; >+ } >+ } // end of Initializers >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName7ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName7ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName7ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName7ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; >+import org.eclipse.gmf.runtime.notation.Location; >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class AssociationName7ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { >+ Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint); >+ Location location = (Location) view.getLayoutConstraint(); >+ IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit()); >+ location.setX(mapMode.DPtoLP(0)); >+ location.setY(mapMode.DPtoLP(15)); >+ return view; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/InterfaceViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/InterfaceViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/InterfaceViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/InterfaceViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,52 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class InterfaceViewFactory extends AbstractShapeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createDescriptionStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFillStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(InterfaceNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeAttributesViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeAttributesViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeAttributesViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/DataTypeAttributesViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class DataTypeAttributesViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeAttributesEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/SlotViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/SlotViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/SlotViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/SlotViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class SlotViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.SlotEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLVisualIDRegistry.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLVisualIDRegistry.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLVisualIDRegistry.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLVisualIDRegistry.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,1627 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import org.eclipse.core.runtime.Platform; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.gmf.runtime.notation.Diagram; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClass2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassClassesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName6EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName7EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Class2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Class3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassClassesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintCompartmentEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataType2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Dependency2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyName2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Enumeration2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationLiteralEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationLiteralsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.GeneralizationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecification2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationSlotsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceRealizationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.LiteralStringEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.OperationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Package2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Package3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageClassifiersEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageOtherEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackagePackagesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PortEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PortNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveType2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeAttributesEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeOperationsEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property6EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PropertyEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PropertyNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.SlotEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.UsageEditPart; >+import org.eclipse.uml2.diagram.clazz.expressions.UMLAbstractExpression; >+import org.eclipse.uml2.diagram.clazz.expressions.UMLOCLFactory; >+import org.eclipse.uml2.uml.Association; >+import org.eclipse.uml2.uml.AssociationClass; >+import org.eclipse.uml2.uml.Constraint; >+import org.eclipse.uml2.uml.DataType; >+import org.eclipse.uml2.uml.Dependency; >+import org.eclipse.uml2.uml.Enumeration; >+import org.eclipse.uml2.uml.EnumerationLiteral; >+import org.eclipse.uml2.uml.Generalization; >+import org.eclipse.uml2.uml.InstanceSpecification; >+import org.eclipse.uml2.uml.Interface; >+import org.eclipse.uml2.uml.InterfaceRealization; >+import org.eclipse.uml2.uml.LiteralString; >+import org.eclipse.uml2.uml.Operation; >+import org.eclipse.uml2.uml.Port; >+import org.eclipse.uml2.uml.PrimitiveType; >+import org.eclipse.uml2.uml.Property; >+import org.eclipse.uml2.uml.Slot; >+import org.eclipse.uml2.uml.UMLPackage; >+import org.eclipse.uml2.uml.Usage; >+ >+/** >+ * This registry is used to determine which type of visual object should be >+ * created for the corresponding Diagram, Node, ChildNode or Link represented >+ * by a domain model object. >+ * >+ * @generated >+ */ >+public class UMLVisualIDRegistry { >+ >+ /** >+ * @generated >+ */ >+ private static final String DEBUG_KEY = UMLDiagramEditorPlugin.getInstance().getBundle().getSymbolicName() + "/debug/visualID"; //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static int getVisualID(View view) { >+ if (view instanceof Diagram) { >+ if (PackageEditPart.MODEL_ID.equals(view.getType())) { >+ return PackageEditPart.VISUAL_ID; >+ } else { >+ return -1; >+ } >+ } >+ return getVisualID(view.getType()); >+ } >+ >+ /** >+ * @generated >+ */ >+ public static String getModelID(View view) { >+ View diagram = view.getDiagram(); >+ while (view != diagram) { >+ EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$ >+ if (annotation != null) { >+ return (String) annotation.getDetails().get("modelID"); //$NON-NLS-1$ >+ } >+ view = (View) view.eContainer(); >+ } >+ return diagram != null ? diagram.getType() : null; >+ } >+ >+ /** >+ * @generated >+ */ >+ public static int getVisualID(String type) { >+ try { >+ return Integer.parseInt(type); >+ } catch (NumberFormatException e) { >+ if (Boolean.TRUE.toString().equalsIgnoreCase(Platform.getDebugOption(DEBUG_KEY))) { >+ UMLDiagramEditorPlugin.getInstance().logError("Unable to parse view type as a visualID number: " + type); >+ } >+ } >+ return -1; >+ } >+ >+ /** >+ * @generated >+ */ >+ public static String getType(int visualID) { >+ return String.valueOf(visualID); >+ } >+ >+ /** >+ * @generated >+ */ >+ public static int getDiagramVisualID(EObject domainElement) { >+ if (domainElement == null) { >+ return -1; >+ } >+ EClass domainElementMetaclass = domainElement.eClass(); >+ return getDiagramVisualID(domainElement, domainElementMetaclass); >+ } >+ >+ /** >+ * @generated >+ */ >+ private static int getDiagramVisualID(EObject domainElement, EClass domainElementMetaclass) { >+ if (UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElementMetaclass) && isDiagramPackage_1000((org.eclipse.uml2.uml.Package) domainElement)) { >+ return PackageEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedDiagramID(domainElement); >+ } >+ >+ /** >+ * @generated >+ */ >+ public static int getNodeVisualID(View containerView, EObject domainElement) { >+ if (domainElement == null) { >+ return -1; >+ } >+ EClass domainElementMetaclass = domainElement.eClass(); >+ return getNodeVisualID(containerView, domainElement, domainElementMetaclass, null); >+ } >+ >+ /** >+ * @generated >+ */ >+ public static int getNodeVisualID(View containerView, EObject domainElement, EClass domainElementMetaclass, String semanticHint) { >+ String containerModelID = getModelID(containerView); >+ if (!PackageEditPart.MODEL_ID.equals(containerModelID)) { >+ return -1; >+ } >+ int containerVisualID; >+ if (PackageEditPart.MODEL_ID.equals(containerModelID)) { >+ containerVisualID = getVisualID(containerView); >+ } else { >+ if (containerView instanceof Diagram) { >+ containerVisualID = PackageEditPart.VISUAL_ID; >+ } else { >+ return -1; >+ } >+ } >+ int nodeVisualID = semanticHint != null ? getVisualID(semanticHint) : -1; >+ switch (containerVisualID) { >+ case Package2EditPart.VISUAL_ID: >+ if (PackageNameEditPart.VISUAL_ID == nodeVisualID) { >+ return PackageNameEditPart.VISUAL_ID; >+ } >+ if (PackagePackagesEditPart.VISUAL_ID == nodeVisualID) { >+ return PackagePackagesEditPart.VISUAL_ID; >+ } >+ if (PackageClassifiersEditPart.VISUAL_ID == nodeVisualID) { >+ return PackageClassifiersEditPart.VISUAL_ID; >+ } >+ if (PackageOtherEditPart.VISUAL_ID == nodeVisualID) { >+ return PackageOtherEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedPackage_2002ChildNodeID(domainElement, semanticHint); >+ case Class2EditPart.VISUAL_ID: >+ if (ClassNameEditPart.VISUAL_ID == nodeVisualID) { >+ return ClassNameEditPart.VISUAL_ID; >+ } >+ if (ClassAttributesEditPart.VISUAL_ID == nodeVisualID) { >+ return ClassAttributesEditPart.VISUAL_ID; >+ } >+ if (ClassOperationsEditPart.VISUAL_ID == nodeVisualID) { >+ return ClassOperationsEditPart.VISUAL_ID; >+ } >+ if (ClassClassesEditPart.VISUAL_ID == nodeVisualID) { >+ return ClassClassesEditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || PortEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getPort().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodePort_3025((Port) domainElement))) { >+ return PortEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedClass_2001ChildNodeID(domainElement, semanticHint); >+ case AssociationClass2EditPart.VISUAL_ID: >+ if (AssociationClassNameEditPart.VISUAL_ID == nodeVisualID) { >+ return AssociationClassNameEditPart.VISUAL_ID; >+ } >+ if (AssociationClassAttributesEditPart.VISUAL_ID == nodeVisualID) { >+ return AssociationClassAttributesEditPart.VISUAL_ID; >+ } >+ if (AssociationClassOperationsEditPart.VISUAL_ID == nodeVisualID) { >+ return AssociationClassOperationsEditPart.VISUAL_ID; >+ } >+ if (AssociationClassClassesEditPart.VISUAL_ID == nodeVisualID) { >+ return AssociationClassClassesEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedAssociationClass_2007ChildNodeID(domainElement, semanticHint); >+ case DataType2EditPart.VISUAL_ID: >+ if (DataTypeNameEditPart.VISUAL_ID == nodeVisualID) { >+ return DataTypeNameEditPart.VISUAL_ID; >+ } >+ if (DataTypeAttributesEditPart.VISUAL_ID == nodeVisualID) { >+ return DataTypeAttributesEditPart.VISUAL_ID; >+ } >+ if (DataTypeOperationsEditPart.VISUAL_ID == nodeVisualID) { >+ return DataTypeOperationsEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedDataType_2004ChildNodeID(domainElement, semanticHint); >+ case PrimitiveType2EditPart.VISUAL_ID: >+ if (PrimitiveTypeNameEditPart.VISUAL_ID == nodeVisualID) { >+ return PrimitiveTypeNameEditPart.VISUAL_ID; >+ } >+ if (PrimitiveTypeAttributesEditPart.VISUAL_ID == nodeVisualID) { >+ return PrimitiveTypeAttributesEditPart.VISUAL_ID; >+ } >+ if (PrimitiveTypeOperationsEditPart.VISUAL_ID == nodeVisualID) { >+ return PrimitiveTypeOperationsEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedPrimitiveType_2005ChildNodeID(domainElement, semanticHint); >+ case Enumeration2EditPart.VISUAL_ID: >+ if (EnumerationNameEditPart.VISUAL_ID == nodeVisualID) { >+ return EnumerationNameEditPart.VISUAL_ID; >+ } >+ if (EnumerationLiteralsEditPart.VISUAL_ID == nodeVisualID) { >+ return EnumerationLiteralsEditPart.VISUAL_ID; >+ } >+ if (EnumerationAttributesEditPart.VISUAL_ID == nodeVisualID) { >+ return EnumerationAttributesEditPart.VISUAL_ID; >+ } >+ if (EnumerationOperationsEditPart.VISUAL_ID == nodeVisualID) { >+ return EnumerationOperationsEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedEnumeration_2003ChildNodeID(domainElement, semanticHint); >+ case InterfaceEditPart.VISUAL_ID: >+ if (InterfaceNameEditPart.VISUAL_ID == nodeVisualID) { >+ return InterfaceNameEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedInterface_2010ChildNodeID(domainElement, semanticHint); >+ case ConstraintEditPart.VISUAL_ID: >+ if (ConstraintNameEditPart.VISUAL_ID == nodeVisualID) { >+ return ConstraintNameEditPart.VISUAL_ID; >+ } >+ if (ConstraintCompartmentEditPart.VISUAL_ID == nodeVisualID) { >+ return ConstraintCompartmentEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedConstraint_2006ChildNodeID(domainElement, semanticHint); >+ case InstanceSpecification2EditPart.VISUAL_ID: >+ if (InstanceSpecificationNameEditPart.VISUAL_ID == nodeVisualID) { >+ return InstanceSpecificationNameEditPart.VISUAL_ID; >+ } >+ if (InstanceSpecificationSlotsEditPart.VISUAL_ID == nodeVisualID) { >+ return InstanceSpecificationSlotsEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedInstanceSpecification_2008ChildNodeID(domainElement, semanticHint); >+ case DependencyEditPart.VISUAL_ID: >+ if (DependencyNameEditPart.VISUAL_ID == nodeVisualID) { >+ return DependencyNameEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedDependency_2009ChildNodeID(domainElement, semanticHint); >+ case Package3EditPart.VISUAL_ID: >+ return getUnrecognizedPackage_3006ChildNodeID(domainElement, semanticHint); >+ case ClassEditPart.VISUAL_ID: >+ return getUnrecognizedClass_3007ChildNodeID(domainElement, semanticHint); >+ case DataTypeEditPart.VISUAL_ID: >+ return getUnrecognizedDataType_3008ChildNodeID(domainElement, semanticHint); >+ case PrimitiveTypeEditPart.VISUAL_ID: >+ return getUnrecognizedPrimitiveType_3009ChildNodeID(domainElement, semanticHint); >+ case EnumerationEditPart.VISUAL_ID: >+ return getUnrecognizedEnumeration_3011ChildNodeID(domainElement, semanticHint); >+ case AssociationClassEditPart.VISUAL_ID: >+ return getUnrecognizedAssociationClass_3012ChildNodeID(domainElement, semanticHint); >+ case InstanceSpecificationEditPart.VISUAL_ID: >+ return getUnrecognizedInstanceSpecification_3013ChildNodeID(domainElement, semanticHint); >+ case PropertyEditPart.VISUAL_ID: >+ return getUnrecognizedProperty_3001ChildNodeID(domainElement, semanticHint); >+ case OperationEditPart.VISUAL_ID: >+ return getUnrecognizedOperation_3002ChildNodeID(domainElement, semanticHint); >+ case Class3EditPart.VISUAL_ID: >+ return getUnrecognizedClass_3003ChildNodeID(domainElement, semanticHint); >+ case PortEditPart.VISUAL_ID: >+ if (PortNameEditPart.VISUAL_ID == nodeVisualID) { >+ return PortNameEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedPort_3025ChildNodeID(domainElement, semanticHint); >+ case Property2EditPart.VISUAL_ID: >+ return getUnrecognizedProperty_3019ChildNodeID(domainElement, semanticHint); >+ case Operation2EditPart.VISUAL_ID: >+ return getUnrecognizedOperation_3020ChildNodeID(domainElement, semanticHint); >+ case Property3EditPart.VISUAL_ID: >+ return getUnrecognizedProperty_3014ChildNodeID(domainElement, semanticHint); >+ case Operation3EditPart.VISUAL_ID: >+ return getUnrecognizedOperation_3015ChildNodeID(domainElement, semanticHint); >+ case Property4EditPart.VISUAL_ID: >+ return getUnrecognizedProperty_3021ChildNodeID(domainElement, semanticHint); >+ case Operation4EditPart.VISUAL_ID: >+ return getUnrecognizedOperation_3022ChildNodeID(domainElement, semanticHint); >+ case EnumerationLiteralEditPart.VISUAL_ID: >+ return getUnrecognizedEnumerationLiteral_3016ChildNodeID(domainElement, semanticHint); >+ case Property5EditPart.VISUAL_ID: >+ return getUnrecognizedProperty_3023ChildNodeID(domainElement, semanticHint); >+ case Operation5EditPart.VISUAL_ID: >+ return getUnrecognizedOperation_3024ChildNodeID(domainElement, semanticHint); >+ case LiteralStringEditPart.VISUAL_ID: >+ return getUnrecognizedLiteralString_3005ChildNodeID(domainElement, semanticHint); >+ case SlotEditPart.VISUAL_ID: >+ return getUnrecognizedSlot_3017ChildNodeID(domainElement, semanticHint); >+ case PackagePackagesEditPart.VISUAL_ID: >+ if ((semanticHint == null || Package3EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodePackage_3006((org.eclipse.uml2.uml.Package) domainElement))) { >+ return Package3EditPart.VISUAL_ID; >+ } >+ return getUnrecognizedPackagePackages_7010ChildNodeID(domainElement, semanticHint); >+ case PackageClassifiersEditPart.VISUAL_ID: >+ if ((semanticHint == null || ClassEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeClass_3007((org.eclipse.uml2.uml.Class) domainElement))) { >+ return ClassEditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || DataTypeEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeDataType_3008((DataType) domainElement))) { >+ return DataTypeEditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || PrimitiveTypeEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodePrimitiveType_3009((PrimitiveType) domainElement))) { >+ return PrimitiveTypeEditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || EnumerationEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeEnumeration_3011((Enumeration) domainElement))) { >+ return EnumerationEditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || AssociationClassEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getAssociationClass().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeAssociationClass_3012((AssociationClass) domainElement))) { >+ return AssociationClassEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedPackageClassifiers_7011ChildNodeID(domainElement, semanticHint); >+ case PackageOtherEditPart.VISUAL_ID: >+ if ((semanticHint == null || InstanceSpecificationEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getInstanceSpecification().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeInstanceSpecification_3013((InstanceSpecification) domainElement))) { >+ return InstanceSpecificationEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedPackageOther_7012ChildNodeID(domainElement, semanticHint); >+ case ClassAttributesEditPart.VISUAL_ID: >+ if ((semanticHint == null || PropertyEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeProperty_3001((Property) domainElement))) { >+ return PropertyEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedClassAttributes_7001ChildNodeID(domainElement, semanticHint); >+ case ClassOperationsEditPart.VISUAL_ID: >+ if ((semanticHint == null || OperationEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeOperation_3002((Operation) domainElement))) { >+ return OperationEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedClassOperations_7002ChildNodeID(domainElement, semanticHint); >+ case ClassClassesEditPart.VISUAL_ID: >+ if ((semanticHint == null || Class3EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeClass_3003((org.eclipse.uml2.uml.Class) domainElement))) { >+ return Class3EditPart.VISUAL_ID; >+ } >+ return getUnrecognizedClassClasses_7003ChildNodeID(domainElement, semanticHint); >+ case AssociationClassAttributesEditPart.VISUAL_ID: >+ if ((semanticHint == null || Property2EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeProperty_3019((Property) domainElement))) { >+ return Property2EditPart.VISUAL_ID; >+ } >+ return getUnrecognizedAssociationClassAttributes_7024ChildNodeID(domainElement, semanticHint); >+ case AssociationClassOperationsEditPart.VISUAL_ID: >+ if ((semanticHint == null || Operation2EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeOperation_3020((Operation) domainElement))) { >+ return Operation2EditPart.VISUAL_ID; >+ } >+ return getUnrecognizedAssociationClassOperations_7025ChildNodeID(domainElement, semanticHint); >+ case AssociationClassClassesEditPart.VISUAL_ID: >+ if ((semanticHint == null || Class3EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeClass_3003((org.eclipse.uml2.uml.Class) domainElement))) { >+ return Class3EditPart.VISUAL_ID; >+ } >+ return getUnrecognizedAssociationClassClasses_7026ChildNodeID(domainElement, semanticHint); >+ case DataTypeAttributesEditPart.VISUAL_ID: >+ if ((semanticHint == null || Property3EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeProperty_3014((Property) domainElement))) { >+ return Property3EditPart.VISUAL_ID; >+ } >+ return getUnrecognizedDataTypeAttributes_7017ChildNodeID(domainElement, semanticHint); >+ case DataTypeOperationsEditPart.VISUAL_ID: >+ if ((semanticHint == null || Operation3EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeOperation_3015((Operation) domainElement))) { >+ return Operation3EditPart.VISUAL_ID; >+ } >+ return getUnrecognizedDataTypeOperations_7018ChildNodeID(domainElement, semanticHint); >+ case PrimitiveTypeAttributesEditPart.VISUAL_ID: >+ if ((semanticHint == null || Property4EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeProperty_3021((Property) domainElement))) { >+ return Property4EditPart.VISUAL_ID; >+ } >+ return getUnrecognizedPrimitiveTypeAttributes_7020ChildNodeID(domainElement, semanticHint); >+ case PrimitiveTypeOperationsEditPart.VISUAL_ID: >+ if ((semanticHint == null || Operation4EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeOperation_3022((Operation) domainElement))) { >+ return Operation4EditPart.VISUAL_ID; >+ } >+ return getUnrecognizedPrimitiveTypeOperations_7021ChildNodeID(domainElement, semanticHint); >+ case EnumerationLiteralsEditPart.VISUAL_ID: >+ if ((semanticHint == null || EnumerationLiteralEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getEnumerationLiteral().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeEnumerationLiteral_3016((EnumerationLiteral) domainElement))) { >+ return EnumerationLiteralEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedEnumerationLiterals_7013ChildNodeID(domainElement, semanticHint); >+ case EnumerationAttributesEditPart.VISUAL_ID: >+ if ((semanticHint == null || Property5EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeProperty_3023((Property) domainElement))) { >+ return Property5EditPart.VISUAL_ID; >+ } >+ return getUnrecognizedEnumerationAttributes_7014ChildNodeID(domainElement, semanticHint); >+ case EnumerationOperationsEditPart.VISUAL_ID: >+ if ((semanticHint == null || Operation5EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeOperation_3024((Operation) domainElement))) { >+ return Operation5EditPart.VISUAL_ID; >+ } >+ return getUnrecognizedEnumerationOperations_7015ChildNodeID(domainElement, semanticHint); >+ case ConstraintCompartmentEditPart.VISUAL_ID: >+ if ((semanticHint == null || LiteralStringEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getLiteralString().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeLiteralString_3005((LiteralString) domainElement))) { >+ return LiteralStringEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedConstraintCompartment_7023ChildNodeID(domainElement, semanticHint); >+ case InstanceSpecificationSlotsEditPart.VISUAL_ID: >+ if ((semanticHint == null || SlotEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getSlot().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeSlot_3017((Slot) domainElement))) { >+ return SlotEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedInstanceSpecificationSlots_7028ChildNodeID(domainElement, semanticHint); >+ case PackageEditPart.VISUAL_ID: >+ if ((semanticHint == null || Package2EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodePackage_2002((org.eclipse.uml2.uml.Package) domainElement))) { >+ return Package2EditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || Class2EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeClass_2001((org.eclipse.uml2.uml.Class) domainElement))) { >+ return Class2EditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || AssociationClass2EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getAssociationClass().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeAssociationClass_2007((AssociationClass) domainElement))) { >+ return AssociationClass2EditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || DataType2EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeDataType_2004((DataType) domainElement))) { >+ return DataType2EditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || PrimitiveType2EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getPrimitiveType().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodePrimitiveType_2005((PrimitiveType) domainElement))) { >+ return PrimitiveType2EditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || Enumeration2EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getEnumeration().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeEnumeration_2003((Enumeration) domainElement))) { >+ return Enumeration2EditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || InterfaceEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getInterface().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeInterface_2010((Interface) domainElement))) { >+ return InterfaceEditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || ConstraintEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeConstraint_2006((Constraint) domainElement))) { >+ return ConstraintEditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || InstanceSpecification2EditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getInstanceSpecification().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeInstanceSpecification_2008((InstanceSpecification) domainElement))) { >+ return InstanceSpecification2EditPart.VISUAL_ID; >+ } >+ if ((semanticHint == null || DependencyEditPart.VISUAL_ID == nodeVisualID) && UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isNodeDependency_2009((Dependency) domainElement))) { >+ return DependencyEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedPackage_1000ChildNodeID(domainElement, semanticHint); >+ case Dependency2EditPart.VISUAL_ID: >+ if (DependencyName2EditPart.VISUAL_ID == nodeVisualID) { >+ return DependencyName2EditPart.VISUAL_ID; >+ } >+ return getUnrecognizedDependency_4002LinkLabelID(semanticHint); >+ case Property6EditPart.VISUAL_ID: >+ if (PropertyNameEditPart.VISUAL_ID == nodeVisualID) { >+ return PropertyNameEditPart.VISUAL_ID; >+ } >+ return getUnrecognizedProperty_4003LinkLabelID(semanticHint); >+ case AssociationEditPart.VISUAL_ID: >+ if (AssociationNameEditPart.VISUAL_ID == nodeVisualID) { >+ return AssociationNameEditPart.VISUAL_ID; >+ } >+ if (AssociationName2EditPart.VISUAL_ID == nodeVisualID) { >+ return AssociationName2EditPart.VISUAL_ID; >+ } >+ if (AssociationName3EditPart.VISUAL_ID == nodeVisualID) { >+ return AssociationName3EditPart.VISUAL_ID; >+ } >+ if (AssociationName4EditPart.VISUAL_ID == nodeVisualID) { >+ return AssociationName4EditPart.VISUAL_ID; >+ } >+ if (AssociationName5EditPart.VISUAL_ID == nodeVisualID) { >+ return AssociationName5EditPart.VISUAL_ID; >+ } >+ if (AssociationName6EditPart.VISUAL_ID == nodeVisualID) { >+ return AssociationName6EditPart.VISUAL_ID; >+ } >+ if (AssociationName7EditPart.VISUAL_ID == nodeVisualID) { >+ return AssociationName7EditPart.VISUAL_ID; >+ } >+ return getUnrecognizedAssociation_4005LinkLabelID(semanticHint); >+ } >+ return -1; >+ } >+ >+ /** >+ * @generated >+ */ >+ public static int getLinkWithClassVisualID(EObject domainElement) { >+ if (domainElement == null) { >+ return -1; >+ } >+ EClass domainElementMetaclass = domainElement.eClass(); >+ return getLinkWithClassVisualID(domainElement, domainElementMetaclass); >+ } >+ >+ /** >+ * @generated >+ */ >+ public static int getLinkWithClassVisualID(EObject domainElement, EClass domainElementMetaclass) { >+ if (UMLPackage.eINSTANCE.getGeneralization().isSuperTypeOf(domainElementMetaclass) && (domainElement == null || isLinkWithClassGeneralization_4001((Generalization) domainElement))) { >+ return GeneralizationEditPart.VISUAL_ID; >+ } else if (UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElementMetaclass) && (domainElement == null || isLinkWithClassDependency_4002((Dependency) domainElement))) { >+ return Dependency2EditPart.VISUAL_ID; >+ } else if (UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElementMetaclass) && (domainElement == null || isLinkWithClassProperty_4003((Property) domainElement))) { >+ return Property6EditPart.VISUAL_ID; >+ } else if (UMLPackage.eINSTANCE.getAssociation().isSuperTypeOf(domainElementMetaclass) && (domainElement == null || isLinkWithClassAssociation_4005((Association) domainElement))) { >+ return AssociationEditPart.VISUAL_ID; >+ } else if (UMLPackage.eINSTANCE.getInterfaceRealization().isSuperTypeOf(domainElementMetaclass) >+ && (domainElement == null || isLinkWithClassInterfaceRealization_4008((InterfaceRealization) domainElement))) { >+ return InterfaceRealizationEditPart.VISUAL_ID; >+ } else if (UMLPackage.eINSTANCE.getUsage().isSuperTypeOf(domainElementMetaclass) && (domainElement == null || isLinkWithClassUsage_4009((Usage) domainElement))) { >+ return UsageEditPart.VISUAL_ID; >+ } else { >+ return getUnrecognizedLinkWithClassID(domainElement); >+ } >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isDiagramPackage_1000(org.eclipse.uml2.uml.Package element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedDiagramID(EObject domainElement) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodePackage_2002(org.eclipse.uml2.uml.Package element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeClass_2001(org.eclipse.uml2.uml.Class element) { >+ return Class_2001.matches(element); >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeAssociationClass_2007(AssociationClass element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeDataType_2004(DataType element) { >+ return DataType_2004.matches(element); >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodePrimitiveType_2005(PrimitiveType element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeEnumeration_2003(Enumeration element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeInterface_2010(Interface element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeConstraint_2006(Constraint element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeInstanceSpecification_2008(InstanceSpecification element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeDependency_2009(Dependency element) { >+ return Dependency_2009.matches(element); >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodePackage_3006(org.eclipse.uml2.uml.Package element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeClass_3007(org.eclipse.uml2.uml.Class element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeDataType_3008(DataType element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodePrimitiveType_3009(PrimitiveType element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeEnumeration_3011(Enumeration element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeAssociationClass_3012(AssociationClass element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeInstanceSpecification_3013(InstanceSpecification element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeProperty_3001(Property element) { >+ return Property_3001.matches(element); >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeOperation_3002(Operation element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeClass_3003(org.eclipse.uml2.uml.Class element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodePort_3025(Port element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeProperty_3019(Property element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeOperation_3020(Operation element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeProperty_3014(Property element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeOperation_3015(Operation element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeProperty_3021(Property element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeOperation_3022(Operation element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeEnumerationLiteral_3016(EnumerationLiteral element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeProperty_3023(Property element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeOperation_3024(Operation element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeLiteralString_3005(LiteralString element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isNodeSlot_3017(Slot element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedPackage_2002ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedClass_2001ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedAssociationClass_2007ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedDataType_2004ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedPrimitiveType_2005ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedEnumeration_2003ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedInterface_2010ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedConstraint_2006ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedInstanceSpecification_2008ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedDependency_2009ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedPackage_3006ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedClass_3007ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedDataType_3008ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedPrimitiveType_3009ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedEnumeration_3011ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedAssociationClass_3012ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedInstanceSpecification_3013ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedProperty_3001ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedOperation_3002ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedClass_3003ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedPort_3025ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedProperty_3019ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedOperation_3020ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedProperty_3014ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedOperation_3015ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedProperty_3021ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedOperation_3022ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedEnumerationLiteral_3016ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedProperty_3023ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedOperation_3024ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedLiteralString_3005ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedSlot_3017ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedPackagePackages_7010ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedPackageClassifiers_7011ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedPackageOther_7012ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedClassAttributes_7001ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedClassOperations_7002ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedClassClasses_7003ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedAssociationClassAttributes_7024ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedAssociationClassOperations_7025ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedAssociationClassClasses_7026ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedDataTypeAttributes_7017ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedDataTypeOperations_7018ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedPrimitiveTypeAttributes_7020ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedPrimitiveTypeOperations_7021ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedEnumerationLiterals_7013ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedEnumerationAttributes_7014ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedEnumerationOperations_7015ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedConstraintCompartment_7023ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedInstanceSpecificationSlots_7028ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedPackage_1000ChildNodeID(EObject domainElement, String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedDependency_4002LinkLabelID(String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedProperty_4003LinkLabelID(String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedAssociation_4005LinkLabelID(String semanticHint) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to handle some specific >+ * situations not covered by default logic. >+ * >+ * @generated >+ */ >+ private static int getUnrecognizedLinkWithClassID(EObject domainElement) { >+ return -1; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isLinkWithClassGeneralization_4001(Generalization element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isLinkWithClassDependency_4002(Dependency element) { >+ return Dependency_4002.matches(element); >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isLinkWithClassProperty_4003(Property element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isLinkWithClassAssociation_4005(Association element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isLinkWithClassInterfaceRealization_4008(InterfaceRealization element) { >+ return true; >+ } >+ >+ /** >+ * User can change implementation of this method to check some additional >+ * conditions here. >+ * >+ * @generated >+ */ >+ private static boolean isLinkWithClassUsage_4009(Usage element) { >+ return Usage_4009.matches(element); >+ } >+ >+ /** >+ * @generated >+ */ >+ private static final Matcher Property_3001 = new Matcher(UMLOCLFactory.getExpression("not oclIsKindOf(uml::Port)", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getProperty())); >+ >+ /** >+ * @generated >+ */ >+ private static final Matcher Class_2001 = new Matcher(UMLOCLFactory.getExpression("not oclIsKindOf(uml::AssociationClass) and not oclIsKindOf(uml::StateMachine)", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getClass_())); >+ >+ /** >+ * @generated >+ */ >+ private static final Matcher DataType_2004 = new Matcher(UMLOCLFactory.getExpression("not oclIsKindOf(uml::PrimitiveType) and not oclIsKindOf(uml::Enumeration)", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getDataType())); >+ >+ /** >+ * @generated >+ */ >+ private static final Matcher Dependency_2009 = new Matcher(UMLOCLFactory.getExpression("self.supplier->size() > 1 or self.client->size() > 1", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getDependency())); >+ >+ /** >+ * @generated >+ */ >+ private static final Matcher Dependency_4002 = new Matcher(UMLOCLFactory.getExpression("self.oclIsTypeOf(uml::Dependency) and self.supplier->size() = 1 and self.client->size() = 1", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getDependency())); >+ >+ /** >+ * @generated >+ */ >+ private static final Matcher Usage_4009 = new Matcher(UMLOCLFactory.getExpression( >+ "self.supplier->size() = 1 and self.client->size() = 1 and self.client->forAll(e:NamedElement | e.oclIsKindOf(uml::Classifier))", //$NON-NLS-1$ >+ UMLPackage.eINSTANCE.getUsage())); >+ >+ /** >+ * @generated >+ */ >+ static class Matcher { >+ >+ /** >+ * @generated >+ */ >+ private UMLAbstractExpression condition; >+ >+ /** >+ * @generated >+ */ >+ Matcher(UMLAbstractExpression conditionExpression) { >+ this.condition = conditionExpression; >+ } >+ >+ /** >+ * @generated >+ */ >+ boolean matches(EObject object) { >+ Object result = condition.evaluate(object); >+ return result instanceof Boolean && ((Boolean) result).booleanValue(); >+ } >+ }// Matcher >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationParserTokenManager.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationParserTokenManager.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationParserTokenManager.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/InstanceSpecificationParserTokenManager.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,728 @@ >+/* Generated By:JavaCC: Do not edit this line. InstanceSpecificationParserTokenManager.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.instance; >+import java.io.*; >+import java.util.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupResolver; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class InstanceSpecificationParserTokenManager implements InstanceSpecificationParserConstants >+{ >+ public java.io.PrintStream debugStream = System.out; >+ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } >+private final int jjStopStringLiteralDfa_0(int pos, long active0) >+{ >+ switch (pos) >+ { >+ case 0: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ return 2; >+ } >+ return -1; >+ case 1: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 1; >+ return 2; >+ } >+ return -1; >+ case 2: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 2; >+ return 2; >+ } >+ return -1; >+ case 3: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 3; >+ return 2; >+ } >+ return -1; >+ case 4: >+ if ((active0 & 0x40000L) != 0L) >+ return 2; >+ if ((active0 & 0x1fa0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 4; >+ return 2; >+ } >+ return -1; >+ case 5: >+ if ((active0 & 0x800000L) != 0L) >+ return 2; >+ if ((active0 & 0x17a0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 5; >+ return 2; >+ } >+ return -1; >+ case 6: >+ if ((active0 & 0x280000L) != 0L) >+ return 2; >+ if ((active0 & 0x1520000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 6; >+ return 2; >+ } >+ return -1; >+ case 7: >+ if ((active0 & 0x20000L) != 0L) >+ return 2; >+ if ((active0 & 0x1500000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 7; >+ return 2; >+ } >+ return -1; >+ default : >+ return -1; >+ } >+} >+private final int jjStartNfa_0(int pos, long active0) >+{ >+ return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); >+} >+private final int jjStopAtPos(int pos, int kind) >+{ >+ jjmatchedKind = kind; >+ jjmatchedPos = pos; >+ return pos + 1; >+} >+private final int jjStartNfaWithStates_0(int pos, int kind, int state) >+{ >+ jjmatchedKind = kind; >+ jjmatchedPos = pos; >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { return pos + 1; } >+ return jjMoveNfa_0(state, pos + 1); >+} >+private final int jjMoveStringLiteralDfa0_0() >+{ >+ switch(curChar) >+ { >+ case 9: >+ return jjStopAtPos(0, 2); >+ case 32: >+ return jjStopAtPos(0, 1); >+ case 35: >+ return jjStopAtPos(0, 13); >+ case 42: >+ return jjStopAtPos(0, 16); >+ case 43: >+ return jjStopAtPos(0, 11); >+ case 44: >+ return jjStopAtPos(0, 10); >+ case 45: >+ return jjStopAtPos(0, 12); >+ case 46: >+ return jjStopAtPos(0, 15); >+ case 47: >+ return jjStopAtPos(0, 3); >+ case 58: >+ return jjStopAtPos(0, 4); >+ case 61: >+ return jjStopAtPos(0, 5); >+ case 91: >+ return jjStopAtPos(0, 6); >+ case 93: >+ return jjStopAtPos(0, 7); >+ case 110: >+ return jjMoveStringLiteralDfa1_0(0x1000000L); >+ case 111: >+ return jjMoveStringLiteralDfa1_0(0x200000L); >+ case 114: >+ return jjMoveStringLiteralDfa1_0(0x120000L); >+ case 115: >+ return jjMoveStringLiteralDfa1_0(0x80000L); >+ case 117: >+ return jjMoveStringLiteralDfa1_0(0xc40000L); >+ case 123: >+ return jjStopAtPos(0, 8); >+ case 125: >+ return jjStopAtPos(0, 9); >+ case 126: >+ return jjStopAtPos(0, 14); >+ default : >+ return jjMoveNfa_0(1, 0); >+ } >+} >+private final int jjMoveStringLiteralDfa1_0(long active0) >+{ >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(0, active0); >+ return 1; >+ } >+ switch(curChar) >+ { >+ case 101: >+ return jjMoveStringLiteralDfa2_0(active0, 0x120000L); >+ case 110: >+ return jjMoveStringLiteralDfa2_0(active0, 0xc40000L); >+ case 111: >+ return jjMoveStringLiteralDfa2_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa2_0(active0, 0x200000L); >+ case 117: >+ return jjMoveStringLiteralDfa2_0(active0, 0x80000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(0, active0); >+} >+private final int jjMoveStringLiteralDfa2_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(0, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(1, active0); >+ return 2; >+ } >+ switch(curChar) >+ { >+ case 97: >+ return jjMoveStringLiteralDfa3_0(active0, 0x20000L); >+ case 98: >+ return jjMoveStringLiteralDfa3_0(active0, 0x80000L); >+ case 100: >+ return jjMoveStringLiteralDfa3_0(active0, 0x300000L); >+ case 105: >+ return jjMoveStringLiteralDfa3_0(active0, 0x840000L); >+ case 110: >+ return jjMoveStringLiteralDfa3_0(active0, 0x1000000L); >+ case 111: >+ return jjMoveStringLiteralDfa3_0(active0, 0x400000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(1, active0); >+} >+private final int jjMoveStringLiteralDfa3_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(1, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(2, active0); >+ return 3; >+ } >+ switch(curChar) >+ { >+ case 100: >+ return jjMoveStringLiteralDfa4_0(active0, 0x20000L); >+ case 101: >+ return jjMoveStringLiteralDfa4_0(active0, 0x300000L); >+ case 111: >+ return jjMoveStringLiteralDfa4_0(active0, 0x40000L); >+ case 113: >+ return jjMoveStringLiteralDfa4_0(active0, 0x800000L); >+ case 114: >+ return jjMoveStringLiteralDfa4_0(active0, 0x400000L); >+ case 115: >+ return jjMoveStringLiteralDfa4_0(active0, 0x80000L); >+ case 117: >+ return jjMoveStringLiteralDfa4_0(active0, 0x1000000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(2, active0); >+} >+private final int jjMoveStringLiteralDfa4_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(2, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(3, active0); >+ return 4; >+ } >+ switch(curChar) >+ { >+ case 79: >+ return jjMoveStringLiteralDfa5_0(active0, 0x20000L); >+ case 100: >+ return jjMoveStringLiteralDfa5_0(active0, 0x400000L); >+ case 101: >+ return jjMoveStringLiteralDfa5_0(active0, 0x80000L); >+ case 102: >+ return jjMoveStringLiteralDfa5_0(active0, 0x100000L); >+ case 110: >+ if ((active0 & 0x40000L) != 0L) >+ return jjStartNfaWithStates_0(4, 18, 2); >+ return jjMoveStringLiteralDfa5_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa5_0(active0, 0x200000L); >+ case 117: >+ return jjMoveStringLiteralDfa5_0(active0, 0x800000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(3, active0); >+} >+private final int jjMoveStringLiteralDfa5_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(3, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(4, active0); >+ return 5; >+ } >+ switch(curChar) >+ { >+ case 101: >+ if ((active0 & 0x800000L) != 0L) >+ return jjStartNfaWithStates_0(5, 23, 2); >+ return jjMoveStringLiteralDfa6_0(active0, 0x600000L); >+ case 105: >+ return jjMoveStringLiteralDfa6_0(active0, 0x1100000L); >+ case 110: >+ return jjMoveStringLiteralDfa6_0(active0, 0x20000L); >+ case 116: >+ return jjMoveStringLiteralDfa6_0(active0, 0x80000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(4, active0); >+} >+private final int jjMoveStringLiteralDfa6_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(4, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(5, active0); >+ return 6; >+ } >+ switch(curChar) >+ { >+ case 100: >+ if ((active0 & 0x200000L) != 0L) >+ return jjStartNfaWithStates_0(6, 21, 2); >+ break; >+ case 108: >+ return jjMoveStringLiteralDfa7_0(active0, 0x20000L); >+ case 110: >+ return jjMoveStringLiteralDfa7_0(active0, 0x100000L); >+ case 113: >+ return jjMoveStringLiteralDfa7_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa7_0(active0, 0x400000L); >+ case 115: >+ if ((active0 & 0x80000L) != 0L) >+ return jjStartNfaWithStates_0(6, 19, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(5, active0); >+} >+private final int jjMoveStringLiteralDfa7_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(5, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(6, active0); >+ return 7; >+ } >+ switch(curChar) >+ { >+ case 101: >+ return jjMoveStringLiteralDfa8_0(active0, 0x500000L); >+ case 117: >+ return jjMoveStringLiteralDfa8_0(active0, 0x1000000L); >+ case 121: >+ if ((active0 & 0x20000L) != 0L) >+ return jjStartNfaWithStates_0(7, 17, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(6, active0); >+} >+private final int jjMoveStringLiteralDfa8_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(6, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(7, active0); >+ return 8; >+ } >+ switch(curChar) >+ { >+ case 100: >+ if ((active0 & 0x400000L) != 0L) >+ return jjStartNfaWithStates_0(8, 22, 2); >+ break; >+ case 101: >+ if ((active0 & 0x1000000L) != 0L) >+ return jjStartNfaWithStates_0(8, 24, 2); >+ break; >+ case 115: >+ if ((active0 & 0x100000L) != 0L) >+ return jjStartNfaWithStates_0(8, 20, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(7, active0); >+} >+private final void jjCheckNAdd(int state) >+{ >+ if (jjrounds[state] != jjround) >+ { >+ jjstateSet[jjnewStateCnt++] = state; >+ jjrounds[state] = jjround; >+ } >+} >+private final void jjAddStates(int start, int end) >+{ >+ do { >+ jjstateSet[jjnewStateCnt++] = jjnextStates[start]; >+ } while (start++ != end); >+} >+private final void jjCheckNAddTwoStates(int state1, int state2) >+{ >+ jjCheckNAdd(state1); >+ jjCheckNAdd(state2); >+} >+private final void jjCheckNAddStates(int start, int end) >+{ >+ do { >+ jjCheckNAdd(jjnextStates[start]); >+ } while (start++ != end); >+} >+private final void jjCheckNAddStates(int start) >+{ >+ jjCheckNAdd(jjnextStates[start]); >+ jjCheckNAdd(jjnextStates[start + 1]); >+} >+static final long[] jjbitVec0 = { >+ 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L >+}; >+static final long[] jjbitVec2 = { >+ 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL >+}; >+static final long[] jjbitVec3 = { >+ 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL >+}; >+static final long[] jjbitVec4 = { >+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L >+}; >+static final long[] jjbitVec5 = { >+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L >+}; >+static final long[] jjbitVec6 = { >+ 0x3fffffffffffL, 0x0L, 0x0L, 0x0L >+}; >+private final int jjMoveNfa_0(int startState, int curPos) >+{ >+ int[] nextStates; >+ int startsAt = 0; >+ jjnewStateCnt = 3; >+ int i = 1; >+ jjstateSet[0] = startState; >+ int j, kind = 0x7fffffff; >+ for (;;) >+ { >+ if (++jjround == 0x7fffffff) >+ ReInitRounds(); >+ if (curChar < 64) >+ { >+ long l = 1L << curChar; >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ if ((0x3ff000000000000L & l) != 0L) >+ { >+ if (kind > 25) >+ kind = 25; >+ jjCheckNAdd(0); >+ } >+ else if (curChar == 36) >+ { >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ } >+ break; >+ case 0: >+ if ((0x3ff000000000000L & l) == 0L) >+ break; >+ if (kind > 25) >+ kind = 25; >+ jjCheckNAdd(0); >+ break; >+ case 2: >+ if ((0x3ff001000000000L & l) == 0L) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ else if (curChar < 128) >+ { >+ long l = 1L << (curChar & 077); >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ case 2: >+ if ((0x7fffffe87fffffeL & l) == 0L) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ else >+ { >+ int hiByte = (int)(curChar >> 8); >+ int i1 = hiByte >> 6; >+ long l1 = 1L << (hiByte & 077); >+ int i2 = (curChar & 0xff) >> 6; >+ long l2 = 1L << (curChar & 077); >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ case 2: >+ if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ if (kind != 0x7fffffff) >+ { >+ jjmatchedKind = kind; >+ jjmatchedPos = curPos; >+ kind = 0x7fffffff; >+ } >+ ++curPos; >+ if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) >+ return curPos; >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { return curPos; } >+ } >+} >+static final int[] jjnextStates = { >+}; >+private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) >+{ >+ switch(hiByte) >+ { >+ case 0: >+ return ((jjbitVec2[i2] & l2) != 0L); >+ case 48: >+ return ((jjbitVec3[i2] & l2) != 0L); >+ case 49: >+ return ((jjbitVec4[i2] & l2) != 0L); >+ case 51: >+ return ((jjbitVec5[i2] & l2) != 0L); >+ case 61: >+ return ((jjbitVec6[i2] & l2) != 0L); >+ default : >+ if ((jjbitVec0[i1] & l1) != 0L) >+ return true; >+ return false; >+ } >+} >+public static final String[] jjstrLiteralImages = { >+"", null, null, "\57", "\72", "\75", "\133", "\135", "\173", "\175", "\54", >+"\53", "\55", "\43", "\176", "\56", "\52", "\162\145\141\144\117\156\154\171", >+"\165\156\151\157\156", "\163\165\142\163\145\164\163", "\162\145\144\145\146\151\156\145\163", >+"\157\162\144\145\162\145\144", "\165\156\157\162\144\145\162\145\144", "\165\156\151\161\165\145", >+"\156\157\156\165\156\151\161\165\145", null, null, null, null, }; >+public static final String[] lexStateNames = { >+ "DEFAULT", >+}; >+static final long[] jjtoToken = { >+ 0x7fffff9L, >+}; >+static final long[] jjtoSkip = { >+ 0x6L, >+}; >+static final long[] jjtoSpecial = { >+ 0x6L, >+}; >+protected JavaCharStream input_stream; >+private final int[] jjrounds = new int[3]; >+private final int[] jjstateSet = new int[6]; >+protected char curChar; >+public InstanceSpecificationParserTokenManager(JavaCharStream stream) >+{ >+ if (JavaCharStream.staticFlag) >+ throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); >+ input_stream = stream; >+} >+public InstanceSpecificationParserTokenManager(JavaCharStream stream, int lexState) >+{ >+ this(stream); >+ SwitchTo(lexState); >+} >+public void ReInit(JavaCharStream stream) >+{ >+ jjmatchedPos = jjnewStateCnt = 0; >+ curLexState = defaultLexState; >+ input_stream = stream; >+ ReInitRounds(); >+} >+private final void ReInitRounds() >+{ >+ int i; >+ jjround = 0x80000001; >+ for (i = 3; i-- > 0;) >+ jjrounds[i] = 0x80000000; >+} >+public void ReInit(JavaCharStream stream, int lexState) >+{ >+ ReInit(stream); >+ SwitchTo(lexState); >+} >+public void SwitchTo(int lexState) >+{ >+ if (lexState >= 1 || lexState < 0) >+ throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); >+ else >+ curLexState = lexState; >+} >+ >+protected Token jjFillToken() >+{ >+ Token t = Token.newToken(jjmatchedKind); >+ t.kind = jjmatchedKind; >+ String im = jjstrLiteralImages[jjmatchedKind]; >+ t.image = (im == null) ? input_stream.GetImage() : im; >+ t.beginLine = input_stream.getBeginLine(); >+ t.beginColumn = input_stream.getBeginColumn(); >+ t.endLine = input_stream.getEndLine(); >+ t.endColumn = input_stream.getEndColumn(); >+ return t; >+} >+ >+int curLexState = 0; >+int defaultLexState = 0; >+int jjnewStateCnt; >+int jjround; >+int jjmatchedPos; >+int jjmatchedKind; >+ >+public Token getNextToken() >+{ >+ int kind; >+ Token specialToken = null; >+ Token matchedToken; >+ int curPos = 0; >+ >+ EOFLoop : >+ for (;;) >+ { >+ try >+ { >+ curChar = input_stream.BeginToken(); >+ } >+ catch(java.io.IOException e) >+ { >+ jjmatchedKind = 0; >+ matchedToken = jjFillToken(); >+ matchedToken.specialToken = specialToken; >+ return matchedToken; >+ } >+ >+ jjmatchedKind = 0x7fffffff; >+ jjmatchedPos = 0; >+ curPos = jjMoveStringLiteralDfa0_0(); >+ if (jjmatchedKind != 0x7fffffff) >+ { >+ if (jjmatchedPos + 1 < curPos) >+ input_stream.backup(curPos - jjmatchedPos - 1); >+ if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) >+ { >+ matchedToken = jjFillToken(); >+ matchedToken.specialToken = specialToken; >+ return matchedToken; >+ } >+ else >+ { >+ if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) >+ { >+ matchedToken = jjFillToken(); >+ if (specialToken == null) >+ specialToken = matchedToken; >+ else >+ { >+ matchedToken.specialToken = specialToken; >+ specialToken = (specialToken.next = matchedToken); >+ } >+ } >+ continue EOFLoop; >+ } >+ } >+ int error_line = input_stream.getEndLine(); >+ int error_column = input_stream.getEndColumn(); >+ String error_after = null; >+ boolean EOFSeen = false; >+ try { input_stream.readChar(); input_stream.backup(1); } >+ catch (java.io.IOException e1) { >+ EOFSeen = true; >+ error_after = curPos <= 1 ? "" : input_stream.GetImage(); >+ if (curChar == '\n' || curChar == '\r') { >+ error_line++; >+ error_column = 0; >+ } >+ else >+ error_column++; >+ } >+ if (!EOFSeen) { >+ input_stream.backup(1); >+ error_after = curPos <= 1 ? "" : input_stream.GetImage(); >+ } >+ throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); >+ } >+} >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Class3ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Class3ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Class3ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Class3ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Class3ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Class3EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/Token.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/Token.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/Token.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/Token.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,92 @@ >+/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.end; >+ >+/** >+ * Describes the input token stream. >+ */ >+ >+public class Token { >+ >+ /** >+ * An integer that describes the kind of this token. This numbering >+ * system is determined by JavaCCParser, and a table of these numbers is >+ * stored in the file ...Constants.java. >+ */ >+ public int kind; >+ >+ /** >+ * beginLine and beginColumn describe the position of the first character >+ * of this token; endLine and endColumn describe the position of the >+ * last character of this token. >+ */ >+ public int beginLine, beginColumn, endLine, endColumn; >+ >+ /** >+ * The string image of the token. >+ */ >+ public String image; >+ >+ /** >+ * A reference to the next regular (non-special) token from the input >+ * stream. If this is the last token from the input stream, or if the >+ * token manager has not read tokens beyond this one, this field is >+ * set to null. This is true only if this token is also a regular >+ * token. Otherwise, see below for a description of the contents of >+ * this field. >+ */ >+ public Token next; >+ >+ /** >+ * This field is used to access special tokens that occur prior to this >+ * token, but after the immediately preceding regular (non-special) token. >+ * If there are no such special tokens, this field is set to null. >+ * When there are more than one such special token, this field refers >+ * to the last of these special tokens, which in turn refers to the next >+ * previous special token through its specialToken field, and so on >+ * until the first special token (whose specialToken field is null). >+ * The next fields of special tokens refer to other special tokens that >+ * immediately follow it (without an intervening regular token). If there >+ * is no such token, this field is null. >+ */ >+ public Token specialToken; >+ >+ /** >+ * Returns the image. >+ */ >+ public String toString() >+ { >+ return image; >+ } >+ >+ /** >+ * Returns a new Token object, by default. However, if you want, you >+ * can create and return subclass objects based on the value of ofKind. >+ * Simply add the cases to the switch for all those special cases. >+ * For example, if you have a subclass of Token called IDToken that >+ * you want to create if ofKind is ID, simlpy add something like : >+ * >+ * case MyParserConstants.ID : return new IDToken(); >+ * >+ * to the following switch statement. Then you can cast matchedToken >+ * variable to the appropriate type and use it in your lexical actions. >+ */ >+ public static final Token newToken(int ofKind) >+ { >+ switch(ofKind) >+ { >+ default : return new Token(); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorSorter.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorSorter.java >diff -N src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorSorter.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorSorter.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+package org.eclipse.uml2.diagram.clazz.navigator; >+ >+import org.eclipse.jface.viewers.ViewerSorter; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+ >+/** >+ * @generated >+ */ >+public class UMLNavigatorSorter extends ViewerSorter { >+ >+ /** >+ * @generated >+ */ >+ private static final int GROUP_CATEGORY = 7029; >+ >+ /** >+ * @generated >+ */ >+ public int category(Object element) { >+ if (element instanceof UMLNavigatorItem) { >+ UMLNavigatorItem item = (UMLNavigatorItem) element; >+ if (PackageEditPart.MODEL_ID.equals(item.getModelID())) { >+ return item.getVisualID(); >+ } >+ } >+ return GROUP_CATEGORY; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/ClassViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/ClassViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/ClassViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/ClassViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class ClassViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.ClassEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencySupplierEditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencySupplierEditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencySupplierEditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/DependencySupplierEditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class DependencySupplierEditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/GeneralizationEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/GeneralizationEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/GeneralizationEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/GeneralizationEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class GeneralizationEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/AssociationEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/AssociationEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/AssociationEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/AssociationEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class AssociationEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/sheet/UMLPropertySection.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/sheet/UMLPropertySection.java >diff -N src/org/eclipse/uml2/diagram/clazz/sheet/UMLPropertySection.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/sheet/UMLPropertySection.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,107 @@ >+package org.eclipse.uml2.diagram.clazz.sheet; >+ >+import java.util.ArrayList; >+import java.util.Iterator; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.common.notify.AdapterFactory; >+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; >+import org.eclipse.emf.edit.provider.IItemPropertySource; >+import org.eclipse.emf.edit.ui.provider.PropertySource; >+import org.eclipse.emf.transaction.TransactionalEditingDomain; >+import org.eclipse.emf.transaction.util.TransactionUtil; >+import org.eclipse.gef.EditPart; >+import org.eclipse.gmf.runtime.diagram.ui.properties.sections.AdvancedPropertySection; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.jface.viewers.ISelection; >+import org.eclipse.jface.viewers.StructuredSelection; >+import org.eclipse.ui.IWorkbenchPart; >+import org.eclipse.ui.views.properties.IPropertySource; >+import org.eclipse.ui.views.properties.IPropertySourceProvider; >+ >+/** >+ * @generated >+ */ >+public class UMLPropertySection extends AdvancedPropertySection implements IPropertySourceProvider { >+ >+ /** >+ * @generated >+ */ >+ public IPropertySource getPropertySource(Object object) { >+ if (object instanceof IPropertySource) { >+ return (IPropertySource) object; >+ } >+ AdapterFactory af = getAdapterFactory(object); >+ if (af != null) { >+ IItemPropertySource ips = (IItemPropertySource) af.adapt(object, IItemPropertySource.class); >+ if (ips != null) { >+ return new PropertySource(object, ips); >+ } >+ } >+ if (object instanceof IAdaptable) { >+ return (IPropertySource) ((IAdaptable) object).getAdapter(IPropertySource.class); >+ } >+ return null; >+ } >+ >+ /** >+ * Modify/unwrap selection. >+ * @generated >+ */ >+ protected Object transformSelection(Object selected) { >+ if (selected instanceof EditPart) { >+ Object model = ((EditPart) selected).getModel(); >+ return model instanceof View ? ((View) model).getElement() : null; >+ } >+ if (selected instanceof View) { >+ return ((View) selected).getElement(); >+ } >+ if (selected instanceof IAdaptable) { >+ View view = (View) ((IAdaptable) selected).getAdapter(View.class); >+ if (view != null) { >+ return view.getElement(); >+ } >+ } >+ return selected; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IPropertySourceProvider getPropertySourceProvider() { >+ return this; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setInput(IWorkbenchPart part, ISelection selection) { >+ if (selection.isEmpty() || false == selection instanceof StructuredSelection) { >+ super.setInput(part, selection); >+ return; >+ } >+ final StructuredSelection structuredSelection = ((StructuredSelection) selection); >+ ArrayList transformedSelection = new ArrayList(structuredSelection.size()); >+ for (Iterator it = structuredSelection.iterator(); it.hasNext();) { >+ Object r = transformSelection(it.next()); >+ if (r != null) { >+ transformedSelection.add(r); >+ } >+ } >+ super.setInput(part, new StructuredSelection(transformedSelection)); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected AdapterFactory getAdapterFactory(Object object) { >+ if (getEditingDomain() instanceof AdapterFactoryEditingDomain) { >+ return ((AdapterFactoryEditingDomain) getEditingDomain()).getAdapterFactory(); >+ } >+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(object); >+ if (editingDomain != null) { >+ return ((AdapterFactoryEditingDomain) editingDomain).getAdapterFactory(); >+ } >+ return null; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/providers/UMLModelingAssistantProvider.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/providers/UMLModelingAssistantProvider.java >diff -N src/org/eclipse/uml2/diagram/clazz/providers/UMLModelingAssistantProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/providers/UMLModelingAssistantProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,259 @@ >+package org.eclipse.uml2.diagram.clazz.providers; >+ >+import java.util.ArrayList; >+import java.util.Collection; >+import java.util.Collections; >+import java.util.HashSet; >+import java.util.Iterator; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; >+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; >+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; >+import org.eclipse.gmf.runtime.emf.type.core.IElementType; >+import org.eclipse.gmf.runtime.emf.ui.services.modelingassistant.ModelingAssistantProvider; >+import org.eclipse.gmf.runtime.notation.Diagram; >+import org.eclipse.jface.viewers.ILabelProvider; >+import org.eclipse.jface.window.Window; >+import org.eclipse.swt.widgets.Display; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.ui.dialogs.ElementListSelectionDialog; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClass2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Class2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataType2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Enumeration2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecification2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Package2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveType2EditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorPlugin; >+ >+/** >+ * @generated >+ */ >+public class UMLModelingAssistantProvider extends ModelingAssistantProvider { >+ >+ /** >+ * @generated >+ */ >+ public List getTypesForPopupBar(IAdaptable host) { >+ IGraphicalEditPart editPart = (IGraphicalEditPart) host.getAdapter(IGraphicalEditPart.class); >+ if (editPart instanceof Package2EditPart) { >+ List types = new ArrayList(); >+ types.add(UMLElementTypes.Package_3006); >+ types.add(UMLElementTypes.Class_3007); >+ types.add(UMLElementTypes.DataType_3008); >+ types.add(UMLElementTypes.PrimitiveType_3009); >+ types.add(UMLElementTypes.Enumeration_3011); >+ types.add(UMLElementTypes.AssociationClass_3012); >+ types.add(UMLElementTypes.InstanceSpecification_3013); >+ return types; >+ } >+ if (editPart instanceof Class2EditPart) { >+ List types = new ArrayList(); >+ types.add(UMLElementTypes.Port_3025); >+ types.add(UMLElementTypes.Property_3001); >+ types.add(UMLElementTypes.Operation_3002); >+ types.add(UMLElementTypes.Class_3003); >+ return types; >+ } >+ if (editPart instanceof AssociationClass2EditPart) { >+ List types = new ArrayList(); >+ types.add(UMLElementTypes.Property_3019); >+ types.add(UMLElementTypes.Operation_3020); >+ types.add(UMLElementTypes.Class_3003); >+ return types; >+ } >+ if (editPart instanceof DataType2EditPart) { >+ List types = new ArrayList(); >+ types.add(UMLElementTypes.Property_3014); >+ types.add(UMLElementTypes.Operation_3015); >+ return types; >+ } >+ if (editPart instanceof PrimitiveType2EditPart) { >+ List types = new ArrayList(); >+ types.add(UMLElementTypes.Property_3021); >+ types.add(UMLElementTypes.Operation_3022); >+ return types; >+ } >+ if (editPart instanceof Enumeration2EditPart) { >+ List types = new ArrayList(); >+ types.add(UMLElementTypes.EnumerationLiteral_3016); >+ types.add(UMLElementTypes.Property_3023); >+ types.add(UMLElementTypes.Operation_3024); >+ return types; >+ } >+ if (editPart instanceof ConstraintEditPart) { >+ List types = new ArrayList(); >+ types.add(UMLElementTypes.LiteralString_3005); >+ return types; >+ } >+ if (editPart instanceof InstanceSpecification2EditPart) { >+ List types = new ArrayList(); >+ types.add(UMLElementTypes.Slot_3017); >+ return types; >+ } >+ if (editPart instanceof PackageEditPart) { >+ List types = new ArrayList(); >+ types.add(UMLElementTypes.Package_2002); >+ types.add(UMLElementTypes.Class_2001); >+ types.add(UMLElementTypes.AssociationClass_2007); >+ types.add(UMLElementTypes.DataType_2004); >+ types.add(UMLElementTypes.PrimitiveType_2005); >+ types.add(UMLElementTypes.Enumeration_2003); >+ types.add(UMLElementTypes.Interface_2010); >+ types.add(UMLElementTypes.Constraint_2006); >+ types.add(UMLElementTypes.InstanceSpecification_2008); >+ types.add(UMLElementTypes.Dependency_2009); >+ return types; >+ } >+ return Collections.EMPTY_LIST; >+ } >+ >+ /** >+ * @generated >+ */ >+ public List getRelTypesOnSource(IAdaptable source) { >+ IGraphicalEditPart sourceEditPart = (IGraphicalEditPart) source.getAdapter(IGraphicalEditPart.class); >+ if (sourceEditPart instanceof ConstraintEditPart) { >+ List types = new ArrayList(); >+ types.add(UMLElementTypes.ConstraintConstrainedElement_4004); >+ return types; >+ } >+ if (sourceEditPart instanceof DependencyEditPart) { >+ List types = new ArrayList(); >+ types.add(UMLElementTypes.DependencySupplier_4006); >+ types.add(UMLElementTypes.DependencyClient_4007); >+ return types; >+ } >+ return Collections.EMPTY_LIST; >+ } >+ >+ /** >+ * @generated >+ */ >+ public List getRelTypesOnTarget(IAdaptable target) { >+ IGraphicalEditPart targetEditPart = (IGraphicalEditPart) target.getAdapter(IGraphicalEditPart.class); >+ if (targetEditPart instanceof InterfaceEditPart) { >+ List types = new ArrayList(); >+ types.add(UMLElementTypes.InterfaceRealization_4008); >+ return types; >+ } >+ return Collections.EMPTY_LIST; >+ } >+ >+ /** >+ * @generated >+ */ >+ public List getRelTypesOnSourceAndTarget(IAdaptable source, IAdaptable target) { >+ IGraphicalEditPart sourceEditPart = (IGraphicalEditPart) source.getAdapter(IGraphicalEditPart.class); >+ IGraphicalEditPart targetEditPart = (IGraphicalEditPart) target.getAdapter(IGraphicalEditPart.class); >+ if (sourceEditPart instanceof ConstraintEditPart) { >+ List types = new ArrayList(); >+ return types; >+ } >+ if (sourceEditPart instanceof DependencyEditPart) { >+ List types = new ArrayList(); >+ return types; >+ } >+ return Collections.EMPTY_LIST; >+ } >+ >+ /** >+ * @generated >+ */ >+ public List getTypesForSource(IAdaptable target, IElementType relationshipType) { >+ IGraphicalEditPart targetEditPart = (IGraphicalEditPart) target.getAdapter(IGraphicalEditPart.class); >+ if (targetEditPart instanceof InterfaceEditPart) { >+ List types = new ArrayList(); >+ return types; >+ } >+ return Collections.EMPTY_LIST; >+ } >+ >+ /** >+ * @generated >+ */ >+ public List getTypesForTarget(IAdaptable source, IElementType relationshipType) { >+ IGraphicalEditPart sourceEditPart = (IGraphicalEditPart) source.getAdapter(IGraphicalEditPart.class); >+ if (sourceEditPart instanceof ConstraintEditPart) { >+ List types = new ArrayList(); >+ return types; >+ } >+ if (sourceEditPart instanceof DependencyEditPart) { >+ List types = new ArrayList(); >+ return types; >+ } >+ return Collections.EMPTY_LIST; >+ } >+ >+ /** >+ * @generated >+ */ >+ public EObject selectExistingElementForSource(IAdaptable target, IElementType relationshipType) { >+ return selectExistingElement(target, getTypesForSource(target, relationshipType)); >+ } >+ >+ /** >+ * @generated >+ */ >+ public EObject selectExistingElementForTarget(IAdaptable source, IElementType relationshipType) { >+ return selectExistingElement(source, getTypesForTarget(source, relationshipType)); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected EObject selectExistingElement(IAdaptable host, Collection types) { >+ if (types.isEmpty()) { >+ return null; >+ } >+ IGraphicalEditPart editPart = (IGraphicalEditPart) host.getAdapter(IGraphicalEditPart.class); >+ if (editPart == null) { >+ return null; >+ } >+ Diagram diagram = (Diagram) editPart.getRoot().getContents().getModel(); >+ Collection elements = new HashSet(); >+ for (Iterator it = diagram.getElement().eAllContents(); it.hasNext();) { >+ EObject element = (EObject) it.next(); >+ if (isApplicableElement(element, types)) { >+ elements.add(element); >+ } >+ } >+ if (elements.isEmpty()) { >+ return null; >+ } >+ return selectElement((EObject[]) elements.toArray(new EObject[elements.size()])); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected boolean isApplicableElement(EObject element, Collection types) { >+ IElementType type = ElementTypeRegistry.getInstance().getElementType(element); >+ return types.contains(type); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected EObject selectElement(EObject[] elements) { >+ Shell shell = Display.getCurrent().getActiveShell(); >+ ILabelProvider labelProvider = new AdapterFactoryLabelProvider(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory()); >+ ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, labelProvider); >+ dialog.setMessage("Available domain model elements:"); >+ dialog.setTitle("Select domain model element"); >+ dialog.setMultipleSelection(false); >+ dialog.setElements(elements); >+ EObject selected = null; >+ if (dialog.open() == Window.OK) { >+ selected = (EObject) dialog.getFirstResult(); >+ } >+ return selected; >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyParser.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyParser.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyParser.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyParser.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,669 @@ >+/* Generated By:JavaCC: Do not edit this line. PropertyParser.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.property; >+ >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupResolver; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class PropertyParser extends ExternalParserBase implements PropertyParserConstants { >+ private Property mySubject; >+ >+ private static class TypeLookupCallback implements LookupResolver.Callback { >+ private final Property myProperty; >+ >+ public TypeLookupCallback(Property property){ >+ myProperty = property; >+ } >+ >+ public void lookupResolved(NamedElement resolution) { >+ if (resolution instanceof Type){ >+ myProperty.setType((Type)resolution); >+ } >+ } >+ } >+ >+ public PropertyParser(){ >+ this(new StringReader("")); >+ } >+ >+ public PropertyParser(LookupSuite lookup){ >+ this(); >+ setLookupSuite(lookup); >+ } >+ >+ public EClass getSubjectClass(){ >+ return UMLPackage.eINSTANCE.getProperty(); >+ } >+ >+ public void parse(EObject target, String text) throws ExternalParserException { >+ checkContext(); >+ ReInit(new StringReader(text)); >+ mySubject = (Property)target; >+ Declaration(); >+ mySubject = null; >+ } >+ >+ protected static int parseInt(Token t) throws ParseException { >+ if (t.kind != PropertyParserConstants.INTEGER_LITERAL){ >+ throw new IllegalStateException("Token: " + t + ", image: " + t.image); >+ } >+ try { >+ return Integer.parseInt(t.image); //XXX: "0005", "99999999999999999999999" >+ } catch (NumberFormatException e){ >+ throw new ParseException("Not supported integer value:" + t.image); >+ } >+ } >+ >+ final public void Declaration() throws ParseException { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case PLUS: >+ case MINUS: >+ case NUMBER_SIGN: >+ case TILDE: >+ Visibility(); >+ break; >+ default: >+ jj_la1[0] = jj_gen; >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case SLASH: >+ IsDerived(); >+ break; >+ default: >+ jj_la1[1] = jj_gen; >+ ; >+ } >+ PropertyName(); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case COLON: >+ PropertyType(); >+ break; >+ default: >+ jj_la1[2] = jj_gen; >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case LBRACKET: >+ Multiplicity(); >+ break; >+ default: >+ jj_la1[3] = jj_gen; >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case EQUALS: >+ DefaultValue(); >+ break; >+ default: >+ jj_la1[4] = jj_gen; >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case LCURLY: >+ PropertyModifiers(); >+ break; >+ default: >+ jj_la1[5] = jj_gen; >+ ; >+ } >+ jj_consume_token(0); >+ } >+ >+ final public void PropertyName() throws ParseException { >+ String name; >+ name = NameWithSpaces(); >+ mySubject.setName(name); >+ } >+ >+ final public void Visibility() throws ParseException { >+ VisibilityKind kind; >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case PLUS: >+ jj_consume_token(PLUS); >+ kind = VisibilityKind.PUBLIC_LITERAL; >+ break; >+ case MINUS: >+ jj_consume_token(MINUS); >+ kind = VisibilityKind.PRIVATE_LITERAL; >+ break; >+ case NUMBER_SIGN: >+ jj_consume_token(NUMBER_SIGN); >+ kind = VisibilityKind.PROTECTED_LITERAL; >+ break; >+ case TILDE: >+ jj_consume_token(TILDE); >+ kind = VisibilityKind.PACKAGE_LITERAL; >+ break; >+ default: >+ jj_la1[6] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ mySubject.setVisibility(kind); >+ } >+ >+ final public void Multiplicity() throws ParseException { >+ MultiplicityRange(); >+ } >+ >+/* XXX: Parse conflict in case of empty default value >+void MultiplicityDesignator() : >+{ } >+{ >+ <LCURLY> >+ ( >+ ( MultiplicityUnique() [ MultiplicityOrdered() ] ) >+ | >+ ( MultiplicityOrdered() [ MultiplicityUnique() ] ) >+ ) >+ <RCURLY> >+} >+ >+void MultiplicityUnique() : >+{} >+{ >+ <UNIQUE> { mySubject.setIsUnique(true); } >+ | >+ <NON_UNIQUE> { mySubject.setIsUnique(false); } >+} >+ >+void MultiplicityOrdered() : >+{} >+{ >+ <ORDERED> { mySubject.setIsOrdered(true); } >+ | >+ <UNORDERED> { mySubject.setIsOrdered(false); } >+} >+ >+*/ >+ >+/* XXX: ValueSpecification -- how to parse */ >+ final public void MultiplicityRange() throws ParseException { >+ Token tLower = null; >+ Token tUpper; >+ jj_consume_token(LBRACKET); >+ if (jj_2_1(2)) { >+ tLower = jj_consume_token(INTEGER_LITERAL); >+ jj_consume_token(DOT); >+ jj_consume_token(DOT); >+ mySubject.setLower(parseInt(tLower)); >+ } else { >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case STAR: >+ tUpper = jj_consume_token(STAR); >+ if (tLower == null){ >+ mySubject.setLower(0); >+ } >+ mySubject.setUpper(LiteralUnlimitedNatural.UNLIMITED); >+ break; >+ case INTEGER_LITERAL: >+ tUpper = jj_consume_token(INTEGER_LITERAL); >+ if (tLower == null){ >+ mySubject.setLower(parseInt(tUpper)); >+ } >+ mySubject.setUpper(parseInt(tUpper)); >+ break; >+ default: >+ jj_la1[7] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ jj_consume_token(RBRACKET); >+ } >+ >+ final public void IsDerived() throws ParseException { >+ jj_consume_token(SLASH); >+ mySubject.setIsDerived(true); >+ } >+ >+ final public void PropertyType() throws ParseException { >+ String type; >+ jj_consume_token(COLON); >+ type = NameWithSpaces(); >+ applyLookup(Type.class, type, new TypeLookupCallback(mySubject)); >+ } >+ >+ final public String NameWithSpaces() throws ParseException { >+ StringBuffer result = new StringBuffer(); >+ Token t; >+ t = jj_consume_token(IDENTIFIER); >+ result.append(t.image); >+ label_1: >+ while (true) { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case IDENTIFIER: >+ ; >+ break; >+ default: >+ jj_la1[8] = jj_gen; >+ break label_1; >+ } >+ t = jj_consume_token(IDENTIFIER); >+ result.append(' '); result.append(t.image); >+ } >+ {if (true) return result.toString();} >+ throw new Error("Missing return statement in function"); >+ } >+ >+ final public void DefaultValue() throws ParseException { >+ Token t; >+ jj_consume_token(EQUALS); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case IDENTIFIER: >+ t = jj_consume_token(IDENTIFIER); >+ break; >+ case INTEGER_LITERAL: >+ t = jj_consume_token(INTEGER_LITERAL); >+ >+ break; >+ default: >+ jj_la1[9] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ mySubject.setDefault(t.image); >+ } >+ >+ final public void SimpleTokenPropertyModifier() throws ParseException { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case READ_ONLY: >+ jj_consume_token(READ_ONLY); >+ mySubject.setIsReadOnly(true); >+ break; >+ case UNION: >+ jj_consume_token(UNION); >+ mySubject.setIsDerivedUnion(true); >+ break; >+ case ORDERED: >+ jj_consume_token(ORDERED); >+ mySubject.setIsOrdered(true); >+ break; >+ case UNORDERED: >+ jj_consume_token(UNORDERED); >+ mySubject.setIsOrdered(false); >+ break; >+ case UNIQUE: >+ jj_consume_token(UNIQUE); >+ mySubject.setIsUnique(true); >+ break; >+ case NON_UNIQUE: >+ jj_consume_token(NON_UNIQUE); >+ mySubject.setIsUnique(false); >+ break; >+ default: >+ jj_la1[10] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ } >+ >+ final public void ReferencingPropertyModifier() throws ParseException { >+ String name; >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case SUBSETS: >+ jj_consume_token(SUBSETS); >+ name = NameWithSpaces(); >+ Property subsets = lookup(Property.class, name); >+ if (subsets != null) { >+ mySubject.getSubsettedProperties().add(subsets); >+ } >+ break; >+ case REDEFINES: >+ jj_consume_token(REDEFINES); >+ name = NameWithSpaces(); >+ RedefinableElement redefines = lookup(RedefinableElement.class, name); >+ if (redefines != null) { >+ mySubject.getRedefinedElements().add(redefines); >+ } >+ break; >+ default: >+ jj_la1[11] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ } >+ >+ final public void PropertyModifiers() throws ParseException { >+ jj_consume_token(LCURLY); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case READ_ONLY: >+ case UNION: >+ case ORDERED: >+ case UNORDERED: >+ case UNIQUE: >+ case NON_UNIQUE: >+ SimpleTokenPropertyModifier(); >+ break; >+ case SUBSETS: >+ case REDEFINES: >+ ReferencingPropertyModifier(); >+ break; >+ default: >+ jj_la1[12] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ label_2: >+ while (true) { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case COMMA: >+ ; >+ break; >+ default: >+ jj_la1[13] = jj_gen; >+ break label_2; >+ } >+ jj_consume_token(COMMA); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case READ_ONLY: >+ case UNION: >+ case ORDERED: >+ case UNORDERED: >+ case UNIQUE: >+ case NON_UNIQUE: >+ SimpleTokenPropertyModifier(); >+ break; >+ case SUBSETS: >+ case REDEFINES: >+ ReferencingPropertyModifier(); >+ break; >+ default: >+ jj_la1[14] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ } >+ jj_consume_token(RCURLY); >+ } >+ >+ final private boolean jj_2_1(int xla) { >+ jj_la = xla; jj_lastpos = jj_scanpos = token; >+ try { return !jj_3_1(); } >+ catch(LookaheadSuccess ls) { return true; } >+ finally { jj_save(0, xla); } >+ } >+ >+ final private boolean jj_3_1() { >+ if (jj_scan_token(INTEGER_LITERAL)) return true; >+ if (jj_scan_token(DOT)) return true; >+ return false; >+ } >+ >+ public PropertyParserTokenManager token_source; >+ JavaCharStream jj_input_stream; >+ public Token token, jj_nt; >+ private int jj_ntk; >+ private Token jj_scanpos, jj_lastpos; >+ private int jj_la; >+ public boolean lookingAhead = false; >+ private boolean jj_semLA; >+ private int jj_gen; >+ final private int[] jj_la1 = new int[15]; >+ static private int[] jj_la1_0; >+ static { >+ jj_la1_0(); >+ } >+ private static void jj_la1_0() { >+ jj_la1_0 = new int[] {0x7800,0x8,0x10,0x40,0x20,0x100,0x7800,0x2010000,0x4000000,0x6000000,0x1e60000,0x180000,0x1fe0000,0x400,0x1fe0000,}; >+ } >+ final private JJCalls[] jj_2_rtns = new JJCalls[1]; >+ private boolean jj_rescan = false; >+ private int jj_gc = 0; >+ >+ public PropertyParser(java.io.InputStream stream) { >+ jj_input_stream = new JavaCharStream(stream, 1, 1); >+ token_source = new PropertyParserTokenManager(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 15; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public void ReInit(java.io.InputStream stream) { >+ jj_input_stream.ReInit(stream, 1, 1); >+ token_source.ReInit(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 15; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public PropertyParser(java.io.Reader stream) { >+ jj_input_stream = new JavaCharStream(stream, 1, 1); >+ token_source = new PropertyParserTokenManager(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 15; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public void ReInit(java.io.Reader stream) { >+ jj_input_stream.ReInit(stream, 1, 1); >+ token_source.ReInit(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 15; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public PropertyParser(PropertyParserTokenManager tm) { >+ token_source = tm; >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 15; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ public void ReInit(PropertyParserTokenManager tm) { >+ token_source = tm; >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 15; i++) jj_la1[i] = -1; >+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); >+ } >+ >+ final private Token jj_consume_token(int kind) throws ParseException { >+ Token oldToken; >+ if ((oldToken = token).next != null) token = token.next; >+ else token = token.next = token_source.getNextToken(); >+ jj_ntk = -1; >+ if (token.kind == kind) { >+ jj_gen++; >+ if (++jj_gc > 100) { >+ jj_gc = 0; >+ for (int i = 0; i < jj_2_rtns.length; i++) { >+ JJCalls c = jj_2_rtns[i]; >+ while (c != null) { >+ if (c.gen < jj_gen) c.first = null; >+ c = c.next; >+ } >+ } >+ } >+ return token; >+ } >+ token = oldToken; >+ jj_kind = kind; >+ throw generateParseException(); >+ } >+ >+ static private final class LookaheadSuccess extends java.lang.Error { } >+ final private LookaheadSuccess jj_ls = new LookaheadSuccess(); >+ final private boolean jj_scan_token(int kind) { >+ if (jj_scanpos == jj_lastpos) { >+ jj_la--; >+ if (jj_scanpos.next == null) { >+ jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); >+ } else { >+ jj_lastpos = jj_scanpos = jj_scanpos.next; >+ } >+ } else { >+ jj_scanpos = jj_scanpos.next; >+ } >+ if (jj_rescan) { >+ int i = 0; Token tok = token; >+ while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } >+ if (tok != null) jj_add_error_token(kind, i); >+ } >+ if (jj_scanpos.kind != kind) return true; >+ if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; >+ return false; >+ } >+ >+ final public Token getNextToken() { >+ if (token.next != null) token = token.next; >+ else token = token.next = token_source.getNextToken(); >+ jj_ntk = -1; >+ jj_gen++; >+ return token; >+ } >+ >+ final public Token getToken(int index) { >+ Token t = lookingAhead ? jj_scanpos : token; >+ for (int i = 0; i < index; i++) { >+ if (t.next != null) t = t.next; >+ else t = t.next = token_source.getNextToken(); >+ } >+ return t; >+ } >+ >+ final private int jj_ntk() { >+ if ((jj_nt=token.next) == null) >+ return (jj_ntk = (token.next=token_source.getNextToken()).kind); >+ else >+ return (jj_ntk = jj_nt.kind); >+ } >+ >+ private java.util.Vector jj_expentries = new java.util.Vector(); >+ private int[] jj_expentry; >+ private int jj_kind = -1; >+ private int[] jj_lasttokens = new int[100]; >+ private int jj_endpos; >+ >+ private void jj_add_error_token(int kind, int pos) { >+ if (pos >= 100) return; >+ if (pos == jj_endpos + 1) { >+ jj_lasttokens[jj_endpos++] = kind; >+ } else if (jj_endpos != 0) { >+ jj_expentry = new int[jj_endpos]; >+ for (int i = 0; i < jj_endpos; i++) { >+ jj_expentry[i] = jj_lasttokens[i]; >+ } >+ boolean exists = false; >+ for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) { >+ int[] oldentry = (int[])(e.nextElement()); >+ if (oldentry.length == jj_expentry.length) { >+ exists = true; >+ for (int i = 0; i < jj_expentry.length; i++) { >+ if (oldentry[i] != jj_expentry[i]) { >+ exists = false; >+ break; >+ } >+ } >+ if (exists) break; >+ } >+ } >+ if (!exists) jj_expentries.addElement(jj_expentry); >+ if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; >+ } >+ } >+ >+ public ParseException generateParseException() { >+ jj_expentries.removeAllElements(); >+ boolean[] la1tokens = new boolean[29]; >+ for (int i = 0; i < 29; i++) { >+ la1tokens[i] = false; >+ } >+ if (jj_kind >= 0) { >+ la1tokens[jj_kind] = true; >+ jj_kind = -1; >+ } >+ for (int i = 0; i < 15; i++) { >+ if (jj_la1[i] == jj_gen) { >+ for (int j = 0; j < 32; j++) { >+ if ((jj_la1_0[i] & (1<<j)) != 0) { >+ la1tokens[j] = true; >+ } >+ } >+ } >+ } >+ for (int i = 0; i < 29; i++) { >+ if (la1tokens[i]) { >+ jj_expentry = new int[1]; >+ jj_expentry[0] = i; >+ jj_expentries.addElement(jj_expentry); >+ } >+ } >+ jj_endpos = 0; >+ jj_rescan_token(); >+ jj_add_error_token(0, 0); >+ int[][] exptokseq = new int[jj_expentries.size()][]; >+ for (int i = 0; i < jj_expentries.size(); i++) { >+ exptokseq[i] = (int[])jj_expentries.elementAt(i); >+ } >+ return new ParseException(token, exptokseq, tokenImage); >+ } >+ >+ final public void enable_tracing() { >+ } >+ >+ final public void disable_tracing() { >+ } >+ >+ final private void jj_rescan_token() { >+ jj_rescan = true; >+ for (int i = 0; i < 1; i++) { >+ JJCalls p = jj_2_rtns[i]; >+ do { >+ if (p.gen > jj_gen) { >+ jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; >+ switch (i) { >+ case 0: jj_3_1(); break; >+ } >+ } >+ p = p.next; >+ } while (p != null); >+ } >+ jj_rescan = false; >+ } >+ >+ final private void jj_save(int index, int xla) { >+ JJCalls p = jj_2_rtns[index]; >+ while (p.gen > jj_gen) { >+ if (p.next == null) { p = p.next = new JJCalls(); break; } >+ p = p.next; >+ } >+ p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; >+ } >+ >+ static final class JJCalls { >+ int gen; >+ Token first; >+ int arg; >+ JJCalls next; >+ } >+ >+} >Index: icons/linkTargetNavigatorGroup.gif >=================================================================== >RCS file: icons/linkTargetNavigatorGroup.gif >diff -N icons/linkTargetNavigatorGroup.gif >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ icons/linkTargetNavigatorGroup.gif 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,5 @@ >+GIF89aÕÿÿr/GøØf'øÐxøàøÐf>2èÆøè°èÐøðÈÿÿÿÃ6úöºøà øØ?]FøèÒ«üößãϹ´2àÀxr+ðØ?¥l$yO@_l$?R¼2ï߯¼ 2à 6!ù,s@pH,?È#âèh:¨T0ô4® >+à?p©Ñd¢Y`B¡p8G AØ%%HÁçW¶ _B???B¥¦¥ B®©C³´µI·¸FA;Content-Type: image/gif >+ >+GIF89aÕÿÿr/GøØf'øÐxøàøÐf>2èÆøè°èÐøðÈÿÿÿÃ6úöºøà øØ?]FøèÒ«üößãϹ´2àÀxr+ðØ?¥l$yO@_l$?R¼2ï߯¼ 2à 6!ù,s@pH,?È#âèh:¨T0ô4® >+à?p©Ñd¢Y`B¡p8G AØ%%HÁçW¶ _B???B¥¦¥ B®©C³´µI·¸FA; >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramPreferenceInitializer.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramPreferenceInitializer.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramPreferenceInitializer.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramPreferenceInitializer.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,17 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import org.eclipse.gmf.runtime.diagram.ui.preferences.DiagramPreferenceInitializer; >+import org.eclipse.jface.preference.IPreferenceStore; >+ >+/** >+ * @generated >+ */ >+public class UMLDiagramPreferenceInitializer extends DiagramPreferenceInitializer { >+ >+ /** >+ * @generated >+ */ >+ protected IPreferenceStore getPreferenceStore() { >+ return org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorPlugin.getInstance().getPreferenceStore(); >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/ConstraintConstrainedElementEditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/ConstraintConstrainedElementEditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/ConstraintConstrainedElementEditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/ConstraintConstrainedElementEditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class ConstraintConstrainedElementEditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName3ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName3ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName3ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName3ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; >+import org.eclipse.gmf.runtime.notation.Location; >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class AssociationName3ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { >+ Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint); >+ Location location = (Location) view.getLayoutConstraint(); >+ IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit()); >+ location.setX(mapMode.DPtoLP(0)); >+ location.setY(mapMode.DPtoLP(-15)); >+ return view; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyName2ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyName2ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyName2ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyName2ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; >+import org.eclipse.gmf.runtime.notation.Location; >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class DependencyName2ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { >+ Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint); >+ Location location = (Location) view.getLayoutConstraint(); >+ IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit()); >+ location.setX(mapMode.DPtoLP(0)); >+ location.setY(mapMode.DPtoLP(40)); >+ return view; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationLiteralViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationLiteralViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationLiteralViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationLiteralViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class EnumerationLiteralViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationLiteralEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PropertyEditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PropertyEditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/PropertyEditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/PropertyEditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/ParseException.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/ParseException.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/property/ParseException.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/property/ParseException.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,194 @@ >+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ >+package org.eclipse.uml2.diagram.clazz.parser.property; >+ >+import org.eclipse.uml2.diagram.parser.ExternalParserException; >+ >+/** >+ * This exception is thrown when parse errors are encountered. >+ * You can explicitly create objects of this exception type by >+ * calling the method generateParseException in the generated >+ * parser. >+ * >+ * You can modify this class to customize your error reporting >+ * mechanisms so long as you retain the public fields. >+ */ >+class ParseException extends ExternalParserException { >+ >+ /** >+ * This constructor is used by the method "generateParseException" >+ * in the generated parser. Calling this constructor generates >+ * a new object of this type with the fields "currentToken", >+ * "expectedTokenSequences", and "tokenImage" set. The boolean >+ * flag "specialConstructor" is also set to true to indicate that >+ * this constructor was used to create this object. >+ * This constructor calls its super class with the empty string >+ * to force the "toString" method of parent class "Throwable" to >+ * print the error message in the form: >+ * ParseException: <result of getMessage> >+ */ >+ public ParseException(Token currentTokenVal, >+ int[][] expectedTokenSequencesVal, >+ String[] tokenImageVal >+ ) >+ { >+ super(""); >+ specialConstructor = true; >+ currentToken = currentTokenVal; >+ expectedTokenSequences = expectedTokenSequencesVal; >+ tokenImage = tokenImageVal; >+ } >+ >+ /** >+ * The following constructors are for use by you for whatever >+ * purpose you can think of. Constructing the exception in this >+ * manner makes the exception behave in the normal way - i.e., as >+ * documented in the class "Throwable". The fields "errorToken", >+ * "expectedTokenSequences", and "tokenImage" do not contain >+ * relevant information. The JavaCC generated code does not use >+ * these constructors. >+ */ >+ >+ public ParseException() { >+ super(); >+ specialConstructor = false; >+ } >+ >+ public ParseException(String message) { >+ super(message); >+ specialConstructor = false; >+ } >+ >+ /** >+ * This variable determines which constructor was used to create >+ * this object and thereby affects the semantics of the >+ * "getMessage" method (see below). >+ */ >+ protected boolean specialConstructor; >+ >+ /** >+ * This is the last token that has been consumed successfully. If >+ * this object has been created due to a parse error, the token >+ * followng this token will (therefore) be the first error token. >+ */ >+ public Token currentToken; >+ >+ /** >+ * Each entry in this array is an array of integers. Each array >+ * of integers represents a sequence of tokens (by their ordinal >+ * values) that is expected at this point of the parse. >+ */ >+ public int[][] expectedTokenSequences; >+ >+ /** >+ * This is a reference to the "tokenImage" array of the generated >+ * parser within which the parse error occurred. This array is >+ * defined in the generated ...Constants interface. >+ */ >+ public String[] tokenImage; >+ >+ /** >+ * This method has the standard behavior when this object has been >+ * created using the standard constructors. Otherwise, it uses >+ * "currentToken" and "expectedTokenSequences" to generate a parse >+ * error message and returns it. If this object has been created >+ * due to a parse error, and you do not catch it (it gets thrown >+ * from the parser), then this method is called during the printing >+ * of the final stack trace, and hence the correct error message >+ * gets displayed. >+ */ >+ public String getMessage() { >+ if (!specialConstructor) { >+ return super.getMessage(); >+ } >+ String expected = ""; >+ int maxSize = 0; >+ for (int i = 0; i < expectedTokenSequences.length; i++) { >+ if (maxSize < expectedTokenSequences[i].length) { >+ maxSize = expectedTokenSequences[i].length; >+ } >+ for (int j = 0; j < expectedTokenSequences[i].length; j++) { >+ expected += tokenImage[expectedTokenSequences[i][j]] + " "; >+ } >+ if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { >+ expected += "..."; >+ } >+ expected += eol + " "; >+ } >+ String retval = "Encountered \""; >+ Token tok = currentToken.next; >+ for (int i = 0; i < maxSize; i++) { >+ if (i != 0) retval += " "; >+ if (tok.kind == 0) { >+ retval += tokenImage[0]; >+ break; >+ } >+ retval += add_escapes(tok.image); >+ tok = tok.next; >+ } >+ retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; >+ retval += "." + eol; >+ if (expectedTokenSequences.length == 1) { >+ retval += "Was expecting:" + eol + " "; >+ } else { >+ retval += "Was expecting one of:" + eol + " "; >+ } >+ retval += expected; >+ return retval; >+ } >+ >+ /** >+ * The end of line string for this machine. >+ */ >+ protected String eol = System.getProperty("line.separator", "\n"); >+ >+ /** >+ * Used to convert raw characters to their escaped version >+ * when these raw version cannot be used as part of an ASCII >+ * string literal. >+ */ >+ protected String add_escapes(String str) { >+ StringBuffer retval = new StringBuffer(); >+ char ch; >+ for (int i = 0; i < str.length(); i++) { >+ switch (str.charAt(i)) >+ { >+ case 0 : >+ continue; >+ case '\b': >+ retval.append("\\b"); >+ continue; >+ case '\t': >+ retval.append("\\t"); >+ continue; >+ case '\n': >+ retval.append("\\n"); >+ continue; >+ case '\f': >+ retval.append("\\f"); >+ continue; >+ case '\r': >+ retval.append("\\r"); >+ continue; >+ case '\"': >+ retval.append("\\\""); >+ continue; >+ case '\'': >+ retval.append("\\\'"); >+ continue; >+ case '\\': >+ retval.append("\\\\"); >+ continue; >+ default: >+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { >+ String s = "0000" + Integer.toString(ch, 16); >+ retval.append("\\u" + s.substring(s.length() - 4, s.length())); >+ } else { >+ retval.append(ch); >+ } >+ continue; >+ } >+ } >+ return retval.toString(); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintCompartmentViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintCompartmentViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintCompartmentViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/ConstraintCompartmentViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class ConstraintCompartmentViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintCompartmentEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/UMLBaseEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/UMLBaseEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/UMLBaseEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/UMLBaseEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,68 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand; >+import org.eclipse.gmf.runtime.common.core.command.ICommand; >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper; >+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; >+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest; >+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest; >+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest; >+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; >+ >+/** >+ * @generated >+ */ >+public class UMLBaseEditHelper extends AbstractEditHelper { >+ >+ /** >+ * @generated >+ */ >+ public static final String EDIT_POLICY_COMMAND = "edit policy command"; //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ protected ICommand getInsteadCommand(IEditCommandRequest req) { >+ ICommand epCommand = (ICommand) req.getParameter(EDIT_POLICY_COMMAND); >+ req.setParameter(EDIT_POLICY_COMMAND, null); >+ ICommand ehCommand = super.getInsteadCommand(req); >+ if (epCommand == null) { >+ return ehCommand; >+ } >+ if (ehCommand == null) { >+ return epCommand; >+ } >+ CompositeCommand command = new CompositeCommand(null); >+ command.add(epCommand); >+ command.add(ehCommand); >+ return command; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected ICommand getCreateCommand(CreateElementRequest req) { >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected ICommand getCreateRelationshipCommand(CreateRelationshipRequest req) { >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected ICommand getDestroyElementCommand(DestroyElementRequest req) { >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected ICommand getDestroyReferenceCommand(DestroyReferenceRequest req) { >+ return null; >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndToString.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndToString.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndToString.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndToString.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,189 @@ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+ >+package org.eclipse.uml2.diagram.clazz.parser.association.end; >+ >+import java.util.Arrays; >+import java.util.LinkedList; >+import java.util.List; >+ >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.uml2.diagram.clazz.association.AssociationEndConvention; >+import org.eclipse.uml2.diagram.clazz.parser.property.PropertyToString; >+import org.eclipse.uml2.diagram.parser.ExternalToString; >+import org.eclipse.uml2.uml.Association; >+import org.eclipse.uml2.uml.Property; >+import org.eclipse.uml2.uml.TypedElement; >+import org.eclipse.uml2.uml.UMLPackage; >+import org.eclipse.uml2.uml.ValueSpecification; >+ >+public abstract class AssociationEndToString extends PropertyToString { >+ private final boolean mySourceNotTarget; >+ >+ public AssociationEndToString(boolean sourceNotTarget){ >+ mySourceNotTarget = sourceNotTarget; >+ } >+ >+ @Override >+ protected Property asProperty(EObject object) { >+ return asProperty(object, mySourceNotTarget); >+ } >+ >+ protected static Property asProperty(EObject object, boolean sourceNotTarget) { >+ if (false == object instanceof Association){ >+ throw new IllegalStateException("I can not provide toString for: " + object); >+ } >+ Association association = (Association)object; >+ if (!association.isBinary()){ >+ throw new IllegalStateException("I can not provide toString for not binary association: " + object); >+ } >+ return AssociationEndConvention.getMemberEnd(association, sourceNotTarget); >+ } >+ >+ /** >+ * NOTE: it DOES NOT extends enclosing AssociationEndToString >+ */ >+ public static class EDIT extends PropertyToString.EDIT { >+ private final boolean myIsSource; >+ >+ public EDIT(boolean isSource){ >+ myIsSource = isSource; >+ } >+ >+ @Override >+ protected void appendType(StringBuffer result, TypedElement typedElement) { >+ //no types for association ends >+ //thus, do nothing >+ } >+ >+ @Override >+ protected void appendDefault(StringBuffer result, Property property) { >+ //no defaults for association ends >+ //again, do nothing >+ } >+ >+ protected Property asProperty(EObject object) { >+ return AssociationEndToString.asProperty(object, myIsSource); >+ } >+ } >+ >+ public static class ROLE_VIEW extends AssociationEndToString implements ExternalToString.WithReferences { >+ public ROLE_VIEW(boolean sourceNotTarget){ >+ super(sourceNotTarget); >+ } >+ >+ private static final List AFFECTING = Arrays.asList(new EStructuralFeature[] { >+ UMLPackage.eINSTANCE.getNamedElement_Visibility(), >+ UMLPackage.eINSTANCE.getProperty_IsDerived(), >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ }); >+ >+ public String getToString(EObject object, int flags) { >+ Property property = asProperty(object); >+ StringBuffer result = new StringBuffer(); >+ result.append(getVisibility(property)); >+ result.append(getIsDerived(property)); >+ result.append(property.getName()); >+ return result.toString(); >+ } >+ >+ public boolean isAffectingFeature(EStructuralFeature feature) { >+ return AFFECTING.contains(feature); >+ } >+ >+ public List getAdditionalReferencedElements(EObject object) { >+ Property property = asProperty(object); >+ List result = new LinkedList(); >+ result.add(property); >+ return result; >+ } >+ } >+ >+ public static class MULTIPLICITY_VIEW extends AssociationEndToString implements ExternalToString.WithReferences { >+ >+ public MULTIPLICITY_VIEW(boolean sourceNotTarget){ >+ super(sourceNotTarget); >+ } >+ >+ private static final List AFFECTING = Arrays.asList(new EStructuralFeature[] { >+ UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue(), >+ UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue(), >+ UMLPackage.eINSTANCE.getLiteralUnlimitedNatural_Value(), >+ UMLPackage.eINSTANCE.getLiteralInteger_Value(), >+ UMLPackage.eINSTANCE.getLiteralString_Value(), >+ }); >+ >+ public String getToString(EObject object, int flags) { >+ Property property = asProperty(object); >+ StringBuffer result = new StringBuffer(); >+ appendMultiplicity(result, property); >+ return result.toString(); >+ } >+ >+ public boolean isAffectingFeature(EStructuralFeature feature) { >+ return AFFECTING.contains(feature); >+ } >+ >+ public List getAdditionalReferencedElements(EObject object) { >+ Property property = asProperty(object); >+ List result = new LinkedList(); >+ result.add(property); >+ ValueSpecification upper = property.getUpperValue(); >+ if (upper != null){ >+ result.add(upper); >+ } >+ ValueSpecification lower = property.getLowerValue(); >+ if (lower != null){ >+ result.add(lower); >+ } >+ return result; >+ } >+ } >+ >+ public static class MODIFIERS_VIEW extends AssociationEndToString implements ExternalToString.WithReferences { >+ public MODIFIERS_VIEW(boolean sourceNotTarget){ >+ super(sourceNotTarget); >+ } >+ >+ private static final List AFFECTING = Arrays.asList(new EStructuralFeature[] { >+ UMLPackage.eINSTANCE.getMultiplicityElement_IsOrdered(), >+ UMLPackage.eINSTANCE.getMultiplicityElement_IsUnique(), >+ UMLPackage.eINSTANCE.getProperty_IsDerivedUnion(), >+ UMLPackage.eINSTANCE.getProperty_SubsettedProperty(), >+ UMLPackage.eINSTANCE.getRedefinableElement_RedefinedElement(), >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ }); >+ >+ public boolean isAffectingFeature(EStructuralFeature feature) { >+ return AFFECTING.contains(feature); >+ } >+ >+ public String getToString(EObject object, int flags) { >+ Property property = asProperty(object); >+ StringBuffer result = new StringBuffer(); >+ appendPropertyModifiers(result, property); >+ return result.toString(); >+ } >+ >+ public List getAdditionalReferencedElements(EObject object) { >+ Property property = asProperty(object); >+ List result = new LinkedList(); >+ result.add(property); >+ result.addAll(property.getSubsettedProperties()); >+ result.addAll(property.getRedefinedElements()); >+ return result; >+ } >+ >+ >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Operation3ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Operation3ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Operation3ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Operation3ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Operation3ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Operation3EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/association/AssociationEndConvention.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/association/AssociationEndConvention.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/association/AssociationEndConvention.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/association/AssociationEndConvention.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,30 @@ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+ >+package org.eclipse.uml2.diagram.clazz.association; >+ >+import org.eclipse.uml2.uml.Association; >+import org.eclipse.uml2.uml.Property; >+ >+public class AssociationEndConvention { >+ public static Property getMemberEnd(Association association, boolean sourceNotTarget){ >+ return (Property)association.getMemberEnds().get(sourceNotTarget ? 0 : 1); >+ } >+ >+ public static Property getSourceEnd(Association association){ >+ return getMemberEnd(association, true); >+ } >+ >+ public static Property getTargetEnd(Association association){ >+ return getMemberEnd(association, false); >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class AssociationClassViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramEditorPlugin.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramEditorPlugin.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramEditorPlugin.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramEditorPlugin.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,219 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Path; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.emf.common.notify.AdapterFactory; >+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory; >+import org.eclipse.emf.edit.provider.ComposedAdapterFactory; >+import org.eclipse.emf.edit.provider.IItemLabelProvider; >+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; >+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; >+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.jface.resource.ImageDescriptor; >+import org.eclipse.swt.graphics.Image; >+import org.eclipse.ui.plugin.AbstractUIPlugin; >+import org.eclipse.uml2.uml.edit.providers.UMLItemProviderAdapterFactory; >+import org.osgi.framework.BundleContext; >+ >+/** >+ * @generated >+ */ >+public class UMLDiagramEditorPlugin extends AbstractUIPlugin { >+ >+ /** >+ * @generated >+ */ >+ public static final String ID = "org.eclipse.uml2.diagram.clazz"; //$NON-NLS-1$ >+ >+ /** >+ * @generated >+ */ >+ public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(ID); >+ >+ /** >+ * @generated >+ */ >+ private static UMLDiagramEditorPlugin instance; >+ >+ /** >+ * @generated >+ */ >+ private ComposedAdapterFactory adapterFactory; >+ >+ /** >+ * @generated >+ */ >+ public UMLDiagramEditorPlugin() { >+ } >+ >+ /** >+ * @generated >+ */ >+ public void start(BundleContext context) throws Exception { >+ super.start(context); >+ instance = this; >+ PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore()); >+ adapterFactory = createAdapterFactory(); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void stop(BundleContext context) throws Exception { >+ adapterFactory.dispose(); >+ adapterFactory = null; >+ instance = null; >+ super.stop(context); >+ } >+ >+ /** >+ * @generated >+ */ >+ public static UMLDiagramEditorPlugin getInstance() { >+ return instance; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected ComposedAdapterFactory createAdapterFactory() { >+ List factories = new ArrayList(); >+ fillItemProviderFactories(factories); >+ return new ComposedAdapterFactory(factories); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void fillItemProviderFactories(List factories) { >+ factories.add(new UMLItemProviderAdapterFactory()); >+ factories.add(new EcoreItemProviderAdapterFactory()); >+ factories.add(new ResourceItemProviderAdapterFactory()); >+ factories.add(new ReflectiveItemProviderAdapterFactory()); >+ } >+ >+ /** >+ * @generated >+ */ >+ public AdapterFactory getItemProvidersAdapterFactory() { >+ return adapterFactory; >+ } >+ >+ /** >+ * @generated >+ */ >+ public ImageDescriptor getItemImageDescriptor(Object item) { >+ IItemLabelProvider labelProvider = (IItemLabelProvider) adapterFactory.adapt(item, IItemLabelProvider.class); >+ if (labelProvider != null) { >+ return ExtendedImageRegistry.getInstance().getImageDescriptor(labelProvider.getImage(item)); >+ } >+ return null; >+ } >+ >+ /** >+ * Returns an image descriptor for the image file at the given >+ * plug-in relative path. >+ * >+ * @generated >+ * @param path the path >+ * @return the image descriptor >+ */ >+ public static ImageDescriptor getBundledImageDescriptor(String path) { >+ return AbstractUIPlugin.imageDescriptorFromPlugin(ID, path); >+ } >+ >+ /** >+ * Respects images residing in any plug-in. If path is relative, >+ * then this bundle is looked up for the image, otherwise, for absolute >+ * path, first segment is taken as id of plug-in with image >+ * >+ * @generated >+ * @param path the path to image, either absolute (with plug-in id as first segment), or relative for bundled images >+ * @return the image descriptor >+ */ >+ public static ImageDescriptor findImageDescriptor(String path) { >+ final IPath p = new Path(path); >+ if (p.isAbsolute() && p.segmentCount() > 1) { >+ return AbstractUIPlugin.imageDescriptorFromPlugin(p.segment(0), p.removeFirstSegments(1).makeAbsolute().toString()); >+ } else { >+ return getBundledImageDescriptor(p.makeAbsolute().toString()); >+ } >+ } >+ >+ /** >+ * Returns an image for the image file at the given plug-in relative path. >+ * Client do not need to dispose this image. Images will be disposed automatically. >+ * >+ * @generated >+ * @param path the path >+ * @return image instance >+ */ >+ public Image getBundledImage(String path) { >+ Image image = getImageRegistry().get(path); >+ if (image == null) { >+ getImageRegistry().put(path, getBundledImageDescriptor(path)); >+ image = getImageRegistry().get(path); >+ } >+ return image; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void logError(String error) { >+ logError(error, null); >+ } >+ >+ /** >+ * @param throwable actual error or null could be passed >+ * @generated >+ */ >+ public void logError(String error, Throwable throwable) { >+ if (error == null && throwable != null) { >+ error = throwable.getMessage(); >+ } >+ getLog().log(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, IStatus.OK, error, throwable)); >+ debug(error, throwable); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void logInfo(String message) { >+ logInfo(message, null); >+ } >+ >+ /** >+ * @param throwable actual error or null could be passed >+ * @generated >+ */ >+ public void logInfo(String message, Throwable throwable) { >+ if (message == null && throwable != null) { >+ message = throwable.getMessage(); >+ } >+ getLog().log(new Status(IStatus.INFO, UMLDiagramEditorPlugin.ID, IStatus.OK, message, throwable)); >+ debug(message, throwable); >+ } >+ >+ /** >+ * @generated >+ */ >+ private void debug(String message, Throwable throwable) { >+ if (!isDebugging()) { >+ return; >+ } >+ if (message != null) { >+ System.err.println(message); >+ } >+ if (throwable != null) { >+ throwable.printStackTrace(); >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotParserConstants.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotParserConstants.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotParserConstants.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotParserConstants.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,80 @@ >+/* Generated By:JavaCC: Do not edit this line. SlotParserConstants.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.slot; >+ >+public interface SlotParserConstants { >+ >+ int EOF = 0; >+ int SLASH = 3; >+ int COLON = 4; >+ int EQUALS = 5; >+ int LBRACKET = 6; >+ int RBRACKET = 7; >+ int LCURLY = 8; >+ int RCURLY = 9; >+ int COMMA = 10; >+ int PLUS = 11; >+ int MINUS = 12; >+ int NUMBER_SIGN = 13; >+ int TILDE = 14; >+ int DOT = 15; >+ int STAR = 16; >+ int READ_ONLY = 17; >+ int UNION = 18; >+ int SUBSETS = 19; >+ int REDEFINES = 20; >+ int ORDERED = 21; >+ int UNORDERED = 22; >+ int UNIQUE = 23; >+ int NON_UNIQUE = 24; >+ int INTEGER_LITERAL = 25; >+ int IDENTIFIER = 26; >+ int LETTER = 27; >+ int DIGIT = 28; >+ >+ int DEFAULT = 0; >+ >+ String[] tokenImage = { >+ "<EOF>", >+ "\" \"", >+ "\"\\t\"", >+ "\"/\"", >+ "\":\"", >+ "\"=\"", >+ "\"[\"", >+ "\"]\"", >+ "\"{\"", >+ "\"}\"", >+ "\",\"", >+ "\"+\"", >+ "\"-\"", >+ "\"#\"", >+ "\"~\"", >+ "\".\"", >+ "\"*\"", >+ "\"readOnly\"", >+ "\"union\"", >+ "\"subsets\"", >+ "\"redefines\"", >+ "\"ordered\"", >+ "\"unordered\"", >+ "\"unique\"", >+ "\"nonunique\"", >+ "<INTEGER_LITERAL>", >+ "<IDENTIFIER>", >+ "<LETTER>", >+ "<DIGIT>", >+ "\"\\\"\"", >+ }; >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/providers/UMLIconProvider.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/providers/UMLIconProvider.java >diff -N src/org/eclipse/uml2/diagram/clazz/providers/UMLIconProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/providers/UMLIconProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,31 @@ >+package org.eclipse.uml2.diagram.clazz.providers; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; >+import org.eclipse.gmf.runtime.common.core.service.IOperation; >+import org.eclipse.gmf.runtime.common.ui.services.icon.GetIconOperation; >+import org.eclipse.gmf.runtime.common.ui.services.icon.IIconProvider; >+import org.eclipse.swt.graphics.Image; >+ >+/** >+ * @generated >+ */ >+public class UMLIconProvider extends AbstractProvider implements IIconProvider { >+ >+ /** >+ * @generated >+ */ >+ public Image getIcon(IAdaptable hint, int flags) { >+ return UMLElementTypes.getImage(hint); >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean provides(IOperation operation) { >+ if (operation instanceof GetIconOperation) { >+ return ((GetIconOperation) operation).execute(this) != null; >+ } >+ return false; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorItem.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorItem.java >diff -N src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorItem.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorItem.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,73 @@ >+package org.eclipse.uml2.diagram.clazz.navigator; >+ >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class UMLNavigatorItem extends UMLAbstractNavigatorItem { >+ >+ /** >+ * @generated >+ */ >+ private View myView; >+ >+ /** >+ * @generated >+ */ >+ public UMLNavigatorItem(View view, Object parent) { >+ super(parent); >+ myView = view; >+ } >+ >+ /** >+ * @generated >+ */ >+ public View getView() { >+ return myView; >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getModelID() { >+ return UMLVisualIDRegistry.getModelID(myView); >+ } >+ >+ /** >+ * @generated >+ */ >+ public int getVisualID() { >+ return UMLVisualIDRegistry.getVisualID(myView); >+ } >+ >+ /** >+ * @generated >+ */ >+ public Object getAdapter(Class adapter) { >+ if (View.class.isAssignableFrom(adapter) || EObject.class.isAssignableFrom(adapter)) { >+ return myView; >+ } >+ return super.getAdapter(adapter); >+ } >+ >+ /** >+ * @generated >+ */ >+ public boolean equals(Object obj) { >+ if (obj instanceof UMLNavigatorItem) { >+ EObject eObject = getView().getElement(); >+ EObject anotherEObject = ((UMLNavigatorItem) obj).getView().getElement(); >+ if (eObject == null) { >+ return anotherEObject == null; >+ } else if (anotherEObject == null) { >+ return false; >+ } >+ return eObject.eResource().getURIFragment(eObject).equals(anotherEObject.eResource().getURIFragment(anotherEObject)); >+ } >+ return super.equals(obj); >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameToString.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameToString.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameToString.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/AssociationNameToString.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,64 @@ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+ >+package org.eclipse.uml2.diagram.clazz.parser.association.name; >+ >+import java.util.Arrays; >+import java.util.List; >+ >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.uml2.diagram.parser.AbstractToString; >+import org.eclipse.uml2.uml.Association; >+import org.eclipse.uml2.uml.UMLPackage; >+ >+public abstract class AssociationNameToString extends AbstractToString { >+ public static class EDIT extends AssociationNameToString { >+ >+ public boolean isAffectingFeature(EStructuralFeature feature) { >+ throw new UnsupportedOperationException("I am edit toString, I am not expected to be asked"); >+ } >+ >+ } >+ >+ public static class VIEW extends AssociationNameToString { >+ private static final List AFFECTING = Arrays.asList(new EStructuralFeature[] { >+ UMLPackage.eINSTANCE.getAssociation_IsDerived(), >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ }); >+ >+ public boolean isAffectingFeature(EStructuralFeature feature) { >+ return AFFECTING.contains(feature); >+ } >+ } >+ >+ public String getToString(EObject object, int flags) { >+ Association association = asAssociation(object); >+ StringBuffer result = new StringBuffer(); >+ result.append(getIsDerived(association)); >+ appendName(result, association); >+ >+ return result.toString(); >+ } >+ >+ protected Association asAssociation(EObject object){ >+ if (false == object instanceof Association){ >+ throw new IllegalStateException("I can not provide toString for: " + object); >+ } >+ return (Association)object; >+ } >+ >+ protected String getIsDerived(Association association) { >+ return association.isDerived() ? "/" : ""; >+ } >+ >+} >Index: plugin.xml >=================================================================== >RCS file: plugin.xml >diff -N plugin.xml >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ plugin.xml 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,1067 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<?eclipse version="3.0"?> >+ >+<plugin> >+ >+<!-- gmf generator persistent region begin --> >+ >+<!-- gmf generator persistent region end --> >+ >+ <extension point="org.eclipse.core.runtime.preferences"> >+ <initializer class="org.eclipse.uml2.diagram.clazz.part.UMLDiagramPreferenceInitializer"/> >+ </extension> >+ >+ <extension point="org.eclipse.team.core.fileTypes"> >+ <fileTypes >+ type="text" >+ extension="umlclass_diagram"> >+ </fileTypes> >+ </extension> >+ >+ <extension point="org.eclipse.emf.ecore.extension_parser"> >+ <parser >+ type="umlclass_diagram" >+ class="org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory"> >+ </parser> >+ </extension> >+ >+ <extension point="org.eclipse.ui.editors"> >+ <editor >+ id="org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorID" >+ name="%editorName" >+ icon="icons/obj16/UMLDiagramFile.gif" >+ extensions="umlclass_diagram" >+ default="true" >+ class="org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditor" >+ matchingStrategy="org.eclipse.uml2.diagram.clazz.part.UMLMatchingStrategy" >+ contributorClass="org.eclipse.uml2.diagram.clazz.part.UMLDiagramActionBarContributor"> >+ </editor> >+ </extension> >+ >+ <extension point="org.eclipse.ui.newWizards"> >+ <wizard >+ name="%newWizardName" >+ icon="icons/obj16/UMLDiagramFile.gif" >+ category="org.eclipse.ui.Examples" >+ class="org.eclipse.uml2.diagram.clazz.part.UMLCreationWizard" >+ id="org.eclipse.uml2.diagram.clazz.part.UMLCreationWizardID"> >+ <description>%newWizardDesc</description> >+ </wizard> >+ </extension> >+ >+ <extension point="org.eclipse.ui.popupMenus"> >+ <objectContribution >+ id="org.eclipse.uml2.diagram.clazz.ui.objectContribution.IFile1" >+ nameFilter="*.uml" >+ objectClass="org.eclipse.core.resources.IFile"> >+ <action >+ label="%initDiagramActionLabel" >+ class="org.eclipse.uml2.diagram.clazz.part.UMLInitDiagramFileAction" >+ menubarPath="additions" >+ enablesFor="1" >+ id="org.eclipse.uml2.diagram.clazz.part.UMLInitDiagramFileActionID"> >+ </action> >+ </objectContribution> >+ <objectContribution >+ adaptable="false" >+ id="org.eclipse.uml2.diagram.clazz.ui.objectContribution.PackageEditPart2" >+ objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart"> >+ <action >+ class="org.eclipse.uml2.diagram.clazz.part.UMLLoadResourceAction" >+ enablesFor="1" >+ id="org.eclipse.uml2.diagram.clazz.part.UMLLoadResourceActionID" >+ label="%loadResourceActionLabel" >+ menubarPath="additions"> >+ </action> >+ </objectContribution> >+ </extension> >+ >+ <extension point="org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders"> >+ <contributionItemProvider >+ class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContributionItemProvider" >+ checkPluginLoaded="false"> >+ <Priority name="Low"/> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Package3EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.ClassEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.PropertyEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.OperationEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Class3EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.PortEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.PortNameEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ <popupPredefinedItem id="deleteFromModelAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Property2EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Operation2EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Property3EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Operation3EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Property4EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Operation4EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationLiteralEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Property5EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Operation5EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.LiteralStringEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.SlotEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Package2EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.PackageNameEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Class2EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.ClassNameEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClass2EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassNameEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.DataType2EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeNameEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveType2EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeNameEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Enumeration2EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationNameEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceNameEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ <popupPredefinedItem id="deleteFromModelAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintNameEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecification2EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationNameEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.DependencyEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.DependencyNameEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ <popupPredefinedItem id="deleteFromModelAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.GeneralizationEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Dependency2EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.DependencyName2EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ <popupPredefinedItem id="deleteFromModelAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.Property6EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.PropertyNameEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ <popupPredefinedItem id="deleteFromModelAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintConstrainedElementEditPart"/> >+ <popupAction path="/editGroup" id="deleteFromModelAction"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.AssociationEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.AssociationNameEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ <popupPredefinedItem id="deleteFromModelAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName2EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ <popupPredefinedItem id="deleteFromModelAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName3EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ <popupPredefinedItem id="deleteFromModelAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName4EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ <popupPredefinedItem id="deleteFromModelAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName5EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ <popupPredefinedItem id="deleteFromModelAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName6EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ <popupPredefinedItem id="deleteFromModelAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.AssociationName7EditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ <popupPredefinedItem id="deleteFromModelAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.DependencySupplierEditPart"/> >+ <popupAction path="/editGroup" id="deleteFromModelAction"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.DependencyClientEditPart"/> >+ <popupAction path="/editGroup" id="deleteFromModelAction"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceRealizationEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider"> >+ <popupStructuredContributionCriteria objectClass="org.eclipse.uml2.diagram.clazz.edit.parts.UsageEditPart"/> >+ <popupPredefinedItem id="deleteFromDiagramAction" remove="true"/> >+ </popupContribution> >+ </contributionItemProvider> >+ </extension> >+ >+ <extension point="org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders"> >+ <GlobalActionHandlerProvider >+ class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandlerProvider" >+ id="UMLClassPresentation"> >+ <Priority name="Lowest"/> >+ <ViewId id="org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorID"> >+ <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"> >+ <GlobalActionId actionId="delete"/> >+ </ElementType> >+ <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart"> >+ <GlobalActionId actionId="save"/> >+ </ElementType> >+ </ViewId> >+ </GlobalActionHandlerProvider> >+ <GlobalActionHandlerProvider >+ class="org.eclipse.gmf.runtime.diagram.ui.providers.ide.providers.DiagramIDEGlobalActionHandlerProvider" >+ id="UMLClassPresentationIDE"> >+ <Priority name="Lowest"/> >+ <ViewId id="org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorID"> >+ <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"> >+ <GlobalActionId actionId="bookmark"/> >+ </ElementType> >+ </ViewId> >+ </GlobalActionHandlerProvider> >+ <GlobalActionHandlerProvider >+ class="org.eclipse.gmf.runtime.diagram.ui.render.providers.DiagramUIRenderGlobalActionHandlerProvider" >+ id="UMLClassRender"> >+ <Priority name="Lowest"/> >+ <ViewId id="org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorID"> >+ <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"> >+ <GlobalActionId actionId="cut"/> >+ <GlobalActionId actionId="copy"/> >+ <GlobalActionId actionId="paste"/> >+ </ElementType> >+ </ViewId> >+ </GlobalActionHandlerProvider> >+ </extension> >+ >+ <extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders"> >+ <viewProvider class="org.eclipse.uml2.diagram.clazz.providers.UMLViewProvider"> >+ <Priority name="Lowest"/> >+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="UMLClass"/> >+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints=""/> >+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints=""/> >+ </viewProvider> >+ </extension> >+ >+ <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders"> >+ <editpartProvider class="org.eclipse.uml2.diagram.clazz.providers.UMLEditPartProvider"> >+ <Priority name="Lowest"/> >+ </editpartProvider> >+ </extension> >+ >+ <extension point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders"> >+ <paletteProvider class="org.eclipse.uml2.diagram.clazz.providers.UMLPaletteProvider"> >+ <Priority name="Lowest"/> >+ <editor id="org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorID"/> >+ </paletteProvider> >+ </extension> >+ >+ <extension point="org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders"> >+ <modelingAssistantProvider class="org.eclipse.uml2.diagram.clazz.providers.UMLModelingAssistantProvider"> >+ <Priority name="Lowest"/> >+ </modelingAssistantProvider> >+ </extension> >+ >+ <extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders"> >+ <IconProvider class="org.eclipse.uml2.diagram.clazz.providers.UMLIconProvider"> >+ <Priority name="Low"/> >+ </IconProvider> >+ </extension> >+ >+ <extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders"> >+ <ParserProvider class="org.eclipse.uml2.diagram.clazz.providers.UMLParserProvider"> >+ <Priority name="Lowest"/> >+ </ParserProvider> >+ </extension> >+ >+ <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes"> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.Package_1000" >+ name="Undefined" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="Package" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.PackageEditHelper"> >+ <param name="semanticHint" value="1000"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Package_3006" >+ name="Package" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.Package2EditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Package_1000"/> >+ <param name="semanticHint" value="3006"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.Class_3007" >+ name="Class" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="Class" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.ClassEditHelper"> >+ <param name="semanticHint" value="3007"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.DataType_3008" >+ name="DataType" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="DataType" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.DataTypeEditHelper"> >+ <param name="semanticHint" value="3008"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.PrimitiveType_3009" >+ name="PrimitiveType" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="PrimitiveType" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.PrimitiveTypeEditHelper"> >+ <param name="semanticHint" value="3009"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.Enumeration_3011" >+ name="Enumeration" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="Enumeration" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.EnumerationEditHelper"> >+ <param name="semanticHint" value="3011"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.AssociationClass_3012" >+ name="AssociationClass" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="AssociationClass" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.AssociationClassEditHelper"> >+ <param name="semanticHint" value="3012"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.InstanceSpecification_3013" >+ name="InstanceSpecification" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="InstanceSpecification" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.InstanceSpecificationEditHelper"> >+ <param name="semanticHint" value="3013"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.Property_3001" >+ name="Property" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="Property" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.PropertyEditHelper"> >+ <param name="semanticHint" value="3001"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.Operation_3002" >+ name="Operation" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="Operation" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.OperationEditHelper"> >+ <param name="semanticHint" value="3002"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Class_3003" >+ name="Class" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.Class2EditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Class_3007"/> >+ <param name="semanticHint" value="3003"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.Port_3025" >+ name="Port" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="Port" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.PortEditHelper"> >+ <param name="semanticHint" value="3025"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Property_3019" >+ name="Property" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.PropertyEditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Property_3001"/> >+ <param name="semanticHint" value="3019"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Operation_3020" >+ name="Operation" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.OperationEditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Operation_3002"/> >+ <param name="semanticHint" value="3020"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Property_3014" >+ name="Property" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.Property2EditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Property_3001"/> >+ <param name="semanticHint" value="3014"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Operation_3015" >+ name="Operation" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.Operation2EditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Operation_3002"/> >+ <param name="semanticHint" value="3015"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Property_3021" >+ name="Property" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.Property3EditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Property_3001"/> >+ <param name="semanticHint" value="3021"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Operation_3022" >+ name="Operation" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.Operation3EditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Operation_3002"/> >+ <param name="semanticHint" value="3022"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.EnumerationLiteral_3016" >+ name="EnumerationLiteral" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="EnumerationLiteral" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.EnumerationLiteralEditHelper"> >+ <param name="semanticHint" value="3016"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Property_3023" >+ name="Property" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.Property4EditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Property_3001"/> >+ <param name="semanticHint" value="3023"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Operation_3024" >+ name="Operation" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.Operation4EditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Operation_3002"/> >+ <param name="semanticHint" value="3024"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.LiteralString_3005" >+ name="LiteralString" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="LiteralString" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.LiteralStringEditHelper"> >+ <param name="semanticHint" value="3005"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.Slot_3017" >+ name="Slot" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="Slot" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.SlotEditHelper"> >+ <param name="semanticHint" value="3017"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Package_2002" >+ name="Package" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.PackageEditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Package_1000"/> >+ <param name="semanticHint" value="2002"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Class_2001" >+ name="Class" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.ClassEditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Class_3007"/> >+ <param name="semanticHint" value="2001"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.AssociationClass_2007" >+ name="AssociationClass" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.AssociationClassEditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.AssociationClass_3012"/> >+ <param name="semanticHint" value="2007"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.DataType_2004" >+ name="DataType" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.DataTypeEditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.DataType_3008"/> >+ <param name="semanticHint" value="2004"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.PrimitiveType_2005" >+ name="PrimitiveType" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.PrimitiveTypeEditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.PrimitiveType_3009"/> >+ <param name="semanticHint" value="2005"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Enumeration_2003" >+ name="Enumeration" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.EnumerationEditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Enumeration_3011"/> >+ <param name="semanticHint" value="2003"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.Interface_2010" >+ name="Interface" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="Interface" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.InterfaceEditHelper"> >+ <param name="semanticHint" value="2010"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.Constraint_2006" >+ name="Constraint" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="Constraint" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.ConstraintEditHelper"> >+ <param name="semanticHint" value="2006"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.InstanceSpecification_2008" >+ name="InstanceSpecification" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.InstanceSpecificationEditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.InstanceSpecification_3013"/> >+ <param name="semanticHint" value="2008"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.Dependency_2009" >+ name="Dependency" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="Dependency" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.DependencyEditHelper"> >+ <param name="semanticHint" value="2009"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.Generalization_4001" >+ name="Generalization" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="Generalization" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.GeneralizationEditHelper"> >+ <param name="semanticHint" value="4001"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Dependency_4002" >+ name="Dependency" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.DependencyEditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Dependency_2009"/> >+ <param name="semanticHint" value="4002"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.Property_4003" >+ name="Property" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.Property5EditHelperAdvice"> >+ <specializes id="org.eclipse.uml2.diagram.clazz.Property_3001"/> >+ <param name="semanticHint" value="4003"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.ConstraintConstrainedElement_4004" >+ name="Undefined" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.ConstraintConstrainedElementEditHelperAdvice"> >+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/> >+ <param name="semanticHint" value="4004"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.Association_4005" >+ name="Association" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="Association" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.AssociationEditHelper"> >+ <param name="semanticHint" value="4005"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.DependencySupplier_4006" >+ name="Undefined" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.DependencySupplierEditHelperAdvice"> >+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/> >+ <param name="semanticHint" value="4006"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <specializationType >+ id="org.eclipse.uml2.diagram.clazz.DependencyClient_4007" >+ name="Undefined" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ edithelperadvice="org.eclipse.uml2.diagram.clazz.edit.helpers.DependencyClientEditHelperAdvice"> >+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/> >+ <param name="semanticHint" value="4007"/> >+ </specializationType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.InterfaceRealization_4008" >+ name="InterfaceRealization" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="InterfaceRealization" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.InterfaceRealizationEditHelper"> >+ <param name="semanticHint" value="4008"/> >+ </metamodelType> >+ </metamodel> >+ >+ <metamodel nsURI="http://www.eclipse.org/uml2/2.0.0/UML"> >+ <metamodelType >+ id="org.eclipse.uml2.diagram.clazz.Usage_4009" >+ name="Usage" >+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType" >+ eclass="Usage" >+ edithelper="org.eclipse.uml2.diagram.clazz.edit.helpers.UsageEditHelper"> >+ <param name="semanticHint" value="4009"/> >+ </metamodelType> >+ </metamodel> >+ </extension> >+ >+ <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings"> >+ <clientContext id="UMLClassClientContext"> >+ <enablement> >+ <test >+ property="org.eclipse.gmf.runtime.emf.core.editingDomain" >+ value="org.eclipse.uml2.diagram.clazz.EditingDomain"/> >+ </enablement> >+ </clientContext> >+ <binding context="UMLClassClientContext"> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Package_1000"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Package_3006"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Class_3007"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.DataType_3008"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.PrimitiveType_3009"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Enumeration_3011"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.AssociationClass_3012"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.InstanceSpecification_3013"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Property_3001"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Operation_3002"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Class_3003"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Port_3025"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Property_3019"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Operation_3020"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Property_3014"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Operation_3015"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Property_3021"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Operation_3022"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.EnumerationLiteral_3016"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Property_3023"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Operation_3024"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.LiteralString_3005"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Slot_3017"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Package_2002"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Class_2001"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.AssociationClass_2007"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.DataType_2004"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.PrimitiveType_2005"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Enumeration_2003"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Interface_2010"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Constraint_2006"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.InstanceSpecification_2008"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Dependency_2009"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Generalization_4001"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Dependency_4002"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Property_4003"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.ConstraintConstrainedElement_4004"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Association_4005"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.DependencySupplier_4006"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.DependencyClient_4007"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.InterfaceRealization_4008"/> >+ <elementType ref="org.eclipse.uml2.diagram.clazz.Usage_4009"/> >+ <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/> >+ </binding> >+ </extension> >+ >+ <extension point="org.eclipse.ui.navigator.viewer"> >+ <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer"> >+ <includes> >+ <contentExtension pattern="org.eclipse.uml2.diagram.clazz.resourceContent"/> >+ <contentExtension pattern="org.eclipse.uml2.diagram.clazz.navigatorLinkHelper"/> >+ </includes> >+ </viewerContentBinding> >+ </extension> >+ >+ <extension point="org.eclipse.ui.navigator.navigatorContent"> >+ <navigatorContent >+ id="org.eclipse.uml2.diagram.clazz.resourceContent" >+ name="%navigatorContentName" >+ priority="normal" >+ contentProvider="org.eclipse.uml2.diagram.clazz.navigator.UMLNavigatorContentProvider" >+ labelProvider="org.eclipse.uml2.diagram.clazz.navigator.UMLNavigatorLabelProvider" >+ icon="icons/obj16/UMLDiagramFile.gif" >+ activeByDefault="true"> >+ <triggerPoints> >+ <or> >+ <and> >+ <instanceof value="org.eclipse.core.resources.IFile"/> >+ <test property="org.eclipse.core.resources.extension" value="umlclass_diagram"/> >+ </and> >+ <instanceof value="org.eclipse.uml2.diagram.clazz.navigator.UMLAbstractNavigatorItem"/> >+ </or> >+ </triggerPoints> >+ <possibleChildren> >+ <instanceof value="org.eclipse.uml2.diagram.clazz.navigator.UMLAbstractNavigatorItem"/> >+ </possibleChildren> >+ <commonSorter >+ id="org.eclipse.uml2.diagram.clazz.navigatorSorter" >+ class="org.eclipse.uml2.diagram.clazz.navigator.UMLNavigatorSorter"> >+ <parentExpression> >+ <or> >+ <and> >+ <instanceof value="org.eclipse.core.resources.IFile"/> >+ <test property="org.eclipse.core.resources.extension" value="umlclass_diagram"/> >+ </and> >+ <instanceof value="org.eclipse.uml2.diagram.clazz.navigator.UMLAbstractNavigatorItem"/> >+ </or> >+ </parentExpression> >+ </commonSorter> >+ <actionProvider >+ id="org.eclipse.uml2.diagram.clazz.navigatorActionProvider" >+ class="org.eclipse.uml2.diagram.clazz.navigator.UMLNavigatorActionProvider"> >+ </actionProvider> >+ </navigatorContent> >+ </extension> >+ >+ <extension point="org.eclipse.ui.navigator.linkHelper"> >+ <linkHelper >+ id="org.eclipse.uml2.diagram.clazz.navigatorLinkHelper" >+ class="org.eclipse.uml2.diagram.clazz.navigator.UMLNavigatorLinkHelper"> >+ <editorInputEnablement> >+ <instanceof value="org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.document.FileEditorInputProxy"/> >+ </editorInputEnablement> >+ <selectionEnablement> >+ <instanceof value="org.eclipse.uml2.diagram.clazz.navigator.UMLAbstractNavigatorItem"/> >+ </selectionEnablement> >+ </linkHelper> >+ </extension> >+ >+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor"> >+ <propertyContributor contributorId="org.eclipse.uml2.diagram.clazz" >+ labelProvider="org.eclipse.uml2.diagram.clazz.sheet.UMLSheetLabelProvider"> >+ <propertyCategory category="domain"/> >+ <propertyCategory category="visual"/> >+ <propertyCategory category="extra"/> >+ </propertyContributor> >+ </extension> >+ >+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs"> >+ <propertyTabs contributorId="org.eclipse.uml2.diagram.clazz"> >+ <propertyTab >+ category="visual" >+ id="property.tab.AppearancePropertySection" >+ label="%tab.appearance"/> >+ <propertyTab >+ category="visual" >+ id="property.tab.DiagramPropertySection" >+ label="%tab.diagram"/> >+ <propertyTab >+ category="domain" >+ id="property.tab.domain" >+ label="%tab.domain"/> >+ </propertyTabs> >+ </extension> >+ >+ <extension point="org.eclipse.ui.views.properties.tabbed.propertySections"> >+ <propertySections contributorId="org.eclipse.uml2.diagram.clazz"> >+ >+ <propertySection id="property.section.ConnectorAppearancePropertySection" >+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter" >+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection" >+ tab="property.tab.AppearancePropertySection"> >+ </propertySection> >+ <propertySection id="property.section.ShapeColorAndFontPropertySection" >+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter" >+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection" >+ tab="property.tab.AppearancePropertySection"> >+ </propertySection> >+ <propertySection id="property.section.DiagramColorsAndFontsPropertySection" >+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter" >+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection" >+ tab="property.tab.AppearancePropertySection"> >+ </propertySection> >+ >+ <propertySection id="property.section.RulerGridPropertySection" >+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter" >+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection" >+ tab="property.tab.DiagramPropertySection"> >+ </propertySection> >+ <propertySection >+ id="property.section.domain" >+ tab="property.tab.domain" >+ class="org.eclipse.uml2.diagram.clazz.sheet.UMLPropertySection"> >+ <input type="org.eclipse.gmf.runtime.notation.View"/> >+ <input type="org.eclipse.gef.EditPart"/> >+ <input type="org.eclipse.uml2.diagram.clazz.navigator.UMLAbstractNavigatorItem"/> >+ </propertySection> >+ </propertySections> >+ </extension> >+</plugin> >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PackageViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PackageViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PackageViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PackageViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,42 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.DiagramViewFactory; >+import org.eclipse.gmf.runtime.notation.MeasurementUnit; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class PackageViewFactory extends DiagramViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createPageStyle()); >+ styles.add(NotationFactory.eINSTANCE.createGuideStyle()); >+ styles.add(NotationFactory.eINSTANCE.createDescriptionStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View view, IAdaptable semanticAdapter, String diagramKind) { >+ super.decorateView(view, semanticAdapter, diagramKind); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected MeasurementUnit getMeasurementUnit() { >+ return MeasurementUnit.PIXEL_LITERAL; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramEditorUtil.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramEditorUtil.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramEditorUtil.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramEditorUtil.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,204 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import java.io.IOException; >+import java.io.InputStream; >+import java.util.ArrayList; >+import java.util.Collections; >+import java.util.HashMap; >+import java.util.List; >+import java.util.Map; >+ >+import org.eclipse.core.resources.IResourceStatus; >+import org.eclipse.core.resources.ResourcesPlugin; >+ >+import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.commands.operations.OperationHistoryFactory; >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.resources.IResource; >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.Path; >+import org.eclipse.core.runtime.SubProgressMonitor; >+import org.eclipse.emf.common.util.URI; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.resource.Resource; >+import org.eclipse.emf.ecore.resource.ResourceSet; >+import org.eclipse.emf.ecore.xmi.XMIResource; >+import org.eclipse.jface.dialogs.ErrorDialog; >+ >+import org.eclipse.emf.transaction.TransactionalEditingDomain; >+import java.io.ByteArrayInputStream; >+ >+import org.eclipse.gmf.runtime.common.core.command.CommandResult; >+import org.eclipse.gmf.runtime.diagram.core.services.ViewService; >+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand; >+import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory; >+import org.eclipse.gmf.runtime.notation.Diagram; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.ui.IEditorPart; >+import org.eclipse.ui.IWorkbenchPage; >+import org.eclipse.ui.IWorkbenchWindow; >+import org.eclipse.ui.PartInitException; >+import org.eclipse.ui.ide.IDE; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+ >+import org.eclipse.uml2.uml.UMLFactory; >+ >+/** >+ * @generated >+ */ >+public class UMLDiagramEditorUtil { >+ >+ /** >+ * @generated >+ */ >+ public static final URI createAndOpenDiagram(IPath containerPath, String fileName, IWorkbenchWindow window, IProgressMonitor progressMonitor, boolean openEditor, boolean saveDiagram) { >+ IFile diagramFile = createNewDiagramFile(containerPath, fileName, window.getShell(), progressMonitor); >+ if (diagramFile != null && openEditor) { >+ openDiagramEditor(window, diagramFile, saveDiagram, progressMonitor); >+ } >+ return URI.createPlatformResourceURI(diagramFile.getFullPath().toString()); >+ } >+ >+ /** >+ * @generated >+ */ >+ public static final IEditorPart openDiagramEditor(IWorkbenchWindow window, IFile file, boolean saveDiagram, IProgressMonitor progressMonitor) { >+ IEditorPart editorPart = null; >+ try { >+ IWorkbenchPage page = window.getActivePage(); >+ if (page != null) { >+ editorPart = openDiagramEditor(page, file); >+ if (saveDiagram) { >+ editorPart.doSave(progressMonitor); >+ } >+ } >+ file.refreshLocal(IResource.DEPTH_ZERO, null); >+ return editorPart; >+ } catch (Exception e) { >+ UMLDiagramEditorPlugin.getInstance().logError("Error opening diagram", e); >+ } >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ public static final IEditorPart openDiagramEditor(IWorkbenchPage page, IFile file) throws PartInitException { >+ return IDE.openEditor(page, file); >+ } >+ >+ /** >+ * <p> >+ * This method should be called within a workspace modify operation since it creates resources. >+ * </p> >+ * @generated >+ * @return the created file resource, or <code>null</code> if the file was not created >+ */ >+ public static final IFile createNewDiagramFile(IPath containerFullPath, String fileName, Shell shell, IProgressMonitor progressMonitor) { >+ TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain(); >+ ResourceSet resourceSet = editingDomain.getResourceSet(); >+ progressMonitor.beginTask("Creating diagram and model files", 3); //$NON-NLS-1$ >+ final IFile diagramFile = createNewFile(containerFullPath, fileName, shell); >+ final Resource diagramResource = resourceSet.createResource(URI.createPlatformResourceURI(diagramFile.getFullPath().toString())); >+ List affectedFiles = new ArrayList(); >+ affectedFiles.add(diagramFile); >+ IPath modelFileRelativePath = diagramFile.getFullPath().removeFileExtension().addFileExtension("uml"); //$NON-NLS-1$ >+ IFile modelFile = diagramFile.getParent().getFile(new Path(modelFileRelativePath.lastSegment())); >+ final Resource modelResource = resourceSet.createResource(URI.createPlatformResourceURI(modelFile.getFullPath().toString())); >+ affectedFiles.add(modelFile); >+ AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain, "Creating diagram and model", affectedFiles) { //$NON-NLS-1$ >+ >+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { >+ org.eclipse.uml2.uml.Package model = createInitialModel(); >+ modelResource.getContents().add(createInitialRoot(model)); >+ Diagram diagram = ViewService.createDiagram(model, PackageEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT); >+ if (diagram != null) { >+ diagramResource.getContents().add(diagram); >+ diagram.setName(diagramFile.getName()); >+ diagram.setElement(model); >+ } >+ try { >+ Map options = new HashMap(); >+ options.put(XMIResource.OPTION_ENCODING, "UTF-8"); //$NON-NLS-1$ >+ modelResource.save(options); >+ diagramResource.save(Collections.EMPTY_MAP); >+ } catch (IOException e) { >+ >+ UMLDiagramEditorPlugin.getInstance().logError("Unable to store model and diagram resources", e); //$NON-NLS-1$ >+ } >+ return CommandResult.newOKCommandResult(); >+ } >+ }; >+ >+ try { >+ OperationHistoryFactory.getOperationHistory().execute(command, new SubProgressMonitor(progressMonitor, 1), null); >+ } catch (ExecutionException e) { >+ UMLDiagramEditorPlugin.getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$ >+ } >+ >+ try { >+ modelFile.setCharset("UTF-8", new SubProgressMonitor(progressMonitor, 1)); //$NON-NLS-1$ >+ } catch (CoreException e) { >+ UMLDiagramEditorPlugin.getInstance().logError("Unable to set charset for model file", e); //$NON-NLS-1$ >+ } >+ try { >+ diagramFile.setCharset("UTF-8", new SubProgressMonitor(progressMonitor, 1)); //$NON-NLS-1$ >+ } catch (CoreException e) { >+ UMLDiagramEditorPlugin.getInstance().logError("Unable to set charset for diagram file", e); //$NON-NLS-1$ >+ } >+ >+ return diagramFile; >+ } >+ >+ /** >+ * Create a new instance of domain element associated with canvas. >+ * @generated NOT >+ */ >+ private static org.eclipse.uml2.uml.Package createInitialModel() { >+ org.eclipse.uml2.uml.Package root = UMLFactory.eINSTANCE.createModel(); >+ root.setName("Model"); >+ return root; >+ } >+ >+ /** >+ * @generated >+ */ >+ private static EObject createInitialRoot(org.eclipse.uml2.uml.Package model) { >+ return model; >+ } >+ >+ /** >+ * @generated >+ */ >+ public static IFile createNewFile(IPath containerPath, String fileName, Shell shell) { >+ IPath newFilePath = containerPath.append(fileName); >+ IFile newFileHandle = ResourcesPlugin.getWorkspace().getRoot().getFile(newFilePath); >+ try { >+ createFile(newFileHandle); >+ } catch (CoreException e) { >+ ErrorDialog.openError(shell, "Creation Problems", null, e.getStatus()); >+ return null; >+ } >+ return newFileHandle; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected static void createFile(IFile fileHandle) throws CoreException { >+ try { >+ fileHandle.create(new ByteArrayInputStream(new byte[0]), false, new NullProgressMonitor()); >+ } catch (CoreException e) { >+ // If the file already existed locally, just refresh to get contents >+ if (e.getStatus().getCode() == IResourceStatus.PATH_OCCUPIED) { >+ fileHandle.refreshLocal(IResource.DEPTH_ZERO, null); >+ } else { >+ throw e; >+ } >+ } >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/TokenMgrError.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/TokenMgrError.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/TokenMgrError.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/TokenMgrError.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,144 @@ >+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.instance; >+ >+public class TokenMgrError extends Error >+{ >+ /* >+ * Ordinals for various reasons why an Error of this type can be thrown. >+ */ >+ >+ /** >+ * Lexical error occured. >+ */ >+ static final int LEXICAL_ERROR = 0; >+ >+ /** >+ * An attempt wass made to create a second instance of a static token manager. >+ */ >+ static final int STATIC_LEXER_ERROR = 1; >+ >+ /** >+ * Tried to change to an invalid lexical state. >+ */ >+ static final int INVALID_LEXICAL_STATE = 2; >+ >+ /** >+ * Detected (and bailed out of) an infinite loop in the token manager. >+ */ >+ static final int LOOP_DETECTED = 3; >+ >+ /** >+ * Indicates the reason why the exception is thrown. It will have >+ * one of the above 4 values. >+ */ >+ int errorCode; >+ >+ /** >+ * Replaces unprintable characters by their espaced (or unicode escaped) >+ * equivalents in the given string >+ */ >+ protected static final String addEscapes(String str) { >+ StringBuffer retval = new StringBuffer(); >+ char ch; >+ for (int i = 0; i < str.length(); i++) { >+ switch (str.charAt(i)) >+ { >+ case 0 : >+ continue; >+ case '\b': >+ retval.append("\\b"); >+ continue; >+ case '\t': >+ retval.append("\\t"); >+ continue; >+ case '\n': >+ retval.append("\\n"); >+ continue; >+ case '\f': >+ retval.append("\\f"); >+ continue; >+ case '\r': >+ retval.append("\\r"); >+ continue; >+ case '\"': >+ retval.append("\\\""); >+ continue; >+ case '\'': >+ retval.append("\\\'"); >+ continue; >+ case '\\': >+ retval.append("\\\\"); >+ continue; >+ default: >+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { >+ String s = "0000" + Integer.toString(ch, 16); >+ retval.append("\\u" + s.substring(s.length() - 4, s.length())); >+ } else { >+ retval.append(ch); >+ } >+ continue; >+ } >+ } >+ return retval.toString(); >+ } >+ >+ /** >+ * Returns a detailed message for the Error when it is thrown by the >+ * token manager to indicate a lexical error. >+ * Parameters : >+ * EOFSeen : indicates if EOF caused the lexicl error >+ * curLexState : lexical state in which this error occured >+ * errorLine : line number when the error occured >+ * errorColumn : column number when the error occured >+ * errorAfter : prefix that was seen before this error occured >+ * curchar : the offending character >+ * Note: You can customize the lexical error message by modifying this method. >+ */ >+ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { >+ return("Lexical error at line " + >+ errorLine + ", column " + >+ errorColumn + ". Encountered: " + >+ (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + >+ "after : \"" + addEscapes(errorAfter) + "\""); >+ } >+ >+ /** >+ * You can also modify the body of this method to customize your error messages. >+ * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not >+ * of end-users concern, so you can return something like : >+ * >+ * "Internal Error : Please file a bug report .... " >+ * >+ * from this method for such cases in the release version of your parser. >+ */ >+ public String getMessage() { >+ return super.getMessage(); >+ } >+ >+ /* >+ * Constructors of various flavors follow. >+ */ >+ >+ public TokenMgrError() { >+ } >+ >+ public TokenMgrError(String message, int reason) { >+ super(message); >+ errorCode = reason; >+ } >+ >+ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { >+ this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassOperationsViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassOperationsViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassOperationsViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationClassOperationsViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class AssociationClassOperationsViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassOperationsEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyToString.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyToString.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyToString.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyToString.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,153 @@ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+ >+package org.eclipse.uml2.diagram.clazz.parser.property; >+ >+import java.util.Arrays; >+import java.util.Iterator; >+import java.util.LinkedList; >+import java.util.List; >+ >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.uml2.diagram.parser.AbstractToString; >+import org.eclipse.uml2.uml.Property; >+import org.eclipse.uml2.uml.UMLFactory; >+import org.eclipse.uml2.uml.UMLPackage; >+import org.eclipse.uml2.uml.ValueSpecification; >+ >+public abstract class PropertyToString extends AbstractToString { >+ private static final Property DEFAULT_VALUES_PROTOTYPE = UMLFactory.eINSTANCE.createProperty(); >+ >+ public static class EDIT extends PropertyToString { >+ public String getToString(EObject object, int flags) { >+ Property property = asProperty(object); >+ StringBuffer result = new StringBuffer(); >+ result.append(getVisibility(property)); >+ result.append(getIsDerived(property)); >+ appendName(result, property); >+ appendType(result, property); >+ appendMultiplicity(result, property); >+ appendDefault(result, property); >+ appendPropertyModifiers(result, property); >+ >+ return result.toString(); >+ } >+ >+ public boolean isAffectingFeature(EStructuralFeature feature) { >+ throw new UnsupportedOperationException("I am edit toString, I am not expected to be asked"); >+ } >+ >+ } >+ >+ public static class VIEW extends PropertyToString implements WithReferences { >+ private static final List AFFECTING = Arrays.asList(new EStructuralFeature[] { >+ UMLPackage.eINSTANCE.getNamedElement_Visibility(), >+ UMLPackage.eINSTANCE.getProperty_IsDerived(), >+ UMLPackage.eINSTANCE.getProperty_DefaultValue(), >+ UMLPackage.eINSTANCE.getNamedElement_Name(), >+ UMLPackage.eINSTANCE.getTypedElement_Type(), >+ UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue(), >+ UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue(), >+ UMLPackage.eINSTANCE.getLiteralUnlimitedNatural_Value(), >+ UMLPackage.eINSTANCE.getLiteralInteger_Value(), >+ UMLPackage.eINSTANCE.getLiteralString_Value(), >+ }); >+ >+ public String getToString(EObject object, int flags) { >+ Property property = asProperty(object); >+ StringBuffer result = new StringBuffer(); >+ result.append(getVisibility(property)); >+ result.append(getIsDerived(property)); >+ result.append(property.getName()); >+ appendType(result, property); >+ appendMultiplicity(result, property); >+ appendDefault(result, property); >+ return result.toString(); >+ } >+ >+ public boolean isAffectingFeature(EStructuralFeature feature) { >+ return AFFECTING.contains(feature); >+ } >+ >+ public List getAdditionalReferencedElements(EObject object) { >+ Property property = asProperty(object); >+ List result = new LinkedList(); >+ result.add(property); >+ ValueSpecification upper = property.getUpperValue(); >+ if (upper != null){ >+ result.add(upper); >+ } >+ ValueSpecification lower = property.getLowerValue(); >+ if (lower != null){ >+ result.add(lower); >+ } >+ if (property.getType() != null){ >+ result.add(property.getType()); >+ } >+ return result; >+ } >+ >+ } >+ >+ protected Property asProperty(EObject object){ >+ if (false == object instanceof Property){ >+ throw new IllegalStateException("I can not provide toString for: " + object); >+ } >+ return (Property)object; >+ } >+ >+ protected void appendPropertyModifiers(StringBuffer result, Property property) { >+ ModifiersBuilder builder = new ModifiersBuilder(); >+ if (property.isReadOnly()){ >+ builder.appendModifier("readOnly"); >+ } >+ if (property.isDerivedUnion()){ >+ builder.appendModifier("union"); >+ } >+ if (property.isOrdered()){ >+ builder.appendModifier("ordered"); >+ } >+ if (property.isUnique() != DEFAULT_VALUES_PROTOTYPE.isUnique()){ >+ builder.appendModifier(property.isUnique() ? "unique" : "nonunique"); >+ } >+ for (Iterator subsets = property.getSubsettedProperties().iterator(); subsets.hasNext();){ >+ Property next = (Property) subsets.next(); >+ String nextName = next.getName(); >+ if (!isEmpty(nextName)){ >+ builder.appendModifier("subsets " + nextName); >+ } >+ } >+ for (Iterator redefines = property.getRedefinedProperties().iterator(); redefines.hasNext();){ >+ Property next = (Property) redefines.next(); >+ String nextName = next.getName(); >+ if (!isEmpty(nextName)){ >+ builder.appendModifier("redefines " + nextName); >+ } >+ } >+ builder.writeInto(result); >+ } >+ >+ protected void appendDefault(StringBuffer result, Property property) { >+ String def = property.getDefault(); >+ if (isEmpty(def)){ >+ return; >+ } >+ result.append(" = "); >+ result.append(def); >+ } >+ >+ protected String getIsDerived(Property property) { >+ return property.isDerived() ? "/" : ""; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/InstanceSpecificationEditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/InstanceSpecificationEditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/InstanceSpecificationEditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/InstanceSpecificationEditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class InstanceSpecificationEditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/DependencyViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,52 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class DependencyViewFactory extends AbstractShapeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createDescriptionStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFillStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.DependencyEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ getViewService().createNode(semanticAdapter, view, UMLVisualIDRegistry.getType(DependencyNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint()); >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/Token.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/Token.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/Token.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/Token.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,92 @@ >+/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.operation; >+ >+/** >+ * Describes the input token stream. >+ */ >+ >+public class Token { >+ >+ /** >+ * An integer that describes the kind of this token. This numbering >+ * system is determined by JavaCCParser, and a table of these numbers is >+ * stored in the file ...Constants.java. >+ */ >+ public int kind; >+ >+ /** >+ * beginLine and beginColumn describe the position of the first character >+ * of this token; endLine and endColumn describe the position of the >+ * last character of this token. >+ */ >+ public int beginLine, beginColumn, endLine, endColumn; >+ >+ /** >+ * The string image of the token. >+ */ >+ public String image; >+ >+ /** >+ * A reference to the next regular (non-special) token from the input >+ * stream. If this is the last token from the input stream, or if the >+ * token manager has not read tokens beyond this one, this field is >+ * set to null. This is true only if this token is also a regular >+ * token. Otherwise, see below for a description of the contents of >+ * this field. >+ */ >+ public Token next; >+ >+ /** >+ * This field is used to access special tokens that occur prior to this >+ * token, but after the immediately preceding regular (non-special) token. >+ * If there are no such special tokens, this field is set to null. >+ * When there are more than one such special token, this field refers >+ * to the last of these special tokens, which in turn refers to the next >+ * previous special token through its specialToken field, and so on >+ * until the first special token (whose specialToken field is null). >+ * The next fields of special tokens refer to other special tokens that >+ * immediately follow it (without an intervening regular token). If there >+ * is no such token, this field is null. >+ */ >+ public Token specialToken; >+ >+ /** >+ * Returns the image. >+ */ >+ public String toString() >+ { >+ return image; >+ } >+ >+ /** >+ * Returns a new Token object, by default. However, if you want, you >+ * can create and return subclass objects based on the value of ofKind. >+ * Simply add the cases to the switch for all those special cases. >+ * For example, if you have a subclass of Token called IDToken that >+ * you want to create if ofKind is ID, simlpy add something like : >+ * >+ * case MyParserConstants.ID : return new IDToken(); >+ * >+ * to the following switch statement. Then you can cast matchedToken >+ * variable to the appropriate type and use it in your lexical actions. >+ */ >+ public static final Token newToken(int ofKind) >+ { >+ switch(ofKind) >+ { >+ default : return new Token(); >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/JavaCharStream.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/JavaCharStream.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/JavaCharStream.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/JavaCharStream.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,558 @@ >+/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.end; >+ >+/** >+ * An implementation of interface CharStream, where the stream is assumed to >+ * contain only ASCII characters (with java-like unicode escape processing). >+ */ >+ >+public class JavaCharStream >+{ >+ public static final boolean staticFlag = false; >+ static final int hexval(char c) throws java.io.IOException { >+ switch(c) >+ { >+ case '0' : >+ return 0; >+ case '1' : >+ return 1; >+ case '2' : >+ return 2; >+ case '3' : >+ return 3; >+ case '4' : >+ return 4; >+ case '5' : >+ return 5; >+ case '6' : >+ return 6; >+ case '7' : >+ return 7; >+ case '8' : >+ return 8; >+ case '9' : >+ return 9; >+ >+ case 'a' : >+ case 'A' : >+ return 10; >+ case 'b' : >+ case 'B' : >+ return 11; >+ case 'c' : >+ case 'C' : >+ return 12; >+ case 'd' : >+ case 'D' : >+ return 13; >+ case 'e' : >+ case 'E' : >+ return 14; >+ case 'f' : >+ case 'F' : >+ return 15; >+ } >+ >+ throw new java.io.IOException(); // Should never come here >+ } >+ >+ public int bufpos = -1; >+ int bufsize; >+ int available; >+ int tokenBegin; >+ protected int bufline[]; >+ protected int bufcolumn[]; >+ >+ protected int column = 0; >+ protected int line = 1; >+ >+ protected boolean prevCharIsCR = false; >+ protected boolean prevCharIsLF = false; >+ >+ protected java.io.Reader inputStream; >+ >+ protected char[] nextCharBuf; >+ protected char[] buffer; >+ protected int maxNextCharInd = 0; >+ protected int nextCharInd = -1; >+ protected int inBuf = 0; >+ >+ protected void ExpandBuff(boolean wrapAround) >+ { >+ char[] newbuffer = new char[bufsize + 2048]; >+ int newbufline[] = new int[bufsize + 2048]; >+ int newbufcolumn[] = new int[bufsize + 2048]; >+ >+ try >+ { >+ if (wrapAround) >+ { >+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); >+ System.arraycopy(buffer, 0, newbuffer, >+ bufsize - tokenBegin, bufpos); >+ buffer = newbuffer; >+ >+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); >+ System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); >+ bufline = newbufline; >+ >+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); >+ System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); >+ bufcolumn = newbufcolumn; >+ >+ bufpos += (bufsize - tokenBegin); >+ } >+ else >+ { >+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); >+ buffer = newbuffer; >+ >+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); >+ bufline = newbufline; >+ >+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); >+ bufcolumn = newbufcolumn; >+ >+ bufpos -= tokenBegin; >+ } >+ } >+ catch (Throwable t) >+ { >+ throw new Error(t.getMessage()); >+ } >+ >+ available = (bufsize += 2048); >+ tokenBegin = 0; >+ } >+ >+ protected void FillBuff() throws java.io.IOException >+ { >+ int i; >+ if (maxNextCharInd == 4096) >+ maxNextCharInd = nextCharInd = 0; >+ >+ try { >+ if ((i = inputStream.read(nextCharBuf, maxNextCharInd, >+ 4096 - maxNextCharInd)) == -1) >+ { >+ inputStream.close(); >+ throw new java.io.IOException(); >+ } >+ else >+ maxNextCharInd += i; >+ return; >+ } >+ catch(java.io.IOException e) { >+ if (bufpos != 0) >+ { >+ --bufpos; >+ backup(0); >+ } >+ else >+ { >+ bufline[bufpos] = line; >+ bufcolumn[bufpos] = column; >+ } >+ throw e; >+ } >+ } >+ >+ protected char ReadByte() throws java.io.IOException >+ { >+ if (++nextCharInd >= maxNextCharInd) >+ FillBuff(); >+ >+ return nextCharBuf[nextCharInd]; >+ } >+ >+ public char BeginToken() throws java.io.IOException >+ { >+ if (inBuf > 0) >+ { >+ --inBuf; >+ >+ if (++bufpos == bufsize) >+ bufpos = 0; >+ >+ tokenBegin = bufpos; >+ return buffer[bufpos]; >+ } >+ >+ tokenBegin = 0; >+ bufpos = -1; >+ >+ return readChar(); >+ } >+ >+ protected void AdjustBuffSize() >+ { >+ if (available == bufsize) >+ { >+ if (tokenBegin > 2048) >+ { >+ bufpos = 0; >+ available = tokenBegin; >+ } >+ else >+ ExpandBuff(false); >+ } >+ else if (available > tokenBegin) >+ available = bufsize; >+ else if ((tokenBegin - available) < 2048) >+ ExpandBuff(true); >+ else >+ available = tokenBegin; >+ } >+ >+ protected void UpdateLineColumn(char c) >+ { >+ column++; >+ >+ if (prevCharIsLF) >+ { >+ prevCharIsLF = false; >+ line += (column = 1); >+ } >+ else if (prevCharIsCR) >+ { >+ prevCharIsCR = false; >+ if (c == '\n') >+ { >+ prevCharIsLF = true; >+ } >+ else >+ line += (column = 1); >+ } >+ >+ switch (c) >+ { >+ case '\r' : >+ prevCharIsCR = true; >+ break; >+ case '\n' : >+ prevCharIsLF = true; >+ break; >+ case '\t' : >+ column--; >+ column += (8 - (column & 07)); >+ break; >+ default : >+ break; >+ } >+ >+ bufline[bufpos] = line; >+ bufcolumn[bufpos] = column; >+ } >+ >+ public char readChar() throws java.io.IOException >+ { >+ if (inBuf > 0) >+ { >+ --inBuf; >+ >+ if (++bufpos == bufsize) >+ bufpos = 0; >+ >+ return buffer[bufpos]; >+ } >+ >+ char c; >+ >+ if (++bufpos == available) >+ AdjustBuffSize(); >+ >+ if ((buffer[bufpos] = c = ReadByte()) == '\\') >+ { >+ UpdateLineColumn(c); >+ >+ int backSlashCnt = 1; >+ >+ for (;;) // Read all the backslashes >+ { >+ if (++bufpos == available) >+ AdjustBuffSize(); >+ >+ try >+ { >+ if ((buffer[bufpos] = c = ReadByte()) != '\\') >+ { >+ UpdateLineColumn(c); >+ // found a non-backslash char. >+ if ((c == 'u') && ((backSlashCnt & 1) == 1)) >+ { >+ if (--bufpos < 0) >+ bufpos = bufsize - 1; >+ >+ break; >+ } >+ >+ backup(backSlashCnt); >+ return '\\'; >+ } >+ } >+ catch(java.io.IOException e) >+ { >+ if (backSlashCnt > 1) >+ backup(backSlashCnt); >+ >+ return '\\'; >+ } >+ >+ UpdateLineColumn(c); >+ backSlashCnt++; >+ } >+ >+ // Here, we have seen an odd number of backslash's followed by a 'u' >+ try >+ { >+ while ((c = ReadByte()) == 'u') >+ ++column; >+ >+ buffer[bufpos] = c = (char)(hexval(c) << 12 | >+ hexval(ReadByte()) << 8 | >+ hexval(ReadByte()) << 4 | >+ hexval(ReadByte())); >+ >+ column += 4; >+ } >+ catch(java.io.IOException e) >+ { >+ throw new Error("Invalid escape character at line " + line + >+ " column " + column + "."); >+ } >+ >+ if (backSlashCnt == 1) >+ return c; >+ else >+ { >+ backup(backSlashCnt - 1); >+ return '\\'; >+ } >+ } >+ else >+ { >+ UpdateLineColumn(c); >+ return (c); >+ } >+ } >+ >+ /** >+ * @deprecated >+ * @see #getEndColumn >+ */ >+ >+ public int getColumn() { >+ return bufcolumn[bufpos]; >+ } >+ >+ /** >+ * @deprecated >+ * @see #getEndLine >+ */ >+ >+ public int getLine() { >+ return bufline[bufpos]; >+ } >+ >+ public int getEndColumn() { >+ return bufcolumn[bufpos]; >+ } >+ >+ public int getEndLine() { >+ return bufline[bufpos]; >+ } >+ >+ public int getBeginColumn() { >+ return bufcolumn[tokenBegin]; >+ } >+ >+ public int getBeginLine() { >+ return bufline[tokenBegin]; >+ } >+ >+ public void backup(int amount) { >+ >+ inBuf += amount; >+ if ((bufpos -= amount) < 0) >+ bufpos += bufsize; >+ } >+ >+ public JavaCharStream(java.io.Reader dstream, >+ int startline, int startcolumn, int buffersize) >+ { >+ inputStream = dstream; >+ line = startline; >+ column = startcolumn - 1; >+ >+ available = bufsize = buffersize; >+ buffer = new char[buffersize]; >+ bufline = new int[buffersize]; >+ bufcolumn = new int[buffersize]; >+ nextCharBuf = new char[4096]; >+ } >+ >+ public JavaCharStream(java.io.Reader dstream, >+ int startline, int startcolumn) >+ { >+ this(dstream, startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.Reader dstream) >+ { >+ this(dstream, 1, 1, 4096); >+ } >+ public void ReInit(java.io.Reader dstream, >+ int startline, int startcolumn, int buffersize) >+ { >+ inputStream = dstream; >+ line = startline; >+ column = startcolumn - 1; >+ >+ if (buffer == null || buffersize != buffer.length) >+ { >+ available = bufsize = buffersize; >+ buffer = new char[buffersize]; >+ bufline = new int[buffersize]; >+ bufcolumn = new int[buffersize]; >+ nextCharBuf = new char[4096]; >+ } >+ prevCharIsLF = prevCharIsCR = false; >+ tokenBegin = inBuf = maxNextCharInd = 0; >+ nextCharInd = bufpos = -1; >+ } >+ >+ public void ReInit(java.io.Reader dstream, >+ int startline, int startcolumn) >+ { >+ ReInit(dstream, startline, startcolumn, 4096); >+ } >+ >+ public void ReInit(java.io.Reader dstream) >+ { >+ ReInit(dstream, 1, 1, 4096); >+ } >+ public JavaCharStream(java.io.InputStream dstream, int startline, >+ int startcolumn, int buffersize) >+ { >+ this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.InputStream dstream, int startline, >+ int startcolumn) >+ { >+ this(dstream, startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.InputStream dstream) >+ { >+ this(dstream, 1, 1, 4096); >+ } >+ >+ public void ReInit(java.io.InputStream dstream, int startline, >+ int startcolumn, int buffersize) >+ { >+ ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); >+ } >+ public void ReInit(java.io.InputStream dstream, int startline, >+ int startcolumn) >+ { >+ ReInit(dstream, startline, startcolumn, 4096); >+ } >+ public void ReInit(java.io.InputStream dstream) >+ { >+ ReInit(dstream, 1, 1, 4096); >+ } >+ >+ public String GetImage() >+ { >+ if (bufpos >= tokenBegin) >+ return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); >+ else >+ return new String(buffer, tokenBegin, bufsize - tokenBegin) + >+ new String(buffer, 0, bufpos + 1); >+ } >+ >+ public char[] GetSuffix(int len) >+ { >+ char[] ret = new char[len]; >+ >+ if ((bufpos + 1) >= len) >+ System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); >+ else >+ { >+ System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, >+ len - bufpos - 1); >+ System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); >+ } >+ >+ return ret; >+ } >+ >+ public void Done() >+ { >+ nextCharBuf = null; >+ buffer = null; >+ bufline = null; >+ bufcolumn = null; >+ } >+ >+ /** >+ * Method to adjust line and column numbers for the start of a token. >+ */ >+ public void adjustBeginLineColumn(int newLine, int newCol) >+ { >+ int start = tokenBegin; >+ int len; >+ >+ if (bufpos >= tokenBegin) >+ { >+ len = bufpos - tokenBegin + inBuf + 1; >+ } >+ else >+ { >+ len = bufsize - tokenBegin + bufpos + 1 + inBuf; >+ } >+ >+ int i = 0, j = 0, k = 0; >+ int nextColDiff = 0, columnDiff = 0; >+ >+ while (i < len && >+ bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) >+ { >+ bufline[j] = newLine; >+ nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; >+ bufcolumn[j] = newCol + columnDiff; >+ columnDiff = nextColDiff; >+ i++; >+ } >+ >+ if (i < len) >+ { >+ bufline[j] = newLine++; >+ bufcolumn[j] = newCol + columnDiff; >+ >+ while (i++ < len) >+ { >+ if (bufline[j = start % bufsize] != bufline[++start % bufsize]) >+ bufline[j] = newLine++; >+ else >+ bufline[j] = newLine; >+ } >+ } >+ >+ line = bufline[j]; >+ column = bufcolumn[j]; >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/providers/UMLAbstractParser.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/providers/UMLAbstractParser.java >diff -N src/org/eclipse/uml2/diagram/clazz/providers/UMLAbstractParser.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/providers/UMLAbstractParser.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,377 @@ >+package org.eclipse.uml2.diagram.clazz.providers; >+ >+import java.text.MessageFormat; >+import java.text.ParsePosition; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EClassifier; >+import org.eclipse.emf.ecore.EDataType; >+import org.eclipse.emf.ecore.EEnum; >+import org.eclipse.emf.ecore.EEnumLiteral; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.gmf.runtime.common.core.command.ICommand; >+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand; >+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; >+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; >+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus; >+import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand; >+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest; >+import org.eclipse.jface.text.contentassist.IContentAssistProcessor; >+import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorPlugin; >+ >+/** >+ * @generated >+ */ >+public abstract class UMLAbstractParser implements IParser { >+ >+ /** >+ * @generated >+ */ >+ private String viewPattern; >+ >+ /** >+ * @generated >+ */ >+ private MessageFormat viewProcessor; >+ >+ /** >+ * @generated >+ */ >+ private String editPattern; >+ >+ /** >+ * @generated >+ */ >+ private MessageFormat editProcessor; >+ >+ /** >+ * @generated >+ */ >+ public String getViewPattern() { >+ return viewPattern; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected MessageFormat getViewProcessor() { >+ return viewProcessor; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setViewPattern(String viewPattern) { >+ this.viewPattern = viewPattern; >+ viewProcessor = createViewProcessor(viewPattern); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected MessageFormat createViewProcessor(String viewPattern) { >+ return new MessageFormat(viewPattern); >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getEditPattern() { >+ return editPattern; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected MessageFormat getEditProcessor() { >+ return editProcessor; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void setEditPattern(String editPattern) { >+ this.editPattern = editPattern; >+ editProcessor = createEditProcessor(editPattern); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected MessageFormat createEditProcessor(String editPattern) { >+ return new MessageFormat(editPattern); >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getPrintString(IAdaptable adapter, int flags) { >+ return getStringByPattern(adapter, flags, getViewPattern(), getViewProcessor()); >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getEditString(IAdaptable adapter, int flags) { >+ return getStringByPattern(adapter, flags, getEditPattern(), getEditProcessor()); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected abstract String getStringByPattern(IAdaptable adapter, int flags, String pattern, MessageFormat processor); >+ >+ /** >+ * @generated >+ */ >+ public IParserEditStatus isValidEditString(IAdaptable element, String editString) { >+ ParsePosition pos = new ParsePosition(0); >+ Object[] values = getEditProcessor().parse(editString, pos); >+ if (values == null) { >+ return new ParserEditStatus(UMLDiagramEditorPlugin.ID, IParserEditStatus.UNEDITABLE, "Invalid input at " + pos.getErrorIndex()); >+ } >+ return validateNewValues(values); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected IParserEditStatus validateNewValues(Object[] values) { >+ return ParserEditStatus.EDITABLE_STATUS; >+ } >+ >+ /** >+ * @generated >+ */ >+ public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) { >+ Object[] values = getEditProcessor().parse(newString, new ParsePosition(0)); >+ if (values == null || validateNewValues(values).getCode() != IParserEditStatus.EDITABLE) { >+ return UnexecutableCommand.INSTANCE; >+ } >+ return getParseCommand(adapter, values); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected abstract ICommand getParseCommand(IAdaptable adapter, Object[] values); >+ >+ /** >+ * @generated >+ */ >+ public IContentAssistProcessor getCompletionProcessor(IAdaptable element) { >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected ICommand getModificationCommand(EObject element, EStructuralFeature feature, Object value) { >+ value = getValidNewValue(feature, value); >+ if (value instanceof InvalidValue) { >+ return UnexecutableCommand.INSTANCE; >+ } >+ SetRequest request = new SetRequest(element, feature, value); >+ return new SetValueCommand(request); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected Object getValidValue(EStructuralFeature feature, Object value) { >+ EClassifier type = feature.getEType(); >+ if (type instanceof EDataType) { >+ Class iClass = type.getInstanceClass(); >+ if (String.class.equals(iClass)) { >+ if (value == null) { >+ value = ""; //$NON-NLS-1$ >+ } >+ } >+ } >+ return value; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected Object getValidNewValue(EStructuralFeature feature, Object value) { >+ EClassifier type = feature.getEType(); >+ if (type instanceof EDataType) { >+ Class iClass = type.getInstanceClass(); >+ if (Boolean.TYPE.equals(iClass)) { >+ if (value instanceof Boolean) { >+ // ok >+ } else if (value instanceof String) { >+ value = Boolean.valueOf((String) value); >+ } else { >+ value = new InvalidValue("Value of type Boolean is expected"); >+ } >+ } else if (Character.TYPE.equals(iClass)) { >+ if (value instanceof Character) { >+ // ok >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ value = null; >+ } else { >+ value = new Character(s.charAt(0)); >+ } >+ } else { >+ value = new InvalidValue("Value of type Character is expected"); >+ } >+ } else if (Byte.TYPE.equals(iClass)) { >+ if (value instanceof Byte) { >+ // ok >+ } else if (value instanceof Number) { >+ value = new Byte(((Number) value).byteValue()); >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ value = null; >+ } else { >+ try { >+ value = Byte.valueOf(s); >+ } catch (NumberFormatException nfe) { >+ value = new InvalidValue("String value does not convert to Byte value"); >+ } >+ } >+ } else { >+ value = new InvalidValue("Value of type Byte is expected"); >+ } >+ } else if (Short.TYPE.equals(iClass)) { >+ if (value instanceof Short) { >+ // ok >+ } else if (value instanceof Number) { >+ value = new Short(((Number) value).shortValue()); >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ value = null; >+ } else { >+ try { >+ value = Short.valueOf(s); >+ } catch (NumberFormatException nfe) { >+ value = new InvalidValue("String value does not convert to Short value"); >+ } >+ } >+ } else { >+ value = new InvalidValue("Value of type Short is expected"); >+ } >+ } else if (Integer.TYPE.equals(iClass)) { >+ if (value instanceof Integer) { >+ // ok >+ } else if (value instanceof Number) { >+ value = new Integer(((Number) value).intValue()); >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ value = null; >+ } else { >+ try { >+ value = Integer.valueOf(s); >+ } catch (NumberFormatException nfe) { >+ value = new InvalidValue("String value does not convert to Integer value"); >+ } >+ } >+ } else { >+ value = new InvalidValue("Value of type Integer is expected"); >+ } >+ } else if (Long.TYPE.equals(iClass)) { >+ if (value instanceof Long) { >+ // ok >+ } else if (value instanceof Number) { >+ value = new Long(((Number) value).longValue()); >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ value = null; >+ } else { >+ try { >+ value = Long.valueOf(s); >+ } catch (NumberFormatException nfe) { >+ value = new InvalidValue("String value does not convert to Long value"); >+ } >+ } >+ } else { >+ value = new InvalidValue("Value of type Long is expected"); >+ } >+ } else if (Float.TYPE.equals(iClass)) { >+ if (value instanceof Float) { >+ // ok >+ } else if (value instanceof Number) { >+ value = new Float(((Number) value).floatValue()); >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ value = null; >+ } else { >+ try { >+ value = Float.valueOf(s); >+ } catch (NumberFormatException nfe) { >+ value = new InvalidValue("String value does not convert to Float value"); >+ } >+ } >+ } else { >+ value = new InvalidValue("Value of type Float is expected"); >+ } >+ } else if (Double.TYPE.equals(iClass)) { >+ if (value instanceof Double) { >+ // ok >+ } else if (value instanceof Number) { >+ value = new Double(((Number) value).doubleValue()); >+ } else if (value instanceof String) { >+ String s = (String) value; >+ if (s.length() == 0) { >+ value = null; >+ } else { >+ try { >+ value = Double.valueOf(s); >+ } catch (NumberFormatException nfe) { >+ value = new InvalidValue("String value does not convert to Double value"); >+ } >+ } >+ } else { >+ value = new InvalidValue("Value of type Double is expected"); >+ } >+ } else if (type instanceof EEnum) { >+ if (value instanceof String) { >+ EEnumLiteral literal = ((EEnum) type).getEEnumLiteralByLiteral((String) value); >+ if (literal == null) { >+ value = new InvalidValue("Unknown literal: " + value); >+ } else { >+ value = literal.getInstance(); >+ } >+ } else { >+ value = new InvalidValue("Value of type String is expected"); >+ } >+ } >+ } >+ return value; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected class InvalidValue { >+ >+ /** >+ * @generated >+ */ >+ private String description; >+ >+ /** >+ * @generated >+ */ >+ public InvalidValue(String description) { >+ this.description = description; >+ } >+ >+ /** >+ * @generated >+ */ >+ public String toString() { >+ return description; >+ } >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName2ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName2ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName2ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName2ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; >+import org.eclipse.gmf.runtime.notation.Location; >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class AssociationName2ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { >+ Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint); >+ Location location = (Location) view.getLayoutConstraint(); >+ IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit()); >+ location.setX(mapMode.DPtoLP(0)); >+ location.setY(mapMode.DPtoLP(-15)); >+ return view; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/DataTypeEditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/DataTypeEditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/DataTypeEditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/DataTypeEditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class DataTypeEditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/ClassOperationsViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/ClassOperationsViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/ClassOperationsViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/ClassOperationsViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class ClassOperationsViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.ClassOperationsEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: .project >=================================================================== >RCS file: .project >diff -N .project >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ .project 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,28 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<projectDescription> >+ <name>org.eclipse.uml2.diagram.clazz</name> >+ <comment></comment> >+ <projects> >+ </projects> >+ <buildSpec> >+ <buildCommand> >+ <name>org.eclipse.jdt.core.javabuilder</name> >+ <arguments> >+ </arguments> >+ </buildCommand> >+ <buildCommand> >+ <name>org.eclipse.pde.ManifestBuilder</name> >+ <arguments> >+ </arguments> >+ </buildCommand> >+ <buildCommand> >+ <name>org.eclipse.pde.SchemaBuilder</name> >+ <arguments> >+ </arguments> >+ </buildCommand> >+ </buildSpec> >+ <natures> >+ <nature>org.eclipse.jdt.core.javanature</nature> >+ <nature>org.eclipse.pde.PluginNature</nature> >+ </natures> >+</projectDescription> >Index: src/org/eclipse/uml2/diagram/clazz/expressions/UMLAbstractExpression.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/expressions/UMLAbstractExpression.java >diff -N src/org/eclipse/uml2/diagram/clazz/expressions/UMLAbstractExpression.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/expressions/UMLAbstractExpression.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,210 @@ >+package org.eclipse.uml2.diagram.clazz.expressions; >+ >+import java.math.BigDecimal; >+import java.math.BigInteger; >+import java.util.Collection; >+import java.util.Collections; >+import java.util.Iterator; >+import java.util.Map; >+ >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Platform; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.emf.ecore.EClassifier; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.EStructuralFeature; >+import org.eclipse.emf.ecore.ETypedElement; >+import org.eclipse.emf.ecore.util.EcoreUtil; >+import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorPlugin; >+ >+/** >+ * @generated >+ */ >+public abstract class UMLAbstractExpression { >+ >+ /** >+ * @generated >+ */ >+ private static final boolean DISABLED_NO_IMPL_EXCEPTION_LOG = Boolean.valueOf( >+ Platform.getDebugOption(UMLDiagramEditorPlugin.getInstance().getBundle().getSymbolicName() + "/debug/disableNoExprImplExceptionLog")).booleanValue(); >+ >+ /** >+ * @generated >+ */ >+ private String body; >+ >+ /** >+ * @generated >+ */ >+ private EClassifier context; >+ >+ /** >+ * @generated >+ */ >+ private IStatus status = Status.OK_STATUS; >+ >+ /** >+ * @generated >+ */ >+ protected UMLAbstractExpression(EClassifier context) { >+ this.context = context; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected UMLAbstractExpression(String body, EClassifier context, Map env) { >+ this.body = body; >+ this.context = context; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setStatus(int severity, String message, Throwable throwable) { >+ String pluginID = UMLDiagramEditorPlugin.ID; >+ this.status = new Status(severity, pluginID, -1, (message != null) ? message : "", throwable); //$NON-NLS-1$ >+ if (!this.status.isOK()) { >+ UMLDiagramEditorPlugin.getInstance().logError("Expression problem:" + message + "body:" + body, throwable); //$NON-NLS-1$ //$NON-NLS-2$ >+ >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected abstract Object doEvaluate(Object context, Map env); >+ >+ /** >+ * @generated >+ */ >+ public Object evaluate(Object context) { >+ return evaluate(context, Collections.EMPTY_MAP); >+ } >+ >+ /** >+ * @generated >+ */ >+ public Object evaluate(Object context, Map env) { >+ if (context().isInstance(context)) { >+ try { >+ return doEvaluate(context, env); >+ } catch (Exception e) { >+ if (DISABLED_NO_IMPL_EXCEPTION_LOG && e instanceof NoImplException) { >+ return null; >+ } >+ UMLDiagramEditorPlugin.getInstance().logError("Expression evaluation failure: " + body, e); >+ } >+ } >+ return null; >+ } >+ >+ /** >+ * @generated >+ */ >+ public IStatus getStatus() { >+ return status; >+ } >+ >+ /** >+ * @generated >+ */ >+ public String body() { >+ return body; >+ } >+ >+ /** >+ * @generated >+ */ >+ public EClassifier context() { >+ return context; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void assignTo(EStructuralFeature feature, EObject target) { >+ Object value = evaluate(target); >+ value = (value != null) ? performCast(value, feature) : null; >+ if (feature.isMany()) { >+ Collection destCollection = (Collection) target.eGet(feature); >+ destCollection.clear(); >+ if (value instanceof Collection) { >+ Collection valueCollection = (Collection) value; >+ for (Iterator it = valueCollection.iterator(); it.hasNext();) { >+ destCollection.add(performCast(it.next(), feature)); >+ } >+ } else { >+ destCollection.add(value); >+ } >+ return; >+ } >+ target.eSet(feature, value); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected Object performCast(Object value, ETypedElement targetType) { >+ if (targetType.getEType() == null || targetType.getEType().getInstanceClass() == null) { >+ return value; >+ } >+ Class targetClass = targetType.getEType().getInstanceClass(); >+ if (value != null && value instanceof Number) { >+ Number num = (Number) value; >+ Class valClass = value.getClass(); >+ Class targetWrapperClass = targetClass; >+ if (targetClass.isPrimitive()) { >+ targetWrapperClass = EcoreUtil.wrapperClassFor(targetClass); >+ } >+ if (valClass.equals(targetWrapperClass)) { >+ return value; >+ } >+ if (Number.class.isAssignableFrom(targetWrapperClass)) { >+ if (targetWrapperClass.equals(Byte.class)) >+ return new Byte(num.byteValue()); >+ if (targetWrapperClass.equals(Integer.class)) >+ return new Integer(num.intValue()); >+ if (targetWrapperClass.equals(Short.class)) >+ return new Short(num.shortValue()); >+ if (targetWrapperClass.equals(Long.class)) >+ return new Long(num.longValue()); >+ if (targetWrapperClass.equals(BigInteger.class)) >+ return BigInteger.valueOf(num.longValue()); >+ if (targetWrapperClass.equals(Float.class)) >+ return new Float(num.floatValue()); >+ if (targetWrapperClass.equals(Double.class)) >+ return new Double(num.doubleValue()); >+ if (targetWrapperClass.equals(BigDecimal.class)) >+ return new BigDecimal(num.doubleValue()); >+ } >+ } >+ return value; >+ } >+ >+ /** >+ * @generated >+ */ >+ public static final UMLAbstractExpression createNullExpression(EClassifier context) { >+ return new UMLAbstractExpression(context) { >+ >+ protected Object doEvaluate(Object context, Map env) { >+ // TODO - log entry about not provider available for this expression >+ return null; >+ } >+ }; >+ } >+ >+ /** >+ * @generated >+ */ >+ public static class NoImplException extends RuntimeException { >+ >+ /** >+ * @generated >+ */ >+ public NoImplException(String message) { >+ super(message); >+ } >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorLabelProvider.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorLabelProvider.java >diff -N src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorLabelProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorLabelProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,1277 @@ >+package org.eclipse.uml2.diagram.clazz.navigator; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; >+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; >+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService; >+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; >+import org.eclipse.gmf.runtime.emf.type.core.IElementType; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.jface.resource.ImageDescriptor; >+import org.eclipse.jface.resource.ImageRegistry; >+import org.eclipse.jface.viewers.LabelProvider; >+import org.eclipse.swt.graphics.Image; >+import org.eclipse.ui.IMemento; >+import org.eclipse.ui.navigator.ICommonContentExtensionSite; >+import org.eclipse.ui.navigator.ICommonLabelProvider; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClass2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationClassNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.AssociationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Class2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Class3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ClassNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintConstrainedElementEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.ConstraintNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataType2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DataTypeNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Dependency2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyClientEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyName2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencyNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.DependencySupplierEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Enumeration2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationLiteralEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.EnumerationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.GeneralizationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecification2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.InterfaceRealizationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.LiteralStringEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Operation5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.OperationEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Package2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Package3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PortEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PortNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveType2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property2EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property3EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property4EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property5EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.Property6EditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PropertyEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PropertyNameEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.SlotEditPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.UsageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditorPlugin; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+import org.eclipse.uml2.diagram.clazz.providers.UMLElementTypes; >+import org.eclipse.uml2.uml.Generalization; >+import org.eclipse.uml2.uml.NamedElement; >+ >+/** >+ * @generated >+ */ >+public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonLabelProvider { >+ >+ /** >+ * @generated >+ */ >+ static { >+ UMLDiagramEditorPlugin.getInstance().getImageRegistry().put("Navigator?InvalidElement", ImageDescriptor.getMissingImageDescriptor()); >+ UMLDiagramEditorPlugin.getInstance().getImageRegistry().put("Navigator?UnknownElement", ImageDescriptor.getMissingImageDescriptor()); >+ UMLDiagramEditorPlugin.getInstance().getImageRegistry().put("Navigator?ImageNotFound", ImageDescriptor.getMissingImageDescriptor()); >+ } >+ >+ /** >+ * @generated >+ */ >+ public Image getImage(Object element) { >+ if (false == element instanceof UMLAbstractNavigatorItem) { >+ return super.getImage(element); >+ } >+ >+ UMLAbstractNavigatorItem abstractNavigatorItem = (UMLAbstractNavigatorItem) element; >+ if (!PackageEditPart.MODEL_ID.equals(abstractNavigatorItem.getModelID())) { >+ return super.getImage(element); >+ } >+ >+ if (abstractNavigatorItem instanceof UMLNavigatorItem) { >+ UMLNavigatorItem navigatorItem = (UMLNavigatorItem) abstractNavigatorItem; >+ switch (navigatorItem.getVisualID()) { >+ case Package2EditPart.VISUAL_ID: >+ return getImage("Navigator?TopLevelNode?http://www.eclipse.org/uml2/2.0.0/UML?Package", UMLElementTypes.Package_2002); >+ case Class2EditPart.VISUAL_ID: >+ return getImage("Navigator?TopLevelNode?http://www.eclipse.org/uml2/2.0.0/UML?Class", UMLElementTypes.Class_2001); >+ case AssociationClass2EditPart.VISUAL_ID: >+ return getImage("Navigator?TopLevelNode?http://www.eclipse.org/uml2/2.0.0/UML?AssociationClass", UMLElementTypes.AssociationClass_2007); >+ case DataType2EditPart.VISUAL_ID: >+ return getImage("Navigator?TopLevelNode?http://www.eclipse.org/uml2/2.0.0/UML?DataType", UMLElementTypes.DataType_2004); >+ case PrimitiveType2EditPart.VISUAL_ID: >+ return getImage("Navigator?TopLevelNode?http://www.eclipse.org/uml2/2.0.0/UML?PrimitiveType", UMLElementTypes.PrimitiveType_2005); >+ case Enumeration2EditPart.VISUAL_ID: >+ return getImage("Navigator?TopLevelNode?http://www.eclipse.org/uml2/2.0.0/UML?Enumeration", UMLElementTypes.Enumeration_2003); >+ case InterfaceEditPart.VISUAL_ID: >+ return getImage("Navigator?TopLevelNode?http://www.eclipse.org/uml2/2.0.0/UML?Interface", UMLElementTypes.Interface_2010); >+ case ConstraintEditPart.VISUAL_ID: >+ return getImage("Navigator?TopLevelNode?http://www.eclipse.org/uml2/2.0.0/UML?Constraint", UMLElementTypes.Constraint_2006); >+ case InstanceSpecification2EditPart.VISUAL_ID: >+ return getImage("Navigator?TopLevelNode?http://www.eclipse.org/uml2/2.0.0/UML?InstanceSpecification", UMLElementTypes.InstanceSpecification_2008); >+ case DependencyEditPart.VISUAL_ID: >+ return getImage("Navigator?TopLevelNode?http://www.eclipse.org/uml2/2.0.0/UML?Dependency", UMLElementTypes.Dependency_2009); >+ case Package3EditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Package", UMLElementTypes.Package_3006); >+ case ClassEditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Class", UMLElementTypes.Class_3007); >+ case DataTypeEditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?DataType", UMLElementTypes.DataType_3008); >+ case PrimitiveTypeEditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?PrimitiveType", UMLElementTypes.PrimitiveType_3009); >+ case EnumerationEditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Enumeration", UMLElementTypes.Enumeration_3011); >+ case AssociationClassEditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?AssociationClass", UMLElementTypes.AssociationClass_3012); >+ case InstanceSpecificationEditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?InstanceSpecification", UMLElementTypes.InstanceSpecification_3013); >+ case PropertyEditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Property", UMLElementTypes.Property_3001); >+ case OperationEditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Operation", UMLElementTypes.Operation_3002); >+ case Class3EditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Class", UMLElementTypes.Class_3003); >+ case PortEditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Port", UMLElementTypes.Port_3025); >+ case Property2EditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Property", UMLElementTypes.Property_3019); >+ case Operation2EditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Operation", UMLElementTypes.Operation_3020); >+ case Property3EditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Property", UMLElementTypes.Property_3014); >+ case Operation3EditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Operation", UMLElementTypes.Operation_3015); >+ case Property4EditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Property", UMLElementTypes.Property_3021); >+ case Operation4EditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Operation", UMLElementTypes.Operation_3022); >+ case EnumerationLiteralEditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?EnumerationLiteral", UMLElementTypes.EnumerationLiteral_3016); >+ case Property5EditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Property", UMLElementTypes.Property_3023); >+ case Operation5EditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Operation", UMLElementTypes.Operation_3024); >+ case LiteralStringEditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?LiteralString", UMLElementTypes.LiteralString_3005); >+ case SlotEditPart.VISUAL_ID: >+ return getImage("Navigator?Node?http://www.eclipse.org/uml2/2.0.0/UML?Slot", UMLElementTypes.Slot_3017); >+ case PackageEditPart.VISUAL_ID: >+ return getImage("Navigator?Diagram?http://www.eclipse.org/uml2/2.0.0/UML?Package", UMLElementTypes.Package_1000); >+ case GeneralizationEditPart.VISUAL_ID: >+ return getImage("Navigator?Link?http://www.eclipse.org/uml2/2.0.0/UML?Generalization", UMLElementTypes.Generalization_4001); >+ case Dependency2EditPart.VISUAL_ID: >+ return getImage("Navigator?Link?http://www.eclipse.org/uml2/2.0.0/UML?Dependency", UMLElementTypes.Dependency_4002); >+ case Property6EditPart.VISUAL_ID: >+ return getImage("Navigator?Link?http://www.eclipse.org/uml2/2.0.0/UML?Property", UMLElementTypes.Property_4003); >+ case ConstraintConstrainedElementEditPart.VISUAL_ID: >+ return getImage("Navigator?Link?http://www.eclipse.org/uml2/2.0.0/UML?Constraint?constrainedElement", UMLElementTypes.ConstraintConstrainedElement_4004); >+ case AssociationEditPart.VISUAL_ID: >+ return getImage("Navigator?Link?http://www.eclipse.org/uml2/2.0.0/UML?Association", UMLElementTypes.Association_4005); >+ case DependencySupplierEditPart.VISUAL_ID: >+ return getImage("Navigator?Link?http://www.eclipse.org/uml2/2.0.0/UML?Dependency?supplier", UMLElementTypes.DependencySupplier_4006); >+ case DependencyClientEditPart.VISUAL_ID: >+ return getImage("Navigator?Link?http://www.eclipse.org/uml2/2.0.0/UML?Dependency?client", UMLElementTypes.DependencyClient_4007); >+ case InterfaceRealizationEditPart.VISUAL_ID: >+ return getImage("Navigator?Link?http://www.eclipse.org/uml2/2.0.0/UML?InterfaceRealization", UMLElementTypes.InterfaceRealization_4008); >+ case UsageEditPart.VISUAL_ID: >+ return getImage("Navigator?Link?http://www.eclipse.org/uml2/2.0.0/UML?Usage", UMLElementTypes.Usage_4009); >+ default: >+ return getImage("Navigator?UnknownElement", null); >+ } >+ } else if (abstractNavigatorItem instanceof UMLNavigatorGroup) { >+ UMLNavigatorGroup group = (UMLNavigatorGroup) element; >+ return UMLDiagramEditorPlugin.getInstance().getBundledImage(group.getIcon()); >+ } >+ return super.getImage(element); >+ } >+ >+ /** >+ * @generated >+ */ >+ private Image getImage(String key, IElementType elementType) { >+ ImageRegistry imageRegistry = UMLDiagramEditorPlugin.getInstance().getImageRegistry(); >+ Image image = imageRegistry.get(key); >+ if (image == null && elementType != null && UMLElementTypes.isKnownElementType(elementType)) { >+ image = UMLElementTypes.getImage(elementType); >+ imageRegistry.put(key, image); >+ } >+ >+ if (image == null) { >+ image = imageRegistry.get("Navigator?ImageNotFound"); >+ imageRegistry.put(key, image); >+ } >+ return image; >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getText(Object element) { >+ if (false == element instanceof UMLAbstractNavigatorItem) { >+ return super.getText(element); >+ } >+ >+ UMLAbstractNavigatorItem abstractNavigatorItem = (UMLAbstractNavigatorItem) element; >+ if (!PackageEditPart.MODEL_ID.equals(abstractNavigatorItem.getModelID())) { >+ return super.getText(element); >+ } >+ >+ if (abstractNavigatorItem instanceof UMLNavigatorItem) { >+ UMLNavigatorItem navigatorItem = (UMLNavigatorItem) abstractNavigatorItem; >+ switch (navigatorItem.getVisualID()) { >+ case Package2EditPart.VISUAL_ID: >+ return getPackage_2002Text(navigatorItem.getView()); >+ case Class2EditPart.VISUAL_ID: >+ return getClass_2001Text(navigatorItem.getView()); >+ case AssociationClass2EditPart.VISUAL_ID: >+ return getAssociationClass_2007Text(navigatorItem.getView()); >+ case DataType2EditPart.VISUAL_ID: >+ return getDataType_2004Text(navigatorItem.getView()); >+ case PrimitiveType2EditPart.VISUAL_ID: >+ return getPrimitiveType_2005Text(navigatorItem.getView()); >+ case Enumeration2EditPart.VISUAL_ID: >+ return getEnumeration_2003Text(navigatorItem.getView()); >+ case InterfaceEditPart.VISUAL_ID: >+ return getInterface_2010Text(navigatorItem.getView()); >+ case ConstraintEditPart.VISUAL_ID: >+ return getConstraint_2006Text(navigatorItem.getView()); >+ case InstanceSpecification2EditPart.VISUAL_ID: >+ return getInstanceSpecification_2008Text(navigatorItem.getView()); >+ case DependencyEditPart.VISUAL_ID: >+ return getDependency_2009Text(navigatorItem.getView()); >+ case Package3EditPart.VISUAL_ID: >+ return getPackage_3006Text(navigatorItem.getView()); >+ case ClassEditPart.VISUAL_ID: >+ return getClass_3007Text(navigatorItem.getView()); >+ case DataTypeEditPart.VISUAL_ID: >+ return getDataType_3008Text(navigatorItem.getView()); >+ case PrimitiveTypeEditPart.VISUAL_ID: >+ return getPrimitiveType_3009Text(navigatorItem.getView()); >+ case EnumerationEditPart.VISUAL_ID: >+ return getEnumeration_3011Text(navigatorItem.getView()); >+ case AssociationClassEditPart.VISUAL_ID: >+ return getAssociationClass_3012Text(navigatorItem.getView()); >+ case InstanceSpecificationEditPart.VISUAL_ID: >+ return getInstanceSpecification_3013Text(navigatorItem.getView()); >+ case PropertyEditPart.VISUAL_ID: >+ return getProperty_3001Text(navigatorItem.getView()); >+ case OperationEditPart.VISUAL_ID: >+ return getOperation_3002Text(navigatorItem.getView()); >+ case Class3EditPart.VISUAL_ID: >+ return getClass_3003Text(navigatorItem.getView()); >+ case PortEditPart.VISUAL_ID: >+ return getPort_3025Text(navigatorItem.getView()); >+ case Property2EditPart.VISUAL_ID: >+ return getProperty_3019Text(navigatorItem.getView()); >+ case Operation2EditPart.VISUAL_ID: >+ return getOperation_3020Text(navigatorItem.getView()); >+ case Property3EditPart.VISUAL_ID: >+ return getProperty_3014Text(navigatorItem.getView()); >+ case Operation3EditPart.VISUAL_ID: >+ return getOperation_3015Text(navigatorItem.getView()); >+ case Property4EditPart.VISUAL_ID: >+ return getProperty_3021Text(navigatorItem.getView()); >+ case Operation4EditPart.VISUAL_ID: >+ return getOperation_3022Text(navigatorItem.getView()); >+ case EnumerationLiteralEditPart.VISUAL_ID: >+ return getEnumerationLiteral_3016Text(navigatorItem.getView()); >+ case Property5EditPart.VISUAL_ID: >+ return getProperty_3023Text(navigatorItem.getView()); >+ case Operation5EditPart.VISUAL_ID: >+ return getOperation_3024Text(navigatorItem.getView()); >+ case LiteralStringEditPart.VISUAL_ID: >+ return getLiteralString_3005Text(navigatorItem.getView()); >+ case SlotEditPart.VISUAL_ID: >+ return getSlot_3017Text(navigatorItem.getView()); >+ case PackageEditPart.VISUAL_ID: >+ return getPackage_1000Text(navigatorItem.getView()); >+ case GeneralizationEditPart.VISUAL_ID: >+ return getGeneralization_4001Text(navigatorItem.getView()); >+ case Dependency2EditPart.VISUAL_ID: >+ return getDependency_4002Text(navigatorItem.getView()); >+ case Property6EditPart.VISUAL_ID: >+ return getProperty_4003Text(navigatorItem.getView()); >+ case ConstraintConstrainedElementEditPart.VISUAL_ID: >+ return getConstraintConstrainedElement_4004Text(navigatorItem.getView()); >+ case AssociationEditPart.VISUAL_ID: >+ return getAssociation_4005Text(navigatorItem.getView()); >+ case DependencySupplierEditPart.VISUAL_ID: >+ return getDependencySupplier_4006Text(navigatorItem.getView()); >+ case DependencyClientEditPart.VISUAL_ID: >+ return getDependencyClient_4007Text(navigatorItem.getView()); >+ case InterfaceRealizationEditPart.VISUAL_ID: >+ return getInterfaceRealization_4008Text(navigatorItem.getView()); >+ case UsageEditPart.VISUAL_ID: >+ return getUsage_4009Text(navigatorItem.getView()); >+ default: >+ return getUnknownElementText(navigatorItem.getView()); >+ } >+ } else if (abstractNavigatorItem instanceof UMLNavigatorGroup) { >+ UMLNavigatorGroup group = (UMLNavigatorGroup) element; >+ return group.getGroupName(); >+ } >+ return super.getText(element); >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getPackage_2002Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(PackageNameEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Package_2002; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5004); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getClass_2001Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(ClassNameEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Class_2001; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5003); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getAssociationClass_2007Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(AssociationClassNameEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.AssociationClass_2007; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5009); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getDataType_2004Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(DataTypeNameEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.DataType_2004; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5006); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getPrimitiveType_2005Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.PrimitiveType_2005; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5007); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getEnumeration_2003Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(EnumerationNameEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Enumeration_2003; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5005); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getInterface_2010Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(InterfaceNameEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Interface_2010; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5012); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getConstraint_2006Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Constraint_2006; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5008); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getInstanceSpecification_2008Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(InstanceSpecificationNameEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.InstanceSpecification_2008; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5010); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getDependency_2009Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(DependencyNameEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Dependency_2009; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5011); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getPackage_3006Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(Package3EditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Package_3006; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3006); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getClass_3007Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Class_3007; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3007); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getDataType_3008Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(DataTypeEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.DataType_3008; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3008); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getPrimitiveType_3009Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(PrimitiveTypeEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.PrimitiveType_3009; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3009); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getEnumeration_3011Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(EnumerationEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Enumeration_3011; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3011); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getAssociationClass_3012Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(AssociationClassEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.AssociationClass_3012; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3012); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getInstanceSpecification_3013Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(InstanceSpecificationEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.InstanceSpecification_3013; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3013); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getProperty_3001Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(PropertyEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Property_3001; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3001); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getOperation_3002Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(OperationEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Operation_3002; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3002); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getClass_3003Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(Class3EditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Class_3003; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3003); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getPort_3025Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(PortNameEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Port_3025; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 5013); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getProperty_3019Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(Property2EditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Property_3019; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3019); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getOperation_3020Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(Operation2EditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Operation_3020; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3020); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getProperty_3014Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(Property3EditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Property_3014; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3014); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getOperation_3015Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(Operation3EditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Operation_3015; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3015); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getProperty_3021Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(Property4EditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Property_3021; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3021); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getOperation_3022Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(Operation4EditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Operation_3022; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3022); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getEnumerationLiteral_3016Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(EnumerationLiteralEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.EnumerationLiteral_3016; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3016); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getProperty_3023Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(Property5EditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Property_3023; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3023); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getOperation_3024Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(Operation5EditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Operation_3024; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3024); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getLiteralString_3005Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(LiteralStringEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.LiteralString_3005; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3005); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getSlot_3017Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(SlotEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Slot_3017; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 3017); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getPackage_1000Text(View view) { >+ EObject domainModelElement = view.getElement(); >+ if (domainModelElement != null) { >+ return String.valueOf(((NamedElement) domainModelElement).getName()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("No domain element for view with visualID = " + 1000); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getGeneralization_4001Text(View view) { >+ EObject domainModelElement = view.getElement(); >+ if (domainModelElement != null) { >+ return String.valueOf(((Generalization) domainModelElement).isSubstitutable()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("No domain element for view with visualID = " + 4001); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getDependency_4002Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(DependencyName2EditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Dependency_4002; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 6001); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getProperty_4003Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(PropertyNameEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Property_4003; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 6002); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getConstraintConstrainedElement_4004Text(View view) { >+ return ""; >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getAssociation_4005Text(View view) { >+ IParser parser = ParserService.getInstance().getParser(new IAdaptable() { >+ >+ public Object getAdapter(Class adapter) { >+ if (String.class.equals(adapter)) { >+ return UMLVisualIDRegistry.getType(AssociationNameEditPart.VISUAL_ID); >+ } >+ if (IElementType.class.equals(adapter)) { >+ return UMLElementTypes.Association_4005; >+ } >+ return null; >+ } >+ }); >+ if (parser != null) { >+ return parser.getPrintString(new EObjectAdapter(view.getElement() != null ? view.getElement() : view), ParserOptions.NONE.intValue()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("Parser was not found for label " + 6003); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getDependencySupplier_4006Text(View view) { >+ return ""; >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getDependencyClient_4007Text(View view) { >+ return ""; >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getInterfaceRealization_4008Text(View view) { >+ EObject domainModelElement = view.getElement(); >+ if (domainModelElement != null) { >+ return String.valueOf(((NamedElement) domainModelElement).getName()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("No domain element for view with visualID = " + 4008); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getUsage_4009Text(View view) { >+ EObject domainModelElement = view.getElement(); >+ if (domainModelElement != null) { >+ return String.valueOf(((NamedElement) domainModelElement).getName()); >+ } else { >+ UMLDiagramEditorPlugin.getInstance().logError("No domain element for view with visualID = " + 4009); >+ return ""; >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ private String getUnknownElementText(View view) { >+ return "<UnknownElement Visual_ID = " + view.getType() + ">"; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void init(ICommonContentExtensionSite aConfig) { >+ } >+ >+ /** >+ * @generated >+ */ >+ public void restoreState(IMemento aMemento) { >+ } >+ >+ /** >+ * @generated >+ */ >+ public void saveState(IMemento aMemento) { >+ } >+ >+ /** >+ * @generated >+ */ >+ public String getDescription(Object anElement) { >+ return null; >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/slot.jj >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/slot.jj >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/slot.jj >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/slot.jj 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,248 @@ >+options { >+ JAVA_UNICODE_ESCAPE = true; >+ STATIC=false; >+} >+ >+PARSER_BEGIN(SlotParser) >+ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.slot; >+ >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class SlotParser extends ExternalParserBase { >+ private Slot mySubject; >+ private Type myOptionalType; >+ >+ public SlotParser(){ >+ this(new StringReader("")); >+ } >+ >+ public SlotParser(LookupSuite lookup){ >+ this(); >+ setLookupSuite(lookup); >+ } >+ >+ public EClass getSubjectClass(){ >+ return UMLPackage.eINSTANCE.getSlot(); >+ } >+ >+ public void parse(EObject target, String text) throws ExternalParserException { >+ checkContext(); >+ myOptionalType = null; >+ ReInit(new StringReader(text)); >+ mySubject = (Slot)target; >+ Declaration(); >+ mySubject = null; >+ myOptionalType = null; >+ } >+ >+ protected static int parseInt(Token t) throws ParseException { >+ if (t.kind != SlotParserConstants.INTEGER_LITERAL){ >+ throw new IllegalStateException("Token: " + t + ", image: " + t.image); >+ } >+ try { >+ return Integer.parseInt(t.image); //XXX: "0005", "99999999999999999999999" >+ } catch (NumberFormatException e){ >+ throw new ParseException("Not supported integer value:" + t.image); >+ } >+ } >+ >+} >+ >+PARSER_END(SlotParser) >+ >+/* WHITE SPACE */ >+ >+SPECIAL_TOKEN : >+{ >+ " " >+| "\t" >+} >+ >+/* SEPARATORS */ >+TOKEN : >+{ >+ < SLASH: "/" > >+| < COLON: ":" > >+| < EQUALS: "=" > >+| < LBRACKET: "[" > >+| < RBRACKET: "]" > >+| < LCURLY: "{" > >+| < RCURLY: "}" > >+| < COMMA: "," > >+} >+ >+/* SPECIAL_MEANING */ >+TOKEN : >+{ >+ < PLUS: "+" > >+| < MINUS: "-" > >+| < NUMBER_SIGN: "#" > >+| < TILDE: "~" > >+| < DOT: "." > >+| < STAR: "*" > >+} >+ >+/* MODIFIERS */ >+TOKEN : >+{ >+ < READ_ONLY: "readOnly" > >+| < UNION: "union" > >+| < SUBSETS: "subsets" > >+| < REDEFINES: "redefines" > >+| < ORDERED: "ordered" > >+| < UNORDERED: "unordered" > >+| < UNIQUE: "unique" > >+| < NON_UNIQUE: "nonunique" > >+} >+ >+/* LITERALS */ >+TOKEN: >+{ >+ < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])* > >+} >+ >+TOKEN : >+{ >+ < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)* > >+| >+ < #LETTER: >+ [ >+ "\u0024", >+ "\u0041"-"\u005a", >+ "\u005f", >+ "\u0061"-"\u007a", >+ "\u00c0"-"\u00d6", >+ "\u00d8"-"\u00f6", >+ "\u00f8"-"\u00ff", >+ "\u0100"-"\u1fff", >+ "\u3040"-"\u318f", >+ "\u3300"-"\u337f", >+ "\u3400"-"\u3d2d", >+ "\u4e00"-"\u9fff", >+ "\uf900"-"\ufaff" >+ ] >+ > >+| >+ < #DIGIT: >+ [ >+ "\u0030"-"\u0039", >+ "\u0660"-"\u0669", >+ "\u06f0"-"\u06f9", >+ "\u0966"-"\u096f", >+ "\u09e6"-"\u09ef", >+ "\u0a66"-"\u0a6f", >+ "\u0ae6"-"\u0aef", >+ "\u0b66"-"\u0b6f", >+ "\u0be7"-"\u0bef", >+ "\u0c66"-"\u0c6f", >+ "\u0ce6"-"\u0cef", >+ "\u0d66"-"\u0d6f", >+ "\u0e50"-"\u0e59", >+ "\u0ed0"-"\u0ed9", >+ "\u1040"-"\u1049" >+ ] >+ > >+} >+ >+void Declaration() : >+{} >+{ >+ ( >+ [ SlotFeatureName() ] >+ [ SlotFeatureType() ] >+ [ SlotValue() ] >+ ) <EOF> >+} >+ >+void SlotFeatureName() : >+{ >+ String name; >+} >+{ >+ name = NameWithSpaces() >+ { >+ StructuralFeature feature = lookup(StructuralFeature.class, name); >+ if (feature != null){ >+ mySubject.setDefiningFeature(feature); >+ } >+ } >+} >+ >+void SlotFeatureType() : >+{ >+ //we do not want to modify feature type when slot type is changed >+ //however, we do want to use provided type to construct correct value >+ //Thus we are going to cache type here and use it in the SlotValue() >+ String type; >+} >+{ >+ <COLON> type = NameWithSpaces() { myOptionalType = lookup(Type.class, type); } >+} >+ >+ >+String NameWithSpaces() : >+{ >+ StringBuffer result = new StringBuffer(); >+ Token t; >+} >+{ >+ ( >+ t = <IDENTIFIER> { result.append(t.image); } >+ ( t = <IDENTIFIER> { result.append(' '); result.append(t.image); } ) * >+ ) >+ { >+ return result.toString(); >+ } >+} >+ >+/** >+ * FIXME: Actually only integers and strings are supported. >+ * Expression will be used as escape if value is neither string nor integer literal >+ */ >+void SlotValue() : >+{ >+ Token t; >+ String text; >+} >+{ >+ ( >+ <EQUALS> >+ ( >+ "\"" text = NameWithSpaces() "\"" >+ { >+ LiteralString literalString = (LiteralString)mySubject.createValue(null, myOptionalType, UMLPackage.eINSTANCE.getLiteralString()); >+ literalString.setValue(text); >+ } >+ | >+ text = NameWithSpaces() >+ { >+ Expression expression = (Expression)mySubject.createValue(null, myOptionalType, UMLPackage.eINSTANCE.getExpression()); >+ expression.setSymbol(text); >+ } >+ | >+ t = <INTEGER_LITERAL> >+ { >+ int value = parseInt(t); >+ LiteralInteger literalInteger = (LiteralInteger)mySubject.createValue(null, myOptionalType, UMLPackage.eINSTANCE.getLiteralInteger()); >+ literalInteger.setValue(value); >+ } >+ ) >+ ) >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationParserConstants.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationParserConstants.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationParserConstants.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationParserConstants.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,85 @@ >+/* Generated By:JavaCC: Do not edit this line. OperationParserConstants.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.operation; >+ >+public interface OperationParserConstants { >+ >+ int EOF = 0; >+ int SLASH = 3; >+ int COLON = 4; >+ int EQUALS = 5; >+ int LBRACKET = 6; >+ int RBRACKET = 7; >+ int LCURLY = 8; >+ int RCURLY = 9; >+ int LPAREN = 10; >+ int RPAREN = 11; >+ int COMMA = 12; >+ int PLUS = 13; >+ int MINUS = 14; >+ int NUMBER_SIGN = 15; >+ int TILDE = 16; >+ int DOT = 17; >+ int STAR = 18; >+ int REDEFINES = 19; >+ int ORDERED = 20; >+ int UNORDERED = 21; >+ int UNIQUE = 22; >+ int NON_UNIQUE = 23; >+ int QUERY = 24; >+ int IN = 25; >+ int OUT = 26; >+ int IN_OUT = 27; >+ int INTEGER_LITERAL = 28; >+ int IDENTIFIER = 29; >+ int LETTER = 30; >+ int DIGIT = 31; >+ >+ int DEFAULT = 0; >+ >+ String[] tokenImage = { >+ "<EOF>", >+ "\" \"", >+ "\"\\t\"", >+ "\"/\"", >+ "\":\"", >+ "\"=\"", >+ "\"[\"", >+ "\"]\"", >+ "\"{\"", >+ "\"}\"", >+ "\"(\"", >+ "\")\"", >+ "\",\"", >+ "\"+\"", >+ "\"-\"", >+ "\"#\"", >+ "\"~\"", >+ "\".\"", >+ "\"*\"", >+ "\"redefines\"", >+ "\"ordered\"", >+ "\"unordered\"", >+ "\"unique\"", >+ "\"nonunique\"", >+ "\"query\"", >+ "\"in\"", >+ "\"out\"", >+ "\"inout\"", >+ "<INTEGER_LITERAL>", >+ "<IDENTIFIER>", >+ "<LETTER>", >+ "<DIGIT>", >+ }; >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Operation4EditHelperAdvice.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/Operation4EditHelperAdvice.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/Operation4EditHelperAdvice.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/Operation4EditHelperAdvice.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; >+ >+/** >+ * @generated >+ */ >+public class Operation4EditHelperAdvice extends AbstractEditHelperAdvice { >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/LiteralStringEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/LiteralStringEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/LiteralStringEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/LiteralStringEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class LiteralStringEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName4ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName4ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName4ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/AssociationName4ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,39 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; >+import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode; >+import org.eclipse.gmf.runtime.notation.Location; >+import org.eclipse.gmf.runtime.notation.Node; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class AssociationName4ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { >+ Node view = (Node) super.createView(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint); >+ Location location = (Location) view.getLayoutConstraint(); >+ IMapMode mapMode = MeasurementUnitHelper.getMapMode(containerView.getDiagram().getMeasurementUnit()); >+ location.setX(mapMode.DPtoLP(0)); >+ location.setY(mapMode.DPtoLP(-30)); >+ return view; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/JavaCharStream.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/JavaCharStream.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/JavaCharStream.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/name/JavaCharStream.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,558 @@ >+/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 3.0 */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.name; >+ >+/** >+ * An implementation of interface CharStream, where the stream is assumed to >+ * contain only ASCII characters (with java-like unicode escape processing). >+ */ >+ >+public class JavaCharStream >+{ >+ public static final boolean staticFlag = false; >+ static final int hexval(char c) throws java.io.IOException { >+ switch(c) >+ { >+ case '0' : >+ return 0; >+ case '1' : >+ return 1; >+ case '2' : >+ return 2; >+ case '3' : >+ return 3; >+ case '4' : >+ return 4; >+ case '5' : >+ return 5; >+ case '6' : >+ return 6; >+ case '7' : >+ return 7; >+ case '8' : >+ return 8; >+ case '9' : >+ return 9; >+ >+ case 'a' : >+ case 'A' : >+ return 10; >+ case 'b' : >+ case 'B' : >+ return 11; >+ case 'c' : >+ case 'C' : >+ return 12; >+ case 'd' : >+ case 'D' : >+ return 13; >+ case 'e' : >+ case 'E' : >+ return 14; >+ case 'f' : >+ case 'F' : >+ return 15; >+ } >+ >+ throw new java.io.IOException(); // Should never come here >+ } >+ >+ public int bufpos = -1; >+ int bufsize; >+ int available; >+ int tokenBegin; >+ protected int bufline[]; >+ protected int bufcolumn[]; >+ >+ protected int column = 0; >+ protected int line = 1; >+ >+ protected boolean prevCharIsCR = false; >+ protected boolean prevCharIsLF = false; >+ >+ protected java.io.Reader inputStream; >+ >+ protected char[] nextCharBuf; >+ protected char[] buffer; >+ protected int maxNextCharInd = 0; >+ protected int nextCharInd = -1; >+ protected int inBuf = 0; >+ >+ protected void ExpandBuff(boolean wrapAround) >+ { >+ char[] newbuffer = new char[bufsize + 2048]; >+ int newbufline[] = new int[bufsize + 2048]; >+ int newbufcolumn[] = new int[bufsize + 2048]; >+ >+ try >+ { >+ if (wrapAround) >+ { >+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); >+ System.arraycopy(buffer, 0, newbuffer, >+ bufsize - tokenBegin, bufpos); >+ buffer = newbuffer; >+ >+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); >+ System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); >+ bufline = newbufline; >+ >+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); >+ System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); >+ bufcolumn = newbufcolumn; >+ >+ bufpos += (bufsize - tokenBegin); >+ } >+ else >+ { >+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); >+ buffer = newbuffer; >+ >+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); >+ bufline = newbufline; >+ >+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); >+ bufcolumn = newbufcolumn; >+ >+ bufpos -= tokenBegin; >+ } >+ } >+ catch (Throwable t) >+ { >+ throw new Error(t.getMessage()); >+ } >+ >+ available = (bufsize += 2048); >+ tokenBegin = 0; >+ } >+ >+ protected void FillBuff() throws java.io.IOException >+ { >+ int i; >+ if (maxNextCharInd == 4096) >+ maxNextCharInd = nextCharInd = 0; >+ >+ try { >+ if ((i = inputStream.read(nextCharBuf, maxNextCharInd, >+ 4096 - maxNextCharInd)) == -1) >+ { >+ inputStream.close(); >+ throw new java.io.IOException(); >+ } >+ else >+ maxNextCharInd += i; >+ return; >+ } >+ catch(java.io.IOException e) { >+ if (bufpos != 0) >+ { >+ --bufpos; >+ backup(0); >+ } >+ else >+ { >+ bufline[bufpos] = line; >+ bufcolumn[bufpos] = column; >+ } >+ throw e; >+ } >+ } >+ >+ protected char ReadByte() throws java.io.IOException >+ { >+ if (++nextCharInd >= maxNextCharInd) >+ FillBuff(); >+ >+ return nextCharBuf[nextCharInd]; >+ } >+ >+ public char BeginToken() throws java.io.IOException >+ { >+ if (inBuf > 0) >+ { >+ --inBuf; >+ >+ if (++bufpos == bufsize) >+ bufpos = 0; >+ >+ tokenBegin = bufpos; >+ return buffer[bufpos]; >+ } >+ >+ tokenBegin = 0; >+ bufpos = -1; >+ >+ return readChar(); >+ } >+ >+ protected void AdjustBuffSize() >+ { >+ if (available == bufsize) >+ { >+ if (tokenBegin > 2048) >+ { >+ bufpos = 0; >+ available = tokenBegin; >+ } >+ else >+ ExpandBuff(false); >+ } >+ else if (available > tokenBegin) >+ available = bufsize; >+ else if ((tokenBegin - available) < 2048) >+ ExpandBuff(true); >+ else >+ available = tokenBegin; >+ } >+ >+ protected void UpdateLineColumn(char c) >+ { >+ column++; >+ >+ if (prevCharIsLF) >+ { >+ prevCharIsLF = false; >+ line += (column = 1); >+ } >+ else if (prevCharIsCR) >+ { >+ prevCharIsCR = false; >+ if (c == '\n') >+ { >+ prevCharIsLF = true; >+ } >+ else >+ line += (column = 1); >+ } >+ >+ switch (c) >+ { >+ case '\r' : >+ prevCharIsCR = true; >+ break; >+ case '\n' : >+ prevCharIsLF = true; >+ break; >+ case '\t' : >+ column--; >+ column += (8 - (column & 07)); >+ break; >+ default : >+ break; >+ } >+ >+ bufline[bufpos] = line; >+ bufcolumn[bufpos] = column; >+ } >+ >+ public char readChar() throws java.io.IOException >+ { >+ if (inBuf > 0) >+ { >+ --inBuf; >+ >+ if (++bufpos == bufsize) >+ bufpos = 0; >+ >+ return buffer[bufpos]; >+ } >+ >+ char c; >+ >+ if (++bufpos == available) >+ AdjustBuffSize(); >+ >+ if ((buffer[bufpos] = c = ReadByte()) == '\\') >+ { >+ UpdateLineColumn(c); >+ >+ int backSlashCnt = 1; >+ >+ for (;;) // Read all the backslashes >+ { >+ if (++bufpos == available) >+ AdjustBuffSize(); >+ >+ try >+ { >+ if ((buffer[bufpos] = c = ReadByte()) != '\\') >+ { >+ UpdateLineColumn(c); >+ // found a non-backslash char. >+ if ((c == 'u') && ((backSlashCnt & 1) == 1)) >+ { >+ if (--bufpos < 0) >+ bufpos = bufsize - 1; >+ >+ break; >+ } >+ >+ backup(backSlashCnt); >+ return '\\'; >+ } >+ } >+ catch(java.io.IOException e) >+ { >+ if (backSlashCnt > 1) >+ backup(backSlashCnt); >+ >+ return '\\'; >+ } >+ >+ UpdateLineColumn(c); >+ backSlashCnt++; >+ } >+ >+ // Here, we have seen an odd number of backslash's followed by a 'u' >+ try >+ { >+ while ((c = ReadByte()) == 'u') >+ ++column; >+ >+ buffer[bufpos] = c = (char)(hexval(c) << 12 | >+ hexval(ReadByte()) << 8 | >+ hexval(ReadByte()) << 4 | >+ hexval(ReadByte())); >+ >+ column += 4; >+ } >+ catch(java.io.IOException e) >+ { >+ throw new Error("Invalid escape character at line " + line + >+ " column " + column + "."); >+ } >+ >+ if (backSlashCnt == 1) >+ return c; >+ else >+ { >+ backup(backSlashCnt - 1); >+ return '\\'; >+ } >+ } >+ else >+ { >+ UpdateLineColumn(c); >+ return (c); >+ } >+ } >+ >+ /** >+ * @deprecated >+ * @see #getEndColumn >+ */ >+ >+ public int getColumn() { >+ return bufcolumn[bufpos]; >+ } >+ >+ /** >+ * @deprecated >+ * @see #getEndLine >+ */ >+ >+ public int getLine() { >+ return bufline[bufpos]; >+ } >+ >+ public int getEndColumn() { >+ return bufcolumn[bufpos]; >+ } >+ >+ public int getEndLine() { >+ return bufline[bufpos]; >+ } >+ >+ public int getBeginColumn() { >+ return bufcolumn[tokenBegin]; >+ } >+ >+ public int getBeginLine() { >+ return bufline[tokenBegin]; >+ } >+ >+ public void backup(int amount) { >+ >+ inBuf += amount; >+ if ((bufpos -= amount) < 0) >+ bufpos += bufsize; >+ } >+ >+ public JavaCharStream(java.io.Reader dstream, >+ int startline, int startcolumn, int buffersize) >+ { >+ inputStream = dstream; >+ line = startline; >+ column = startcolumn - 1; >+ >+ available = bufsize = buffersize; >+ buffer = new char[buffersize]; >+ bufline = new int[buffersize]; >+ bufcolumn = new int[buffersize]; >+ nextCharBuf = new char[4096]; >+ } >+ >+ public JavaCharStream(java.io.Reader dstream, >+ int startline, int startcolumn) >+ { >+ this(dstream, startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.Reader dstream) >+ { >+ this(dstream, 1, 1, 4096); >+ } >+ public void ReInit(java.io.Reader dstream, >+ int startline, int startcolumn, int buffersize) >+ { >+ inputStream = dstream; >+ line = startline; >+ column = startcolumn - 1; >+ >+ if (buffer == null || buffersize != buffer.length) >+ { >+ available = bufsize = buffersize; >+ buffer = new char[buffersize]; >+ bufline = new int[buffersize]; >+ bufcolumn = new int[buffersize]; >+ nextCharBuf = new char[4096]; >+ } >+ prevCharIsLF = prevCharIsCR = false; >+ tokenBegin = inBuf = maxNextCharInd = 0; >+ nextCharInd = bufpos = -1; >+ } >+ >+ public void ReInit(java.io.Reader dstream, >+ int startline, int startcolumn) >+ { >+ ReInit(dstream, startline, startcolumn, 4096); >+ } >+ >+ public void ReInit(java.io.Reader dstream) >+ { >+ ReInit(dstream, 1, 1, 4096); >+ } >+ public JavaCharStream(java.io.InputStream dstream, int startline, >+ int startcolumn, int buffersize) >+ { >+ this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.InputStream dstream, int startline, >+ int startcolumn) >+ { >+ this(dstream, startline, startcolumn, 4096); >+ } >+ >+ public JavaCharStream(java.io.InputStream dstream) >+ { >+ this(dstream, 1, 1, 4096); >+ } >+ >+ public void ReInit(java.io.InputStream dstream, int startline, >+ int startcolumn, int buffersize) >+ { >+ ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); >+ } >+ public void ReInit(java.io.InputStream dstream, int startline, >+ int startcolumn) >+ { >+ ReInit(dstream, startline, startcolumn, 4096); >+ } >+ public void ReInit(java.io.InputStream dstream) >+ { >+ ReInit(dstream, 1, 1, 4096); >+ } >+ >+ public String GetImage() >+ { >+ if (bufpos >= tokenBegin) >+ return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); >+ else >+ return new String(buffer, tokenBegin, bufsize - tokenBegin) + >+ new String(buffer, 0, bufpos + 1); >+ } >+ >+ public char[] GetSuffix(int len) >+ { >+ char[] ret = new char[len]; >+ >+ if ((bufpos + 1) >= len) >+ System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); >+ else >+ { >+ System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, >+ len - bufpos - 1); >+ System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); >+ } >+ >+ return ret; >+ } >+ >+ public void Done() >+ { >+ nextCharBuf = null; >+ buffer = null; >+ bufline = null; >+ bufcolumn = null; >+ } >+ >+ /** >+ * Method to adjust line and column numbers for the start of a token. >+ */ >+ public void adjustBeginLineColumn(int newLine, int newCol) >+ { >+ int start = tokenBegin; >+ int len; >+ >+ if (bufpos >= tokenBegin) >+ { >+ len = bufpos - tokenBegin + inBuf + 1; >+ } >+ else >+ { >+ len = bufsize - tokenBegin + bufpos + 1 + inBuf; >+ } >+ >+ int i = 0, j = 0, k = 0; >+ int nextColDiff = 0, columnDiff = 0; >+ >+ while (i < len && >+ bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) >+ { >+ bufline[j] = newLine; >+ nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; >+ bufcolumn[j] = newCol + columnDiff; >+ columnDiff = nextColDiff; >+ i++; >+ } >+ >+ if (i < len) >+ { >+ bufline[j] = newLine++; >+ bufcolumn[j] = newCol + columnDiff; >+ >+ while (i++ < len) >+ { >+ if (bufline[j = start % bufsize] != bufline[++start % bufsize]) >+ bufline[j] = newLine++; >+ else >+ bufline[j] = newLine; >+ } >+ } >+ >+ line = bufline[j]; >+ column = bufcolumn[j]; >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndParserTokenManager.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndParserTokenManager.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndParserTokenManager.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/association/end/AssociationEndParserTokenManager.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,726 @@ >+/* Generated By:JavaCC: Do not edit this line. AssociationEndParserTokenManager.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.association.end; >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class AssociationEndParserTokenManager implements AssociationEndParserConstants >+{ >+ public java.io.PrintStream debugStream = System.out; >+ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } >+private final int jjStopStringLiteralDfa_0(int pos, long active0) >+{ >+ switch (pos) >+ { >+ case 0: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ return 2; >+ } >+ return -1; >+ case 1: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 1; >+ return 2; >+ } >+ return -1; >+ case 2: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 2; >+ return 2; >+ } >+ return -1; >+ case 3: >+ if ((active0 & 0x1fe0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 3; >+ return 2; >+ } >+ return -1; >+ case 4: >+ if ((active0 & 0x40000L) != 0L) >+ return 2; >+ if ((active0 & 0x1fa0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 4; >+ return 2; >+ } >+ return -1; >+ case 5: >+ if ((active0 & 0x800000L) != 0L) >+ return 2; >+ if ((active0 & 0x17a0000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 5; >+ return 2; >+ } >+ return -1; >+ case 6: >+ if ((active0 & 0x280000L) != 0L) >+ return 2; >+ if ((active0 & 0x1520000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 6; >+ return 2; >+ } >+ return -1; >+ case 7: >+ if ((active0 & 0x20000L) != 0L) >+ return 2; >+ if ((active0 & 0x1500000L) != 0L) >+ { >+ jjmatchedKind = 26; >+ jjmatchedPos = 7; >+ return 2; >+ } >+ return -1; >+ default : >+ return -1; >+ } >+} >+private final int jjStartNfa_0(int pos, long active0) >+{ >+ return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); >+} >+private final int jjStopAtPos(int pos, int kind) >+{ >+ jjmatchedKind = kind; >+ jjmatchedPos = pos; >+ return pos + 1; >+} >+private final int jjStartNfaWithStates_0(int pos, int kind, int state) >+{ >+ jjmatchedKind = kind; >+ jjmatchedPos = pos; >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { return pos + 1; } >+ return jjMoveNfa_0(state, pos + 1); >+} >+private final int jjMoveStringLiteralDfa0_0() >+{ >+ switch(curChar) >+ { >+ case 9: >+ return jjStopAtPos(0, 2); >+ case 32: >+ return jjStopAtPos(0, 1); >+ case 35: >+ return jjStopAtPos(0, 13); >+ case 42: >+ return jjStopAtPos(0, 16); >+ case 43: >+ return jjStopAtPos(0, 11); >+ case 44: >+ return jjStopAtPos(0, 10); >+ case 45: >+ return jjStopAtPos(0, 12); >+ case 46: >+ return jjStopAtPos(0, 15); >+ case 47: >+ return jjStopAtPos(0, 3); >+ case 58: >+ return jjStopAtPos(0, 4); >+ case 61: >+ return jjStopAtPos(0, 5); >+ case 91: >+ return jjStopAtPos(0, 6); >+ case 93: >+ return jjStopAtPos(0, 7); >+ case 110: >+ return jjMoveStringLiteralDfa1_0(0x1000000L); >+ case 111: >+ return jjMoveStringLiteralDfa1_0(0x200000L); >+ case 114: >+ return jjMoveStringLiteralDfa1_0(0x120000L); >+ case 115: >+ return jjMoveStringLiteralDfa1_0(0x80000L); >+ case 117: >+ return jjMoveStringLiteralDfa1_0(0xc40000L); >+ case 123: >+ return jjStopAtPos(0, 8); >+ case 125: >+ return jjStopAtPos(0, 9); >+ case 126: >+ return jjStopAtPos(0, 14); >+ default : >+ return jjMoveNfa_0(1, 0); >+ } >+} >+private final int jjMoveStringLiteralDfa1_0(long active0) >+{ >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(0, active0); >+ return 1; >+ } >+ switch(curChar) >+ { >+ case 101: >+ return jjMoveStringLiteralDfa2_0(active0, 0x120000L); >+ case 110: >+ return jjMoveStringLiteralDfa2_0(active0, 0xc40000L); >+ case 111: >+ return jjMoveStringLiteralDfa2_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa2_0(active0, 0x200000L); >+ case 117: >+ return jjMoveStringLiteralDfa2_0(active0, 0x80000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(0, active0); >+} >+private final int jjMoveStringLiteralDfa2_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(0, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(1, active0); >+ return 2; >+ } >+ switch(curChar) >+ { >+ case 97: >+ return jjMoveStringLiteralDfa3_0(active0, 0x20000L); >+ case 98: >+ return jjMoveStringLiteralDfa3_0(active0, 0x80000L); >+ case 100: >+ return jjMoveStringLiteralDfa3_0(active0, 0x300000L); >+ case 105: >+ return jjMoveStringLiteralDfa3_0(active0, 0x840000L); >+ case 110: >+ return jjMoveStringLiteralDfa3_0(active0, 0x1000000L); >+ case 111: >+ return jjMoveStringLiteralDfa3_0(active0, 0x400000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(1, active0); >+} >+private final int jjMoveStringLiteralDfa3_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(1, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(2, active0); >+ return 3; >+ } >+ switch(curChar) >+ { >+ case 100: >+ return jjMoveStringLiteralDfa4_0(active0, 0x20000L); >+ case 101: >+ return jjMoveStringLiteralDfa4_0(active0, 0x300000L); >+ case 111: >+ return jjMoveStringLiteralDfa4_0(active0, 0x40000L); >+ case 113: >+ return jjMoveStringLiteralDfa4_0(active0, 0x800000L); >+ case 114: >+ return jjMoveStringLiteralDfa4_0(active0, 0x400000L); >+ case 115: >+ return jjMoveStringLiteralDfa4_0(active0, 0x80000L); >+ case 117: >+ return jjMoveStringLiteralDfa4_0(active0, 0x1000000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(2, active0); >+} >+private final int jjMoveStringLiteralDfa4_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(2, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(3, active0); >+ return 4; >+ } >+ switch(curChar) >+ { >+ case 79: >+ return jjMoveStringLiteralDfa5_0(active0, 0x20000L); >+ case 100: >+ return jjMoveStringLiteralDfa5_0(active0, 0x400000L); >+ case 101: >+ return jjMoveStringLiteralDfa5_0(active0, 0x80000L); >+ case 102: >+ return jjMoveStringLiteralDfa5_0(active0, 0x100000L); >+ case 110: >+ if ((active0 & 0x40000L) != 0L) >+ return jjStartNfaWithStates_0(4, 18, 2); >+ return jjMoveStringLiteralDfa5_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa5_0(active0, 0x200000L); >+ case 117: >+ return jjMoveStringLiteralDfa5_0(active0, 0x800000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(3, active0); >+} >+private final int jjMoveStringLiteralDfa5_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(3, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(4, active0); >+ return 5; >+ } >+ switch(curChar) >+ { >+ case 101: >+ if ((active0 & 0x800000L) != 0L) >+ return jjStartNfaWithStates_0(5, 23, 2); >+ return jjMoveStringLiteralDfa6_0(active0, 0x600000L); >+ case 105: >+ return jjMoveStringLiteralDfa6_0(active0, 0x1100000L); >+ case 110: >+ return jjMoveStringLiteralDfa6_0(active0, 0x20000L); >+ case 116: >+ return jjMoveStringLiteralDfa6_0(active0, 0x80000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(4, active0); >+} >+private final int jjMoveStringLiteralDfa6_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(4, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(5, active0); >+ return 6; >+ } >+ switch(curChar) >+ { >+ case 100: >+ if ((active0 & 0x200000L) != 0L) >+ return jjStartNfaWithStates_0(6, 21, 2); >+ break; >+ case 108: >+ return jjMoveStringLiteralDfa7_0(active0, 0x20000L); >+ case 110: >+ return jjMoveStringLiteralDfa7_0(active0, 0x100000L); >+ case 113: >+ return jjMoveStringLiteralDfa7_0(active0, 0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa7_0(active0, 0x400000L); >+ case 115: >+ if ((active0 & 0x80000L) != 0L) >+ return jjStartNfaWithStates_0(6, 19, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(5, active0); >+} >+private final int jjMoveStringLiteralDfa7_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(5, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(6, active0); >+ return 7; >+ } >+ switch(curChar) >+ { >+ case 101: >+ return jjMoveStringLiteralDfa8_0(active0, 0x500000L); >+ case 117: >+ return jjMoveStringLiteralDfa8_0(active0, 0x1000000L); >+ case 121: >+ if ((active0 & 0x20000L) != 0L) >+ return jjStartNfaWithStates_0(7, 17, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(6, active0); >+} >+private final int jjMoveStringLiteralDfa8_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(6, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(7, active0); >+ return 8; >+ } >+ switch(curChar) >+ { >+ case 100: >+ if ((active0 & 0x400000L) != 0L) >+ return jjStartNfaWithStates_0(8, 22, 2); >+ break; >+ case 101: >+ if ((active0 & 0x1000000L) != 0L) >+ return jjStartNfaWithStates_0(8, 24, 2); >+ break; >+ case 115: >+ if ((active0 & 0x100000L) != 0L) >+ return jjStartNfaWithStates_0(8, 20, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(7, active0); >+} >+private final void jjCheckNAdd(int state) >+{ >+ if (jjrounds[state] != jjround) >+ { >+ jjstateSet[jjnewStateCnt++] = state; >+ jjrounds[state] = jjround; >+ } >+} >+private final void jjAddStates(int start, int end) >+{ >+ do { >+ jjstateSet[jjnewStateCnt++] = jjnextStates[start]; >+ } while (start++ != end); >+} >+private final void jjCheckNAddTwoStates(int state1, int state2) >+{ >+ jjCheckNAdd(state1); >+ jjCheckNAdd(state2); >+} >+private final void jjCheckNAddStates(int start, int end) >+{ >+ do { >+ jjCheckNAdd(jjnextStates[start]); >+ } while (start++ != end); >+} >+private final void jjCheckNAddStates(int start) >+{ >+ jjCheckNAdd(jjnextStates[start]); >+ jjCheckNAdd(jjnextStates[start + 1]); >+} >+static final long[] jjbitVec0 = { >+ 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L >+}; >+static final long[] jjbitVec2 = { >+ 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL >+}; >+static final long[] jjbitVec3 = { >+ 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL >+}; >+static final long[] jjbitVec4 = { >+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L >+}; >+static final long[] jjbitVec5 = { >+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L >+}; >+static final long[] jjbitVec6 = { >+ 0x3fffffffffffL, 0x0L, 0x0L, 0x0L >+}; >+private final int jjMoveNfa_0(int startState, int curPos) >+{ >+ int[] nextStates; >+ int startsAt = 0; >+ jjnewStateCnt = 3; >+ int i = 1; >+ jjstateSet[0] = startState; >+ int j, kind = 0x7fffffff; >+ for (;;) >+ { >+ if (++jjround == 0x7fffffff) >+ ReInitRounds(); >+ if (curChar < 64) >+ { >+ long l = 1L << curChar; >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ if ((0x3ff000000000000L & l) != 0L) >+ { >+ if (kind > 25) >+ kind = 25; >+ jjCheckNAdd(0); >+ } >+ else if (curChar == 36) >+ { >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ } >+ break; >+ case 0: >+ if ((0x3ff000000000000L & l) == 0L) >+ break; >+ if (kind > 25) >+ kind = 25; >+ jjCheckNAdd(0); >+ break; >+ case 2: >+ if ((0x3ff001000000000L & l) == 0L) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ else if (curChar < 128) >+ { >+ long l = 1L << (curChar & 077); >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ case 2: >+ if ((0x7fffffe87fffffeL & l) == 0L) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ else >+ { >+ int hiByte = (int)(curChar >> 8); >+ int i1 = hiByte >> 6; >+ long l1 = 1L << (hiByte & 077); >+ int i2 = (curChar & 0xff) >> 6; >+ long l2 = 1L << (curChar & 077); >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ case 2: >+ if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) >+ break; >+ if (kind > 26) >+ kind = 26; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ if (kind != 0x7fffffff) >+ { >+ jjmatchedKind = kind; >+ jjmatchedPos = curPos; >+ kind = 0x7fffffff; >+ } >+ ++curPos; >+ if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) >+ return curPos; >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { return curPos; } >+ } >+} >+static final int[] jjnextStates = { >+}; >+private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) >+{ >+ switch(hiByte) >+ { >+ case 0: >+ return ((jjbitVec2[i2] & l2) != 0L); >+ case 48: >+ return ((jjbitVec3[i2] & l2) != 0L); >+ case 49: >+ return ((jjbitVec4[i2] & l2) != 0L); >+ case 51: >+ return ((jjbitVec5[i2] & l2) != 0L); >+ case 61: >+ return ((jjbitVec6[i2] & l2) != 0L); >+ default : >+ if ((jjbitVec0[i1] & l1) != 0L) >+ return true; >+ return false; >+ } >+} >+public static final String[] jjstrLiteralImages = { >+"", null, null, "\57", "\72", "\75", "\133", "\135", "\173", "\175", "\54", >+"\53", "\55", "\43", "\176", "\56", "\52", "\162\145\141\144\117\156\154\171", >+"\165\156\151\157\156", "\163\165\142\163\145\164\163", "\162\145\144\145\146\151\156\145\163", >+"\157\162\144\145\162\145\144", "\165\156\157\162\144\145\162\145\144", "\165\156\151\161\165\145", >+"\156\157\156\165\156\151\161\165\145", null, null, null, null, }; >+public static final String[] lexStateNames = { >+ "DEFAULT", >+}; >+static final long[] jjtoToken = { >+ 0x7fffff9L, >+}; >+static final long[] jjtoSkip = { >+ 0x6L, >+}; >+static final long[] jjtoSpecial = { >+ 0x6L, >+}; >+protected JavaCharStream input_stream; >+private final int[] jjrounds = new int[3]; >+private final int[] jjstateSet = new int[6]; >+protected char curChar; >+public AssociationEndParserTokenManager(JavaCharStream stream) >+{ >+ if (JavaCharStream.staticFlag) >+ throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); >+ input_stream = stream; >+} >+public AssociationEndParserTokenManager(JavaCharStream stream, int lexState) >+{ >+ this(stream); >+ SwitchTo(lexState); >+} >+public void ReInit(JavaCharStream stream) >+{ >+ jjmatchedPos = jjnewStateCnt = 0; >+ curLexState = defaultLexState; >+ input_stream = stream; >+ ReInitRounds(); >+} >+private final void ReInitRounds() >+{ >+ int i; >+ jjround = 0x80000001; >+ for (i = 3; i-- > 0;) >+ jjrounds[i] = 0x80000000; >+} >+public void ReInit(JavaCharStream stream, int lexState) >+{ >+ ReInit(stream); >+ SwitchTo(lexState); >+} >+public void SwitchTo(int lexState) >+{ >+ if (lexState >= 1 || lexState < 0) >+ throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); >+ else >+ curLexState = lexState; >+} >+ >+protected Token jjFillToken() >+{ >+ Token t = Token.newToken(jjmatchedKind); >+ t.kind = jjmatchedKind; >+ String im = jjstrLiteralImages[jjmatchedKind]; >+ t.image = (im == null) ? input_stream.GetImage() : im; >+ t.beginLine = input_stream.getBeginLine(); >+ t.beginColumn = input_stream.getBeginColumn(); >+ t.endLine = input_stream.getEndLine(); >+ t.endColumn = input_stream.getEndColumn(); >+ return t; >+} >+ >+int curLexState = 0; >+int defaultLexState = 0; >+int jjnewStateCnt; >+int jjround; >+int jjmatchedPos; >+int jjmatchedKind; >+ >+public Token getNextToken() >+{ >+ int kind; >+ Token specialToken = null; >+ Token matchedToken; >+ int curPos = 0; >+ >+ EOFLoop : >+ for (;;) >+ { >+ try >+ { >+ curChar = input_stream.BeginToken(); >+ } >+ catch(java.io.IOException e) >+ { >+ jjmatchedKind = 0; >+ matchedToken = jjFillToken(); >+ matchedToken.specialToken = specialToken; >+ return matchedToken; >+ } >+ >+ jjmatchedKind = 0x7fffffff; >+ jjmatchedPos = 0; >+ curPos = jjMoveStringLiteralDfa0_0(); >+ if (jjmatchedKind != 0x7fffffff) >+ { >+ if (jjmatchedPos + 1 < curPos) >+ input_stream.backup(curPos - jjmatchedPos - 1); >+ if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) >+ { >+ matchedToken = jjFillToken(); >+ matchedToken.specialToken = specialToken; >+ return matchedToken; >+ } >+ else >+ { >+ if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) >+ { >+ matchedToken = jjFillToken(); >+ if (specialToken == null) >+ specialToken = matchedToken; >+ else >+ { >+ matchedToken.specialToken = specialToken; >+ specialToken = (specialToken.next = matchedToken); >+ } >+ } >+ continue EOFLoop; >+ } >+ } >+ int error_line = input_stream.getEndLine(); >+ int error_column = input_stream.getEndColumn(); >+ String error_after = null; >+ boolean EOFSeen = false; >+ try { input_stream.readChar(); input_stream.backup(1); } >+ catch (java.io.IOException e1) { >+ EOFSeen = true; >+ error_after = curPos <= 1 ? "" : input_stream.GetImage(); >+ if (curChar == '\n' || curChar == '\r') { >+ error_line++; >+ error_column = 0; >+ } >+ else >+ error_column++; >+ } >+ if (!EOFSeen) { >+ input_stream.backup(1); >+ error_after = curPos <= 1 ? "" : input_stream.GetImage(); >+ } >+ throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); >+ } >+} >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/InterfaceRealizationEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/InterfaceRealizationEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/InterfaceRealizationEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/InterfaceRealizationEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class InterfaceRealizationEditHelper extends UMLBaseEditHelper { >+} >Index: icons/linkSourceNavigatorGroup.gif >=================================================================== >RCS file: icons/linkSourceNavigatorGroup.gif >diff -N icons/linkSourceNavigatorGroup.gif >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ icons/linkSourceNavigatorGroup.gif 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,5 @@ >+GIF89aÕÿÿr/GøØf'øÐxøàøÐf>2èÆøè°èÐøðÈÿÿÿÃ6úöºøà øØ?]FøèÒ«üößãϹ´2àÀxr+ðØ?¥l$yO@_l$?R¼2ï߯¼ 2à 6!ù,s@pH,?È#âèh:¨T0ô4® >+à?p©Ñd¢Y`B¡p8G AØ%%HÁçW¶ _B???B¥¦¥ B®©C³´µI·¸FA;Content-Type: image/gif >+ >+GIF89aÕÿÿr/GøØf'øÐxøàøÐf>2èÆøè°èÐøðÈÿÿÿÃ6úöºøà øØ?]FøèÒ«üößãϹ´2àÀxr+ðØ?¥l$yO@_l$?R¼2ï߯¼ 2à 6!ù,s@pH,?È#âèh:¨T0ô4® >+à?p©Ñd¢Y`B¡p8G AØ%%HÁçW¶ _B???B¥¦¥ B®©C³´µI·¸FA; >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/ClassNameViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/ClassNameViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/ClassNameViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/ClassNameViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class ClassNameViewFactory extends BasicNodeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotParser.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotParser.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotParser.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/slot/SlotParser.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,310 @@ >+/* Generated By:JavaCC: Do not edit this line. SlotParser.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.slot; >+ >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class SlotParser extends ExternalParserBase implements SlotParserConstants { >+ private Slot mySubject; >+ private Type myOptionalType; >+ >+ public SlotParser(){ >+ this(new StringReader("")); >+ } >+ >+ public SlotParser(LookupSuite lookup){ >+ this(); >+ setLookupSuite(lookup); >+ } >+ >+ public EClass getSubjectClass(){ >+ return UMLPackage.eINSTANCE.getSlot(); >+ } >+ >+ public void parse(EObject target, String text) throws ExternalParserException { >+ checkContext(); >+ myOptionalType = null; >+ ReInit(new StringReader(text)); >+ mySubject = (Slot)target; >+ Declaration(); >+ mySubject = null; >+ myOptionalType = null; >+ } >+ >+ protected static int parseInt(Token t) throws ParseException { >+ if (t.kind != SlotParserConstants.INTEGER_LITERAL){ >+ throw new IllegalStateException("Token: " + t + ", image: " + t.image); >+ } >+ try { >+ return Integer.parseInt(t.image); //XXX: "0005", "99999999999999999999999" >+ } catch (NumberFormatException e){ >+ throw new ParseException("Not supported integer value:" + t.image); >+ } >+ } >+ >+ final public void Declaration() throws ParseException { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case IDENTIFIER: >+ SlotFeatureName(); >+ break; >+ default: >+ jj_la1[0] = jj_gen; >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case COLON: >+ SlotFeatureType(); >+ break; >+ default: >+ jj_la1[1] = jj_gen; >+ ; >+ } >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case EQUALS: >+ SlotValue(); >+ break; >+ default: >+ jj_la1[2] = jj_gen; >+ ; >+ } >+ jj_consume_token(0); >+ } >+ >+ final public void SlotFeatureName() throws ParseException { >+ String name; >+ name = NameWithSpaces(); >+ StructuralFeature feature = lookup(StructuralFeature.class, name); >+ if (feature != null){ >+ mySubject.setDefiningFeature(feature); >+ } >+ } >+ >+ final public void SlotFeatureType() throws ParseException { >+ //we do not want to modify feature type when slot type is changed >+ //however, we do want to use provided type to construct correct value >+ //Thus we are going to cache type here and use it in the SlotValue() >+ String type; >+ jj_consume_token(COLON); >+ type = NameWithSpaces(); >+ myOptionalType = lookup(Type.class, type); >+ } >+ >+ final public String NameWithSpaces() throws ParseException { >+ StringBuffer result = new StringBuffer(); >+ Token t; >+ t = jj_consume_token(IDENTIFIER); >+ result.append(t.image); >+ label_1: >+ while (true) { >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case IDENTIFIER: >+ ; >+ break; >+ default: >+ jj_la1[3] = jj_gen; >+ break label_1; >+ } >+ t = jj_consume_token(IDENTIFIER); >+ result.append(' '); result.append(t.image); >+ } >+ {if (true) return result.toString();} >+ throw new Error("Missing return statement in function"); >+ } >+ >+/** >+ * FIXME: Actually only integers and strings are supported. >+ * Expression will be used as escape if value is neither string nor integer literal >+ */ >+ final public void SlotValue() throws ParseException { >+ Token t; >+ String text; >+ jj_consume_token(EQUALS); >+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { >+ case 29: >+ jj_consume_token(29); >+ text = NameWithSpaces(); >+ jj_consume_token(29); >+ LiteralString literalString = (LiteralString)mySubject.createValue(null, myOptionalType, UMLPackage.eINSTANCE.getLiteralString()); >+ literalString.setValue(text); >+ break; >+ case IDENTIFIER: >+ text = NameWithSpaces(); >+ Expression expression = (Expression)mySubject.createValue(null, myOptionalType, UMLPackage.eINSTANCE.getExpression()); >+ expression.setSymbol(text); >+ break; >+ case INTEGER_LITERAL: >+ t = jj_consume_token(INTEGER_LITERAL); >+ int value = parseInt(t); >+ LiteralInteger literalInteger = (LiteralInteger)mySubject.createValue(null, myOptionalType, UMLPackage.eINSTANCE.getLiteralInteger()); >+ literalInteger.setValue(value); >+ break; >+ default: >+ jj_la1[4] = jj_gen; >+ jj_consume_token(-1); >+ throw new ParseException(); >+ } >+ } >+ >+ public SlotParserTokenManager token_source; >+ JavaCharStream jj_input_stream; >+ public Token token, jj_nt; >+ private int jj_ntk; >+ private int jj_gen; >+ final private int[] jj_la1 = new int[5]; >+ static private int[] jj_la1_0; >+ static { >+ jj_la1_0(); >+ } >+ private static void jj_la1_0() { >+ jj_la1_0 = new int[] {0x4000000,0x10,0x20,0x4000000,0x26000000,}; >+ } >+ >+ public SlotParser(java.io.InputStream stream) { >+ jj_input_stream = new JavaCharStream(stream, 1, 1); >+ token_source = new SlotParserTokenManager(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 5; i++) jj_la1[i] = -1; >+ } >+ >+ public void ReInit(java.io.InputStream stream) { >+ jj_input_stream.ReInit(stream, 1, 1); >+ token_source.ReInit(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 5; i++) jj_la1[i] = -1; >+ } >+ >+ public SlotParser(java.io.Reader stream) { >+ jj_input_stream = new JavaCharStream(stream, 1, 1); >+ token_source = new SlotParserTokenManager(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 5; i++) jj_la1[i] = -1; >+ } >+ >+ public void ReInit(java.io.Reader stream) { >+ jj_input_stream.ReInit(stream, 1, 1); >+ token_source.ReInit(jj_input_stream); >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 5; i++) jj_la1[i] = -1; >+ } >+ >+ public SlotParser(SlotParserTokenManager tm) { >+ token_source = tm; >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 5; i++) jj_la1[i] = -1; >+ } >+ >+ public void ReInit(SlotParserTokenManager tm) { >+ token_source = tm; >+ token = new Token(); >+ jj_ntk = -1; >+ jj_gen = 0; >+ for (int i = 0; i < 5; i++) jj_la1[i] = -1; >+ } >+ >+ final private Token jj_consume_token(int kind) throws ParseException { >+ Token oldToken; >+ if ((oldToken = token).next != null) token = token.next; >+ else token = token.next = token_source.getNextToken(); >+ jj_ntk = -1; >+ if (token.kind == kind) { >+ jj_gen++; >+ return token; >+ } >+ token = oldToken; >+ jj_kind = kind; >+ throw generateParseException(); >+ } >+ >+ final public Token getNextToken() { >+ if (token.next != null) token = token.next; >+ else token = token.next = token_source.getNextToken(); >+ jj_ntk = -1; >+ jj_gen++; >+ return token; >+ } >+ >+ final public Token getToken(int index) { >+ Token t = token; >+ for (int i = 0; i < index; i++) { >+ if (t.next != null) t = t.next; >+ else t = t.next = token_source.getNextToken(); >+ } >+ return t; >+ } >+ >+ final private int jj_ntk() { >+ if ((jj_nt=token.next) == null) >+ return (jj_ntk = (token.next=token_source.getNextToken()).kind); >+ else >+ return (jj_ntk = jj_nt.kind); >+ } >+ >+ private java.util.Vector jj_expentries = new java.util.Vector(); >+ private int[] jj_expentry; >+ private int jj_kind = -1; >+ >+ public ParseException generateParseException() { >+ jj_expentries.removeAllElements(); >+ boolean[] la1tokens = new boolean[30]; >+ for (int i = 0; i < 30; i++) { >+ la1tokens[i] = false; >+ } >+ if (jj_kind >= 0) { >+ la1tokens[jj_kind] = true; >+ jj_kind = -1; >+ } >+ for (int i = 0; i < 5; i++) { >+ if (jj_la1[i] == jj_gen) { >+ for (int j = 0; j < 32; j++) { >+ if ((jj_la1_0[i] & (1<<j)) != 0) { >+ la1tokens[j] = true; >+ } >+ } >+ } >+ } >+ for (int i = 0; i < 30; i++) { >+ if (la1tokens[i]) { >+ jj_expentry = new int[1]; >+ jj_expentry[0] = i; >+ jj_expentries.addElement(jj_expentry); >+ } >+ } >+ int[][] exptokseq = new int[jj_expentries.size()][]; >+ for (int i = 0; i < jj_expentries.size(); i++) { >+ exptokseq[i] = (int[])jj_expentries.elementAt(i); >+ } >+ return new ParseException(token, exptokseq, tokenImage); >+ } >+ >+ final public void enable_tracing() { >+ } >+ >+ final public void disable_tracing() { >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/UsageViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/UsageViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/UsageViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/UsageViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,48 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ConnectionViewFactory; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class UsageViewFactory extends ConnectionViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createRoutingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFontStyle()); >+ styles.add(NotationFactory.eINSTANCE.createLineStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.UsageEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PackageClassifiersViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PackageClassifiersViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PackageClassifiersViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PackageClassifiersViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,74 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class PackageClassifiersViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.PackageClassifiersEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecificationSlotsViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecificationSlotsViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecificationSlotsViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/InstanceSpecificationSlotsViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,73 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.ListCompartmentViewFactory; >+import org.eclipse.gmf.runtime.notation.DrawerStyle; >+import org.eclipse.gmf.runtime.notation.NotationFactory; >+import org.eclipse.gmf.runtime.notation.NotationPackage; >+import org.eclipse.gmf.runtime.notation.TitleStyle; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class InstanceSpecificationSlotsViewFactory extends ListCompartmentViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ styles.add(NotationFactory.eINSTANCE.createTitleStyle()); >+ styles.add(NotationFactory.eINSTANCE.createSortingStyle()); >+ styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.InstanceSpecificationSlotsEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ setupCompartmentTitle(view); >+ setupCompartmentCollapsed(view); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentTitle(View view) { >+ TitleStyle titleStyle = (TitleStyle) view.getStyle(NotationPackage.eINSTANCE.getTitleStyle()); >+ if (titleStyle != null) { >+ titleStyle.setShowTitle(true); >+ } >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void setupCompartmentCollapsed(View view) { >+ DrawerStyle drawerStyle = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); >+ if (drawerStyle != null) { >+ drawerStyle.setCollapsed(false); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/OperationViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/OperationViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/OperationViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/OperationViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class OperationViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.OperationEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/OperationEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/OperationEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/OperationEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/OperationEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class OperationEditHelper extends UMLBaseEditHelper { >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyParserConstants.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyParserConstants.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyParserConstants.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/property/PropertyParserConstants.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,79 @@ >+/* Generated By:JavaCC: Do not edit this line. PropertyParserConstants.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.property; >+ >+public interface PropertyParserConstants { >+ >+ int EOF = 0; >+ int SLASH = 3; >+ int COLON = 4; >+ int EQUALS = 5; >+ int LBRACKET = 6; >+ int RBRACKET = 7; >+ int LCURLY = 8; >+ int RCURLY = 9; >+ int COMMA = 10; >+ int PLUS = 11; >+ int MINUS = 12; >+ int NUMBER_SIGN = 13; >+ int TILDE = 14; >+ int DOT = 15; >+ int STAR = 16; >+ int READ_ONLY = 17; >+ int UNION = 18; >+ int SUBSETS = 19; >+ int REDEFINES = 20; >+ int ORDERED = 21; >+ int UNORDERED = 22; >+ int UNIQUE = 23; >+ int NON_UNIQUE = 24; >+ int INTEGER_LITERAL = 25; >+ int IDENTIFIER = 26; >+ int LETTER = 27; >+ int DIGIT = 28; >+ >+ int DEFAULT = 0; >+ >+ String[] tokenImage = { >+ "<EOF>", >+ "\" \"", >+ "\"\\t\"", >+ "\"/\"", >+ "\":\"", >+ "\"=\"", >+ "\"[\"", >+ "\"]\"", >+ "\"{\"", >+ "\"}\"", >+ "\",\"", >+ "\"+\"", >+ "\"-\"", >+ "\"#\"", >+ "\"~\"", >+ "\".\"", >+ "\"*\"", >+ "\"readOnly\"", >+ "\"union\"", >+ "\"subsets\"", >+ "\"redefines\"", >+ "\"ordered\"", >+ "\"unordered\"", >+ "\"unique\"", >+ "\"nonunique\"", >+ "<INTEGER_LITERAL>", >+ "<IDENTIFIER>", >+ "<LETTER>", >+ "<DIGIT>", >+ }; >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramActionBarContributor.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramActionBarContributor.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramActionBarContributor.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLDiagramActionBarContributor.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,23 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramActionBarContributor; >+ >+/** >+ * @generated >+ */ >+public class UMLDiagramActionBarContributor extends DiagramActionBarContributor { >+ >+ /** >+ * @generated >+ */ >+ protected Class getEditorClass() { >+ return UMLDiagramEditor.class; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected String getEditorId() { >+ return UMLDiagramEditor.ID; >+ } >+} >Index: .cvsignore >=================================================================== >RCS file: .cvsignore >diff -N .cvsignore >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ .cvsignore 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,2 @@ >+bin >+.settings >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLInitDiagramFileAction.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLInitDiagramFileAction.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLInitDiagramFileAction.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLInitDiagramFileAction.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,98 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import org.eclipse.core.resources.IFile; >+import org.eclipse.emf.common.util.URI; >+import org.eclipse.emf.common.util.WrappedException; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.resource.Resource; >+import org.eclipse.emf.ecore.resource.ResourceSet; >+import org.eclipse.emf.transaction.TransactionalEditingDomain; >+import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory; >+import org.eclipse.jface.action.IAction; >+import org.eclipse.jface.dialogs.IDialogSettings; >+import org.eclipse.jface.dialogs.MessageDialog; >+import org.eclipse.jface.viewers.ISelection; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.jface.viewers.StructuredSelection; >+import org.eclipse.jface.wizard.Wizard; >+import org.eclipse.jface.wizard.WizardDialog; >+import org.eclipse.ui.IObjectActionDelegate; >+import org.eclipse.ui.IWorkbenchPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+ >+/** >+ * @generated >+ */ >+public class UMLInitDiagramFileAction implements IObjectActionDelegate { >+ >+ /** >+ * @generated >+ */ >+ private IWorkbenchPart myPart; >+ >+ /** >+ * @generated >+ */ >+ private IFile mySelectedModelFile; >+ >+ /** >+ * @generated >+ */ >+ private IStructuredSelection mySelection; >+ >+ /** >+ * @generated >+ */ >+ public void setActivePart(IAction action, IWorkbenchPart targetPart) { >+ myPart = targetPart; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void selectionChanged(IAction action, ISelection selection) { >+ mySelectedModelFile = null; >+ mySelection = StructuredSelection.EMPTY; >+ action.setEnabled(false); >+ if (selection instanceof IStructuredSelection == false || selection.isEmpty()) { >+ return; >+ } >+ mySelection = (IStructuredSelection) selection; >+ mySelectedModelFile = (IFile) ((IStructuredSelection) selection).getFirstElement(); >+ action.setEnabled(true); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void run(IAction action) { >+ TransactionalEditingDomain editingDomain = GMFEditingDomainFactory.INSTANCE.createEditingDomain(); >+ ResourceSet resourceSet = editingDomain.getResourceSet(); >+ EObject diagramRoot = null; >+ try { >+ Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(mySelectedModelFile.getFullPath().toString()), true); >+ diagramRoot = (EObject) resource.getContents().get(0); >+ } catch (WrappedException ex) { >+ UMLDiagramEditorPlugin.getInstance().logError("Unable to load resource: " + mySelectedModelFile.getFullPath().toString(), ex); //$NON-NLS-1$ >+ } >+ if (diagramRoot == null) { >+ MessageDialog.openError(myPart.getSite().getShell(), "Error", "Model file loading failed"); >+ return; >+ } >+ Wizard wizard = new UMLNewDiagramFileWizard(mySelectedModelFile, myPart.getSite().getPage(), mySelection, diagramRoot, editingDomain); >+ IDialogSettings pluginDialogSettings = UMLDiagramEditorPlugin.getInstance().getDialogSettings(); >+ IDialogSettings initDiagramFileSettings = pluginDialogSettings.getSection("InisDiagramFile"); //$NON-NLS-1$ >+ if (initDiagramFileSettings == null) { >+ initDiagramFileSettings = pluginDialogSettings.addNewSection("InisDiagramFile"); //$NON-NLS-1$ >+ } >+ wizard.setDialogSettings(initDiagramFileSettings); >+ wizard.setForcePreviousAndNextButtons(false); >+ wizard.setWindowTitle("Initialize new " + PackageEditPart.MODEL_ID + " diagram file"); >+ >+ WizardDialog dialog = new WizardDialog(myPart.getSite().getShell(), wizard); >+ dialog.create(); >+ dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500); >+ dialog.open(); >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationNameViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationNameViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationNameViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/EnumerationNameViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+ >+/** >+ * @generated >+ */ >+public class EnumerationNameViewFactory extends BasicNodeViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ } >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/operation.jj >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/operation.jj >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/operation.jj >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/operation.jj 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,523 @@ >+options { >+ JAVA_UNICODE_ESCAPE = true; >+ STATIC=false; >+} >+ >+PARSER_BEGIN(OperationParser) >+ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.operation; >+ >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+/** >+ * JavaCC does not support any "include" construct. >+ * This parser shares a lot of delcrations (mainly at the tokens level) >+ * with other parsers (see PropertyParser, etc) >+ * but we do not yet know how to avoid duplication of the delarations. >+ */ >+public class OperationParser extends ExternalParserBase { >+ private OperationAdapter myOperation; >+ private ParameterAdapter myCurrentParameter; >+ >+ private static interface TypeGate { >+ public void setType(Type type); >+ public void setName(String name); >+ } >+ >+ private static interface MultiplicityGate { >+ public void setIsOrdered(boolean ordered); >+ public void setIsUnique(boolean unique); >+ public void setLower(int lower); >+ public void setUpper(int upper); >+ } >+ >+ private static class ParameterAdapter implements TypeGate, MultiplicityGate { >+ private final Parameter myParameter; >+ >+ public ParameterAdapter(){ >+ myParameter = UMLFactory.eINSTANCE.createParameter(); >+ } >+ >+ public Parameter getParameter(){ >+ return myParameter; >+ } >+ >+ public void setType(Type type){ >+ myParameter.setType(type); >+ } >+ >+ public void setName(String name){ >+ myParameter.setName(name); >+ } >+ >+ public void setIsOrdered(boolean value) { >+ myParameter.setIsOrdered(value); >+ } >+ >+ public void setIsUnique(boolean value) { >+ myParameter.setIsUnique(value); >+ } >+ >+ public void setLower(int value) { >+ myParameter.setLower(value); >+ } >+ >+ public void setUpper(int value) { >+ myParameter.setUpper(value); >+ } >+ } >+ >+ private static class OperationAdapter implements TypeGate, MultiplicityGate { >+ private final Operation myOperation; >+ >+ public OperationAdapter(Operation operation){ >+ myOperation = operation; >+ if (myOperation.getReturnResult() == null){ >+ myOperation.createReturnResult(null, null); >+ } >+ } >+ >+ public Operation getOperation(){ >+ return myOperation; >+ } >+ >+ public void setType(Type type) { >+ myOperation.setType(type); >+ } >+ >+ public void setName(String name){ >+ myOperation.setName(name); >+ } >+ >+ public void setIsOrdered(boolean ordered) { >+ myOperation.setIsOrdered(ordered); >+ } >+ >+ public void setIsUnique(boolean value) { >+ myOperation.setIsUnique(value); >+ } >+ >+ public void setLower(int value) { >+ myOperation.setLower(value); >+ } >+ >+ public void setUpper(int value) { >+ myOperation.setUpper(value); >+ } >+ >+ } >+ >+ public OperationParser(){ >+ this(new StringReader("")); >+ } >+ >+ public OperationParser(LookupSuite lookup){ >+ this(); >+ setLookupSuite(lookup); >+ } >+ >+ public EClass getSubjectClass(){ >+ return UMLPackage.eINSTANCE.getOperation(); >+ } >+ >+ public void parse(EObject target, String text) throws ExternalParserException { >+ checkContext(); >+ ReInit(new StringReader(text)); >+ myOperation = new OperationAdapter((Operation)target); >+ myCurrentParameter = null; >+ Declaration(); >+ myOperation = null; >+ } >+ >+ protected static int parseInt(Token t) throws ParseException { >+ if (t.kind != OperationParserConstants.INTEGER_LITERAL){ >+ throw new IllegalStateException("Token: " + t + ", image: " + t.image); >+ } >+ try { >+ return Integer.parseInt(t.image); //XXX: "0005", "99999999999999999999999" >+ } catch (NumberFormatException e){ >+ throw new ParseException("Not supported integer value:" + t.image); >+ } >+ } >+ >+ private MultiplicityGate getCurrentMultiplicityElement(){ >+ return myCurrentParameter != null ? myCurrentParameter : (MultiplicityGate)myOperation; >+ } >+ >+ private TypeGate getCurrentTypedElement(){ >+ return myCurrentParameter != null ? myCurrentParameter : (TypeGate)myOperation; >+ } >+ >+ private Operation getOperation(){ >+ return myOperation.getOperation(); >+ } >+ >+ private Parameter getCurrentParameter(){ >+ if (myCurrentParameter == null){ >+ throw new IllegalStateException("We are not in the parameter list. Check BNF"); >+ } >+ return myCurrentParameter.getParameter(); >+ } >+ >+ private void registerParameter() { >+ getOperation().getOwnedParameters().add(getCurrentParameter()); >+ myCurrentParameter = null; >+ } >+ >+ private void startParameter() { >+ myCurrentParameter = new ParameterAdapter(); >+ } >+ >+} >+ >+PARSER_END(OperationParser) >+ >+/* WHITE SPACE */ >+ >+SPECIAL_TOKEN : >+{ >+ " " >+| "\t" >+} >+ >+/* SEPARATORS */ >+TOKEN : >+{ >+ < SLASH: "/" > >+| < COLON: ":" > >+| < EQUALS: "=" > >+| < LBRACKET: "[" > >+| < RBRACKET: "]" > >+| < LCURLY: "{" > >+| < RCURLY: "}" > >+| < LPAREN: "(" > >+| < RPAREN: ")" > >+| < COMMA: "," > >+} >+ >+/* SPECIAL_MEANING */ >+TOKEN : >+{ >+ < PLUS: "+" > >+| < MINUS: "-" > >+| < NUMBER_SIGN: "#" > >+| < TILDE: "~" > >+| < DOT: "." > >+| < STAR: "*" > >+} >+ >+/* MODIFIERS */ >+TOKEN : >+{ >+ < REDEFINES: "redefines" > >+| < ORDERED: "ordered" > >+| < UNORDERED: "unordered" > >+| < UNIQUE: "unique" > >+| < NON_UNIQUE: "nonunique" > >+} >+ >+/* OPERATION SPECIFIC */ >+TOKEN : >+{ >+ < QUERY: "query" > >+| < IN: "in" > >+| < OUT: "out" > >+| < IN_OUT: "inout" > >+} >+ >+/* LITERALS */ >+TOKEN: >+{ >+ < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])* > >+} >+ >+TOKEN : >+{ >+ < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)* > >+| >+ < #LETTER: >+ [ >+ "\u0024", >+ "\u0041"-"\u005a", >+ "\u005f", >+ "\u0061"-"\u007a", >+ "\u00c0"-"\u00d6", >+ "\u00d8"-"\u00f6", >+ "\u00f8"-"\u00ff", >+ "\u0100"-"\u1fff", >+ "\u3040"-"\u318f", >+ "\u3300"-"\u337f", >+ "\u3400"-"\u3d2d", >+ "\u4e00"-"\u9fff", >+ "\uf900"-"\ufaff" >+ ] >+ > >+| >+ < #DIGIT: >+ [ >+ "\u0030"-"\u0039", >+ "\u0660"-"\u0669", >+ "\u06f0"-"\u06f9", >+ "\u0966"-"\u096f", >+ "\u09e6"-"\u09ef", >+ "\u0a66"-"\u0a6f", >+ "\u0ae6"-"\u0aef", >+ "\u0b66"-"\u0b6f", >+ "\u0be7"-"\u0bef", >+ "\u0c66"-"\u0c6f", >+ "\u0ce6"-"\u0cef", >+ "\u0d66"-"\u0d6f", >+ "\u0e50"-"\u0e59", >+ "\u0ed0"-"\u0ed9", >+ "\u1040"-"\u1049" >+ ] >+ > >+} >+ >+void Declaration() : >+{} >+{ >+ ( >+ [ Visibility() ] >+ Name() >+ <LPAREN> >+ [ ParametersList() ] >+ <RPAREN> >+ [ Type() ] >+ [ OperationModifiers() ] >+ ) <EOF> >+} >+ >+void ParametersList() : >+{} >+{ >+ Parameter() >+ ( <COMMA> Parameter() )* >+} >+ >+void Parameter() : >+{ >+ startParameter(); >+} >+{ >+ ( >+ [ ParameterDirection() ] >+ Name() >+ [ Type() ] >+ [ Multiplicity() ] >+ [ DefaultValue() ] >+ // XXX: what is this? [ ParamerPropertiesList() ] >+ ) >+ { >+ registerParameter(); >+ } >+} >+ >+void ParameterDirection() : >+{ >+ ParameterDirectionKind kind; >+} >+{ >+ ( >+ <IN> { kind = ParameterDirectionKind.IN_LITERAL; } >+ | >+ <OUT> { kind = ParameterDirectionKind.OUT_LITERAL; } >+ | >+ <IN_OUT> { kind = ParameterDirectionKind.INOUT_LITERAL; } >+ ) >+ { >+ getCurrentParameter().setDirection(kind); >+ } >+} >+ >+void Visibility() : >+{ >+ VisibilityKind kind; >+} >+{ >+ ( >+ <PLUS> { kind = VisibilityKind.PUBLIC_LITERAL; } >+ | >+ <MINUS> { kind = VisibilityKind.PRIVATE_LITERAL; } >+ | >+ <NUMBER_SIGN> { kind = VisibilityKind.PROTECTED_LITERAL; } >+ | >+ <TILDE> { kind = VisibilityKind.PACKAGE_LITERAL; } >+ ) >+ { >+ getOperation().setVisibility(kind); >+ } >+} >+ >+void Name() : >+{ >+ String name; >+} >+{ >+ name = NameWithSpaces() >+ { >+ getCurrentTypedElement().setName(name); >+ } >+} >+ >+void Multiplicity() : >+{} >+{ >+ MultiplicityRange() >+ [ MultiplicityDesignator() ] >+} >+ >+void MultiplicityDesignator() : >+{ } >+{ >+ <LCURLY> >+ ( >+ ( MultiplicityUnique() [ MultiplicityOrdered() ] ) >+ | >+ ( MultiplicityOrdered() [ MultiplicityUnique() ] ) >+ ) >+ <RCURLY> >+} >+ >+void MultiplicityUnique() : >+{ >+ MultiplicityGate multiplicity = getCurrentMultiplicityElement(); >+} >+{ >+ <UNIQUE> { multiplicity.setIsUnique(true); } >+ | >+ <NON_UNIQUE> { multiplicity.setIsUnique(false); } >+} >+ >+void MultiplicityOrdered() : >+{ >+ MultiplicityGate multiplicity = getCurrentMultiplicityElement(); >+} >+{ >+ <ORDERED> { multiplicity.setIsOrdered(true); } >+ | >+ <UNORDERED> { multiplicity.setIsOrdered(false); } >+} >+ >+/* XXX: ValueSpecification -- how to parse */ >+void MultiplicityRange() : >+{ >+ Token tLower = null; >+ Token tUpper; >+ MultiplicityGate multiplicity = getCurrentMultiplicityElement(); >+} >+{ >+ <LBRACKET> >+ ( >+ [ LOOKAHEAD(2) tLower = <INTEGER_LITERAL> <DOT> <DOT> { multiplicity.setLower(parseInt(tLower)); } ] >+ ( >+ tUpper = <STAR> >+ { >+ if (tLower == null){ >+ multiplicity.setLower(0); >+ } >+ multiplicity.setUpper(LiteralUnlimitedNatural.UNLIMITED); >+ } >+ | >+ tUpper = <INTEGER_LITERAL> >+ { >+ if (tLower == null){ >+ multiplicity.setLower(parseInt(tUpper)); >+ } >+ multiplicity.setUpper(parseInt(tUpper)); >+ } >+ ) >+ ) >+ <RBRACKET> >+} >+ >+void Type() : >+{ >+ String type; >+} >+{ >+ <COLON> type = NameWithSpaces() { getCurrentTypedElement().setType(lookup(Type.class, type)); } >+} >+ >+String NameWithSpaces() : >+{ >+ StringBuffer result = new StringBuffer(); >+ Token t; >+} >+{ >+ ( >+ t = <IDENTIFIER> { result.append(t.image); } >+ ( t = <IDENTIFIER> { result.append(' '); result.append(t.image); } ) * >+ ) >+ { >+ return result.toString(); >+ } >+} >+ >+void DefaultValue() : >+{ >+ Token t; >+} >+{ >+ ( >+ <EQUALS> ( t = <IDENTIFIER> | t = <INTEGER_LITERAL> { /* XXX: Should be Expression */ } ) >+ ) >+ { >+ getCurrentParameter().setDefault(t.image); >+ } >+} >+ >+void SimpleTokenPropertyModifier() : >+{} >+{ >+ ( >+ <QUERY> { getOperation().setIsQuery(true); } >+ | >+ <ORDERED> { getOperation().setIsOrdered(true); } >+ | >+ <UNORDERED> { getOperation().setIsOrdered(false); } >+ | >+ <UNIQUE> { getOperation().setIsUnique(true); } >+ | >+ <NON_UNIQUE> { getOperation().setIsUnique(false); } >+ ) >+} >+ >+void ReferencingPropertyModifier() : >+{ >+ String name; >+} >+{ >+ <REDEFINES> name = NameWithSpaces() >+ { >+ RedefinableElement redefines = lookup(RedefinableElement.class, name); >+ if (redefines != null) { >+ getOperation().getRedefinedElements().add(redefines); >+ } >+ } >+} >+ >+void OperationModifiers() : >+{} >+{ >+ <LCURLY> >+ ( SimpleTokenPropertyModifier() | ReferencingPropertyModifier() ) >+ ( <COMMA> ( SimpleTokenPropertyModifier() | ReferencingPropertyModifier() ) ) * >+ <RCURLY> >+} >Index: src/org/eclipse/uml2/diagram/clazz/part/UMLLoadResourceAction.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/part/UMLLoadResourceAction.java >diff -N src/org/eclipse/uml2/diagram/clazz/part/UMLLoadResourceAction.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/part/UMLLoadResourceAction.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,63 @@ >+package org.eclipse.uml2.diagram.clazz.part; >+ >+import org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog; >+import org.eclipse.jface.action.IAction; >+import org.eclipse.jface.viewers.ISelection; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.ui.IObjectActionDelegate; >+import org.eclipse.ui.IWorkbenchPart; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+ >+/** >+ * @generated >+ */ >+public class UMLLoadResourceAction implements IObjectActionDelegate { >+ >+ /** >+ * @generated >+ */ >+ private PackageEditPart mySelectedElement; >+ >+ /** >+ * @generated >+ */ >+ private Shell myShell; >+ >+ /** >+ * @generated >+ */ >+ public void setActivePart(IAction action, IWorkbenchPart targetPart) { >+ myShell = targetPart.getSite().getShell(); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void run(IAction action) { >+ LoadResourceDialog loadResourceDialog = new LoadResourceDialog(myShell, mySelectedElement.getEditingDomain()); >+ loadResourceDialog.open(); >+ } >+ >+ /** >+ * @generated >+ */ >+ public void selectionChanged(IAction action, ISelection selection) { >+ mySelectedElement = null; >+ if (selection instanceof IStructuredSelection) { >+ IStructuredSelection structuredSelection = (IStructuredSelection) selection; >+ if (structuredSelection.size() == 1 && structuredSelection.getFirstElement() instanceof PackageEditPart) { >+ mySelectedElement = (PackageEditPart) structuredSelection.getFirstElement(); >+ } >+ } >+ action.setEnabled(isEnabled()); >+ } >+ >+ /** >+ * @generated >+ */ >+ private boolean isEnabled() { >+ return mySelectedElement != null; >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/instance.jj >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/instance.jj >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/instance.jj >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/instance/instance.jj 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,240 @@ >+options { >+ JAVA_UNICODE_ESCAPE = true; >+ STATIC=false; >+} >+ >+PARSER_BEGIN(InstanceSpecificationParser) >+ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.instance; >+ >+import java.io.*; >+import java.util.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.diagram.parser.lookup.LookupResolver; >+import org.eclipse.uml2.uml.*; >+ >+public class InstanceSpecificationParser extends ExternalParserBase { >+ private InstanceSpecification mySubject; >+ >+ private static class ClassifierLookupCallback implements LookupResolver.Callback { >+ private final InstanceSpecification mySubject; >+ >+ public ClassifierLookupCallback(InstanceSpecification subject){ >+ mySubject = subject; >+ } >+ >+ public void lookupResolved(NamedElement resolution) { >+ if (resolution instanceof Classifier){ >+ mySubject.getClassifiers().add(resolution); >+ } >+ } >+ } >+ >+ public InstanceSpecificationParser(){ >+ this(new StringReader("")); >+ } >+ >+ public InstanceSpecificationParser(LookupSuite lookup){ >+ this(); >+ setLookupSuite(lookup); >+ } >+ >+ public EClass getSubjectClass(){ >+ return UMLPackage.eINSTANCE.getInstanceSpecification(); >+ } >+ >+ public void parse(EObject target, String text) throws ExternalParserException { >+ checkContext(); >+ ReInit(new StringReader(text)); >+ mySubject = (InstanceSpecification)target; >+ Declaration(); >+ mySubject = null; >+ } >+ >+ public InstanceSpecification parseNew(String text) throws ExternalParserException { >+ InstanceSpecification instance = UMLFactory.eINSTANCE.createInstanceSpecification(); >+ parse(instance, text); >+ return instance; >+ } >+ >+ protected static int parseInt(Token t) throws ParseException { >+ if (t.kind != InstanceSpecificationParserConstants.INTEGER_LITERAL){ >+ throw new IllegalStateException("Token: " + t + ", image: " + t.image); >+ } >+ try { >+ return Integer.parseInt(t.image); //XXX: "0005", "99999999999999999999999" >+ } catch (NumberFormatException e){ >+ throw new ParseException("Not supported integer value:" + t.image); >+ } >+ } >+ >+} >+ >+PARSER_END(InstanceSpecificationParser) >+ >+/* WHITE SPACE */ >+ >+SPECIAL_TOKEN : >+{ >+ " " >+| "\t" >+} >+ >+/* SEPARATORS */ >+TOKEN : >+{ >+ < SLASH: "/" > >+| < COLON: ":" > >+| < EQUALS: "=" > >+| < LBRACKET: "[" > >+| < RBRACKET: "]" > >+| < LCURLY: "{" > >+| < RCURLY: "}" > >+| < COMMA: "," > >+} >+ >+/* SPECIAL_MEANING */ >+TOKEN : >+{ >+ < PLUS: "+" > >+| < MINUS: "-" > >+| < NUMBER_SIGN: "#" > >+| < TILDE: "~" > >+| < DOT: "." > >+| < STAR: "*" > >+} >+ >+/* MODIFIERS */ >+TOKEN : >+{ >+ < READ_ONLY: "readOnly" > >+| < UNION: "union" > >+| < SUBSETS: "subsets" > >+| < REDEFINES: "redefines" > >+| < ORDERED: "ordered" > >+| < UNORDERED: "unordered" > >+| < UNIQUE: "unique" > >+| < NON_UNIQUE: "nonunique" > >+} >+ >+/* LITERALS */ >+TOKEN: >+{ >+ < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])* > >+} >+ >+TOKEN : >+{ >+ < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)* > >+| >+ < #LETTER: >+ [ >+ "\u0024", >+ "\u0041"-"\u005a", >+ "\u005f", >+ "\u0061"-"\u007a", >+ "\u00c0"-"\u00d6", >+ "\u00d8"-"\u00f6", >+ "\u00f8"-"\u00ff", >+ "\u0100"-"\u1fff", >+ "\u3040"-"\u318f", >+ "\u3300"-"\u337f", >+ "\u3400"-"\u3d2d", >+ "\u4e00"-"\u9fff", >+ "\uf900"-"\ufaff" >+ ] >+ > >+| >+ < #DIGIT: >+ [ >+ "\u0030"-"\u0039", >+ "\u0660"-"\u0669", >+ "\u06f0"-"\u06f9", >+ "\u0966"-"\u096f", >+ "\u09e6"-"\u09ef", >+ "\u0a66"-"\u0a6f", >+ "\u0ae6"-"\u0aef", >+ "\u0b66"-"\u0b6f", >+ "\u0be7"-"\u0bef", >+ "\u0c66"-"\u0c6f", >+ "\u0ce6"-"\u0cef", >+ "\u0d66"-"\u0d6f", >+ "\u0e50"-"\u0e59", >+ "\u0ed0"-"\u0ed9", >+ "\u1040"-"\u1049" >+ ] >+ > >+} >+ >+void Declaration() : >+{} >+{ >+ LOOKAHEAD(2) >+ ( >+ AnonymousUnnamed() >+ ) >+ | >+ ( >+ [ InstanceName() ] >+ [ InstanceType() ] >+ ) <EOF> >+} >+ >+void AnonymousUnnamed() : >+{} >+{ >+ <COLON> { mySubject.setName(null); mySubject.getClassifiers().clear(); } >+} >+ >+void InstanceName() : >+{ >+ String name; >+} >+{ >+ name = NameWithSpaces() >+ { >+ mySubject.setName(name); >+ } >+} >+ >+void InstanceType() : >+{ >+ String type; >+} >+{ >+ ( >+ <COLON> type = NameWithSpaces() { applyLookup(Type.class, type, new ClassifierLookupCallback(mySubject)); } >+ ( >+ <COMMA> type = NameWithSpaces() { applyLookup(Type.class, type, new ClassifierLookupCallback(mySubject)); } >+ )* >+ ) >+} >+ >+String NameWithSpaces() : >+{ >+ StringBuffer result = new StringBuffer(); >+ Token t; >+} >+{ >+ ( >+ t = <IDENTIFIER> { result.append(t.image); } >+ ( t = <IDENTIFIER> { result.append(' '); result.append(t.image); } ) * >+ ) >+ { >+ return result.toString(); >+ } >+} >Index: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorLinkHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorLinkHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorLinkHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/navigator/UMLNavigatorLinkHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,84 @@ >+package org.eclipse.uml2.diagram.clazz.navigator; >+ >+import org.eclipse.core.resources.IFile; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.emf.ecore.resource.Resource; >+import org.eclipse.gef.EditPart; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.jface.viewers.StructuredSelection; >+import org.eclipse.ui.IEditorInput; >+import org.eclipse.ui.IEditorPart; >+import org.eclipse.ui.IWorkbenchPage; >+import org.eclipse.ui.navigator.ILinkHelper; >+import org.eclipse.ui.part.FileEditorInput; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLDiagramEditor; >+ >+/** >+ * @generated >+ */ >+public class UMLNavigatorLinkHelper implements ILinkHelper { >+ >+ /** >+ * @generated >+ */ >+ public IStructuredSelection findSelection(IEditorInput anInput) { >+ return StructuredSelection.EMPTY; >+ } >+ >+ /** >+ * @generated >+ */ >+ public void activateEditor(IWorkbenchPage aPage, IStructuredSelection aSelection) { >+ if (aSelection == null || aSelection.isEmpty()) { >+ return; >+ } >+ if (aSelection.getFirstElement() instanceof UMLAbstractNavigatorItem) { >+ UMLAbstractNavigatorItem navigatorItem = (UMLAbstractNavigatorItem) aSelection.getFirstElement(); >+ if (!PackageEditPart.MODEL_ID.equals(navigatorItem.getModelID())) { >+ return; >+ } >+ Object parentFile = navigatorItem.getParent(); >+ while (parentFile instanceof UMLAbstractNavigatorItem) { >+ parentFile = ((UMLAbstractNavigatorItem) parentFile).getParent(); >+ } >+ if (false == parentFile instanceof IFile) { >+ return; >+ } >+ IEditorInput fileInput = new FileEditorInput((IFile) parentFile); >+ IEditorPart editor = aPage.findEditor(fileInput); >+ if (editor == null) { >+ return; >+ } >+ aPage.bringToTop(editor); >+ if (editor instanceof UMLDiagramEditor) { >+ UMLDiagramEditor diagramEditor = (UMLDiagramEditor) editor; >+ Resource diagramResource = diagramEditor.getDiagram().eResource(); >+ >+ View navigatorView = null; >+ if (navigatorItem instanceof UMLNavigatorItem) { >+ navigatorView = ((UMLNavigatorItem) navigatorItem).getView(); >+ } else if (navigatorItem instanceof UMLNavigatorGroup) { >+ UMLNavigatorGroup group = (UMLNavigatorGroup) navigatorItem; >+ if (group.getParent() instanceof UMLNavigatorItem) { >+ navigatorView = ((UMLNavigatorItem) group.getParent()).getView(); >+ } >+ } >+ >+ if (navigatorView == null) { >+ return; >+ } >+ EObject selectedView = diagramResource.getEObject(navigatorView.eResource().getURIFragment(navigatorView)); >+ if (selectedView == null) { >+ return; >+ } >+ EditPart selectedEditPart = (EditPart) diagramEditor.getDiagramGraphicalViewer().getEditPartRegistry().get(selectedView); >+ if (selectedEditPart != null) { >+ diagramEditor.getDiagramGraphicalViewer().select(selectedEditPart); >+ } >+ } >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PortEditHelper.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/edit/helpers/PortEditHelper.java >diff -N src/org/eclipse/uml2/diagram/clazz/edit/helpers/PortEditHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/edit/helpers/PortEditHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,7 @@ >+package org.eclipse.uml2.diagram.clazz.edit.helpers; >+ >+/** >+ * @generated >+ */ >+public class PortEditHelper extends UMLBaseEditHelper { >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/Property5ViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/Property5ViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/Property5ViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/Property5ViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class Property5ViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.Property5EditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeViewFactory.java >=================================================================== >RCS file: src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeViewFactory.java >diff -N src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeViewFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/uml2/diagram/clazz/view/factories/PrimitiveTypeViewFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+package org.eclipse.uml2.diagram.clazz.view.factories; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.emf.ecore.EAnnotation; >+import org.eclipse.emf.ecore.EcoreFactory; >+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractLabelViewFactory; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.uml2.diagram.clazz.edit.parts.PackageEditPart; >+import org.eclipse.uml2.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * @generated >+ */ >+public class PrimitiveTypeViewFactory extends AbstractLabelViewFactory { >+ >+ /** >+ * @generated >+ */ >+ protected List createStyles(View view) { >+ List styles = new ArrayList(); >+ return styles; >+ } >+ >+ /** >+ * @generated >+ */ >+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { >+ if (semanticHint == null) { >+ semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.clazz.edit.parts.PrimitiveTypeEditPart.VISUAL_ID); >+ view.setType(semanticHint); >+ } >+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted); >+ if (!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { >+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); >+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ >+ shortcutAnnotation.getDetails().put("modelID", PackageEditPart.MODEL_ID); //$NON-NLS-1$ >+ view.getEAnnotations().add(shortcutAnnotation); >+ } >+ } >+ >+} >Index: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationParserTokenManager.java >=================================================================== >RCS file: custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationParserTokenManager.java >diff -N custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationParserTokenManager.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ custom-src/org/eclipse/uml2/diagram/clazz/parser/operation/OperationParserTokenManager.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,726 @@ >+/* Generated By:JavaCC: Do not edit this line. OperationParserTokenManager.java */ >+/* >+ * Copyright (c) 2006 Borland Software Corporation >+ * >+ * 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: >+ * Michael Golubev (Borland) - initial API and implementation >+ */ >+package org.eclipse.uml2.diagram.clazz.parser.operation; >+import java.io.*; >+import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; >+import org.eclipse.uml2.diagram.parser.*; >+import org.eclipse.uml2.diagram.parser.lookup.LookupSuite; >+import org.eclipse.uml2.uml.*; >+ >+public class OperationParserTokenManager implements OperationParserConstants >+{ >+ public java.io.PrintStream debugStream = System.out; >+ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } >+private final int jjStopStringLiteralDfa_0(int pos, long active0) >+{ >+ switch (pos) >+ { >+ case 0: >+ if ((active0 & 0xff80000L) != 0L) >+ { >+ jjmatchedKind = 29; >+ return 2; >+ } >+ return -1; >+ case 1: >+ if ((active0 & 0xa000000L) != 0L) >+ return 2; >+ if ((active0 & 0x5f80000L) != 0L) >+ { >+ if (jjmatchedPos != 1) >+ { >+ jjmatchedKind = 29; >+ jjmatchedPos = 1; >+ } >+ return 2; >+ } >+ return -1; >+ case 2: >+ if ((active0 & 0x4000000L) != 0L) >+ return 2; >+ if ((active0 & 0x9f80000L) != 0L) >+ { >+ jjmatchedKind = 29; >+ jjmatchedPos = 2; >+ return 2; >+ } >+ return -1; >+ case 3: >+ if ((active0 & 0x9f80000L) != 0L) >+ { >+ jjmatchedKind = 29; >+ jjmatchedPos = 3; >+ return 2; >+ } >+ return -1; >+ case 4: >+ if ((active0 & 0x9000000L) != 0L) >+ return 2; >+ if ((active0 & 0xf80000L) != 0L) >+ { >+ jjmatchedKind = 29; >+ jjmatchedPos = 4; >+ return 2; >+ } >+ return -1; >+ case 5: >+ if ((active0 & 0x400000L) != 0L) >+ return 2; >+ if ((active0 & 0xb80000L) != 0L) >+ { >+ jjmatchedKind = 29; >+ jjmatchedPos = 5; >+ return 2; >+ } >+ return -1; >+ case 6: >+ if ((active0 & 0x100000L) != 0L) >+ return 2; >+ if ((active0 & 0xa80000L) != 0L) >+ { >+ jjmatchedKind = 29; >+ jjmatchedPos = 6; >+ return 2; >+ } >+ return -1; >+ case 7: >+ if ((active0 & 0xa80000L) != 0L) >+ { >+ jjmatchedKind = 29; >+ jjmatchedPos = 7; >+ return 2; >+ } >+ return -1; >+ default : >+ return -1; >+ } >+} >+private final int jjStartNfa_0(int pos, long active0) >+{ >+ return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); >+} >+private final int jjStopAtPos(int pos, int kind) >+{ >+ jjmatchedKind = kind; >+ jjmatchedPos = pos; >+ return pos + 1; >+} >+private final int jjStartNfaWithStates_0(int pos, int kind, int state) >+{ >+ jjmatchedKind = kind; >+ jjmatchedPos = pos; >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { return pos + 1; } >+ return jjMoveNfa_0(state, pos + 1); >+} >+private final int jjMoveStringLiteralDfa0_0() >+{ >+ switch(curChar) >+ { >+ case 9: >+ return jjStopAtPos(0, 2); >+ case 32: >+ return jjStopAtPos(0, 1); >+ case 35: >+ return jjStopAtPos(0, 15); >+ case 40: >+ return jjStopAtPos(0, 10); >+ case 41: >+ return jjStopAtPos(0, 11); >+ case 42: >+ return jjStopAtPos(0, 18); >+ case 43: >+ return jjStopAtPos(0, 13); >+ case 44: >+ return jjStopAtPos(0, 12); >+ case 45: >+ return jjStopAtPos(0, 14); >+ case 46: >+ return jjStopAtPos(0, 17); >+ case 47: >+ return jjStopAtPos(0, 3); >+ case 58: >+ return jjStopAtPos(0, 4); >+ case 61: >+ return jjStopAtPos(0, 5); >+ case 91: >+ return jjStopAtPos(0, 6); >+ case 93: >+ return jjStopAtPos(0, 7); >+ case 105: >+ return jjMoveStringLiteralDfa1_0(0xa000000L); >+ case 110: >+ return jjMoveStringLiteralDfa1_0(0x800000L); >+ case 111: >+ return jjMoveStringLiteralDfa1_0(0x4100000L); >+ case 113: >+ return jjMoveStringLiteralDfa1_0(0x1000000L); >+ case 114: >+ return jjMoveStringLiteralDfa1_0(0x80000L); >+ case 117: >+ return jjMoveStringLiteralDfa1_0(0x600000L); >+ case 123: >+ return jjStopAtPos(0, 8); >+ case 125: >+ return jjStopAtPos(0, 9); >+ case 126: >+ return jjStopAtPos(0, 16); >+ default : >+ return jjMoveNfa_0(1, 0); >+ } >+} >+private final int jjMoveStringLiteralDfa1_0(long active0) >+{ >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(0, active0); >+ return 1; >+ } >+ switch(curChar) >+ { >+ case 101: >+ return jjMoveStringLiteralDfa2_0(active0, 0x80000L); >+ case 110: >+ if ((active0 & 0x2000000L) != 0L) >+ { >+ jjmatchedKind = 25; >+ jjmatchedPos = 1; >+ } >+ return jjMoveStringLiteralDfa2_0(active0, 0x8600000L); >+ case 111: >+ return jjMoveStringLiteralDfa2_0(active0, 0x800000L); >+ case 114: >+ return jjMoveStringLiteralDfa2_0(active0, 0x100000L); >+ case 117: >+ return jjMoveStringLiteralDfa2_0(active0, 0x5000000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(0, active0); >+} >+private final int jjMoveStringLiteralDfa2_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(0, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(1, active0); >+ return 2; >+ } >+ switch(curChar) >+ { >+ case 100: >+ return jjMoveStringLiteralDfa3_0(active0, 0x180000L); >+ case 101: >+ return jjMoveStringLiteralDfa3_0(active0, 0x1000000L); >+ case 105: >+ return jjMoveStringLiteralDfa3_0(active0, 0x400000L); >+ case 110: >+ return jjMoveStringLiteralDfa3_0(active0, 0x800000L); >+ case 111: >+ return jjMoveStringLiteralDfa3_0(active0, 0x8200000L); >+ case 116: >+ if ((active0 & 0x4000000L) != 0L) >+ return jjStartNfaWithStates_0(2, 26, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(1, active0); >+} >+private final int jjMoveStringLiteralDfa3_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(1, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(2, active0); >+ return 3; >+ } >+ switch(curChar) >+ { >+ case 101: >+ return jjMoveStringLiteralDfa4_0(active0, 0x180000L); >+ case 113: >+ return jjMoveStringLiteralDfa4_0(active0, 0x400000L); >+ case 114: >+ return jjMoveStringLiteralDfa4_0(active0, 0x1200000L); >+ case 117: >+ return jjMoveStringLiteralDfa4_0(active0, 0x8800000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(2, active0); >+} >+private final int jjMoveStringLiteralDfa4_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(2, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(3, active0); >+ return 4; >+ } >+ switch(curChar) >+ { >+ case 100: >+ return jjMoveStringLiteralDfa5_0(active0, 0x200000L); >+ case 102: >+ return jjMoveStringLiteralDfa5_0(active0, 0x80000L); >+ case 110: >+ return jjMoveStringLiteralDfa5_0(active0, 0x800000L); >+ case 114: >+ return jjMoveStringLiteralDfa5_0(active0, 0x100000L); >+ case 116: >+ if ((active0 & 0x8000000L) != 0L) >+ return jjStartNfaWithStates_0(4, 27, 2); >+ break; >+ case 117: >+ return jjMoveStringLiteralDfa5_0(active0, 0x400000L); >+ case 121: >+ if ((active0 & 0x1000000L) != 0L) >+ return jjStartNfaWithStates_0(4, 24, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(3, active0); >+} >+private final int jjMoveStringLiteralDfa5_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(3, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(4, active0); >+ return 5; >+ } >+ switch(curChar) >+ { >+ case 101: >+ if ((active0 & 0x400000L) != 0L) >+ return jjStartNfaWithStates_0(5, 22, 2); >+ return jjMoveStringLiteralDfa6_0(active0, 0x300000L); >+ case 105: >+ return jjMoveStringLiteralDfa6_0(active0, 0x880000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(4, active0); >+} >+private final int jjMoveStringLiteralDfa6_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(4, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(5, active0); >+ return 6; >+ } >+ switch(curChar) >+ { >+ case 100: >+ if ((active0 & 0x100000L) != 0L) >+ return jjStartNfaWithStates_0(6, 20, 2); >+ break; >+ case 110: >+ return jjMoveStringLiteralDfa7_0(active0, 0x80000L); >+ case 113: >+ return jjMoveStringLiteralDfa7_0(active0, 0x800000L); >+ case 114: >+ return jjMoveStringLiteralDfa7_0(active0, 0x200000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(5, active0); >+} >+private final int jjMoveStringLiteralDfa7_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(5, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(6, active0); >+ return 7; >+ } >+ switch(curChar) >+ { >+ case 101: >+ return jjMoveStringLiteralDfa8_0(active0, 0x280000L); >+ case 117: >+ return jjMoveStringLiteralDfa8_0(active0, 0x800000L); >+ default : >+ break; >+ } >+ return jjStartNfa_0(6, active0); >+} >+private final int jjMoveStringLiteralDfa8_0(long old0, long active0) >+{ >+ if (((active0 &= old0)) == 0L) >+ return jjStartNfa_0(6, old0); >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { >+ jjStopStringLiteralDfa_0(7, active0); >+ return 8; >+ } >+ switch(curChar) >+ { >+ case 100: >+ if ((active0 & 0x200000L) != 0L) >+ return jjStartNfaWithStates_0(8, 21, 2); >+ break; >+ case 101: >+ if ((active0 & 0x800000L) != 0L) >+ return jjStartNfaWithStates_0(8, 23, 2); >+ break; >+ case 115: >+ if ((active0 & 0x80000L) != 0L) >+ return jjStartNfaWithStates_0(8, 19, 2); >+ break; >+ default : >+ break; >+ } >+ return jjStartNfa_0(7, active0); >+} >+private final void jjCheckNAdd(int state) >+{ >+ if (jjrounds[state] != jjround) >+ { >+ jjstateSet[jjnewStateCnt++] = state; >+ jjrounds[state] = jjround; >+ } >+} >+private final void jjAddStates(int start, int end) >+{ >+ do { >+ jjstateSet[jjnewStateCnt++] = jjnextStates[start]; >+ } while (start++ != end); >+} >+private final void jjCheckNAddTwoStates(int state1, int state2) >+{ >+ jjCheckNAdd(state1); >+ jjCheckNAdd(state2); >+} >+private final void jjCheckNAddStates(int start, int end) >+{ >+ do { >+ jjCheckNAdd(jjnextStates[start]); >+ } while (start++ != end); >+} >+private final void jjCheckNAddStates(int start) >+{ >+ jjCheckNAdd(jjnextStates[start]); >+ jjCheckNAdd(jjnextStates[start + 1]); >+} >+static final long[] jjbitVec0 = { >+ 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L >+}; >+static final long[] jjbitVec2 = { >+ 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL >+}; >+static final long[] jjbitVec3 = { >+ 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL >+}; >+static final long[] jjbitVec4 = { >+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L >+}; >+static final long[] jjbitVec5 = { >+ 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L >+}; >+static final long[] jjbitVec6 = { >+ 0x3fffffffffffL, 0x0L, 0x0L, 0x0L >+}; >+private final int jjMoveNfa_0(int startState, int curPos) >+{ >+ int[] nextStates; >+ int startsAt = 0; >+ jjnewStateCnt = 3; >+ int i = 1; >+ jjstateSet[0] = startState; >+ int j, kind = 0x7fffffff; >+ for (;;) >+ { >+ if (++jjround == 0x7fffffff) >+ ReInitRounds(); >+ if (curChar < 64) >+ { >+ long l = 1L << curChar; >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ if ((0x3ff000000000000L & l) != 0L) >+ { >+ if (kind > 28) >+ kind = 28; >+ jjCheckNAdd(0); >+ } >+ else if (curChar == 36) >+ { >+ if (kind > 29) >+ kind = 29; >+ jjCheckNAdd(2); >+ } >+ break; >+ case 0: >+ if ((0x3ff000000000000L & l) == 0L) >+ break; >+ if (kind > 28) >+ kind = 28; >+ jjCheckNAdd(0); >+ break; >+ case 2: >+ if ((0x3ff001000000000L & l) == 0L) >+ break; >+ if (kind > 29) >+ kind = 29; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ else if (curChar < 128) >+ { >+ long l = 1L << (curChar & 077); >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ case 2: >+ if ((0x7fffffe87fffffeL & l) == 0L) >+ break; >+ if (kind > 29) >+ kind = 29; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ else >+ { >+ int hiByte = (int)(curChar >> 8); >+ int i1 = hiByte >> 6; >+ long l1 = 1L << (hiByte & 077); >+ int i2 = (curChar & 0xff) >> 6; >+ long l2 = 1L << (curChar & 077); >+ MatchLoop: do >+ { >+ switch(jjstateSet[--i]) >+ { >+ case 1: >+ case 2: >+ if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) >+ break; >+ if (kind > 29) >+ kind = 29; >+ jjCheckNAdd(2); >+ break; >+ default : break; >+ } >+ } while(i != startsAt); >+ } >+ if (kind != 0x7fffffff) >+ { >+ jjmatchedKind = kind; >+ jjmatchedPos = curPos; >+ kind = 0x7fffffff; >+ } >+ ++curPos; >+ if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) >+ return curPos; >+ try { curChar = input_stream.readChar(); } >+ catch(java.io.IOException e) { return curPos; } >+ } >+} >+static final int[] jjnextStates = { >+}; >+private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) >+{ >+ switch(hiByte) >+ { >+ case 0: >+ return ((jjbitVec2[i2] & l2) != 0L); >+ case 48: >+ return ((jjbitVec3[i2] & l2) != 0L); >+ case 49: >+ return ((jjbitVec4[i2] & l2) != 0L); >+ case 51: >+ return ((jjbitVec5[i2] & l2) != 0L); >+ case 61: >+ return ((jjbitVec6[i2] & l2) != 0L); >+ default : >+ if ((jjbitVec0[i1] & l1) != 0L) >+ return true; >+ return false; >+ } >+} >+public static final String[] jjstrLiteralImages = { >+"", null, null, "\57", "\72", "\75", "\133", "\135", "\173", "\175", "\50", >+"\51", "\54", "\53", "\55", "\43", "\176", "\56", "\52", >+"\162\145\144\145\146\151\156\145\163", "\157\162\144\145\162\145\144", "\165\156\157\162\144\145\162\145\144", >+"\165\156\151\161\165\145", "\156\157\156\165\156\151\161\165\145", "\161\165\145\162\171", "\151\156", >+"\157\165\164", "\151\156\157\165\164", null, null, null, null, }; >+public static final String[] lexStateNames = { >+ "DEFAULT", >+}; >+static final long[] jjtoToken = { >+ 0x3ffffff9L, >+}; >+static final long[] jjtoSkip = { >+ 0x6L, >+}; >+static final long[] jjtoSpecial = { >+ 0x6L, >+}; >+protected JavaCharStream input_stream; >+private final int[] jjrounds = new int[3]; >+private final int[] jjstateSet = new int[6]; >+protected char curChar; >+public OperationParserTokenManager(JavaCharStream stream) >+{ >+ if (JavaCharStream.staticFlag) >+ throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); >+ input_stream = stream; >+} >+public OperationParserTokenManager(JavaCharStream stream, int lexState) >+{ >+ this(stream); >+ SwitchTo(lexState); >+} >+public void ReInit(JavaCharStream stream) >+{ >+ jjmatchedPos = jjnewStateCnt = 0; >+ curLexState = defaultLexState; >+ input_stream = stream; >+ ReInitRounds(); >+} >+private final void ReInitRounds() >+{ >+ int i; >+ jjround = 0x80000001; >+ for (i = 3; i-- > 0;) >+ jjrounds[i] = 0x80000000; >+} >+public void ReInit(JavaCharStream stream, int lexState) >+{ >+ ReInit(stream); >+ SwitchTo(lexState); >+} >+public void SwitchTo(int lexState) >+{ >+ if (lexState >= 1 || lexState < 0) >+ throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); >+ else >+ curLexState = lexState; >+} >+ >+protected Token jjFillToken() >+{ >+ Token t = Token.newToken(jjmatchedKind); >+ t.kind = jjmatchedKind; >+ String im = jjstrLiteralImages[jjmatchedKind]; >+ t.image = (im == null) ? input_stream.GetImage() : im; >+ t.beginLine = input_stream.getBeginLine(); >+ t.beginColumn = input_stream.getBeginColumn(); >+ t.endLine = input_stream.getEndLine(); >+ t.endColumn = input_stream.getEndColumn(); >+ return t; >+} >+ >+int curLexState = 0; >+int defaultLexState = 0; >+int jjnewStateCnt; >+int jjround; >+int jjmatchedPos; >+int jjmatchedKind; >+ >+public Token getNextToken() >+{ >+ int kind; >+ Token specialToken = null; >+ Token matchedToken; >+ int curPos = 0; >+ >+ EOFLoop : >+ for (;;) >+ { >+ try >+ { >+ curChar = input_stream.BeginToken(); >+ } >+ catch(java.io.IOException e) >+ { >+ jjmatchedKind = 0; >+ matchedToken = jjFillToken(); >+ matchedToken.specialToken = specialToken; >+ return matchedToken; >+ } >+ >+ jjmatchedKind = 0x7fffffff; >+ jjmatchedPos = 0; >+ curPos = jjMoveStringLiteralDfa0_0(); >+ if (jjmatchedKind != 0x7fffffff) >+ { >+ if (jjmatchedPos + 1 < curPos) >+ input_stream.backup(curPos - jjmatchedPos - 1); >+ if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) >+ { >+ matchedToken = jjFillToken(); >+ matchedToken.specialToken = specialToken; >+ return matchedToken; >+ } >+ else >+ { >+ if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) >+ { >+ matchedToken = jjFillToken(); >+ if (specialToken == null) >+ specialToken = matchedToken; >+ else >+ { >+ matchedToken.specialToken = specialToken; >+ specialToken = (specialToken.next = matchedToken); >+ } >+ } >+ continue EOFLoop; >+ } >+ } >+ int error_line = input_stream.getEndLine(); >+ int error_column = input_stream.getEndColumn(); >+ String error_after = null; >+ boolean EOFSeen = false; >+ try { input_stream.readChar(); input_stream.backup(1); } >+ catch (java.io.IOException e1) { >+ EOFSeen = true; >+ error_after = curPos <= 1 ? "" : input_stream.GetImage(); >+ if (curChar == '\n' || curChar == '\r') { >+ error_line++; >+ error_column = 0; >+ } >+ else >+ error_column++; >+ } >+ if (!EOFSeen) { >+ input_stream.backup(1); >+ error_after = curPos <= 1 ? "" : input_stream.GetImage(); >+ } >+ throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); >+ } >+} >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 80318
:
52154
| 52848 |
52849
|
52850