Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-04-03 17:03:08 +0000
committerCamille Letavernier2014-04-03 17:04:28 +0000
commit199d5323303095c78adf9a714aab73c1e5081541 (patch)
tree511131bae161ad0a9f80e4657e77edb4d98feca4 /plugins
parent122ea68d4171acac15d0445d51113976840e5a77 (diff)
parentaef55231325caccc23272c722d92263fa022f7e9 (diff)
downloadorg.eclipse.papyrus-199d5323303095c78adf9a714aab73c1e5081541.tar.gz
org.eclipse.papyrus-199d5323303095c78adf9a714aab73c1e5081541.tar.xz
org.eclipse.papyrus-199d5323303095c78adf9a714aab73c1e5081541.zip
Synchronize with master
Diffstat (limited to 'plugins')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/plugin.xml2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/command/CreateAppliedStereotypeViewCommand.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeCompartmentEditPart.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeConpartmentEditPart.java)6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCompartmentEditPolicy.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/provider/StereotypePropertiesEditPartProvider.java4
6 files changed, 18 insertions, 12 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java
index 20c2f3c77cf..5e0f438e42d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java
@@ -183,7 +183,13 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout {
bound.width = container.width;
} else {
bound.x = container.x + 3;
- bound.y = container.y + ((container.height - totalHeight) / 2);
+ // in the case where the content is grater than the container
+ // it is forbidden to change the y coordinate
+ if(((container.height - totalHeight) / 2)>0 ){
+ bound.y = container.y + ((container.height - totalHeight) / 2);}
+ else{
+ bound.y = container.y;
+ }
bound.width = container.width;
}
child.setBounds(bound);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/plugin.xml
index 8588ff9bb04..da422aeaec1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/plugin.xml
@@ -20,7 +20,7 @@
<object
class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
id="StereotypePropertiesEditPartProvider">
- <method name="getType()" value="AppliedStereotypeContainer,AppliedStereotypeProperty,AppliedStereotypesComment,AppliedStereotypesCommentLink"/>
+ <method name="getType()" value="AppliedStereotypeCompartment,AppliedStereotypeProperty,AppliedStereotypesComment,AppliedStereotypesCommentLink"/>
</object>
</editpartProvider>
</extension>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/command/CreateAppliedStereotypeViewCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/command/CreateAppliedStereotypeViewCommand.java
index ce489a3e042..170adacc280 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/command/CreateAppliedStereotypeViewCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/command/CreateAppliedStereotypeViewCommand.java
@@ -21,7 +21,7 @@ import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.NotationFactory;
import org.eclipse.gmf.runtime.notation.TitleStyle;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeConpartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeCompartmentEditPart;
/**
* the goal of this command is to create a basic compartment in the notation that represent a compartment of stereotypes
@@ -62,7 +62,7 @@ public class CreateAppliedStereotypeViewCommand extends RecordingCommand {
ts.setShowTitle(true);
compartment.getStyles().add(ts);
compartment.setElement(StereotypeApplication);
- compartment.setType(AppliedStereotypeConpartmentEditPart.ID);
+ compartment.setType(AppliedStereotypeCompartmentEditPart.ID);
ViewUtil.insertChildView(owner, compartment, ViewUtil.APPEND, false);
compartment.setMutable(true);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeConpartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeCompartmentEditPart.java
index bfdc311036c..fcf2508871a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeConpartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeCompartmentEditPart.java
@@ -38,11 +38,11 @@ import org.eclipse.uml2.uml.util.UMLUtil;
* this compartment is the an editpart associated to an applied stereotype
*/
-public class AppliedStereotypeConpartmentEditPart extends ResizeableListCompartmentEditPart {
+public class AppliedStereotypeCompartmentEditPart extends ResizeableListCompartmentEditPart {
- public static String ID = "AppliedStereotypeCompartement";
+ public static String ID = "AppliedStereotypeCompartment";
- public AppliedStereotypeConpartmentEditPart(View view) {
+ public AppliedStereotypeCompartmentEditPart(View view) {
super(view);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCompartmentEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCompartmentEditPolicy.java
index c53aa2a17fc..5aa0fb7a0bc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCompartmentEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCompartmentEditPolicy.java
@@ -35,7 +35,7 @@ import org.eclipse.papyrus.uml.diagram.common.Activator;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.command.CreateAppliedStereotypeViewCommand;
-import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeConpartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeCompartmentEditPart;
import org.eclipse.papyrus.uml.tools.listeners.PapyrusStereotypeListener;
import org.eclipse.swt.widgets.Display;
import org.eclipse.uml2.uml.Element;
@@ -299,7 +299,7 @@ public class AppliedStereotypeCompartmentEditPolicy extends AppliedStereotypeNod
});
}
// the sub nodes has the type appliedStereotypeCompartment but does not references a application of stereotype
- if((currentNode.getType().equals(AppliedStereotypeConpartmentEditPart.ID)) && (!(currentNode.getElement() instanceof DynamicEObjectImpl))) {
+ if((currentNode.getType().equals(AppliedStereotypeCompartmentEditPart.ID)) && (!(currentNode.getElement() instanceof DynamicEObjectImpl))) {
//yes, Execution of the Deletion command
editPart.getEditingDomain().runExclusive(new Runnable() {
@@ -339,7 +339,7 @@ public class AppliedStereotypeCompartmentEditPolicy extends AppliedStereotypeNod
while(i < node.getChildren().size()) {
if((node.getChildren().get(i)) instanceof Node) {
final Node currentNode = (Node)(node.getChildren().get(i));
- if(currentNode.getType().equals(AppliedStereotypeConpartmentEditPart.ID)) {
+ if(currentNode.getType().equals(AppliedStereotypeCompartmentEditPart.ID)) {
EObject stereotypeApplication = currentNode.getElement();
Stereotype stereotype = UMLUtil.getStereotype(stereotypeApplication);
if(stereotype != null && stereotypesPropertiesToDisplay.contains(stereotype.getQualifiedName())) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/provider/StereotypePropertiesEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/provider/StereotypePropertiesEditPartProvider.java
index 6ac1704eb9c..69a4c6604ff 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/provider/StereotypePropertiesEditPartProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/provider/StereotypePropertiesEditPartProvider.java
@@ -23,7 +23,7 @@ import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.providers.RestrictedAbstractEditPartProvider;
-import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeConpartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeMultilinePropertyEditPart;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypePropertyEditPart;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypesCommentEditPart;
@@ -42,7 +42,7 @@ public class StereotypePropertiesEditPartProvider extends RestrictedAbstractEdit
public StereotypePropertiesEditPartProvider() {
super();
- nodeMap.put(AppliedStereotypeConpartmentEditPart.ID, AppliedStereotypeConpartmentEditPart.class);
+ nodeMap.put(AppliedStereotypeCompartmentEditPart.ID, AppliedStereotypeCompartmentEditPart.class);
nodeMap.put(AppliedStereotypePropertyEditPart.ID, AppliedStereotypeMultilinePropertyEditPart.class);
nodeMap.put(AppliedStereotypesCommentEditPart.ID, AppliedStereotypesCommentEditPart.class);
edgeMap.put(AppliedStereotypesCommentLinkEditPart.ID, AppliedStereotypesCommentLinkEditPart.class);

Back to the top