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 228339 Details for
Bug 402895
[Package Diagram] Add 'Model' element in the palette
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]
Patch to add 'model, constraint element and link, Abstraction link' and correct bug "Relationship and Package figure"
org.eclipse.papyrus.uml.diagram.pkg_13032013.patch (text/plain), 66.16 KB, created by
N G
on 2013-03-13 08:46:38 EDT
(
hide
)
Description:
Patch to add 'model, constraint element and link, Abstraction link' and correct bug "Relationship and Package figure"
Filename:
MIME Type:
Creator:
N G
Created:
2013-03-13 08:46:38 EDT
Size:
66.16 KB
patch
obsolete
>Index: plugin.gen.xml >=================================================================== >--- plugin.gen.xml (revision 10517) >+++ plugin.gen.xml (working copy) >@@ -113,22 +113,26 @@ > "3009" = PACKAGE_CN > "2012" = COMMENT > "3028" = COMMENT_CN >+ "2011" = CONSTRAINT >+ "3029" = CONSTRAINT_CN >+ "2005" = MODEL > --> >- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2007, 3009, 2012, 3028"/> >+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2007, 3009, 2012, 3028, 2011, 3029, 2005"/> > > <!-- > "4008" = DEPENDENCY > "4010" = PACKAGE_IMPORT > "4013" = COMMENT_ANNOTATED_ELEMENT >+ "4006" = ABSTRACTION > --> >- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4008, 4010, 4013"/> >+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4008, 4010, 4013, 4006"/> > > <object id="elementtype.node" > class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)"> > > <method > name="getSemanticHint()" >- value="2007, 3009, 2012, 3028"> >+ value="2007, 3009, 2012, 3028, 2011, 3029, 2005"> > </method> > </object> > <context viewClass="org.eclipse.gmf.runtime.notation.Node" elements="elementtype.node"/> >@@ -138,7 +142,7 @@ > > <method > name="getSemanticHint()" >- value="4008, 4010, 4013"> >+ value="4008, 4010, 4013, 4006"> > </method> > </object> > <context viewClass="org.eclipse.gmf.runtime.notation.Edge" elements="elementtype.edge"/> >@@ -156,6 +160,16 @@ > <method name="getProxyClassID()" value="uml.Comment"/> > </object> > >+ <!-- "uml.Constraint" --> >+ <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)"> >+ <method name="getProxyClassID()" value="uml.Constraint"/> >+ </object> >+ >+ <!-- "uml.Model" --> >+ <object id="uml.Model" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)"> >+ <method name="getProxyClassID()" value="uml.Model"/> >+ </object> >+ > <!-- "uml.Dependency" --> > <object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)"> > <method name="getProxyClassID()" value="uml.Dependency"/> >@@ -166,13 +180,18 @@ > <method name="getProxyClassID()" value="uml.PackageImport"/> > </object> > >+ <!-- "uml.Abstraction" --> >+ <object id="uml.Abstraction" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)"> >+ <method name="getProxyClassID()" value="uml.Abstraction"/> >+ </object> >+ > <!-- Additional activation contexts for nodes semantic objects --> > <context viewClass="org.eclipse.gmf.runtime.notation.Node" >- elements="uml.Package, uml.Comment"/> >+ elements="uml.Package, uml.Comment, uml.Constraint, uml.Model"/> > > <!-- Additional activation contexts for edges semantic objects --> > <context viewClass="org.eclipse.gmf.runtime.notation.Edge" >- elements="uml.Dependency, uml.PackageImport"/> >+ elements="uml.Dependency, uml.PackageImport, uml.Abstraction"/> > > </viewProvider> > </extension> >@@ -207,6 +226,15 @@ > "5038" = COMMENT_LABEL_BODY_HINT > "3028" = COMMENT_CN > "5063" = COMMENT_CN_LABEL_BODY_HINT >+ "2011" = CONSTRAINT >+ "5037" = CONSTRAINT_LABEL_NAME_HINT >+ "5159" = CONSTRAINT_LABEL_BODY_HINT >+ "3029" = CONSTRAINT_CN >+ "5064" = CONSTRAINT_CN_LABEL_NAME_HINT >+ "5160" = CONSTRAINT_CN_LABEL_BODY_HINT >+ "2005" = MODEL >+ "5020" = MODEL_LABEL_NAME_TN_HINT >+ "7009" = MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT > --> > <object > id="PACKAGE" >@@ -228,6 +256,21 @@ > class="org.eclipse.gmf.runtime.notation.Node"> > <method name="getType()" value="3028, 5063"/> > </object> >+ <object >+ id="CONSTRAINT" >+ class="org.eclipse.gmf.runtime.notation.Node"> >+ <method name="getType()" value="2011, 5037, 5159"/> >+ </object> >+ <object >+ id="CONSTRAINT_CN" >+ class="org.eclipse.gmf.runtime.notation.Node"> >+ <method name="getType()" value="3029, 5064, 5160"/> >+ </object> >+ <object >+ id="MODEL" >+ class="org.eclipse.gmf.runtime.notation.Node"> >+ <method name="getType()" value="2005, 5020, 7009"/> >+ </object> > > > <!-- >@@ -237,6 +280,9 @@ > "4010" = PACKAGE_IMPORT > "6022" = PACKAGE_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT > "4013" = COMMENT_ANNOTATED_ELEMENT >+ "4006" = ABSTRACTION >+ "6014" = ABSTRACTION_LABEL_NAME_HINT >+ "6015" = ABSTRACTION_LABEL_APPLIED_STEREOTYPE_HINT > --> > <object > id="DEPENDENCY" >@@ -253,9 +299,14 @@ > class="org.eclipse.gmf.runtime.notation.Edge"> > <method name="getType()" value="4013"/> > </object> >+ <object >+ id="ABSTRACTION" >+ class="org.eclipse.gmf.runtime.notation.Edge"> >+ <method name="getType()" value="4006, 6014, 6015"/> >+ </object> > >- <context views="PACKAGE, PACKAGE_CN, COMMENT, COMMENT_CN"/> >- <context views="DEPENDENCY, PACKAGE_IMPORT, COMMENT_ANNOTATED_ELEMENT"/> >+ <context views="PACKAGE, PACKAGE_CN, COMMENT, COMMENT_CN, CONSTRAINT, CONSTRAINT_CN, MODEL"/> >+ <context views="DEPENDENCY, PACKAGE_IMPORT, COMMENT_ANNOTATED_ELEMENT, ABSTRACTION"/> > > </editpartProvider> > </extension> >@@ -282,7 +333,7 @@ > > <!-- Element Preference pages declaration --> > <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences" >- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackagePreferencePage" >+ class="org.eclipse.papyrus.uml.diagram.pkg.CustomPackagePreferencePage" > id="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackagePreferencePage" > name="Package"> > </page> >@@ -300,6 +351,22 @@ > > > <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences" >+ class="org.eclipse.papyrus.uml.diagram.pkg.preferences.ConstraintPreferencePage" >+ id="org.eclipse.papyrus.uml.diagram.pkg.preferences.ConstraintPreferencePage" >+ name="Constraint"> >+ </page> >+ >+ >+ >+ >+ <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences" >+ class="org.eclipse.papyrus.uml.diagram.pkg.CustomModelPreferencePage" >+ id="org.eclipse.papyrus.uml.diagram.pkg.preferences.ModelPreferencePage" >+ name="Model"> >+ </page> >+ >+ >+ <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences" > class="org.eclipse.papyrus.uml.diagram.pkg.preferences.DependencyPreferencePage" > id="org.eclipse.papyrus.uml.diagram.pkg.preferences.DependencyPreferencePage" > name="Dependency"> >@@ -313,10 +380,12 @@ > </page> > > >+ >+ > <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences" >- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentLinkPreferencePage" >- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentLinkPreferencePage" >- name="CommentLink"> >+ class="org.eclipse.papyrus.uml.diagram.pkg.preferences.AbstractionPreferencePage" >+ id="org.eclipse.papyrus.uml.diagram.pkg.preferences.AbstractionPreferencePage" >+ name="Abstraction"> > </page> > > >Index: plugin.properties >=================================================================== >--- plugin.properties (revision 10517) >+++ plugin.properties (working copy) >@@ -8,5 +8,5 @@ > # Contributors: > # Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - initial API and implementation > ################################################################################## >-pluginName=UML Package Diagram (Incubation) >+pluginName=UML Package Diagram > providerName=Eclipse Modeling Project >Index: plugin.xml >=================================================================== >--- plugin.xml (revision 10517) >+++ plugin.xml (working copy) >@@ -113,22 +113,26 @@ > "3009" = PACKAGE_CN > "2012" = COMMENT > "3028" = COMMENT_CN >+ "2011" = CONSTRAINT >+ "3029" = CONSTRAINT_CN >+ "2005" = MODEL > --> >- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2007, 3009, 2012, 3028"/> >+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2007, 3009, 2012, 3028, 2011, 3029, 2005"/> > > <!-- > "4008" = DEPENDENCY > "4010" = PACKAGE_IMPORT > "4013" = COMMENT_ANNOTATED_ELEMENT >+ "4006" = ABSTRACTION > --> >- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4008, 4010, 4013"/> >+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4008, 4010, 4013, 4006"/> > > <object id="elementtype.node" > class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)"> > > <method > name="getSemanticHint()" >- value="2007, 3009, 2012, 3028"> >+ value="2007, 3009, 2012, 3028, 2011, 3029, 2005"> > </method> > </object> > <context viewClass="org.eclipse.gmf.runtime.notation.Node" elements="elementtype.node"/> >@@ -138,7 +142,7 @@ > > <method > name="getSemanticHint()" >- value="4008, 4010, 4013"> >+ value="4008, 4010, 4013, 4006"> > </method> > </object> > <context viewClass="org.eclipse.gmf.runtime.notation.Edge" elements="elementtype.edge"/> >@@ -156,6 +160,16 @@ > <method name="getProxyClassID()" value="uml.Comment"/> > </object> > >+ <!-- "uml.Constraint" --> >+ <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)"> >+ <method name="getProxyClassID()" value="uml.Constraint"/> >+ </object> >+ >+ <!-- "uml.Model" --> >+ <object id="uml.Model" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)"> >+ <method name="getProxyClassID()" value="uml.Model"/> >+ </object> >+ > <!-- "uml.Dependency" --> > <object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)"> > <method name="getProxyClassID()" value="uml.Dependency"/> >@@ -166,13 +180,18 @@ > <method name="getProxyClassID()" value="uml.PackageImport"/> > </object> > >+ <!-- "uml.Abstraction" --> >+ <object id="uml.Abstraction" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)"> >+ <method name="getProxyClassID()" value="uml.Abstraction"/> >+ </object> >+ > <!-- Additional activation contexts for nodes semantic objects --> > <context viewClass="org.eclipse.gmf.runtime.notation.Node" >- elements="uml.Package, uml.Comment"/> >+ elements="uml.Package, uml.Comment, uml.Constraint, uml.Model"/> > > <!-- Additional activation contexts for edges semantic objects --> > <context viewClass="org.eclipse.gmf.runtime.notation.Edge" >- elements="uml.Dependency, uml.PackageImport"/> >+ elements="uml.Dependency, uml.PackageImport, uml.Abstraction"/> > > </viewProvider> > </extension> >@@ -207,6 +226,15 @@ > "5038" = COMMENT_LABEL_BODY_HINT > "3028" = COMMENT_CN > "5063" = COMMENT_CN_LABEL_BODY_HINT >+ "2011" = CONSTRAINT >+ "5037" = CONSTRAINT_LABEL_NAME_HINT >+ "5159" = CONSTRAINT_LABEL_BODY_HINT >+ "3029" = CONSTRAINT_CN >+ "5064" = CONSTRAINT_CN_LABEL_NAME_HINT >+ "5160" = CONSTRAINT_CN_LABEL_BODY_HINT >+ "2005" = MODEL >+ "5020" = MODEL_LABEL_NAME_TN_HINT >+ "7009" = MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT > --> > <object > id="PACKAGE" >@@ -228,6 +256,21 @@ > class="org.eclipse.gmf.runtime.notation.Node"> > <method name="getType()" value="3028, 5063"/> > </object> >+ <object >+ id="CONSTRAINT" >+ class="org.eclipse.gmf.runtime.notation.Node"> >+ <method name="getType()" value="2011, 5037, 5159"/> >+ </object> >+ <object >+ id="CONSTRAINT_CN" >+ class="org.eclipse.gmf.runtime.notation.Node"> >+ <method name="getType()" value="3029, 5064, 5160"/> >+ </object> >+ <object >+ id="MODEL" >+ class="org.eclipse.gmf.runtime.notation.Node"> >+ <method name="getType()" value="2005, 5020, 7009"/> >+ </object> > > > <!-- >@@ -237,6 +280,9 @@ > "4010" = PACKAGE_IMPORT > "6022" = PACKAGE_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT > "4013" = COMMENT_ANNOTATED_ELEMENT >+ "4006" = ABSTRACTION >+ "6014" = ABSTRACTION_LABEL_NAME_HINT >+ "6015" = ABSTRACTION_LABEL_APPLIED_STEREOTYPE_HINT > --> > <object > id="DEPENDENCY" >@@ -253,9 +299,14 @@ > class="org.eclipse.gmf.runtime.notation.Edge"> > <method name="getType()" value="4013"/> > </object> >+ <object >+ id="ABSTRACTION" >+ class="org.eclipse.gmf.runtime.notation.Edge"> >+ <method name="getType()" value="4006, 6014, 6015"/> >+ </object> > >- <context views="PACKAGE, PACKAGE_CN, COMMENT, COMMENT_CN"/> >- <context views="DEPENDENCY, PACKAGE_IMPORT, COMMENT_ANNOTATED_ELEMENT"/> >+ <context views="PACKAGE, PACKAGE_CN, COMMENT, COMMENT_CN, CONSTRAINT, CONSTRAINT_CN, MODEL"/> >+ <context views="DEPENDENCY, PACKAGE_IMPORT, COMMENT_ANNOTATED_ELEMENT, ABSTRACTION"/> > > </editpartProvider> > </extension> >@@ -282,7 +333,7 @@ > > <!-- Element Preference pages declaration --> > <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences" >- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackagePreferencePage" >+ class="org.eclipse.papyrus.uml.diagram.pkg.CustomPackagePreferencePage" > id="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackagePreferencePage" > name="Package"> > </page> >@@ -300,6 +351,22 @@ > > > <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences" >+ class="org.eclipse.papyrus.uml.diagram.pkg.preferences.ConstraintPreferencePage" >+ id="org.eclipse.papyrus.uml.diagram.pkg.preferences.ConstraintPreferencePage" >+ name="Constraint"> >+ </page> >+ >+ >+ >+ >+ <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences" >+ class="org.eclipse.papyrus.uml.diagram.pkg.CustomModelPreferencePage" >+ id="org.eclipse.papyrus.uml.diagram.pkg.preferences.ModelPreferencePage" >+ name="Model"> >+ </page> >+ >+ >+ <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences" > class="org.eclipse.papyrus.uml.diagram.pkg.preferences.DependencyPreferencePage" > id="org.eclipse.papyrus.uml.diagram.pkg.preferences.DependencyPreferencePage" > name="Dependency"> >@@ -313,15 +380,70 @@ > </page> > > >+ >+ > <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences" >- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentLinkPreferencePage" >- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentLinkPreferencePage" >- name="CommentLink"> >+ class="org.eclipse.papyrus.uml.diagram.pkg.preferences.AbstractionPreferencePage" >+ id="org.eclipse.papyrus.uml.diagram.pkg.preferences.AbstractionPreferencePage" >+ name="Abstraction"> > </page> > > > > </extension> >+<extension >+ id="ep-provider" >+ point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders"> >+ <editpartProvider >+ class="org.eclipse.papyrus.uml.diagram.pkg.provider.CPackageEditPartProvider"> >+ <Priority >+ name="High"> >+ </Priority> >+ <object >+ class="org.eclipse.gmf.runtime.notation.Diagram" >+ id="generated-diagram"> >+ <method >+ name="getType()" >+ value="Package"> >+ </method> >+ </object> >+ <object >+ class="org.eclipse.gmf.runtime.notation.Node" >+ id="generated-nodes"> >+ <method >+ name="getType()" >+ value="2014,2013,2015,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2016,3002,3003,3004,3015,3031,3016,3005,3006,3007,3008,3020,3021,3022,3023,3024,3025,3017,3009,3010,3011,3012,3013,3014,3026,3027,3018,3019,3028,3029,3030"> >+ </method> >+ </object> >+ <object >+ class="org.eclipse.gmf.runtime.notation.Edge" >+ id="generated-links"> >+ <method >+ name="getType()" >+ value="4016,4017,4001,4019,4002,4003,4004,4005,4006,4007,4008,4018,4009,4010,4011,4012,4013,4014,4015,4020,4021"> >+ </method> >+ </object> >+ <object >+ class="org.eclipse.gmf.runtime.notation.Node" >+ id="generated-labels"> >+ <method >+ name="getType()" >+ value="5066,5002,5005,5008,5011,5020,5023,5026,5029,5032,5035,5037,5038,0,5040,5043,5046,5049,5052,5055,5017,5014,5058,5061,5063,5064"> >+ </method> >+ </object> >+ <object >+ class="org.eclipse.gmf.runtime.notation.Node" >+ id="generated-compartments"> >+ <method >+ name="getType()" >+ value="7034,7001,7002,7003,7004,7014,7005,7006,7007,7008,7009,7023,7024,7025,7026,7027,7028,7029,7030,7031,7010,7011,7012,7013,7032,7033,7015,7016,7017,7018,7019,7020,7021,7035"> >+ </method> >+ </object> >+ <context >+ views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"> >+ </context> >+ </editpartProvider> >+</extension> > > <!-- // Start of user code custom extensions > --> >Index: model/UML.Package.idgen >=================================================================== >--- model/UML.Package.idgen (revision 10517) >+++ model/UML.Package.idgen (working copy) >@@ -8,10 +8,10 @@ > </diagramEditPart> > <inheritedDiagrams name="ClassDiagram" viewProviderClassQualifiedName="" editPartProviderClassQualifiedName="" dndEditPolicyClassQualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"> > <genInheritedEditor href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#PapyrusUMLClassDiagram"/> >- <genNodes> >+ <genNodes customPreferencePage="org.eclipse.papyrus.uml.diagram.pkg.CustomPackagePreferencePage"> > <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.9"/> > </genNodes> >- <genNodes generatePreferencePage="false" generateTool="false"> >+ <genNodes customPreferencePage="org.eclipse.papyrus.uml.diagram.pkg.CustomPackagePreferencePage" generatePreferencePage="false" generateTool="false"> > <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.31"/> > </genNodes> > <genNodes name=""> >@@ -20,15 +20,27 @@ > <genNodes generatePreferencePage="false" generateTool="false"> > <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.36"/> > </genNodes> >+ <genNodes> >+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.14"/> >+ </genNodes> >+ <genNodes generatePreferencePage="false" generateTool="false"> >+ <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.37"/> >+ </genNodes> >+ <genNodes customPreferencePage="org.eclipse.papyrus.uml.diagram.pkg.CustomModelPreferencePage"> >+ <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.7"/> >+ </genNodes> > <genLinks> > <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.10"/> > </genLinks> > <genLinks> > <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.13"/> > </genLinks> >- <genLinks name="CommentLink"> >+ <genLinks name="CommentLink" customPreferencePage="" generatePreferencePage="false" generateTool="false"> > <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.16"/> > </genLinks> >+ <genLinks> >+ <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.8"/> >+ </genLinks> > </inheritedDiagrams> > <customJavaClasses customEditPolicyProvider="org.eclipse.papyrus.uml.diagram.pkg.provider.CustomEditPolicyProvider"/> > </idgen:Diagram> >Index: palettes/package.palette.gen.xml >=================================================================== >--- palettes/package.palette.gen.xml (revision 10517) >+++ palettes/package.palette.gen.xml (working copy) >@@ -7,11 +7,17 @@ > <aspectTool description="Create a new Comment" id="package.tool.comment" > name="Comment" refToolId="clazz.tool.comment"> > </aspectTool> >+ <aspectTool description="Create a new Constraint" id="package.tool.constraint" >+ name="Constraint" refToolId="clazz.tool.constraint"> >+ </aspectTool> >+ <aspectTool description="Create a new Model" id="package.tool.model" >+ name="Model" refToolId="clazz.tool.model"> >+ </aspectTool> > <aspectTool description="Create a new Package" id="package.tool.package" > name="Package" refToolId="clazz.tool.package"> > </aspectTool> >- <aspectTool description="Create a new CommentLink" id="package.tool.commentlink" >- name="CommentLink" refToolId="clazz.tool.link"> >+ <aspectTool description="Create a new Abstraction" id="package.tool.abstraction" >+ name="Abstraction" refToolId="clazz.tool.abstraction"> > </aspectTool> > <aspectTool description="Create a new Dependency" id="package.tool.dependency" > name="Dependency" refToolId="clazz.tool.dependency"> >Index: palettes/package.palette.xml >=================================================================== >--- palettes/package.palette.xml (revision 10517) >+++ palettes/package.palette.xml (working copy) >@@ -1,14 +1,23 @@ > <?xml version="1.0" encoding="UTF-8" standalone="no"?> > <paletteDefinition> > <content> >- <drawer >+ <drawer > iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif" > id="org.eclipse.papyrus.uml.diagram.pkg.UML_Package__Tools" name="Tools"> >+ <aspectTool description="Create a new Comment" id="package.tool.comment" >+ name="Comment" refToolId="clazz.tool.comment"> >+ </aspectTool> >+ <aspectTool description="Create a new Constraint" id="package.tool.constraint" >+ name="Constraint" refToolId="clazz.tool.constraint"> >+ </aspectTool> >+ <aspectTool description="Create a new Model" id="package.tool.model" >+ name="Model" refToolId="clazz.tool.model"> >+ </aspectTool> > <aspectTool description="Create a new Package" id="package.tool.package" > name="Package" refToolId="clazz.tool.package"> > </aspectTool> >- <aspectTool description="Create a new Comment" id="package.tool.comment" >- name="Comment" refToolId="clazz.tool.comment"> >+ <aspectTool description="Create a new Abstraction" id="package.tool.abstraction" >+ name="Abstraction" refToolId="clazz.tool.abstraction"> > </aspectTool> > <aspectTool description="Create a new Dependency" id="package.tool.dependency" > name="Dependency" refToolId="clazz.tool.dependency"> >@@ -16,10 +25,13 @@ > <aspectTool description="Create a new PackageImport" id="package.tool.packageimport" > name="PackageImport" refToolId="clazz.tool.packageimport"> > </aspectTool> >- <aspectTool description="Create a new CommentLink" id="package.tool.commentlink" >- name="CommentLink" refToolId="clazz.tool.link"> >+ >+ <!-- Attention : The element is added manually, can combine the two links comment and constraint, and therefore is not deleted --> >+ <aspectTool description="Create a new Link" id="package.tool.link" >+ name="Link" refToolId="clazz.tool.link"> > </aspectTool> > > </drawer> >+ > </content> > </paletteDefinition> >Index: src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/AbstractionPreferencePage.java >=================================================================== >--- src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/AbstractionPreferencePage.java (revision 0) >+++ src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/AbstractionPreferencePage.java (working copy) >@@ -0,0 +1,75 @@ >+/***************************************************************************** >+ * Copyright (c) 2011 CEA LIST. >+ * >+ * 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: >+ * >+ * CEA LIST - Initial API and implementation >+ * >+ *****************************************************************************/ >+package org.eclipse.papyrus.uml.diagram.pkg.preferences; >+ >+import java.util.Collections; >+import java.util.LinkedHashMap; >+import java.util.Map; >+ >+import org.eclipse.jface.preference.IPreferenceStore; >+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper; >+import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes; >+ >+public class AbstractionPreferencePage extends PackageDiagramLinkPreferencePage { >+ >+ /** Constant key to access preferences */ >+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Abstraction"; //$NON-NLS-1$ >+ >+ /** The compartments default visibility for preferences */ >+ public static final Map<String, Boolean> labelDefaultVisibilityMap; >+ >+ /** Static attribute initialization */ >+ static { >+ labelDefaultVisibilityMap = new LinkedHashMap<String, Boolean>(); >+ labelDefaultVisibilityMap.put("Name", Boolean.TRUE); //$NON-NLS-1$ >+ labelDefaultVisibilityMap.put("Stereotype", Boolean.TRUE); //$NON-NLS-1$ >+ >+ // Start of user code custom static initializations >+ // End of user code >+ >+ Collections.unmodifiableMap(labelDefaultVisibilityMap); >+ } >+ >+ /** Default constructor */ >+ public AbstractionPreferencePage() { >+ super(); >+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Abstraction"); //$NON-NLS-1$ >+ } >+ >+ /** >+ * Initialize defaults using a specified {@link IPreferenceStore} >+ * >+ * @param store >+ * the preference store. >+ */ >+ public static void initDefaults(IPreferenceStore store) { >+ // Start of user code custom default initializations >+ // End of user code >+ >+ for(String labelName : labelDefaultVisibilityMap.keySet()) { >+ String showLabelKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, labelName, PreferenceConstantHelper.LABEL_VISIBILITY); >+ store.setDefault(showLabelKey, labelDefaultVisibilityMap.get(labelName)); >+ } >+ } >+ >+ /** >+ * {@inheritDoc} >+ */ >+ @Override >+ protected void initializeLabelsList() { >+ for(String name : labelDefaultVisibilityMap.keySet()) { >+ this.labelsList.add(name); >+ } >+ } >+} >Index: src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintConstrainedElementPreferencePage.java >=================================================================== >--- src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintConstrainedElementPreferencePage.java (revision 0) >+++ src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintConstrainedElementPreferencePage.java (working copy) >@@ -0,0 +1,42 @@ >+/***************************************************************************** >+ * Copyright (c) 2011 CEA LIST. >+ * >+ * 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: >+ * >+ * CEA LIST - Initial API and implementation >+ * >+ *****************************************************************************/ >+package org.eclipse.papyrus.uml.diagram.pkg.preferences; >+ >+import org.eclipse.jface.preference.IPreferenceStore; >+import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes; >+ >+public class ConstraintConstrainedElementPreferencePage extends PackageDiagramLinkPreferencePage { >+ >+ /** Constant key to access preferences */ >+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_ConstraintConstrainedElement"; //$NON-NLS-1$ >+ >+ /** Default constructor */ >+ public ConstraintConstrainedElementPreferencePage() { >+ super(); >+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_ConstraintConstrainedElement"); //$NON-NLS-1$ >+ } >+ >+ /** >+ * Initialize defaults using a specified {@link IPreferenceStore} >+ * >+ * @param store >+ * the preference store. >+ */ >+ public static void initDefaults(IPreferenceStore store) { >+ // Start of user code custom default initializations >+ // End of user code >+ >+ } >+ >+} >Index: src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintPreferencePage.java >=================================================================== >--- src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintPreferencePage.java (revision 0) >+++ src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintPreferencePage.java (working copy) >@@ -0,0 +1,42 @@ >+/***************************************************************************** >+ * Copyright (c) 2011 CEA LIST. >+ * >+ * 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: >+ * >+ * CEA LIST - Initial API and implementation >+ * >+ *****************************************************************************/ >+package org.eclipse.papyrus.uml.diagram.pkg.preferences; >+ >+import org.eclipse.jface.preference.IPreferenceStore; >+import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes; >+ >+public class ConstraintPreferencePage extends PackageDiagramNodePreferencePage { >+ >+ /** Constant key to access preferences */ >+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Constraint"; //$NON-NLS-1$ >+ >+ /** Default constructor */ >+ public ConstraintPreferencePage() { >+ super(); >+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Constraint"); //$NON-NLS-1$ >+ } >+ >+ /** >+ * Initialize defaults using a specified {@link IPreferenceStore} >+ * >+ * @param store >+ * the preference store. >+ */ >+ public static void initDefaults(IPreferenceStore store) { >+ // Start of user code custom default initializations >+ // End of user code >+ >+ } >+ >+} >Index: src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ModelPreferencePage.java >=================================================================== >--- src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ModelPreferencePage.java (revision 0) >+++ src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ModelPreferencePage.java (working copy) >@@ -0,0 +1,101 @@ >+/***************************************************************************** >+ * Copyright (c) 2011 CEA LIST. >+ * >+ * 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: >+ * >+ * CEA LIST - Initial API and implementation >+ * >+ *****************************************************************************/ >+package org.eclipse.papyrus.uml.diagram.pkg.preferences; >+ >+import java.util.Collections; >+import java.util.LinkedHashMap; >+import java.util.Map; >+ >+import org.eclipse.jface.preference.IPreferenceStore; >+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper; >+import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes; >+ >+public class ModelPreferencePage extends PackageDiagramNodePreferencePage { >+ >+ /** Constant key to access preferences */ >+ protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Model"; //$NON-NLS-1$ >+ >+ /** The compartments default visibility for preferences */ >+ public static final Map<String, Boolean> compartmentDefaultVisibilityMap; >+ >+ /** The compartment titles default visibility for preferences */ >+ public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap; >+ >+ /** Static attribute initialization */ >+ static { >+ compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>(); >+ compartmentDefaultVisibilityMap.put("PackageableElementCompartment", Boolean.TRUE); //$NON-NLS-1$ >+ >+ compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>(); >+ compartmentTitleDefaultVisibilityMap.put("PackageableElementCompartment", Boolean.TRUE); //$NON-NLS-1$ >+ >+ // Start of user code custom static initializations >+ // End of user code >+ >+ Collections.unmodifiableMap(compartmentDefaultVisibilityMap); >+ Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap); >+ } >+ >+ /** Default constructor */ >+ public ModelPreferencePage() { >+ super(); >+ setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Model"); //$NON-NLS-1$ >+ } >+ >+ /** >+ * Initialize defaults using a specified {@link IPreferenceStore} >+ * >+ * @param store >+ * the preference store. >+ */ >+ public static void initDefaults(IPreferenceStore store) { >+ // Start of user code custom default initializations >+ // End of user code >+ >+ store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 200); >+ store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100); >+ // Initialize default visibility for compartments in preference page. >+ for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) { >+ String showCompartmentKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_VISIBILITY); >+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName)); >+ } >+ >+ // Initialize default title visibility for compartments in preference page. >+ for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) { >+ String showCompartmentTitleKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_NAME_VISIBILITY); >+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName)); >+ } >+ } >+ >+ /** >+ * {@inheritDoc} >+ */ >+ @Override >+ protected void initializeCompartmentNamesList() { >+ for(String name : compartmentDefaultVisibilityMap.keySet()) { >+ this.compartmentNamesList.add(name); >+ } >+ } >+ >+ /** >+ * {@inheritDoc} >+ */ >+ @Override >+ protected void initializeCompartmentTitlesList() { >+ for(String name : compartmentTitleDefaultVisibilityMap.keySet()) { >+ this.compartmentTitlesList.add(name); >+ } >+ } >+ >+} >Index: src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramPreferenceInitializer.java >=================================================================== >--- src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramPreferenceInitializer.java (revision 10517) >+++ src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramPreferenceInitializer.java (working copy) >@@ -27,10 +27,12 @@ > public void initializeDefaultPreferences() { > IPreferenceStore store = getPreferenceStore(); > >- org.eclipse.papyrus.uml.diagram.pkg.preferences.PackagePreferencePage.initDefaults(store); >+ org.eclipse.papyrus.uml.diagram.pkg.CustomPackagePreferencePage.initDefaults(store); > org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentPreferencePage.initDefaults(store); >+ org.eclipse.papyrus.uml.diagram.pkg.preferences.ConstraintPreferencePage.initDefaults(store); >+ org.eclipse.papyrus.uml.diagram.pkg.CustomModelPreferencePage.initDefaults(store); > org.eclipse.papyrus.uml.diagram.pkg.preferences.DependencyPreferencePage.initDefaults(store); > org.eclipse.papyrus.uml.diagram.pkg.preferences.PackageImportPreferencePage.initDefaults(store); >- org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentLinkPreferencePage.initDefaults(store); >+ org.eclipse.papyrus.uml.diagram.pkg.preferences.AbstractionPreferencePage.initDefaults(store); > } > } >Index: src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/ElementTypes.java >=================================================================== >--- src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/ElementTypes.java (revision 10517) >+++ src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/ElementTypes.java (working copy) >@@ -53,6 +53,27 @@ > > public static final String COMMENT_CN_LABEL_BODY_HINT = "5063"; //$NON-NLS-1$ > >+ /** ClassDiagram :: CONSTRAINT */ >+ public static final IHintedType CONSTRAINT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Constraint_2011"); //$NON-NLS-1$ >+ >+ public static final String CONSTRAINT_LABEL_NAME_HINT = "5037"; //$NON-NLS-1$ >+ >+ public static final String CONSTRAINT_LABEL_BODY_HINT = "5159"; //$NON-NLS-1$ >+ >+ /** ClassDiagram :: CONSTRAINT_CN */ >+ public static final IHintedType CONSTRAINT_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Constraint_3029"); //$NON-NLS-1$ >+ >+ public static final String CONSTRAINT_CN_LABEL_NAME_HINT = "5064"; //$NON-NLS-1$ >+ >+ public static final String CONSTRAINT_CN_LABEL_BODY_HINT = "5160"; //$NON-NLS-1$ >+ >+ /** ClassDiagram :: MODEL */ >+ public static final IHintedType MODEL = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Model_2005"); //$NON-NLS-1$ >+ >+ public static final String MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = "7009"; //$NON-NLS-1$ >+ >+ public static final String MODEL_LABEL_NAME_TN_HINT = "5020"; //$NON-NLS-1$ >+ > /** ClassDiagram :: DEPENDENCY */ > public static final IHintedType DEPENDENCY = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Dependency_4008"); //$NON-NLS-1$ > >@@ -68,4 +89,11 @@ > /** ClassDiagram :: COMMENT_ANNOTATED_ELEMENT */ > public static final IHintedType COMMENT_ANNOTATED_ELEMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.CommentAnnotatedElement_4013"); //$NON-NLS-1$ > >+ /** ClassDiagram :: ABSTRACTION */ >+ public static final IHintedType ABSTRACTION = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Abstraction_4006"); //$NON-NLS-1$ >+ >+ public static final String ABSTRACTION_LABEL_NAME_HINT = "6014"; //$NON-NLS-1$ >+ >+ public static final String ABSTRACTION_LABEL_APPLIED_STEREOTYPE_HINT = "6015"; //$NON-NLS-1$ >+ > } >Index: src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/GraphicalTypeRegistry.java >=================================================================== >--- src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/GraphicalTypeRegistry.java (revision 10517) >+++ src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/GraphicalTypeRegistry.java (working copy) >@@ -41,6 +41,7 @@ > // Fill known edges set > knownEdges.add(ElementTypes.DEPENDENCY.getSemanticHint()); > knownEdges.add(ElementTypes.PACKAGE_IMPORT.getSemanticHint()); >+ knownEdges.add(ElementTypes.ABSTRACTION.getSemanticHint()); > knownEdges.add(ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint()); > > // Fill known nodes set (primary nodes) >@@ -48,6 +49,9 @@ > knownNodes.add(ElementTypes.PACKAGE_CN.getSemanticHint()); > knownNodes.add(ElementTypes.COMMENT.getSemanticHint()); > knownNodes.add(ElementTypes.COMMENT_CN.getSemanticHint()); >+ knownNodes.add(ElementTypes.CONSTRAINT.getSemanticHint()); >+ knownNodes.add(ElementTypes.CONSTRAINT_CN.getSemanticHint()); >+ knownNodes.add(ElementTypes.MODEL.getSemanticHint()); > > // Fill known nodes set (child label nodes) > } >@@ -67,6 +71,9 @@ > if(domainElement instanceof org.eclipse.uml2.uml.PackageImport) { > graphicalType = ElementTypes.PACKAGE_IMPORT.getSemanticHint(); > } >+ if(domainElement instanceof org.eclipse.uml2.uml.Abstraction) { >+ graphicalType = ElementTypes.ABSTRACTION.getSemanticHint(); >+ } > return graphicalType; > } > >@@ -110,6 +117,9 @@ > if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Package ChildNode > graphicalType = ElementTypes.PACKAGE_CN.getSemanticHint(); > } >+ if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Package ChildNode >+ graphicalType = ElementTypes.PACKAGE_CN.getSemanticHint(); >+ } > if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Package ChildNode > graphicalType = ElementTypes.PACKAGE_CN.getSemanticHint(); > } >@@ -123,12 +133,38 @@ > if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Comment ChildNode > graphicalType = ElementTypes.COMMENT_CN.getSemanticHint(); > } >+ if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Comment ChildNode >+ graphicalType = ElementTypes.COMMENT_CN.getSemanticHint(); >+ } > if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Comment ChildNode > graphicalType = ElementTypes.COMMENT_CN.getSemanticHint(); > } > > } > >+ if(domainElement instanceof org.eclipse.uml2.uml.Constraint) { >+ if(ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode >+ graphicalType = ElementTypes.CONSTRAINT.getSemanticHint(); >+ } >+ if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode >+ graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint(); >+ } >+ if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode >+ graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint(); >+ } >+ if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode >+ graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint(); >+ } >+ >+ } >+ >+ if(domainElement instanceof org.eclipse.uml2.uml.Model) { >+ if(ElementTypes.DIAGRAM_ID.equals(containerType)) { // Model TopNode >+ graphicalType = ElementTypes.MODEL.getSemanticHint(); >+ } >+ >+ } >+ > return graphicalType; > } > >Index: src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramEditPartProvider.java >=================================================================== >--- src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramEditPartProvider.java (revision 10517) >+++ src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramEditPartProvider.java (working copy) >@@ -42,6 +42,12 @@ > if(eobject instanceof org.eclipse.uml2.uml.Comment) { > return true; > } >+ if(eobject instanceof org.eclipse.uml2.uml.Constraint) { >+ return true; >+ } >+ if(eobject instanceof org.eclipse.uml2.uml.Model) { >+ return true; >+ } > > /** Edges *********** */ > if(eobject instanceof org.eclipse.uml2.uml.Dependency) { >@@ -50,6 +56,9 @@ > if(eobject instanceof org.eclipse.uml2.uml.PackageImport) { > return true; > } >+ if(eobject instanceof org.eclipse.uml2.uml.Abstraction) { >+ return true; >+ } > > // Additional test needed here to decide whether to support Feature type links. > // As feature type link are not related to a MetaClass from the domain model >Index: src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramViewProvider.java >=================================================================== >--- src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramViewProvider.java (revision 10517) >+++ src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramViewProvider.java (working copy) >@@ -62,6 +62,9 @@ > if(ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(domainElementGraphicalType)) { > createdEdge = createCommentAnnotatedElement_4013(containerView, index, persisted, preferencesHint); > } >+ if(ElementTypes.ABSTRACTION.getSemanticHint().equals(domainElementGraphicalType)) { >+ createdEdge = createAbstraction_4006(domainElement, containerView, index, persisted, preferencesHint); >+ } > } > } > >@@ -108,6 +111,9 @@ > if(elementType == ElementTypes.COMMENT_ANNOTATED_ELEMENT) { > return true; > } >+ if(elementType == ElementTypes.ABSTRACTION) { >+ return true; >+ } > > // ///////////////////////////////////////////////////////////////////// > // Test possibility to provide a view based on the semantic nature and its expected container. >@@ -156,12 +162,15 @@ > } > } > if(elementType == ElementTypes.PACKAGE_CN) { >- // node: org.eclipse.gmf.codegen.gmfgen.impl.GenChildNodeImpl@339c674e (visualID: 3009, editPartClassName: PackageEditPartCN, itemSemanticEditPolicyClassName: PackageItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackageCanonicalEditPolicyCN) (primaryDragEditPolicyQualifiedClassName: null, graphicalNodeEditPolicyClassName: PackageGraphicalNodeEditPolicyCN, createCommandClassName: PackageCreateCommandCN) >- // containers: org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@47a2da98 (visualID: 7010, editPartClassName: PackagePackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@3cb4c75f (visualID: 7009, editPartClassName: ModelPackageableElementCompartmentEditPartTN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyTN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyTN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@8d4d1c (visualID: 7030, editPartClassName: ModelPackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@1f236dde (visualID: 7016, editPartClassName: PackagePackageableElementCompartmentEditPart, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicy, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicy) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false) >- // nodeRef: org.eclipse.papyrus.generation.diagram.idgen.impl.GenNodeRefImpl@5a9760a3 (name: null) (customPreferencePage: null, generatePreferencePage: false, generateTool: false) >+ // node: org.eclipse.gmf.codegen.gmfgen.impl.GenChildNodeImpl@56c24e1c (visualID: 3009, editPartClassName: PackageEditPartCN, itemSemanticEditPolicyClassName: PackageItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackageCanonicalEditPolicyCN) (primaryDragEditPolicyQualifiedClassName: null, graphicalNodeEditPolicyClassName: PackageGraphicalNodeEditPolicyCN, createCommandClassName: PackageCreateCommandCN) >+ // containers: org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@496f5eed (visualID: 7010, editPartClassName: PackagePackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@58b333c7 (visualID: 7009, editPartClassName: ModelPackageableElementCompartmentEditPartTN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyTN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyTN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@61d4e023 (visualID: 7030, editPartClassName: ModelPackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@79dbfb56 (visualID: 7016, editPartClassName: PackagePackageableElementCompartmentEditPart, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicy, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicy) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false) >+ // nodeRef: org.eclipse.papyrus.generation.diagram.idgen.impl.GenNodeRefImpl@514d41b8 (name: null) (customPreferencePage: org.eclipse.papyrus.uml.diagram.pkg.CustomPackagePreferencePage, generatePreferencePage: false, generateTool: false) > if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { > return true; > } >+ if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { >+ return true; >+ } > if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { > return true; > } >@@ -172,16 +181,43 @@ > } > } > if(elementType == ElementTypes.COMMENT_CN) { >- // node: org.eclipse.gmf.codegen.gmfgen.impl.GenChildNodeImpl@14a1b15 (visualID: 3028, editPartClassName: CommentEditPartCN, itemSemanticEditPolicyClassName: CommentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: CommentCanonicalEditPolicyCN) (primaryDragEditPolicyQualifiedClassName: null, graphicalNodeEditPolicyClassName: CommentGraphicalNodeEditPolicyCN, createCommandClassName: CommentCreateCommandCN) >- // containers: org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@47a2da98 (visualID: 7010, editPartClassName: PackagePackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@3cb4c75f (visualID: 7009, editPartClassName: ModelPackageableElementCompartmentEditPartTN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyTN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyTN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@8d4d1c (visualID: 7030, editPartClassName: ModelPackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@1f236dde (visualID: 7016, editPartClassName: PackagePackageableElementCompartmentEditPart, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicy, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicy) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false) >- // nodeRef: org.eclipse.papyrus.generation.diagram.idgen.impl.GenNodeRefImpl@18937254 (name: null) (customPreferencePage: null, generatePreferencePage: false, generateTool: false) >+ // node: org.eclipse.gmf.codegen.gmfgen.impl.GenChildNodeImpl@35f8045c (visualID: 3028, editPartClassName: CommentEditPartCN, itemSemanticEditPolicyClassName: CommentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: CommentCanonicalEditPolicyCN) (primaryDragEditPolicyQualifiedClassName: null, graphicalNodeEditPolicyClassName: CommentGraphicalNodeEditPolicyCN, createCommandClassName: CommentCreateCommandCN) >+ // containers: org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@496f5eed (visualID: 7010, editPartClassName: PackagePackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@58b333c7 (visualID: 7009, editPartClassName: ModelPackageableElementCompartmentEditPartTN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyTN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyTN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@61d4e023 (visualID: 7030, editPartClassName: ModelPackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@79dbfb56 (visualID: 7016, editPartClassName: PackagePackageableElementCompartmentEditPart, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicy, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicy) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false) >+ // nodeRef: org.eclipse.papyrus.generation.diagram.idgen.impl.GenNodeRefImpl@5204909 (name: null) (customPreferencePage: null, generatePreferencePage: false, generateTool: false) > if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { > return true; > } >+ if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { >+ return true; >+ } > if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { > return true; > } > } >+ if(elementType == ElementTypes.CONSTRAINT) { >+ if(ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) { >+ return true; >+ } >+ } >+ if(elementType == ElementTypes.CONSTRAINT_CN) { >+ // node: org.eclipse.gmf.codegen.gmfgen.impl.GenChildNodeImpl@156cb35a (visualID: 3029, editPartClassName: ConstraintEditPartCN, itemSemanticEditPolicyClassName: ConstraintItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ConstraintCanonicalEditPolicyCN) (primaryDragEditPolicyQualifiedClassName: null, graphicalNodeEditPolicyClassName: ConstraintGraphicalNodeEditPolicyCN, createCommandClassName: ConstraintCreateCommandCN) >+ // containers: org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@496f5eed (visualID: 7010, editPartClassName: PackagePackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@58b333c7 (visualID: 7009, editPartClassName: ModelPackageableElementCompartmentEditPartTN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyTN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyTN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@61d4e023 (visualID: 7030, editPartClassName: ModelPackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@79dbfb56 (visualID: 7016, editPartClassName: PackagePackageableElementCompartmentEditPart, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicy, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicy) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false) >+ // nodeRef: org.eclipse.papyrus.generation.diagram.idgen.impl.GenNodeRefImpl@422368f0 (name: null) (customPreferencePage: null, generatePreferencePage: false, generateTool: false) >+ if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { >+ return true; >+ } >+ if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { >+ return true; >+ } >+ if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { >+ return true; >+ } >+ } >+ if(elementType == ElementTypes.MODEL) { >+ if(ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) { >+ return true; >+ } >+ } > > // ///////////////////////////////////////////////////////////////////// > // Test possibility to provide a view based on the semantic nature and its expected container. >Index: src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramEditPolicyProvider.java >=================================================================== >--- src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramEditPolicyProvider.java (revision 10517) >+++ src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramEditPolicyProvider.java (working copy) >@@ -54,6 +54,18 @@ > if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN) { > return true; > } >+ if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart) { >+ return true; >+ } >+ if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN) { >+ return true; >+ } >+ if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartTN) { >+ return true; >+ } >+ if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelPackageableElementCompartmentEditPartTN) { >+ return true; >+ } > > return false; > } >Index: src/org/eclipse/papyrus/uml/diagram/pkg/CustomModelPreferencePage.java >=================================================================== >--- src/org/eclipse/papyrus/uml/diagram/pkg/CustomModelPreferencePage.java (revision 0) >+++ src/org/eclipse/papyrus/uml/diagram/pkg/CustomModelPreferencePage.java (working copy) >@@ -0,0 +1,51 @@ >+/***************************************************************************** >+ * Copyright (c) 2011 CEA LIST. >+ * >+ * 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: >+ * >+ * Nizar GUEDIDI CEA LIST - Initial API and implementation >+ * >+ *****************************************************************************/ >+package org.eclipse.papyrus.uml.diagram.pkg; >+ >+import org.eclipse.jface.preference.IPreferenceStore; >+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper; >+import org.eclipse.papyrus.uml.diagram.pkg.preferences.ModelPreferencePage; >+ >+public class CustomModelPreferencePage extends ModelPreferencePage { >+ >+ static { >+ compartmentTitleDefaultVisibilityMap.put("PackageableElementCompartment", Boolean.FALSE); //$NON-NLS-1$ >+ } >+ >+ /** >+ * Initialize defaults using a specified {@link IPreferenceStore} >+ * >+ * @param store >+ * the preference store. >+ */ >+ public static void initDefaults(IPreferenceStore store) { >+ // Start of user code custom default initializations >+ // End of user code >+ >+ store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 200); >+ store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100); >+ // Initialize default visibility for compartments in preference page. >+ for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) { >+ String showCompartmentKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_VISIBILITY); >+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName)); >+ } >+ >+ // Initialize default title visibility for compartments in preference page. >+ for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) { >+ String showCompartmentTitleKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_NAME_VISIBILITY); >+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName)); >+ } >+ } >+ >+} >Index: src/org/eclipse/papyrus/uml/diagram/pkg/CustomPackagePreferencePage.java >=================================================================== >--- src/org/eclipse/papyrus/uml/diagram/pkg/CustomPackagePreferencePage.java (revision 0) >+++ src/org/eclipse/papyrus/uml/diagram/pkg/CustomPackagePreferencePage.java (working copy) >@@ -0,0 +1,51 @@ >+/***************************************************************************** >+ * Copyright (c) 2011 CEA LIST. >+ * >+ * 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: >+ * >+ * Nizar GUEDIDI CEA LIST - Initial API and implementation >+ * >+ *****************************************************************************/ >+package org.eclipse.papyrus.uml.diagram.pkg; >+ >+import org.eclipse.jface.preference.IPreferenceStore; >+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper; >+import org.eclipse.papyrus.uml.diagram.pkg.preferences.PackagePreferencePage; >+ >+public class CustomPackagePreferencePage extends PackagePreferencePage { >+ >+ static { >+ compartmentTitleDefaultVisibilityMap.put("PackageableElementCompartment", Boolean.FALSE); //$NON-NLS-1$ >+ } >+ >+ /** >+ * Initialize defaults using a specified {@link IPreferenceStore} >+ * >+ * @param store >+ * the preference store. >+ */ >+ public static void initDefaults(IPreferenceStore store) { >+ // Start of user code custom default initializations >+ // End of user code >+ >+ store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 200); >+ store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100); >+ // Initialize default visibility for compartments in preference page. >+ for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) { >+ String showCompartmentKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_VISIBILITY); >+ store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName)); >+ } >+ >+ // Initialize default title visibility for compartments in preference page. >+ for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) { >+ String showCompartmentTitleKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_NAME_VISIBILITY); >+ store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName)); >+ } >+ } >+ >+} >Index: src/org/eclipse/papyrus/uml/diagram/pkg/provider/CPackageEditPartProvider.java >=================================================================== >--- src/org/eclipse/papyrus/uml/diagram/pkg/provider/CPackageEditPartProvider.java (revision 0) >+++ src/org/eclipse/papyrus/uml/diagram/pkg/provider/CPackageEditPartProvider.java (working copy) >@@ -0,0 +1,47 @@ >+/***************************************************************************** >+ * Copyright (c) 2013 CEA LIST. >+ * >+ * 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: >+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation >+ *****************************************************************************/ >+package org.eclipse.papyrus.uml.diagram.pkg.provider; >+ >+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.CreateGraphicEditPartOperation; >+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation; >+import org.eclipse.gmf.runtime.notation.View; >+import org.eclipse.papyrus.uml.diagram.clazz.custom.providers.CUMLEditPartProvider; >+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry; >+ >+/** >+ * Reuse the Custom EditPartProvider from the Class Diagram >+ * >+ * @author Camille Letavernier >+ */ >+public class CPackageEditPartProvider extends CUMLEditPartProvider { >+ >+ @Override >+ public synchronized boolean provides(IOperation operation) { >+ super.provides(operation); >+ if(operation instanceof CreateGraphicEditPartOperation) { >+ View view = ((IEditPartOperation)operation).getView(); >+ if(!ElementTypes.DIAGRAM_ID.equals(UMLVisualIDRegistry.getModelID(view))) { >+ return false; >+ } >+ if(isAllowCaching() && getCachedPart(view) != null) { >+ return true; >+ } >+ IGraphicalEditPart part = createEditPart(view); >+ if(part != null) { >+ return true; >+ } >+ } >+ return false; >+ } >+}
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
Flags:
rschnekenburger
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 402895
: 228339