Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/.classpath14
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/META-INF/MANIFEST.MF6
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/src/org/eclipse/papyrus/infra/gmfdiag/css/debug/views/CSSDebugView.java71
4 files changed, 54 insertions, 43 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/.classpath b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/.classpath
index 2d1a4302f04..098194ca4b7 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/.classpath
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/.classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/.settings/org.eclipse.jdt.core.prefs
index 4759947300a..9ca8e68231b 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/META-INF/MANIFEST.MF
index 3b4ce82cfd4..14940e3378a 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/META-INF/MANIFEST.MF
@@ -12,9 +12,9 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
org.eclipse.e4.ui.css.core;bundle-version="0.10.2",
org.eclipse.papyrus.infra.gmfdiag.css.configuration;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.css.xtext;bundle-version="1.1.0",
org.eclipse.gmf.runtime.draw2d.ui;bundle-version="1.7.0",
- org.eclipse.draw2d;bundle-version="3.9.0"
+ org.eclipse.draw2d;bundle-version="3.9.0",
+ org.eclipse.papyrus.infra.gmfdiag.css3.xtext;bundle-version="1.0.0"
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.1.0.qualifier
@@ -24,5 +24,5 @@ Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.debug.Activato
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.debug;singl
eton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/src/org/eclipse/papyrus/infra/gmfdiag/css/debug/views/CSSDebugView.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/src/org/eclipse/papyrus/infra/gmfdiag/css/debug/views/CSSDebugView.java
index 0005e36680f..b61b31dddba 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/src/org/eclipse/papyrus/infra/gmfdiag/css/debug/views/CSSDebugView.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.debug/src/org/eclipse/papyrus/infra/gmfdiag/css/debug/views/CSSDebugView.java
@@ -42,19 +42,19 @@ import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.papyrus.infra.emf.Activator;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.gmfdiag.css.Expression;
-import org.eclipse.papyrus.infra.gmfdiag.css.HexColor;
-import org.eclipse.papyrus.infra.gmfdiag.css.Name;
-import org.eclipse.papyrus.infra.gmfdiag.css.Number;
-import org.eclipse.papyrus.infra.gmfdiag.css.StringValue;
-import org.eclipse.papyrus.infra.gmfdiag.css.Subterm;
-import org.eclipse.papyrus.infra.gmfdiag.css.Term;
import org.eclipse.papyrus.infra.gmfdiag.css.configuration.handler.GMFToCSSConverter;
import org.eclipse.papyrus.infra.gmfdiag.css.dom.GMFElementAdapter;
import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
-import org.eclipse.papyrus.infra.gmfdiag.css.util.CssSwitch;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.ColorTok;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.CssTok;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.IdentifierTok;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.NumberTok;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.StringTok;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.SymbolTok;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.UrlTok;
+import org.eclipse.papyrus.infra.gmfdiag.css3.cSS.util.CSSSwitch;
import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
import org.eclipse.papyrus.infra.widgets.providers.CollectionContentProvider;
import org.eclipse.swt.SWT;
@@ -178,6 +178,7 @@ public class CSSDebugView extends ViewPart implements ISelectionListener, ISelec
// Nothing
}
+ @Override
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
if (selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
@@ -246,6 +247,7 @@ public class CSSDebugView extends ViewPart implements ISelectionListener, ISelec
return view;
}
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();
if (selection.isEmpty()) {
@@ -382,6 +384,7 @@ public class CSSDebugView extends ViewPart implements ISelectionListener, ISelec
public static FeatureComparator instance = new FeatureComparator();
+ @Override
public int compare(EStructuralFeature o1, EStructuralFeature o2) {
return Collator.getInstance().compare(o1.getName(), o2.getName());
}
@@ -500,47 +503,55 @@ public class CSSDebugView extends ViewPart implements ISelectionListener, ISelec
}
}
- protected String getLabel(Expression expression) {
- if (expression == null) {
+ protected String getLabel(List<CssTok> expression) {
+ if (expression == null || expression.isEmpty()) {
return "";
}
- String label = getLabel(expression.getTerms());
- for (Subterm subTerm : expression.getSubterms()) {
- if (subTerm.getOperator() != null) {
- label += subTerm.getOperator();
+
+
+ String label = "";
+ for (CssTok token : expression) {
+ if (token instanceof SymbolTok) {
+ label += token;
+ } else {
+ label += " " + getLabel(token);
}
- label += " " + getLabel(subTerm.getTerm());
}
- return label;
+
+ return label.trim().replaceAll("[ ]+", " ");
}
- protected String getLabel(Term term) {
- return (new CssSwitch<String>() {
+ protected String getLabel(CssTok term) {
+ return (new CSSSwitch<String>() {
@Override
- public String caseHexColor(HexColor term) {
- return '#' + term.getValue();
+ public String caseColorTok(ColorTok token) {
+ return token.getValue();
}
@Override
- public String caseName(Name term) {
- return term.getValue();
+ public String caseIdentifierTok(IdentifierTok token) {
+ return token.getName();
}
@Override
- public String caseStringValue(StringValue term) {
- return "\"" + term.getValue() + "\"";
+ public String caseStringTok(StringTok token) {
+ return token.getValue();
}
@Override
- public String caseNumber(Number term) {
- String label = "";
- if (term.getOp() != null) {
- label += term.getOp().getOperator();
- }
- label += term.getValue();
+ public String caseNumberTok(NumberTok token) {
+ return Double.toString(token.getVal());
+ }
+
+ @Override
+ public String caseUrlTok(UrlTok token) {
+ String label = "url('";
+ label += token.getUrl().getUrl();
+ label += "')";
return label;
}
+
}).doSwitch(term);
}

Back to the top