Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/extension/contribution/DiagramPathAdditionalInformations.java')
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/extension/contribution/DiagramPathAdditionalInformations.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/extension/contribution/DiagramPathAdditionalInformations.java b/plugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/extension/contribution/DiagramPathAdditionalInformations.java
new file mode 100644
index 00000000000..bbd485c04d6
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/extension/contribution/DiagramPathAdditionalInformations.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Benoit Maggi (CEA LIST) - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.export.extension.contribution;
+
+import org.eclipse.gmf.runtime.diagram.ui.image.ImageFileFormat;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.uml.export.extension.AdditionalInformations;
+import org.eclipse.papyrus.uml.export.util.HTMLUtil;
+
+
+/**
+ * The Class DiagramPathAdditionalInformations.
+ */
+public class DiagramPathAdditionalInformations implements AdditionalInformations {
+
+ /**
+ * @see org.eclipse.papyrus.uml.export.extension.AdditionalInformations#getData(java.lang.Object)
+ *
+ * @param object
+ * @return
+ */
+ @Override
+ public String getData(Object object) {
+ if (object instanceof Diagram) {
+ Diagram diagram = (Diagram) object;
+ return HTMLUtil.diagramRelativPath(diagram)+"."+ImageFileFormat.SVG.toString(); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+}

Back to the top