Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPart.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPart.java80
1 files changed, 35 insertions, 45 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPart.java
index cc344fb83e4..d6ccbd21bd8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPart.java
@@ -1,13 +1,13 @@
/**
* Copyright (c) 2014 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
+ *
+ * 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.clazz.edit.parts;
@@ -94,7 +94,6 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
/**
* @generated
*/
- @Override
protected void createDefaultEditPolicies() {
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
super.createDefaultEditPolicies();
@@ -108,13 +107,10 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
- new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY,
- new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY,
- new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
@@ -167,12 +163,12 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
return lep;
}
+
/**
* Papyrus codeGen
- *
+ *
* @generated
**/
- @Override
protected void handleNotificationEvent(Notification event) {
/*
* when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
@@ -181,7 +177,8 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
Object notifier = event.getNotifier();
List<?> modelChildren = ((View) getModel()).getChildren();
- if (false == notifier instanceof Edge && false == notifier instanceof BasicCompartment) {
+ if (false == notifier instanceof Edge
+ && false == notifier instanceof BasicCompartment) {
if (modelChildren.contains(event.getNotifier())) {
return;
}
@@ -191,10 +188,10 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
}
+
/**
* @generated
*/
- @Override
protected IFigure createNodeShape() {
return primaryShape = new PrimitiveTypeFigure();
}
@@ -204,7 +201,6 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
*
* @generated
*/
- @Override
public PrimitiveTypeFigure getPrimaryShape() {
return (PrimitiveTypeFigure) primaryShape;
}
@@ -218,6 +214,7 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
return true;
}
+
if (childEditPart instanceof PrimitiveTypeAttributeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
@@ -232,14 +229,16 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
return true;
}
+
+
// Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
- getBorderedFigure().getBorderItemContainer()
- .add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
+ getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
return true;
}
+
return false;
}
@@ -261,8 +260,7 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
return true;
}
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
- getBorderedFigure().getBorderItemContainer()
- .remove(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure());
+ getBorderedFigure().getBorderItemContainer().remove(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure());
return true;
}
return false;
@@ -271,7 +269,6 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
/**
* @generated
*/
- @Override
protected void addChildVisual(EditPart childEditPart, int index) {
if (addFixedChild(childEditPart)) {
return;
@@ -282,7 +279,6 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
/**
* @generated
*/
- @Override
protected void removeChildVisual(EditPart childEditPart) {
if (removeFixedChild(childEditPart)) {
return;
@@ -293,7 +289,6 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
/**
* @generated
*/
- @Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
if (editPart instanceof PrimitiveTypeAttributeCompartmentEditPart) {
return getPrimaryShape().getAttributeCompartmentFigure();
@@ -310,7 +305,6 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
/**
* @generated
*/
- @Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
if (borderItemEditPart instanceof PrimitiveTypeFloatingNameEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
@@ -323,21 +317,20 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
/**
* @generated
*/
- @Override
protected NodeFigure createNodePlate() {
RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 50);
return result;
}
+
/**
* Creates figure for this edit part.
- *
+ *
* Body of this method does not depend on settings in generation model
* so you may safely remove <i>generated</i> tag and modify it.
- *
+ *
* @generated
*/
- @Override
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
@@ -351,7 +344,6 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
* instance of generated figure class
* @generated
*/
- @Override
protected IFigure setupContentPane(IFigure nodeShape) {
if (nodeShape.getLayoutManager() == null) {
ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
@@ -364,7 +356,6 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
/**
* @generated
*/
- @Override
public IFigure getContentPane() {
if (contentPane != null) {
return contentPane;
@@ -375,17 +366,16 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
/**
* @generated
*/
- @Override
protected void setForegroundColor(Color color) {
if (primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
+
/**
* @generated
*/
- @Override
protected void setLineWidth(int width) {
super.setLineWidth(width);
}
@@ -393,7 +383,6 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
/**
* @generated
*/
- @Override
protected void setLineType(int style) {
if (primaryShape instanceof IPapyrusNodeFigure) {
((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
@@ -403,29 +392,30 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
/**
* @generated
*/
- @Override
public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPart.VISUAL_ID));
}
+
+
/**
* @generated
*/
- @Override
public EditPart getTargetEditPart(Request request) {
if (request instanceof CreateViewAndElementRequest) {
- CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request).getViewAndElementDescriptor()
- .getCreateElementRequestAdapter();
+ CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
IElementType type = (IElementType) adapter.getAdapter(IElementType.class);
if (UMLElementTypes.isKindOf(type, UMLElementTypes.Property_PrimitiveTypeAttributeLabel)) {
- return getChildBySemanticHint(
- UMLVisualIDRegistry.getType(PrimitiveTypeAttributeCompartmentEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PrimitiveTypeAttributeCompartmentEditPart.VISUAL_ID));
}
if (UMLElementTypes.isKindOf(type, UMLElementTypes.Operation_PrimitiveTypeOperationLabel)) {
- return getChildBySemanticHint(
- UMLVisualIDRegistry.getType(PrimitiveTypeOperationCompartmentEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PrimitiveTypeOperationCompartmentEditPart.VISUAL_ID));
}
}
return super.getTargetEditPart(request);
}
+
+
+
+
}

Back to the top