Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java15
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css4
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java1
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/handler/ResetStyleHandler.java4
4 files changed, 15 insertions, 9 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java
index 51bfcd51a23..436380c2d5f 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java
@@ -40,8 +40,9 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers;
import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
import org.eclipse.papyrus.infra.gmfdiag.css.ATTRIBUTE_OP;
import org.eclipse.papyrus.infra.gmfdiag.css.Attribute;
@@ -55,7 +56,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.SelectorCondition;
import org.eclipse.papyrus.infra.gmfdiag.css.SimpleSelector;
import org.eclipse.papyrus.infra.gmfdiag.css.Stylesheet;
import org.eclipse.papyrus.infra.gmfdiag.css.configuration.Activator;
-import org.eclipse.papyrus.infra.gmfdiag.css.handler.CSSRefreshHandler;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.BaseCSSEngine;
import org.eclipse.papyrus.infra.gmfdiag.css.provider.CustomStyle;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
@@ -68,13 +69,12 @@ public abstract class AbstractStyleHandler extends AbstractHandler {
public Object execute(ExecutionEvent event) {
ISelection selection;
try {
- selection = ServiceUtilsForActionHandlers.getInstance().getNestedActiveIEditorPart().getSite().getSelectionProvider().getSelection();
+ selection = ServiceUtilsForHandlers.getInstance().getNestedActiveIEditorPart(event).getSite().getSelectionProvider().getSelection();
if(selection.isEmpty()) {
return null;
}
- } catch (ServiceException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ } catch (ServiceException ex) {
+ Activator.log.error(ex);
return null;
}
@@ -165,7 +165,8 @@ public abstract class AbstractStyleHandler extends AbstractHandler {
try {
resource.save(new HashMap<Object, Object>());
- (new CSSRefreshHandler()).execute(null); //FIXME: NPE on ExecutionEvent
+ BaseCSSEngine.instance.reset();
+ DiagramHelper.refreshDiagrams();
} catch (IOException ex) {
Activator.log.error(ex);
MessageDialog.open(MessageDialog.ERROR, parentShell, "Style error", "An unexpected error occured while trying to save the Stylesheet", SWT.NONE);
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css
index 924608d767d..6e1a9f68694 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css
@@ -39,3 +39,7 @@ ActivityDiagram Activity * {
UseCaseDiagram Actor {
elementIcon:false;
}
+
+TimingDiagram * {
+ gradient:none;
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java
index 7b4f76aed57..6736c587a17 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/dom/GMFElementAdapter.java
@@ -75,6 +75,7 @@ public class GMFElementAdapter extends ElementAdapter implements NodeList, IChan
diagramNameMappings.put("PapyrusUMLSequenceDiagram", "SequenceDiagram");
diagramNameMappings.put("PapyrusUMLStateMachineDiagram", "StateMachineDiagram");
diagramNameMappings.put("UseCase", "UseCaseDiagram");
+ diagramNameMappings.put("PapyrusUMLTimingDiagram", "TimingDiagram");
//SysML
diagramNameMappings.put("BlockDefinition", "BlockDiagram");
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/handler/ResetStyleHandler.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/handler/ResetStyleHandler.java
index 4c139a2987f..4bb39cfc34c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/handler/ResetStyleHandler.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/handler/ResetStyleHandler.java
@@ -32,10 +32,10 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers;
import org.eclipse.papyrus.infra.emf.Activator;
import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.NotationHelper;
import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSAnnotations;
@@ -58,7 +58,7 @@ public class ResetStyleHandler extends AbstractHandler {
public Object execute(ExecutionEvent event) throws ExecutionException {
ISelection selection;
try {
- selection = ServiceUtilsForActionHandlers.getInstance().getNestedActiveIEditorPart().getSite().getSelectionProvider().getSelection();
+ selection = ServiceUtilsForHandlers.getInstance().getNestedActiveIEditorPart(event).getSite().getSelectionProvider().getSelection();
if(selection.isEmpty()) {
return null;
}

Back to the top