Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCéline Janssens2014-09-23 12:00:00 +0000
committerCéline Janssens2014-09-25 14:10:05 +0000
commitae5529b97d58d304e1b2b6a1f88dfbb4e4be6366 (patch)
tree870f314b0517d0a5cff196516bb21a77d4b990ae /plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src
parent3d8a37d4c55ba794588e8f17d5abc89aa9a8fcb4 (diff)
downloadorg.eclipse.papyrus-ae5529b97d58d304e1b2b6a1f88dfbb4e4be6366.tar.gz
org.eclipse.papyrus-ae5529b97d58d304e1b2b6a1f88dfbb4e4be6366.tar.xz
org.eclipse.papyrus-ae5529b97d58d304e1b2b6a1f88dfbb4e4be6366.zip
440230: [All Diagrams] Add Margins to the Labels
https://bugs.eclipse.org/bugs/show_bug.cgi?id=440230 - Generation of Component Diagram in order to make the PortNameEditPart a PapyrusWrappingLabel instead of WrappingLabel - Application of new Formatter and Clean up of Component Diagram sources - Change default value of Margin to 0 pixel - Switch horizontal/vertical to be aligned with the margin direction - add NON-NLS tag - fix some Cast Exception Change-Id: I6e222e5d8eb39ca5525e6747e7c0b18bd1089302 Signed-off-by: Céline Janssens <Celine.Janssens@all4tec.net>
Diffstat (limited to 'plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElement.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElement.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElement.java
index 3c91af3e1f9..df00838d2fb 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElement.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSModelElement.java
@@ -8,7 +8,7 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- * Mickaël Adam (ALL4TEC) mickael.adam@all4tec.net - bug 429642
+ * Micka�l Adam (ALL4TEC) mickael.adam@all4tec.net - bug 429642
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement;
@@ -70,7 +70,9 @@ public class CSSModelElement extends CustomStyleModelElement {
@Override
public IObservable doGetObservable(String propertyPath) {
if (CSSStyles.CSS_DIAGRAM_STYLESHEETS_KEY.equals(propertyPath)) {
- return new DiagramStyleSheetObservableList((View) source, domain, propertyPath);
+ if (source instanceof View){
+ return new DiagramStyleSheetObservableList((View) source, domain, propertyPath);
+ }
}
if (CSSStyles.CSS_MODEL_STYLESHEETS_KEY.equals(propertyPath)) {
// Get the resource
@@ -96,9 +98,12 @@ public class CSSModelElement extends CustomStyleModelElement {
Activator.log.error(e);
}
// Initialize the adapter of the engine to listen model styleSheet
- ExtendedCSSEngine engine = ((CSSNotationResource) notationResource).getModelEngine();
- if (engine instanceof ModelCSSEngine) {
- ((ModelCSSEngine) engine).initAdapter();
+ if (notationResource instanceof CSSNotationResource ){
+ ExtendedCSSEngine engine = ((CSSNotationResource) notationResource).getModelEngine();
+
+ if (engine instanceof ModelCSSEngine) {
+ ((ModelCSSEngine) engine).initAdapter();
+ }
}
}
return new ModelStyleSheetObservableList(notationResource, modelStyleSheetsSource.getStylesheets(), domain, modelStyleSheetsSource, StylesheetsPackage.Literals.MODEL_STYLE_SHEETS__STYLESHEETS);

Back to the top