Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2015-04-13 09:41:48 -0400
committerVincent Lorenzo2015-04-13 09:41:48 -0400
commit802efd6972dd44f9a2b29f9306b6d8c68f90e905 (patch)
tree1a6c078f53a567411348ec7794cece8ffb799fc2
parente52ebd8b2b5e1f43c8b8dea6db7f5c7c188558d4 (diff)
downloadorg.eclipse.papyrus-802efd6972dd44f9a2b29f9306b6d8c68f90e905.tar.gz
org.eclipse.papyrus-802efd6972dd44f9a2b29f9306b6d8c68f90e905.tar.xz
org.eclipse.papyrus-802efd6972dd44f9a2b29f9306b6d8c68f90e905.zip
464129: [Class Diagram] Italic font style not kept after re-opening any diagrams
-rwxr-xr-x[-rw-r--r--]plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassifierEditPart.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/theme/uml.css37
2 files changed, 52 insertions, 8 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassifierEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassifierEditPart.java
index e627fb7196e..2c752ecab26 100644..100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassifierEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassifierEditPart.java
@@ -8,7 +8,7 @@
*
* Contributors:
* Thibault Landre (Atos Origin) - Initial API and implementation
- *
+ * Vincent Lorenzo (CEA-LIST) - vincent.lorenzo@cea.fr - 464129: [Class Diagram] Italic font style not kept after re-opening any diagrams - italic is now done with CSS
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.editparts;
@@ -91,13 +91,20 @@ public abstract class ClassifierEditPart extends NamedElementEditPart {
*/
@Override
protected FontData getFontData(FontStyle style) {
- FontData data = super.getFontData(style);
- if (isAbstract) {
- data.setStyle(data.getStyle() | SWT.ITALIC); // Force the Italic flag
- } else {
- data.setStyle(data.getStyle() & ~SWT.ITALIC); // Remove the Italic flag
- }
- return data;
+ return super.getFontData(style);
+
+ //next line commented for bug 464129: [Class Diagram] Italic font style not kept after re-opening any diagrams
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=464129
+ //new implementation use CSS (umlBase.css)
+
+
+ // FontData data = super.getFontData(style);
+ // if (isAbstract) {
+ // data.setStyle(data.getStyle() | SWT.ITALIC); // Force the Italic flag
+ // } else {
+ // data.setStyle(data.getStyle() & ~SWT.ITALIC); // Remove the Italic flag
+ // }
+ // return data;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/theme/uml.css b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/theme/uml.css
index 3ff65297c8c..10e66b2a3f3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/theme/uml.css
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/theme/uml.css
@@ -11,3 +11,40 @@ InformationFlow > Label:name
{
visible: false;
}
+
+/* Display name in italic when isAbstract=true for Classifier (bug 464129)*/
+Artifact[isAbstract=true],
+DeploymentSpecification[isAbstract=true],
+Association[isAbstract=true],
+CommunicationPath[isAbstract=true],
+Extension[isAbstract=true],
+BehavioredClassifier[isAbstract=true],
+Actor[isAbstract=true],
+Usecase[isAbstract=true],
+DataType[isAbstract=true],
+Enumeration[isAbstract=true],
+PrimitiveType[isAbstract=true],
+InformationItem[isAbstract=true],
+Interface[isAbstract=true],
+Signal[isAbstract=true],
+Collaboration[isAbstract=true],
+Class[isAbstract=true],
+AssociationClass[isAbstract=true],
+Activity[isAbstract=true],
+Interaction[isAbstract=true],
+OpaqueBehavior[isAbstract=true],
+FunctionBehavior[isAbstract=true],
+StateMachine[isAbstract=true],
+ProtocolStateMachine[isAbstract=true],
+Component[isAbstract=true],
+Node[isAbstract=true],
+Device[isAbstract=true],
+ExecutionEnvironment[isAbstract=true],
+Stereotype[isAbstract=true] {
+ italic:true;
+}
+
+/* Display name in italic when isAbstract=true for BehavioralFeature (bug 464129)*/
+Operation[isAbstract=true],Reception[isAbstract=true]{
+ italic:true;
+}

Back to the top