Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStéphane Bégaudeau2018-04-19 08:22:42 +0000
committerPierre-Charles David2018-04-26 09:26:20 +0000
commit3d6de26c22af876d9061e0152cabab89cc4f1914 (patch)
tree1905100d06b79e1e38c7d7a2e7b7b3124d4c7d82
parentac159571b706654a93b79a74821dc5c25249e5bc (diff)
downloadorg.eclipse.sirius-3d6de26c22af876d9061e0152cabab89cc4f1914.tar.gz
org.eclipse.sirius-3d6de26c22af876d9061e0152cabab89cc4f1914.tar.xz
org.eclipse.sirius-3d6de26c22af876d9061e0152cabab89cc4f1914.zip
[509735] Add workflow page and backend services
Bug: 509735 Change-Id: I07782d5d594b885d58744973391518c44e1c06a7 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.server.backend/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/SiriusServerBackendFilter.java4
-rw-r--r--plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/activities/SiriusServerActivityExecutorService.java105
-rw-r--r--plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerActivityDto.java44
-rw-r--r--plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerPageDto.java65
-rw-r--r--plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerPageService.java96
-rw-r--r--plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerSectionDto.java55
-rw-r--r--plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerActivityDto.java44
-rw-r--r--plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerPageDto.java53
-rw-r--r--plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerProjectDto.java21
-rw-r--r--plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerProjectService.java40
-rw-r--r--plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerSectionDto.java55
-rw-r--r--plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/workflow/SiriusToolServices.java127
-rw-r--r--plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/workflow/WorkflowHelper.java97
-rw-r--r--plugins/org.eclipse.sirius.server/src/org/eclipse/sirius/server/internal/SiriusServerManager.java13
-rw-r--r--plugins/org.eclipse.sirius.server/src/org/eclipse/sirius/server/internal/SiriusServerPlugin.java12
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/.checkstyle13
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/.classpath7
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/.project28
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/.settings/fr.obeo.baseliner.prefs2
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.core.resources.prefs4
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.jdt.core.prefs354
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.jdt.ui.prefs62
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.ltk.core.refactoring.prefs2
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.pde.prefs32
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/META-INF/MANIFEST.MF26
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/about.html27
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/build.properties20
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/plugin.properties16
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/SiriusServicesUtils.java42
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/CreateRepresentationDto.java42
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/ISiriusRepresentationService.java51
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/OpenRepresentationDto.java42
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/RepresentationDto.java59
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/RepresentationsDto.java44
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/sessions/ISiriusSessionService.java25
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/sessions/SessionDto.java42
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/sessions/SessionsDto.java44
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/ActionDto.java60
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/ISiriusWorkflowService.java40
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/PageDto.java128
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/SectionDto.java61
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/SimplePageDto.java76
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/WorkflowDto.java44
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/internal/representations/SiriusRepresentationService.java133
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/internal/sessions/SiriusSessionService.java37
-rw-r--r--plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/internal/workflow/SiriusWorkflowService.java255
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/.checkstyle13
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/.classpath7
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/.project28
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/.settings/fr.obeo.baseliner.prefs2
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.core.resources.prefs4
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.jdt.core.prefs354
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.jdt.ui.prefs62
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.ltk.core.refactoring.prefs2
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.pde.prefs32
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/META-INF/MANIFEST.MF23
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/about.html27
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/build.properties21
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/plugin.properties16
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/plugin.xml7
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/Messages.java33
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/WorkflowPage.java126
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/WorkflowPagePlugin.java79
-rw-r--r--plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/WorkflowPageProvider.java50
67 files changed, 3542 insertions, 5 deletions
diff --git a/plugins/org.eclipse.sirius.server.backend/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.server.backend/META-INF/MANIFEST.MF
index f989dfbfc1..844b0954e6 100644
--- a/plugins/org.eclipse.sirius.server.backend/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.server.backend/META-INF/MANIFEST.MF
@@ -18,7 +18,11 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.sirius.table;bundle-version="6.0.0",
org.eclipse.sirius.tree;bundle-version="6.0.0",
org.eclipse.sirius.server;bundle-version="6.0.0",
- com.google.gson;bundle-version="2.7.0"
+ com.google.gson;bundle-version="2.7.0",
+ org.eclipse.sirius.workflow.model;bundle-version="6.0.0",
+ org.eclipse.sirius.ecore.extender;bundle-version="6.0.0",
+ org.eclipse.emf.transaction;bundle-version="1.9.0",
+ org.eclipse.sirius.common;bundle-version="6.0.0"
Bundle-Localization: plugin
Export-Package: org.eclipse.sirius.server.backend.internal;x-friends:="org.eclipse.sirius.tests.server.backend",
org.eclipse.sirius.server.backend.internal.services.dashboard;x-internal:=true,
diff --git a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/SiriusServerBackendFilter.java b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/SiriusServerBackendFilter.java
index 661e5b32fe..6c8f2b495d 100644
--- a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/SiriusServerBackendFilter.java
+++ b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/SiriusServerBackendFilter.java
@@ -29,7 +29,9 @@ import javax.servlet.http.HttpServletResponse;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.sirius.server.backend.internal.services.activities.SiriusServerActivityExecutorService;
import org.eclipse.sirius.server.backend.internal.services.dashboard.SiriusServerDashboardService;
+import org.eclipse.sirius.server.backend.internal.services.pages.SiriusServerPageService;
import org.eclipse.sirius.server.backend.internal.services.project.SiriusServerProjectService;
import org.eclipse.sirius.server.backend.internal.services.projects.SiriusServerProjectsService;
@@ -120,6 +122,8 @@ public class SiriusServerBackendFilter implements Filter {
serviceClasses.add(SiriusServerDashboardService.class);
serviceClasses.add(SiriusServerProjectsService.class);
serviceClasses.add(SiriusServerProjectService.class);
+ serviceClasses.add(SiriusServerPageService.class);
+ serviceClasses.add(SiriusServerActivityExecutorService.class);
List<SiriusServerServiceDescriptor> descriptors = new ArrayList<>();
for (Class<? extends ISiriusServerService> serviceClass : serviceClasses) {
diff --git a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/activities/SiriusServerActivityExecutorService.java b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/activities/SiriusServerActivityExecutorService.java
new file mode 100644
index 0000000000..138406d3ef
--- /dev/null
+++ b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/activities/SiriusServerActivityExecutorService.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.server.backend.internal.services.activities;
+
+import static org.eclipse.sirius.server.backend.internal.SiriusServerResponse.STATUS_NOT_FOUND;
+import static org.eclipse.sirius.server.backend.internal.SiriusServerResponse.STATUS_OK;
+
+import java.util.Map;
+import java.util.Optional;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.sirius.business.api.modelingproject.ModelingProject;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl;
+import org.eclipse.sirius.server.backend.internal.ISiriusServerService;
+import org.eclipse.sirius.server.backend.internal.SiriusServerPath;
+import org.eclipse.sirius.server.backend.internal.SiriusServerResponse;
+import org.eclipse.sirius.server.backend.internal.services.workflow.SiriusToolServices;
+import org.eclipse.sirius.server.backend.internal.services.workflow.WorkflowHelper;
+import org.eclipse.sirius.server.backend.internal.utils.SiriusServerUtils;
+import org.eclipse.sirius.viewpoint.DAnalysis;
+import org.eclipse.sirius.workflow.ActivityDescription;
+
+/**
+ * The service used to execute a specific activity of a workflow.
+ *
+ * @author sbegaudeau
+ */
+@SiriusServerPath("/projects/{projectName}/pages/{pageIdentifier}/sections/{sectionIdentifier}/activities/{activityIdentifier}/execute")
+public class SiriusServerActivityExecutorService implements ISiriusServerService {
+
+ /**
+ * The name of the variable used to capture the name of the project.
+ */
+ private static final Object PROJECT_NAME = "projectName"; //$NON-NLS-1$
+
+ /**
+ * The name of the variable used to capture the identifier of the page.
+ */
+ private static final Object PAGE_IDENTIFIER = "pageIdentifier"; //$NON-NLS-1$
+
+ /**
+ * The name of the variable used to capture the identifier of the section.
+ */
+ private static final Object SECTION_IDENTIFIER = "sectionIdentifier"; //$NON-NLS-1$
+
+ /**
+ * The name of the variable used to capture the identifier of the activity.
+ */
+ private static final Object ACTIVITY_IDENTIFIER = "activityIdentifier"; //$NON-NLS-1$
+
+ @Override
+ public SiriusServerResponse doPost(HttpServletRequest request, Map<String, String> variables, String remainingPart) {
+ String projectName = variables.get(PROJECT_NAME);
+ String pageId = variables.get(PAGE_IDENTIFIER);
+ String sectionId = variables.get(SECTION_IDENTIFIER);
+ String activityId = variables.get(ACTIVITY_IDENTIFIER);
+
+ // @formatter:off
+ Optional<IProject> optionalProject = Optional.ofNullable(ResourcesPlugin.getWorkspace().getRoot().getProject(projectName));
+ Optional<ModelingProject> optionalModelingProject = optionalProject.filter(ModelingProject::hasModelingProjectNature)
+ .filter(IProject::isOpen)
+ .map(iProject -> ModelingProject.asModelingProject(iProject).get()); // FIXME Sirius Optional removal!
+ // @formatter:on
+ if (optionalModelingProject.isPresent()) {
+ ModelingProject modelingProject = optionalModelingProject.get();
+ Session session = SiriusServerUtils.getSession(modelingProject);
+
+ WorkflowHelper.on(session).findActivityById(pageId, sectionId, activityId).ifPresent(activity -> {
+ executeActivity(session, activity);
+ });
+
+ return new SiriusServerResponse(STATUS_OK);
+ }
+
+ return new SiriusServerResponse(STATUS_NOT_FOUND);
+ }
+
+ private void executeActivity(Session session, ActivityDescription activity) {
+ URI taskURI = EcoreUtil.getURI(activity.getOperation());
+ TransactionalEditingDomain ted = session.getTransactionalEditingDomain();
+ ted.getCommandStack().execute(new RecordingCommand(ted) {
+ @Override
+ protected void doExecute() {
+ DAnalysis self = ((DAnalysisSessionImpl) session).getAnalyses().get(0);
+ new SiriusToolServices().executeOperation(self, taskURI.toString());
+ }
+ });
+ }
+}
diff --git a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerActivityDto.java b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerActivityDto.java
new file mode 100644
index 0000000000..d52efe064b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerActivityDto.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.server.backend.internal.services.pages;
+
+/**
+ * The DTO used to represent an activity of the workflow.
+ *
+ * @author sbegaudeau
+ */
+@SuppressWarnings({ "checkstyle::javadocmethod", "checkstyle::javadocfield" })
+public class SiriusServerActivityDto {
+ private String identifier;
+
+ private String name;
+
+ /**
+ * The constructor.
+ *
+ * @param identifier
+ * The identifier of the activity
+ * @param name
+ * The name of the activity
+ */
+ public SiriusServerActivityDto(String identifier, String name) {
+ this.identifier = identifier;
+ this.name = name;
+ }
+
+ public String getIdentifier() {
+ return this.identifier;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerPageDto.java b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerPageDto.java
new file mode 100644
index 0000000000..cbb4c729dd
--- /dev/null
+++ b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerPageDto.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.server.backend.internal.services.pages;
+
+import java.util.List;
+
+/**
+ * The DTO used to receive the details of a page.
+ *
+ * @author sbegaudeau
+ */
+@SuppressWarnings({ "checkstyle::javadocmethod", "checkstyle::javadocfield" })
+public class SiriusServerPageDto {
+ private String identifier;
+
+ private String name;
+
+ private String description;
+
+ private List<SiriusServerSectionDto> sections;
+
+ /**
+ * The constructor.
+ *
+ * @param identifier
+ * The identifier
+ * @param name
+ * The name
+ * @param description
+ * The description
+ * @param sections
+ * The sections
+ */
+ public SiriusServerPageDto(String identifier, String name, String description, List<SiriusServerSectionDto> sections) {
+ this.identifier = identifier;
+ this.name = name;
+ this.description = description;
+ this.sections = sections;
+ }
+
+ public String getIdentifier() {
+ return this.identifier;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public List<SiriusServerSectionDto> getSections() {
+ return this.sections;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerPageService.java b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerPageService.java
new file mode 100644
index 0000000000..4a64c5a0a8
--- /dev/null
+++ b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerPageService.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.server.backend.internal.services.pages;
+
+import static org.eclipse.sirius.server.backend.internal.SiriusServerResponse.STATUS_NOT_FOUND;
+import static org.eclipse.sirius.server.backend.internal.SiriusServerResponse.STATUS_OK;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.sirius.business.api.modelingproject.ModelingProject;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.server.backend.internal.ISiriusServerService;
+import org.eclipse.sirius.server.backend.internal.SiriusServerPath;
+import org.eclipse.sirius.server.backend.internal.SiriusServerResponse;
+import org.eclipse.sirius.server.backend.internal.services.workflow.WorkflowHelper;
+import org.eclipse.sirius.server.backend.internal.utils.SiriusServerUtils;
+
+/**
+ * The service used to manipulate a page of the workflow of a project.
+ *
+ * @author sbegaudeau
+ */
+@SiriusServerPath("/projects/{projectName}/pages/{pageIdentifier}")
+public class SiriusServerPageService implements ISiriusServerService {
+
+ /**
+ * The name of the variable used to capture the name of the project.
+ */
+ private static final Object PROJECT_NAME = "projectName"; //$NON-NLS-1$
+
+ /**
+ * The name of the variable used to capture the identifier of the page.
+ */
+ private static final Object PAGE_IDENTIFIER = "pageIdentifier"; //$NON-NLS-1$
+
+ @Override
+ public SiriusServerResponse doGet(HttpServletRequest request, Map<String, String> variables, String remainingPart) {
+ String projectName = variables.get(PROJECT_NAME);
+ String pageIdentifier = variables.get(PAGE_IDENTIFIER);
+
+ // @formatter:off
+ Optional<IProject> optionalProject = Optional.ofNullable(ResourcesPlugin.getWorkspace().getRoot().getProject(projectName));
+ Optional<ModelingProject> optionalModelingProject = optionalProject.filter(ModelingProject::hasModelingProjectNature)
+ .filter(IProject::isOpen)
+ .map(iProject -> ModelingProject.asModelingProject(iProject).get()); // FIXME Sirius Optional removal!
+ Optional<SiriusServerPageDto> optionalPage = optionalModelingProject.flatMap(modelingProject -> this.getPage(modelingProject, pageIdentifier));
+ // @formatter:on
+ if (optionalPage.isPresent()) {
+ SiriusServerPageDto page = optionalPage.get();
+ return new SiriusServerResponse(STATUS_OK, page);
+ }
+
+ return new SiriusServerResponse(STATUS_NOT_FOUND);
+ }
+
+ /**
+ * Finds the page with the given pageIdentifier in the given modeling
+ * project.
+ *
+ * @param modelingProject
+ * The modeling project
+ * @param pageIdentifier
+ * The page identifier
+ * @return An optional containing the page found or an empty optional if it
+ * does not exist
+ */
+ private Optional<SiriusServerPageDto> getPage(ModelingProject modelingProject, String pageIdentifier) {
+ Session session = SiriusServerUtils.getSession(modelingProject);
+ return WorkflowHelper.on(session).findPageById(pageIdentifier).map(page -> {
+ List<SiriusServerSectionDto> sections = page.getSections().stream().map(section -> {
+ List<SiriusServerActivityDto> activities = section.getActivities().stream().map(desc -> {
+ return new SiriusServerActivityDto(desc.getName(), desc.getLabelExpression());
+ }).collect(Collectors.toList());
+ return new SiriusServerSectionDto(section.getName(), section.getTitleExpression(), activities);
+
+ }).collect(Collectors.toList());
+ return new SiriusServerPageDto(page.getName(), page.getTitleExpression(), page.getDescriptionExpression(), sections);
+ });
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerSectionDto.java b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerSectionDto.java
new file mode 100644
index 0000000000..c8cf5a9513
--- /dev/null
+++ b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/pages/SiriusServerSectionDto.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.server.backend.internal.services.pages;
+
+import java.util.List;
+
+/**
+ * The DTO used to represent a section of the workflow page.
+ *
+ * @author sbegaudeau
+ */
+@SuppressWarnings({ "checkstyle::javadocmethod", "checkstyle::javadocfield" })
+public class SiriusServerSectionDto {
+ private String identifier;
+
+ private String name;
+
+ private List<SiriusServerActivityDto> activities;
+
+ /**
+ * The constructor.
+ *
+ * @param identifier
+ * The identifier
+ * @param name
+ * The name
+ * @param activities
+ * The activities
+ */
+ public SiriusServerSectionDto(String identifier, String name, List<SiriusServerActivityDto> activities) {
+ this.identifier = identifier;
+ this.name = name;
+ this.activities = activities;
+ }
+
+ public String getIdentifier() {
+ return this.identifier;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public List<SiriusServerActivityDto> getActivities() {
+ return this.activities;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerActivityDto.java b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerActivityDto.java
new file mode 100644
index 0000000000..5aa22a7f00
--- /dev/null
+++ b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerActivityDto.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.server.backend.internal.services.project;
+
+/**
+ * The DTO used to represent an activity of the workflow.
+ *
+ * @author sbegaudeau
+ */
+@SuppressWarnings({ "checkstyle::javadocmethod", "checkstyle::javadocfield" })
+public class SiriusServerActivityDto {
+ private String identifier;
+
+ private String name;
+
+ /**
+ * The constructor.
+ *
+ * @param identifier
+ * The identifier of the activity
+ * @param name
+ * The name of the activity
+ */
+ public SiriusServerActivityDto(String identifier, String name) {
+ this.identifier = identifier;
+ this.name = name;
+ }
+
+ public String getIdentifier() {
+ return this.identifier;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerPageDto.java b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerPageDto.java
new file mode 100644
index 0000000000..3253d37ccd
--- /dev/null
+++ b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerPageDto.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.server.backend.internal.services.project;
+
+/**
+ * The DTO used to represent a page of the workflow.
+ *
+ * @author sbegaudeau
+ */
+@SuppressWarnings({ "checkstyle::javadocmethod", "checkstyle::javadocfield" })
+public class SiriusServerPageDto {
+ private String identifier;
+
+ private String name;
+
+ private String description;
+
+ /**
+ * The constructor.
+ *
+ * @param identifier
+ * The identifier
+ * @param name
+ * The name
+ * @param description
+ * The description
+ */
+ public SiriusServerPageDto(String identifier, String name, String description) {
+ this.identifier = identifier;
+ this.name = name;
+ this.description = description;
+ }
+
+ public String getIdentifier() {
+ return this.identifier;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerProjectDto.java b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerProjectDto.java
index 951efaddfc..0580b7fc01 100644
--- a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerProjectDto.java
+++ b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerProjectDto.java
@@ -25,6 +25,10 @@ public class SiriusServerProjectDto {
private List<SiriusServerSemanticResourceDto> semanticResources;
+ private List<SiriusServerPageDto> pages;
+
+ private List<SiriusServerSectionDto> currentPageSections;
+
/**
* The constructor.
*
@@ -34,11 +38,18 @@ public class SiriusServerProjectDto {
* The representations
* @param semanticResources
* The semantic resources
+ * @param pages
+ * The pages of the workflow
+ * @param currentPageSections
+ * The sections of the current page of the workflow
*/
- public SiriusServerProjectDto(String name, List<AbstractSiriusServerRepresentationDto> representations, List<SiriusServerSemanticResourceDto> semanticResources) {
+ public SiriusServerProjectDto(String name, List<AbstractSiriusServerRepresentationDto> representations, List<SiriusServerSemanticResourceDto> semanticResources, List<SiriusServerPageDto> pages,
+ List<SiriusServerSectionDto> currentPageSections) {
this.name = name;
this.representations = representations;
this.semanticResources = semanticResources;
+ this.pages = pages;
+ this.currentPageSections = currentPageSections;
}
public String getName() {
@@ -53,4 +64,12 @@ public class SiriusServerProjectDto {
return this.semanticResources;
}
+ public List<SiriusServerPageDto> getPages() {
+ return this.pages;
+ }
+
+ public List<SiriusServerSectionDto> getCurrentPageSections() {
+ return this.currentPageSections;
+ }
+
}
diff --git a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerProjectService.java b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerProjectService.java
index 041a948f3e..5df8de86d9 100644
--- a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerProjectService.java
+++ b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerProjectService.java
@@ -17,6 +17,7 @@ import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.text.DecimalFormat;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@@ -41,12 +42,14 @@ import org.eclipse.sirius.server.backend.internal.ISiriusServerService;
import org.eclipse.sirius.server.backend.internal.SiriusServerBackendPlugin;
import org.eclipse.sirius.server.backend.internal.SiriusServerPath;
import org.eclipse.sirius.server.backend.internal.SiriusServerResponse;
+import org.eclipse.sirius.server.backend.internal.services.workflow.WorkflowHelper;
import org.eclipse.sirius.server.backend.internal.utils.SiriusServerUtils;
import org.eclipse.sirius.table.metamodel.table.description.TableDescription;
import org.eclipse.sirius.tree.description.TreeDescription;
import org.eclipse.sirius.viewpoint.DRepresentationDescriptor;
import org.eclipse.sirius.viewpoint.description.RepresentationDescription;
import org.eclipse.sirius.viewpoint.description.Viewpoint;
+import org.eclipse.sirius.workflow.SectionDescription;
/**
* Service used to manipulate a specific project.
@@ -101,7 +104,42 @@ public class SiriusServerProjectService implements ISiriusServerService {
String projectName = modelingProject.getProject().getName();
List<AbstractSiriusServerRepresentationDto> representations = this.getRepresentations(session);
List<SiriusServerSemanticResourceDto> semanticResources = this.getSemanticResources(modelingProject.getProject(), session);
- return new SiriusServerProjectDto(projectName, representations, semanticResources);
+ List<SiriusServerPageDto> pages = this.getPages(session);
+ List<SiriusServerSectionDto> currentPageSections = this.getFirstPageSections(session);
+ return new SiriusServerProjectDto(projectName, representations, semanticResources, pages, currentPageSections);
+ }
+
+ /**
+ * Returns the list of workflow page from the given session.
+ *
+ * @param session
+ * The session
+ * @return The list of workflow page from the given session
+ */
+ private List<SiriusServerPageDto> getPages(Session session) {
+ return WorkflowHelper.on(session).getPageDescriptions().map(page -> {
+ return new SiriusServerPageDto(page.getName(), page.getLabel(), page.getDescriptionExpression());
+ }).collect(Collectors.toList());
+ }
+
+ /**
+ * Returns the list of the sections of the current page.
+ *
+ * @param session
+ * The session
+ * @return The list of the sections of the current page
+ */
+ private List<SiriusServerSectionDto> getFirstPageSections(Session session) {
+ List<SiriusServerSectionDto> sections = new ArrayList<>();
+ WorkflowHelper.on(session).getPageDescriptions().findFirst().ifPresent(page -> {
+ for (SectionDescription sectionDesc : page.getSections()) {
+ List<SiriusServerActivityDto> activities = sectionDesc.getActivities().stream().map(desc -> {
+ return new SiriusServerActivityDto(desc.getName(), desc.getLabelExpression());
+ }).collect(Collectors.toList());
+ sections.add(new SiriusServerSectionDto(sectionDesc.getName(), sectionDesc.getTitleExpression(), activities));
+ }
+ });
+ return sections;
}
/**
diff --git a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerSectionDto.java b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerSectionDto.java
new file mode 100644
index 0000000000..136ba70a17
--- /dev/null
+++ b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/project/SiriusServerSectionDto.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.server.backend.internal.services.project;
+
+import java.util.List;
+
+/**
+ * The DTO used to represent a section of the workflow page.
+ *
+ * @author sbegaudeau
+ */
+@SuppressWarnings({ "checkstyle::javadocmethod", "checkstyle::javadocfield" })
+public class SiriusServerSectionDto {
+ private String identifier;
+
+ private String name;
+
+ private List<SiriusServerActivityDto> activities;
+
+ /**
+ * The constructor.
+ *
+ * @param identifier
+ * The identifier
+ * @param name
+ * The name
+ * @param activities
+ * The activities
+ */
+ public SiriusServerSectionDto(String identifier, String name, List<SiriusServerActivityDto> activities) {
+ this.identifier = identifier;
+ this.name = name;
+ this.activities = activities;
+ }
+
+ public String getIdentifier() {
+ return this.identifier;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public List<SiriusServerActivityDto> getActivities() {
+ return this.activities;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/workflow/SiriusToolServices.java b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/workflow/SiriusToolServices.java
new file mode 100644
index 0000000000..9ea8da025d
--- /dev/null
+++ b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/workflow/SiriusToolServices.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2015, 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.server.backend.internal.services.workflow;
+
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.sirius.business.api.helper.task.ICommandTask;
+import org.eclipse.sirius.business.api.helper.task.TaskHelper;
+import org.eclipse.sirius.business.api.query.EObjectQuery;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor;
+import org.eclipse.sirius.tools.api.command.SiriusCommand;
+import org.eclipse.sirius.viewpoint.SiriusPlugin;
+import org.eclipse.sirius.viewpoint.description.Viewpoint;
+import org.eclipse.sirius.viewpoint.description.tool.InitialOperation;
+import org.eclipse.sirius.viewpoint.description.tool.ModelOperation;
+
+/**
+ * This class contains various services provided by the Sirius UI Properties
+ * bundle to the interpreter.
+ *
+ * @author sbegaudeau
+ */
+public class SiriusToolServices {
+
+ /**
+ * Executes the operation with the given URI.
+ *
+ * @param eObject
+ * The EObject to use as the operation's context
+ * @param initialCommandUri
+ * the URI of the operation to execute
+ * @return the model element on which the tool was executed.
+ */
+ public EObject executeOperation(EObject eObject, String initialCommandUri) {
+ if (!eObject.eIsProxy()) {
+ Session session = new EObjectQuery(eObject).getSession();
+ if (session != null) {
+ ModelOperation modelOperation = findModelOperation(initialCommandUri, session);
+ if (modelOperation != null) {
+ ModelAccessor modelAccessor = session.getModelAccessor();
+ ICommandTask task = new TaskHelper(modelAccessor, SiriusPlugin.getDefault().getUiCallback()).buildTaskFromModelOperation(eObject, modelOperation);
+ SiriusCommand command = new SiriusCommand(session.getTransactionalEditingDomain(), "SiriusToolServices#executeOperation"); //$NON-NLS-1$
+ command.getTasks().add(task);
+ try {
+ if (command.canExecute()) {
+ command.execute();
+ }
+ } catch (OperationCanceledException cancel) {
+ // A tool (possibly via a Java service) can request the
+ // cancellation of its execution. This is
+ // handled as a rollback by EMF Transaction, but the
+ // exception should not propagate above this
+ // point: it's a signal for requesting
+ // cancellation/rollback, which at this point is done,
+ // but
+ // not an error that the caller should be aware of.
+ } finally {
+ command.dispose();
+ }
+ }
+ }
+ }
+ return eObject;
+ }
+
+ /**
+ * Resolves the actual {@link ModelOperation} to execute given its URI.
+ *
+ * @param initialCommandUri
+ * the URI of the operation to search for.
+ * @param session
+ * the Sirius session which determines the scope to search into.
+ * @return the {@link ModelOperation} instance found at the specified URI,
+ * either in one of the VSMs for which at least one Viewpoint is
+ * currently enabled in the session, or from the default ruleset, or
+ * <code>null</code> if no matching operation could be located.
+ */
+ private ModelOperation findModelOperation(String initialCommandUri, Session session) {
+ URI commandResourceURI = URI.createURI(initialCommandUri).trimFragment();
+ for (Resource res : getResourcesInScope(session)) {
+ if (commandResourceURI.equals(res.getURI())) {
+ EObject modelOperationEObject = res.getEObject(URI.createURI(initialCommandUri).fragment());
+ if (modelOperationEObject instanceof InitialOperation) {
+ return ((InitialOperation) modelOperationEObject).getFirstModelOperations();
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns all the (VSM-like) resources in which to search for the
+ * {@link ModelOperation} to execute.
+ *
+ * @param session
+ * the Sirius session.
+ * @return all the resources in which to look for the ModelOperation, in
+ * order of preference.
+ */
+ private Set<Resource> getResourcesInScope(Session session) {
+ Set<Resource> result = new LinkedHashSet<>();
+ Collection<Viewpoint> selectedViewpoints = session.getSelectedViewpoints(true);
+ for (Viewpoint viewpoint : selectedViewpoints) {
+ Resource eResource = viewpoint.eResource();
+ if (eResource != null) {
+ result.add(eResource);
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/workflow/WorkflowHelper.java b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/workflow/WorkflowHelper.java
new file mode 100644
index 0000000000..ebfaca849f
--- /dev/null
+++ b/plugins/org.eclipse.sirius.server.backend/src/org/eclipse/sirius/server/backend/internal/services/workflow/WorkflowHelper.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.server.backend.internal.services.workflow;
+
+import java.util.Collection;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.stream.Stream;
+
+import org.eclipse.sirius.business.api.query.EObjectQuery;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.ext.base.Option;
+import org.eclipse.sirius.viewpoint.description.DescriptionPackage;
+import org.eclipse.sirius.viewpoint.description.Group;
+import org.eclipse.sirius.viewpoint.description.IdentifiedElement;
+import org.eclipse.sirius.workflow.ActivityDescription;
+import org.eclipse.sirius.workflow.PageDescription;
+import org.eclipse.sirius.workflow.SectionDescription;
+import org.eclipse.sirius.workflow.WorkflowDescription;
+
+/**
+ * Utility methods to manipulate Workflows and their elements.
+ *
+ * @author pcdavid
+ *
+ */
+// CHECKSTYLE:OFF
+public final class WorkflowHelper {
+ private final Session session;
+
+ public static WorkflowHelper on(Session session) {
+ return new WorkflowHelper(Objects.requireNonNull(session));
+ }
+
+ private WorkflowHelper(Session session) {
+ this.session = session;
+ }
+
+ /**
+ * Finds all the workflow pages that apply to the given session. This may
+ * include pages defined in different workflows, but pages that originate
+ * from a given workflow are guaranteed to be contiguous.
+ *
+ * @return all the workflow pages that apply to the session.
+ */
+ public Stream<PageDescription> getPageDescriptions() {
+ return getWorkflowDescriptions().flatMap(w -> w.getPages().stream());
+ }
+
+ /**
+ * Returns the workflow descriptions from the given session.
+ *
+ * @return The workflow descriptions from the given session
+ */
+ public Stream<WorkflowDescription> getWorkflowDescriptions() {
+ // @formatter:off
+ return session.getSelectedViewpoints(true).stream()
+ .map(viewpoint -> new EObjectQuery(viewpoint).getFirstAncestorOfType(DescriptionPackage.Literals.GROUP))
+ .filter(Option::some)
+ .map(Option::get)
+ .filter(Group.class::isInstance)
+ .map(Group.class::cast)
+ .flatMap(group -> group.getExtensions().stream())
+ .filter(WorkflowDescription.class::isInstance)
+ .map(WorkflowDescription.class::cast);
+ // @formatter:on
+ }
+
+ public Optional<PageDescription> findPageById(String pageIdentifier) {
+ return findById(getPageDescriptions(), pageIdentifier);
+ }
+
+ public Optional<SectionDescription> findSectionById(String pageId, String sectionId) {
+ return findPageById(pageId).flatMap(page -> findById(page.getSections(), sectionId));
+ }
+
+ public Optional<ActivityDescription> findActivityById(String pageId, String sectionId, String activityId) {
+ return findSectionById(pageId, sectionId).flatMap(section -> findById(section.getActivities(), activityId));
+ }
+
+ private <T extends IdentifiedElement> Optional<T> findById(Collection<T> candidates, String id) {
+ return findById(candidates.stream(), id);
+ }
+
+ private <T extends IdentifiedElement> Optional<T> findById(Stream<T> candidates, String id) {
+ return candidates.filter(elt -> Objects.equals(elt.getName(), id)).findFirst();
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.server/src/org/eclipse/sirius/server/internal/SiriusServerManager.java b/plugins/org.eclipse.sirius.server/src/org/eclipse/sirius/server/internal/SiriusServerManager.java
index 655966dfa0..b4ab5a4d85 100644
--- a/plugins/org.eclipse.sirius.server/src/org/eclipse/sirius/server/internal/SiriusServerManager.java
+++ b/plugins/org.eclipse.sirius.server/src/org/eclipse/sirius/server/internal/SiriusServerManager.java
@@ -44,6 +44,8 @@ public class SiriusServerManager {
*/
private Server server;
+ private InetSocketAddress address;
+
/**
* Starts the HTTP server.
*/
@@ -51,7 +53,7 @@ public class SiriusServerManager {
public void start() {
if (this.server == null || !this.server.isRunning()) {
int port = Integer.valueOf(System.getProperty(PORT_VMARG, PORT)).intValue();
- InetSocketAddress address = new InetSocketAddress(HOSTNAME, port);
+ address = new InetSocketAddress(HOSTNAME, port);
this.server = new Server(address);
this.server.setHandler(new HandlerCollection());
@@ -80,4 +82,13 @@ public class SiriusServerManager {
}
});
}
+
+ /**
+ * Returns the address on which the server is listening.
+ *
+ * @return the address on which the server is listening.
+ */
+ public InetSocketAddress getAddress() {
+ return this.address;
+ }
}
diff --git a/plugins/org.eclipse.sirius.server/src/org/eclipse/sirius/server/internal/SiriusServerPlugin.java b/plugins/org.eclipse.sirius.server/src/org/eclipse/sirius/server/internal/SiriusServerPlugin.java
index bb16c84fcb..cb74c8d996 100644
--- a/plugins/org.eclipse.sirius.server/src/org/eclipse/sirius/server/internal/SiriusServerPlugin.java
+++ b/plugins/org.eclipse.sirius.server/src/org/eclipse/sirius/server/internal/SiriusServerPlugin.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.sirius.server.internal;
+import java.net.InetSocketAddress;
import java.util.List;
import java.util.stream.Collectors;
@@ -140,7 +141,7 @@ public class SiriusServerPlugin extends EMFPlugin {
/**
* Returns the list of the {@link ISiriusServerConfigurator}.
- *
+ *
* @return The list of the {@link ISiriusServerConfigurator}
*/
public List<ISiriusServerConfigurator> getSiriusServerConfigurators() {
@@ -150,5 +151,14 @@ public class SiriusServerPlugin extends EMFPlugin {
.collect(Collectors.toList());
// @formatter:on
}
+
+ /**
+ * Returns the address on which the server is listening.
+ *
+ * @return the address on which the server is listening.
+ */
+ public InetSocketAddress getServerAddress() {
+ return serverManager.getAddress();
+ }
}
}
diff --git a/plugins/org.eclipse.sirius.workflow.services/.checkstyle b/plugins/org.eclipse.sirius.workflow.services/.checkstyle
new file mode 100644
index 0000000000..3c756ff819
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/.checkstyle
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+ <local-check-config name="Sirius Checks" location="/org.eclipse.sirius.settings/CheckstyleConfiguration.xml" type="project" description="">
+ <additional-data name="protect-config-file" value="false"/>
+ </local-check-config>
+ <fileset name="all" enabled="true" check-config-name="Sirius Checks" local="true">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+ <filter name="FilesFromPackage" enabled="true">
+ <filter-data value="src-gen"/>
+ </filter>
+</fileset-config>
diff --git a/plugins/org.eclipse.sirius.workflow.services/.classpath b/plugins/org.eclipse.sirius.workflow.services/.classpath
new file mode 100644
index 0000000000..eca7bdba8f
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/.classpath
@@ -0,0 +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/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.sirius.workflow.services/.project b/plugins/org.eclipse.sirius.workflow.services/.project
new file mode 100644
index 0000000000..5f6b389345
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.sirius.workflow.services</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.sirius.workflow.services/.settings/fr.obeo.baseliner.prefs b/plugins/org.eclipse.sirius.workflow.services/.settings/fr.obeo.baseliner.prefs
new file mode 100644
index 0000000000..edbf92725a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/.settings/fr.obeo.baseliner.prefs
@@ -0,0 +1,2 @@
+baselineSource=platform\:/resource/org.eclipse.sirius.targets/baseline.target
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..9093a2c880
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+#Thu Jan 26 14:35:58 CET 2012
+eclipse.preferences.version=1
+encoding/<project>=US-ASCII
+encoding/analysis_templates=ISO-8859-1
diff --git a/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.core.runtime.prefs b/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000000..a287fefdba
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,3 @@
+#Mon Sep 24 15:04:19 CEST 2007
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..97c066b909
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,354 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,HIGH
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,TODOCBR,TODOMCH,TODOYMO,OPTIMISATION_POSSIBLE,TODONEWMM
+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=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=200
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
diff --git a/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..f903dbceb5
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,62 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=true
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=true
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_Sirius
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Sirius
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.ltk.core.refactoring.prefs b/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000000..b196c64a34
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..c307a7b58e
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,32 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=0
+compilers.p.build=0
+compilers.p.build.bin.includes=0
+compilers.p.build.encodings=0
+compilers.p.build.java.compiler=0
+compilers.p.build.java.compliance=0
+compilers.p.build.missing.output=0
+compilers.p.build.output.library=0
+compilers.p.build.source.library=0
+compilers.p.build.src.includes=0
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=0
+compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=1
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=0
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=0
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=0
+compilers.p.unknown-resource=0
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.sirius.workflow.services/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.workflow.services/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..6064c49c80
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.sirius.workflow.services;singleton:=true
+Bundle-Version: 6.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.sirius.workflow.services.api;version="6.0.0",
+ org.eclipse.sirius.workflow.services.api.representations;version="6.0.0",
+ org.eclipse.sirius.workflow.services.api.sessions;version="6.0.0",
+ org.eclipse.sirius.workflow.services.api.workflow;version="6.0.0",
+ org.eclipse.sirius.workflow.services.internal.representations;x-internal:=true,
+ org.eclipse.sirius.workflow.services.internal.sessions;x-internal:=true,
+ org.eclipse.sirius.workflow.services.internal.workflow;x-internal:=true
+Require-Bundle: org.eclipse.sirius;bundle-version="6.0.0",
+ org.eclipse.sirius.ui;bundle-version="6.0.0",
+ org.eclipse.swt;bundle-version="3.0.0",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.jface;bundle-version="3.8.0",
+ org.eclipse.core.runtime;bundle-version="3.8.0",
+ org.eclipse.emf.transaction;bundle-version="1.5.0",
+ org.eclipse.sirius.ext.base;bundle-version="6.0.0",
+ org.eclipse.sirius.common;bundle-version="6.0.0",
+ org.eclipse.sirius.workflow.model;bundle-version="6.0.0"
diff --git a/plugins/org.eclipse.sirius.workflow.services/about.html b/plugins/org.eclipse.sirius.workflow.services/about.html
new file mode 100644
index 0000000000..420ad0f930
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/about.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- saved from url=(0043)http://www.eclipse.org/legal/epl/about.html -->
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+
+</body></html> \ No newline at end of file
diff --git a/plugins/org.eclipse.sirius.workflow.services/build.properties b/plugins/org.eclipse.sirius.workflow.services/build.properties
new file mode 100644
index 0000000000..c4bc17ca84
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/build.properties
@@ -0,0 +1,20 @@
+# Copyright (c) 2018 Obeo.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# Contributors:
+# Obeo - initial API and implementation
+#
+
+bin.includes = .,\
+ META-INF/,\
+ plugin.properties,\
+ about.html
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+javacWarnings.. = none
+javacDefaultEncoding.. = US-ASCII
+javacProjectSettings = true
diff --git a/plugins/org.eclipse.sirius.workflow.services/plugin.properties b/plugins/org.eclipse.sirius.workflow.services/plugin.properties
new file mode 100644
index 0000000000..294ec2ec49
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/plugin.properties
@@ -0,0 +1,16 @@
+# ====================================================================
+# Copyright (c) 2018 Obeo
+# 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:
+# Obeo - initial API and implementation
+# ====================================================================
+
+pluginName = Workflow Page Provider for Aird Editor
+providerName = Eclipse Modeling Project
+
+WorkflowPage_tab_name=Workflow
+WorkflowPage_header_title=Workflow of {0}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/SiriusServicesUtils.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/SiriusServicesUtils.java
new file mode 100644
index 0000000000..c59dcfeab0
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/SiriusServicesUtils.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api;
+
+import java.util.Base64;
+
+/**
+ * Utility class used to manipulate Sirius concepts.
+ *
+ * @author sbegaudeau
+ */
+public class SiriusServicesUtils {
+ /**
+ * Encodes the given string.
+ *
+ * @param string
+ * The string to encode
+ * @return The encoded version of the given string
+ */
+ public static String encode(String string) {
+ return new String(Base64.getEncoder().encode(string.getBytes()));
+ }
+
+ /**
+ * Decodes the given string.
+ *
+ * @param string
+ * The string to decode
+ * @return The decoded version of the given string
+ */
+ public static String decode(String string) {
+ return new String(Base64.getDecoder().decode(string));
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/CreateRepresentationDto.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/CreateRepresentationDto.java
new file mode 100644
index 0000000000..c896930b99
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/CreateRepresentationDto.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.representations;
+
+/**
+ * The command used to create a new representation.
+ *
+ * @author sbegaudeau
+ */
+public class CreateRepresentationDto {
+ /**
+ * The identifier of the representation.
+ */
+ private String representationId;
+
+ /**
+ * Return the representationId.
+ *
+ * @return the representationId
+ */
+ public String getRepresentationId() {
+ return this.representationId;
+ }
+
+ /**
+ * Sets the representationId.
+ *
+ * @param representationId
+ * the representationId to set
+ */
+ public void setRepresentationId(String representationId) {
+ this.representationId = representationId;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/ISiriusRepresentationService.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/ISiriusRepresentationService.java
new file mode 100644
index 0000000000..facf99af20
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/ISiriusRepresentationService.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.representations;
+
+import java.util.Optional;
+
+/**
+ * The services used to manipulate Sirius sessions.
+ *
+ * @author sbegaudeau
+ */
+public interface ISiriusRepresentationService {
+ /**
+ * Returns the representations of the session with the given session identifier.
+ *
+ * @param sessionId
+ * The session identifier
+ * @return The representations of the session with the given session identifier
+ */
+ RepresentationsDto getRepresentations(String sessionId);
+
+ /**
+ * Creates a new representation in the session with the given sessionId.
+ *
+ * @param sessionId
+ * The identifier of the session
+ * @param createRepresentationDto
+ * The details of the representation to create
+ * @return An optional with the representation created or an empty optional if it could not be created
+ */
+ Optional<RepresentationDto> createRepresentation(String sessionId, CreateRepresentationDto createRepresentationDto);
+
+ /**
+ * Opens a representation in the session with the given sessionId.
+ *
+ * @param sessionId
+ * The identifier of the session
+ * @param openRepresentationDto
+ * The details of the representation to open
+ * @return An optional with the representation opened or an empty optional if it could not be opened
+ */
+ Optional<RepresentationDto> openRepresentation(String sessionId, OpenRepresentationDto openRepresentationDto);
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/OpenRepresentationDto.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/OpenRepresentationDto.java
new file mode 100644
index 0000000000..1c6cfdd2a1
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/OpenRepresentationDto.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.representations;
+
+/**
+ * The command used to open e representation.
+ *
+ * @author sbegaudeau
+ */
+public class OpenRepresentationDto {
+ /**
+ * The identifier of the representation.
+ */
+ private String representationId;
+
+ /**
+ * Return the representationId.
+ *
+ * @return the representationId
+ */
+ public String getRepresentationId() {
+ return this.representationId;
+ }
+
+ /**
+ * Sets the representationId.
+ *
+ * @param representationId
+ * the representationId to set
+ */
+ public void setRepresentationId(String representationId) {
+ this.representationId = representationId;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/RepresentationDto.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/RepresentationDto.java
new file mode 100644
index 0000000000..ca207a40ad
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/RepresentationDto.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.representations;
+
+/**
+ * A representation DTO.
+ *
+ * @author sbegaudeau
+ */
+public class RepresentationDto {
+ /**
+ * The identifier.
+ */
+ private String representationId;
+
+ /**
+ * The label.
+ */
+ private String label;
+
+ /**
+ * The constructor.
+ *
+ * @param representationId
+ * The identifier
+ * @param label
+ * The label
+ */
+ public RepresentationDto(String representationId, String label) {
+ this.representationId = representationId;
+ this.label = label;
+ }
+
+ /**
+ * Return the representationId.
+ *
+ * @return the representationId
+ */
+ public String getRepresentationId() {
+ return this.representationId;
+ }
+
+ /**
+ * Return the label.
+ *
+ * @return the label
+ */
+ public String getLabel() {
+ return this.label;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/RepresentationsDto.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/RepresentationsDto.java
new file mode 100644
index 0000000000..29d7123a34
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/representations/RepresentationsDto.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.representations;
+
+import java.util.List;
+
+/**
+ * The main DTO for the representations.
+ *
+ * @author sbegaudeau
+ */
+public class RepresentationsDto {
+ /**
+ * The representations.
+ */
+ private List<RepresentationDto> representations;
+
+ /**
+ * The constructor.
+ *
+ * @param representations
+ * The representations
+ */
+ public RepresentationsDto(List<RepresentationDto> representations) {
+ this.representations = representations;
+ }
+
+ /**
+ * Return the representations.
+ *
+ * @return the representations
+ */
+ public List<RepresentationDto> getRepresentations() {
+ return this.representations;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/sessions/ISiriusSessionService.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/sessions/ISiriusSessionService.java
new file mode 100644
index 0000000000..87e08a95f2
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/sessions/ISiriusSessionService.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.sessions;
+
+/**
+ * The service class used to manipulate the Sirius sessions.
+ *
+ * @author sbegaudeau
+ */
+public interface ISiriusSessionService {
+ /**
+ * Returns the Sirius sessions.
+ *
+ * @return The Sirius sessions
+ */
+ SessionsDto getSessions();
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/sessions/SessionDto.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/sessions/SessionDto.java
new file mode 100644
index 0000000000..f49fb9014e
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/sessions/SessionDto.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.sessions;
+
+/**
+ * The session.
+ *
+ * @author sbegaudeau
+ */
+public class SessionDto {
+ /**
+ * The session id.
+ */
+ private String sessionId;
+
+ /**
+ * The constructor.
+ *
+ * @param sessionId
+ * The session id
+ */
+ public SessionDto(String sessionId) {
+ this.sessionId = sessionId;
+ }
+
+ /**
+ * Return the sessionId.
+ *
+ * @return the sessionId
+ */
+ public String getSessionId() {
+ return this.sessionId;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/sessions/SessionsDto.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/sessions/SessionsDto.java
new file mode 100644
index 0000000000..43f0a5ba7a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/sessions/SessionsDto.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.sessions;
+
+import java.util.List;
+
+/**
+ * The list of the sessions.
+ *
+ * @author sbegaudeau
+ */
+public class SessionsDto {
+ /**
+ * The sessions.
+ */
+ private List<SessionDto> sessions;
+
+ /**
+ * The constructor.
+ *
+ * @param sessions
+ * The sessions.
+ */
+ public SessionsDto(List<SessionDto> sessions) {
+ this.sessions = sessions;
+ }
+
+ /**
+ * Return the sessions.
+ *
+ * @return the sessions
+ */
+ public List<SessionDto> getSessions() {
+ return this.sessions;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/ActionDto.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/ActionDto.java
new file mode 100644
index 0000000000..0f254faead
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/ActionDto.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.workflow;
+
+/**
+ * The action.
+ *
+ * @author sbegaudeau
+ */
+public class ActionDto {
+ /**
+ * The identifier.
+ */
+ private String identifier;
+
+ /**
+ * The label.
+ */
+ private String label;
+
+ /**
+ * The constructor.
+ *
+ * @param identifier
+ * The identifier
+ *
+ * @param label
+ * The label
+ */
+ public ActionDto(String identifier, String label) {
+ this.identifier = identifier;
+ this.label = label;
+ }
+
+ /**
+ * Return the identifier.
+ *
+ * @return the identifier
+ */
+ public String getIdentifier() {
+ return this.identifier;
+ }
+
+ /**
+ * Return the label.
+ *
+ * @return the label
+ */
+ public String getLabel() {
+ return this.label;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/ISiriusWorkflowService.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/ISiriusWorkflowService.java
new file mode 100644
index 0000000000..f51e464b26
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/ISiriusWorkflowService.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.workflow;
+
+import java.util.Optional;
+
+/**
+ * The service class used to manipulate Sirius workflows.
+ *
+ * @author sbegaudeau
+ */
+public interface ISiriusWorkflowService {
+ /**
+ * Returns the workflow of the session with the given sessionId.
+ *
+ * @param sessionId
+ * The identifier of the session
+ * @return The workflow of the session or an empty optional if none has been found
+ */
+ Optional<WorkflowDto> getWorkflow(String sessionId);
+
+ /**
+ * Returns the page with the given pageId.
+ *
+ * @param sessionId
+ * The identifier of the session
+ * @param pageId
+ * The identifier of the page
+ * @return An optional containing the page found, or an empty optional
+ */
+ Optional<PageDto> getPage(String sessionId, String pageId);
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/PageDto.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/PageDto.java
new file mode 100644
index 0000000000..366b1944a6
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/PageDto.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.workflow;
+
+import java.util.List;
+
+/**
+ * The page.
+ *
+ * @author sbegaudeau
+ */
+public class PageDto {
+ /**
+ * The identifier of the page.
+ */
+ private String pageId;
+
+ /**
+ * The label.
+ */
+ private String label;
+
+ /**
+ * The description.
+ */
+ private String description;
+
+ /**
+ * The identifier of the previous page.
+ */
+ private String previousPageId;
+
+ /**
+ * The identifier of the next page.
+ */
+ private String nextPageId;
+
+ /**
+ * The sections.
+ */
+ private List<SectionDto> sections;
+
+ /**
+ * The constructor.
+ *
+ * @param pageId
+ * The identifier of the page
+ * @param label
+ * The label
+ * @param description
+ * The description
+ * @param previousPageId
+ * The identifier of the previous page
+ * @param nextPageId
+ * The identifier of the next page
+ * @param sections
+ * The sections
+ */
+ public PageDto(String pageId, String label, String description, String previousPageId, String nextPageId, List<SectionDto> sections) {
+ this.label = label;
+ this.description = description;
+ this.previousPageId = previousPageId;
+ this.nextPageId = nextPageId;
+ this.sections = sections;
+ }
+
+ /**
+ * Return the pageId.
+ *
+ * @return the pageId
+ */
+ public String getPageId() {
+ return this.pageId;
+ }
+
+ /**
+ * Return the label.
+ *
+ * @return the label
+ */
+ public String getLabel() {
+ return this.label;
+ }
+
+ /**
+ * Return the description.
+ *
+ * @return the description
+ */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Return the previousPageId.
+ *
+ * @return the previousPageId
+ */
+ public String getPreviousPageId() {
+ return this.previousPageId;
+ }
+
+ /**
+ * Return the nextPageId.
+ *
+ * @return the nextPageId
+ */
+ public String getNextPageId() {
+ return this.nextPageId;
+ }
+
+ /**
+ * Return the sections.
+ *
+ * @return the sections
+ */
+ public List<SectionDto> getSections() {
+ return this.sections;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/SectionDto.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/SectionDto.java
new file mode 100644
index 0000000000..6dfdb5461e
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/SectionDto.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.workflow;
+
+import java.util.List;
+
+/**
+ * The section.
+ *
+ * @author sbegaudeau
+ */
+public class SectionDto {
+ /**
+ * The label.
+ */
+ private String label;
+
+ /**
+ * The actions of the section.
+ */
+ private List<ActionDto> actions;
+
+ /**
+ * The constructor.
+ *
+ * @param label
+ * The label
+ * @param actions
+ * The actions
+ */
+ public SectionDto(String label, List<ActionDto> actions) {
+ this.label = label;
+ this.actions = actions;
+ }
+
+ /**
+ * Return the label.
+ *
+ * @return the label
+ */
+ public String getLabel() {
+ return this.label;
+ }
+
+ /**
+ * Return the actions.
+ *
+ * @return the actions
+ */
+ public List<ActionDto> getActions() {
+ return this.actions;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/SimplePageDto.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/SimplePageDto.java
new file mode 100644
index 0000000000..edc4bcb66a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/SimplePageDto.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.workflow;
+
+/**
+ * A simple version of the page.
+ *
+ * @author sbegaudeau
+ */
+public class SimplePageDto {
+ /**
+ * The identifier of the page.
+ */
+ private String pageId;
+
+ /**
+ * The label.
+ */
+ private String label;
+
+ /**
+ * The description.
+ */
+ private String description;
+
+ /**
+ * The constructor.
+ *
+ * @param pageId
+ * The identifier of the page
+ * @param label
+ * The label
+ * @param description
+ * The description
+ */
+ public SimplePageDto(String pageId, String label, String description) {
+ this.pageId = pageId;
+ this.label = label;
+ this.description = description;
+ }
+
+ /**
+ * Return the pageId.
+ *
+ * @return the pageId
+ */
+ public String getPageId() {
+ return this.pageId;
+ }
+
+ /**
+ * Return the label.
+ *
+ * @return the label
+ */
+ public String getLabel() {
+ return this.label;
+ }
+
+ /**
+ * Return the description.
+ *
+ * @return the description
+ */
+ public String getDescription() {
+ return this.description;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/WorkflowDto.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/WorkflowDto.java
new file mode 100644
index 0000000000..809934ba87
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/api/workflow/WorkflowDto.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.api.workflow;
+
+import java.util.List;
+
+/**
+ * The workflow.
+ *
+ * @author sbegaudeau
+ */
+public class WorkflowDto {
+ /**
+ * The pages of the workflow.
+ */
+ private List<SimplePageDto> pages;
+
+ /**
+ * The constructor.
+ *
+ * @param pages
+ * The pages of the workflow
+ */
+ public WorkflowDto(List<SimplePageDto> pages) {
+ this.pages = pages;
+ }
+
+ /**
+ * Return the pages of the workflow.
+ *
+ * @return the pages of the workflow
+ */
+ public List<SimplePageDto> getPages() {
+ return this.pages;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/internal/representations/SiriusRepresentationService.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/internal/representations/SiriusRepresentationService.java
new file mode 100644
index 0000000000..b13204efe8
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/internal/representations/SiriusRepresentationService.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.internal.representations;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.sirius.business.api.dialect.DialectManager;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager;
+import org.eclipse.sirius.ui.tools.internal.views.common.item.RepresentationDescriptionItemImpl;
+import org.eclipse.sirius.ui.tools.internal.wizards.CreateRepresentationWizard;
+import org.eclipse.sirius.viewpoint.DRepresentation;
+import org.eclipse.sirius.viewpoint.DRepresentationDescriptor;
+import org.eclipse.sirius.viewpoint.description.RepresentationDescription;
+import org.eclipse.sirius.workflow.services.api.SiriusServicesUtils;
+import org.eclipse.sirius.workflow.services.api.representations.CreateRepresentationDto;
+import org.eclipse.sirius.workflow.services.api.representations.ISiriusRepresentationService;
+import org.eclipse.sirius.workflow.services.api.representations.OpenRepresentationDto;
+import org.eclipse.sirius.workflow.services.api.representations.RepresentationDto;
+import org.eclipse.sirius.workflow.services.api.representations.RepresentationsDto;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The implementation of the Sirius service for representations.
+ *
+ * @author sbegaudeau
+ */
+public class SiriusRepresentationService implements ISiriusRepresentationService {
+
+ @Override
+ public RepresentationsDto getRepresentations(String sessionId) {
+ return this.findSessionById(sessionId).map(session -> {
+ List<RepresentationDto> representations = DialectManager.INSTANCE.getAllRepresentationDescriptors(session).stream().map(descriptor -> {
+ URI uri = EcoreUtil.getURI(descriptor);
+ return new RepresentationDto(SiriusServicesUtils.encode(uri.toString()), descriptor.getName());
+ }).collect(Collectors.toList());
+ return new RepresentationsDto(representations);
+ }).orElse(new RepresentationsDto(new ArrayList<>()));
+ }
+
+ /**
+ * Returns the session with the identifier matching the given session identifier.
+ *
+ * @param sessionId
+ * The encoded session identifier
+ * @return An optional with the session found or an empty optional if no matching session has been found
+ */
+ private Optional<Session> findSessionById(String sessionId) {
+ // @formatter:off
+ return SessionManager.INSTANCE.getSessions().stream()
+ .filter(session -> sessionId.equals(session.getID()))
+ .findFirst();
+ // @formatter:on
+ }
+
+ @Override
+ public Optional<RepresentationDto> createRepresentation(String sessionId, CreateRepresentationDto createRepresentationDto) {
+ // @formatter:off
+ return this.findSessionById(sessionId).flatMap(session -> {
+ return this.findRepresentationDescription(session, createRepresentationDto.getRepresentationId()).flatMap(representationDescription -> {
+ // return DialectManager.INSTANCE.createRepresentation(name, semantic, representationDescription, session, null);
+ RepresentationDescriptionItemImpl item = new RepresentationDescriptionItemImpl(session, representationDescription, null);
+ CreateRepresentationWizard wizard = new CreateRepresentationWizard(session, item);
+ wizard.init();
+
+ Display display = PlatformUI.getWorkbench().getDisplay();
+ display.syncExec(() -> {
+ final WizardDialog dialog = new WizardDialog(display.getActiveShell(), wizard);
+ dialog.setMinimumPageSize(CreateRepresentationWizard.MIN_PAGE_WIDTH, CreateRepresentationWizard.MIN_PAGE_HEIGHT);
+ dialog.create();
+ dialog.getShell().setText("Create Representation"); //$NON-NLS-1$
+ dialog.open();
+ });
+ return Optional.empty();
+ });
+ });
+ // @formatter:on
+ }
+
+ /**
+ * Locate a {@link RepresentationDescription} in a session's enabled Viewpoints from its identifier.
+ *
+ * @param session
+ * the session.
+ * @param representationDescriptionId
+ * the identified of the {@link RepresentationDescription} to find.
+ * @return the {@link RepresentationDescription}, if it could be found.
+ */
+ private Optional<RepresentationDescription> findRepresentationDescription(Session session, String representationDescriptionId) {
+ // @formatter:off
+ return session.getSelectedViewpoints(true).stream()
+ .flatMap(viewpoint -> viewpoint.getOwnedRepresentations().stream())
+ .filter(representationDescription -> representationDescriptionId.equals(representationDescription.getName()))
+ .findFirst();
+ // @formatter:on
+ }
+
+ @Override
+ public Optional<RepresentationDto> openRepresentation(String sessionId, OpenRepresentationDto openRepresentationDto) {
+ return this.findSessionById(sessionId).flatMap(session -> {
+ String representationDescriptionId = SiriusServicesUtils.decode(openRepresentationDto.getRepresentationId());
+ ResourceSet resourceSet = session.getTransactionalEditingDomain().getResourceSet();
+ DRepresentationDescriptor representationDescriptor = (DRepresentationDescriptor) resourceSet
+ .getEObject(URI.createURI(representationDescriptionId), false);
+ DRepresentation representation = representationDescriptor.getRepresentation();
+
+ PlatformUI.getWorkbench().getDisplay().syncExec(() -> {
+ DialectUIManager.INSTANCE.openEditor(session, representation, new NullProgressMonitor());
+ });
+
+ return Optional.empty();
+ });
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/internal/sessions/SiriusSessionService.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/internal/sessions/SiriusSessionService.java
new file mode 100644
index 0000000000..055abaa0bc
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/internal/sessions/SiriusSessionService.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.internal.sessions;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.workflow.services.api.SiriusServicesUtils;
+import org.eclipse.sirius.workflow.services.api.sessions.ISiriusSessionService;
+import org.eclipse.sirius.workflow.services.api.sessions.SessionDto;
+import org.eclipse.sirius.workflow.services.api.sessions.SessionsDto;
+
+/**
+ * The implementation of the Sirius session service.
+ *
+ * @author sbegaudeau
+ */
+public class SiriusSessionService implements ISiriusSessionService {
+
+ @Override
+ public SessionsDto getSessions() {
+ List<SessionDto> sessionDtos = SessionManager.INSTANCE.getSessions().stream().map(session -> {
+ return new SessionDto(SiriusServicesUtils.encode(session.getID()));
+ }).collect(Collectors.toList());
+ return new SessionsDto(sessionDtos);
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/internal/workflow/SiriusWorkflowService.java b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/internal/workflow/SiriusWorkflowService.java
new file mode 100644
index 0000000000..2a4f18125b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.services/src/org/eclipse/sirius/workflow/services/internal/workflow/SiriusWorkflowService.java
@@ -0,0 +1,255 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.services.internal.workflow;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.sirius.business.api.query.EObjectQuery;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl;
+import org.eclipse.sirius.common.tools.api.interpreter.EvaluationException;
+import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
+import org.eclipse.sirius.ext.base.Option;
+import org.eclipse.sirius.viewpoint.description.DescriptionPackage;
+import org.eclipse.sirius.viewpoint.description.Group;
+import org.eclipse.sirius.workflow.ActivityDescription;
+import org.eclipse.sirius.workflow.PageDescription;
+import org.eclipse.sirius.workflow.SectionDescription;
+import org.eclipse.sirius.workflow.WorkflowDescription;
+import org.eclipse.sirius.workflow.services.api.workflow.ActionDto;
+import org.eclipse.sirius.workflow.services.api.workflow.ISiriusWorkflowService;
+import org.eclipse.sirius.workflow.services.api.workflow.PageDto;
+import org.eclipse.sirius.workflow.services.api.workflow.SectionDto;
+import org.eclipse.sirius.workflow.services.api.workflow.SimplePageDto;
+import org.eclipse.sirius.workflow.services.api.workflow.WorkflowDto;
+
+/**
+ * The implementation of the Sirius workflow service.
+ *
+ * @author sbegaudeau
+ */
+public class SiriusWorkflowService implements ISiriusWorkflowService {
+
+ @Override
+ public Optional<WorkflowDto> getWorkflow(String sessionId) {
+ URI sessionResourceURI = URI.createURI(sessionId);
+ return Optional.ofNullable(SessionManager.INSTANCE.getExistingSession(sessionResourceURI)).flatMap(this::computeWorkflow);
+ }
+
+ /**
+ * Computes the workflow of the given session.
+ *
+ * @param session
+ * The session
+ * @return The workflow computed form the session
+ */
+ private Optional<WorkflowDto> computeWorkflow(Session session) {
+ // @formatter:off
+ List<SimplePageDto> pageDtos = this.getWorkflowDescriptions(session)
+ .map(WorkflowDescription::getPages)
+ .flatMap(Collection::stream)
+ .flatMap(pageDescription -> this.computeSimplePage(session, pageDescription))
+ .collect(Collectors.toList());
+ // @formatter:on
+ if (pageDtos.size() > 0) {
+ return Optional.of(new WorkflowDto(pageDtos));
+ }
+ return Optional.empty();
+ }
+
+ /**
+ * Returns the workflow descriptions from the given session.
+ *
+ * @param session
+ * The session
+ * @return The workflow descriptions from the given session
+ */
+ private Stream<WorkflowDescription> getWorkflowDescriptions(Session session) {
+ // @formatter:off
+ return session.getSelectedViewpoints(true).stream()
+ .map(viewpoint -> new EObjectQuery(viewpoint).getFirstAncestorOfType(DescriptionPackage.Literals.GROUP))
+ .filter(Option::some)
+ .map(Option::get)
+ .filter(Group.class::isInstance)
+ .map(Group.class::cast)
+ .flatMap(group -> group.getExtensions().stream())
+ .filter(WorkflowDescription.class::isInstance)
+ .map(WorkflowDescription.class::cast);
+ // @formatter:on
+ }
+
+ /**
+ * Computes a pageDto for the given pageDescription.
+ *
+ * @param session
+ * the session.
+ * @param pageDescription
+ * The page description
+ * @return The simplePageDto computed
+ */
+ private Stream<SimplePageDto> computeSimplePage(Session session, PageDescription pageDescription) {
+ IInterpreter itp = session.getInterpreter();
+ EObject self = ((DAnalysisSessionImpl) session).getAnalyses().iterator().next();
+ try {
+ String title = itp.evaluateString(self, pageDescription.getTitleExpression());
+ String description = itp.evaluateString(self, pageDescription.getDescriptionExpression());
+ return Stream.of(new SimplePageDto(pageDescription.getName(), title, description));
+ } catch (EvaluationException e) {
+ return Stream.empty();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.obeonetwork.jarvis.server.sirius.api.services.workflow.IJarvisSiriusWorkflowService#getPage(java.lang.String,
+ * java.lang.String)
+ */
+ @Override
+ public Optional<PageDto> getPage(String sessionId, String pageId) {
+ // @formatter:off
+ Optional<PageDto> optionalPageDto = SessionManager.INSTANCE.getSessions().stream()
+ .filter(session -> sessionId.equals(session.getID()))
+ .findFirst()
+ .flatMap(session -> {
+ return this.getWorkflowDescriptions(session)
+ .map(WorkflowDescription::getPages)
+ .flatMap(Collection::stream)
+ .filter(pageDescription -> Objects.equals(pageId, pageDescription.getName()))
+ .findFirst()
+ .flatMap(pageDescription -> this.convert(session, pageDescription));
+ });
+ // @formatter:on
+ return optionalPageDto;
+ }
+
+ /**
+ * Converts the given description into an optional containing a page dto or an empty page dto.
+ *
+ * @param session
+ * The Sirius session
+ * @param pageDescription
+ * The page description
+ * @return An optional containing the converted page dto
+ */
+ private Optional<PageDto> convert(Session session, PageDescription pageDescription) {
+ IInterpreter itp = session.getInterpreter();
+ EObject self = ((DAnalysisSessionImpl) session).getAnalyses().iterator().next();
+ try {
+ String pageId = pageDescription.getName();
+ String label = itp.evaluateString(self, pageDescription.getTitleExpression());
+ String description = itp.evaluateString(self, pageDescription.getDescriptionExpression());
+
+ Optional<String> optionalPreviousPageId = this.getPreviousPageId(pageDescription);
+ Optional<String> optionalNextPageId = this.getNextPageId(pageDescription);
+
+ // @formatter:off
+ List<SectionDto> sectionDtos = pageDescription.getSections().stream()
+ .flatMap(sectionDescription -> this.convert(session, sectionDescription))
+ .collect(Collectors.toList());
+ // @formatter:on
+
+ return Optional
+ .of(new PageDto(pageId, label, description, optionalPreviousPageId.orElse(null), optionalNextPageId.orElse(null), sectionDtos));
+ } catch (EvaluationException e) {
+ return Optional.empty();
+ }
+ }
+
+ /**
+ * Returns an optional containing the next page identifier or an empty optional if it is the last page.
+ *
+ * @param pageDescription
+ * The page description
+ * @return An optional containing the next page identifier or an empty optional if it is the last page
+ */
+ private Optional<String> getNextPageId(PageDescription pageDescription) {
+ WorkflowDescription workflow = (WorkflowDescription) pageDescription.eContainer();
+ int index = workflow.getPages().indexOf(pageDescription);
+ if (index + 1 < workflow.getPages().size()) {
+ return Optional.of(workflow.getPages().get(index + 1).getName());
+ }
+ return Optional.empty();
+ }
+
+ /**
+ * Returns an optional containing the previous page identifier or an empty optional if it is the first page.
+ *
+ * @param pageDescription
+ * The page description
+ * @return An optional containing the previous page identifier or an empty optional if it is the first page
+ */
+ private Optional<String> getPreviousPageId(PageDescription pageDescription) {
+ WorkflowDescription workflow = (WorkflowDescription) pageDescription.eContainer();
+ int index = workflow.getPages().indexOf(pageDescription);
+ if (index > 0) {
+ return Optional.of(workflow.getPages().get(index - 1).getName());
+ }
+ return Optional.empty();
+ }
+
+ /**
+ * Converts the given section description into a stream with one section dto or an empty stream if an error occurs.
+ *
+ * @param session
+ * The Sirius session
+ * @param sectionDescription
+ * The section description
+ * @return A stream containing the converted section description
+ */
+ private Stream<SectionDto> convert(Session session, SectionDescription sectionDescription) {
+ IInterpreter itp = session.getInterpreter();
+ EObject self = ((DAnalysisSessionImpl) session).getAnalyses().iterator().next();
+ try {
+ String label = itp.evaluateString(self, sectionDescription.getTitleExpression());
+
+ // @formatter:off
+ List<ActionDto> actions = sectionDescription.getActivities().stream()
+ .flatMap(activityDescription -> this.convert(session, activityDescription))
+ .collect(Collectors.toList());
+ // @formatter:on
+
+ return Stream.of(new SectionDto(label, actions));
+ } catch (EvaluationException e) {
+ return Stream.empty();
+ }
+ }
+
+ /**
+ * Converts the given activity description into stream containing one action dto or an empty stream if an error
+ * occurs.
+ *
+ * @param session
+ * The Sirius session
+ * @param activityDescription
+ * The activity description
+ * @return A stream containing the converted action dto
+ */
+ private Stream<ActionDto> convert(Session session, ActivityDescription activityDescription) {
+ IInterpreter itp = session.getInterpreter();
+ EObject self = ((DAnalysisSessionImpl) session).getAnalyses().iterator().next();
+ try {
+ String actionId = activityDescription.getName();
+ String label = itp.evaluateString(self, activityDescription.getLabelExpression());
+ return Stream.of(new ActionDto(actionId, label));
+ } catch (EvaluationException e) {
+ return Stream.empty();
+ }
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/.checkstyle b/plugins/org.eclipse.sirius.workflow.ui.page/.checkstyle
new file mode 100644
index 0000000000..3c756ff819
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/.checkstyle
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+ <local-check-config name="Sirius Checks" location="/org.eclipse.sirius.settings/CheckstyleConfiguration.xml" type="project" description="">
+ <additional-data name="protect-config-file" value="false"/>
+ </local-check-config>
+ <fileset name="all" enabled="true" check-config-name="Sirius Checks" local="true">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+ <filter name="FilesFromPackage" enabled="true">
+ <filter-data value="src-gen"/>
+ </filter>
+</fileset-config>
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/.classpath b/plugins/org.eclipse.sirius.workflow.ui.page/.classpath
new file mode 100644
index 0000000000..eca7bdba8f
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/.classpath
@@ -0,0 +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/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/.project b/plugins/org.eclipse.sirius.workflow.ui.page/.project
new file mode 100644
index 0000000000..020f9c6392
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.sirius.workflow.ui.page</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/.settings/fr.obeo.baseliner.prefs b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/fr.obeo.baseliner.prefs
new file mode 100644
index 0000000000..edbf92725a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/fr.obeo.baseliner.prefs
@@ -0,0 +1,2 @@
+baselineSource=platform\:/resource/org.eclipse.sirius.targets/baseline.target
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..9093a2c880
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+#Thu Jan 26 14:35:58 CET 2012
+eclipse.preferences.version=1
+encoding/<project>=US-ASCII
+encoding/analysis_templates=ISO-8859-1
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.core.runtime.prefs b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000000..a287fefdba
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,3 @@
+#Mon Sep 24 15:04:19 CEST 2007
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..97c066b909
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,354 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,HIGH
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,TODOCBR,TODOMCH,TODOYMO,OPTIMISATION_POSSIBLE,TODONEWMM
+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=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=200
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..f903dbceb5
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,62 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=true
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=true
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_Sirius
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Sirius
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.ltk.core.refactoring.prefs b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000000..b196c64a34
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.pde.prefs b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000000..c307a7b58e
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,32 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=0
+compilers.p.build=0
+compilers.p.build.bin.includes=0
+compilers.p.build.encodings=0
+compilers.p.build.java.compiler=0
+compilers.p.build.java.compliance=0
+compilers.p.build.missing.output=0
+compilers.p.build.output.library=0
+compilers.p.build.source.library=0
+compilers.p.build.src.includes=0
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=0
+compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=1
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=0
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=0
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=0
+compilers.p.unknown-resource=0
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.workflow.ui.page/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..e818e70fc7
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.sirius.workflow.ui.page;singleton:=true
+Bundle-Version: 6.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.sirius.ui.editor;bundle-version="6.0.0",
+ org.eclipse.ui.forms;bundle-version="3.7.100",
+ org.eclipse.ui;bundle-version="3.109.0",
+ org.eclipse.sirius.common;bundle-version="6.0.0",
+ org.eclipse.sirius.ui;bundle-version="6.0.0",
+ org.eclipse.emf.transaction;bundle-version="1.9.0",
+ org.eclipse.ui.browser;bundle-version="3.6.100",
+ org.eclipse.sirius.ecore.extender;bundle-version="5.1.0",
+ org.eclipse.sirius.server;bundle-version="6.0.0"
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.sirius.workflow.ui.page;version="6.0.0"
+Bundle-Activator: org.eclipse.sirius.workflow.ui.page.WorkflowPagePlugin$Implementation
+Import-Package: org.eclipse.sirius.ext.base;version="2.1.0",
+ org.eclipse.sirius.workflow.services.api;version="6.0.0"
+Automatic-Module-Name: org.eclipse.sirius.workflow.ui.page
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/about.html b/plugins/org.eclipse.sirius.workflow.ui.page/about.html
new file mode 100644
index 0000000000..420ad0f930
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/about.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- saved from url=(0043)http://www.eclipse.org/legal/epl/about.html -->
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+
+</body></html> \ No newline at end of file
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/build.properties b/plugins/org.eclipse.sirius.workflow.ui.page/build.properties
new file mode 100644
index 0000000000..536522a34f
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/build.properties
@@ -0,0 +1,21 @@
+# Copyright (c) 2018 Obeo.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v2.0
+# which accompanies this distribution, and is available at
+# https://www.eclipse.org/legal/epl-2.0/
+#
+# Contributors:
+# Obeo - initial API and implementation
+#
+
+bin.includes = .,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+javacWarnings.. = none
+javacDefaultEncoding.. = US-ASCII
+javacProjectSettings = true
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/plugin.properties b/plugins/org.eclipse.sirius.workflow.ui.page/plugin.properties
new file mode 100644
index 0000000000..294ec2ec49
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/plugin.properties
@@ -0,0 +1,16 @@
+# ====================================================================
+# Copyright (c) 2018 Obeo
+# 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:
+# Obeo - initial API and implementation
+# ====================================================================
+
+pluginName = Workflow Page Provider for Aird Editor
+providerName = Eclipse Modeling Project
+
+WorkflowPage_tab_name=Workflow
+WorkflowPage_header_title=Workflow of {0}
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/plugin.xml b/plugins/org.eclipse.sirius.workflow.ui.page/plugin.xml
new file mode 100644
index 0000000000..d1fc895c09
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/plugin.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension point="org.eclipse.sirius.ui.editor.sessionEditorPageProvider">
+ <pageProvider class="org.eclipse.sirius.workflow.ui.page.WorkflowPageProvider" />
+ </extension>
+</plugin>
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/Messages.java b/plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/Messages.java
new file mode 100644
index 0000000000..ede317121d
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/Messages.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.ui.page;
+
+import org.eclipse.sirius.ext.base.I18N;
+import org.eclipse.sirius.ext.base.I18N.TranslatableMessage;
+
+/**
+ * Translatable messages used in this plug-in.
+ *
+ * @author pcdavid
+ *
+ */
+public class Messages {
+ static {
+ I18N.initializeMessages(Messages.class, WorkflowPagePlugin.INSTANCE);
+ }
+
+ @TranslatableMessage
+ public static String WorkflowPage_tab_name;
+
+ @TranslatableMessage
+ public static String WorkflowPage_header_title;
+
+}
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/WorkflowPage.java b/plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/WorkflowPage.java
new file mode 100644
index 0000000000..130aa01e4d
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/WorkflowPage.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.ui.page;
+
+import java.net.InetSocketAddress;
+import java.text.MessageFormat;
+import java.util.Objects;
+import java.util.Optional;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.transaction.ResourceSetChangeEvent;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.server.internal.SiriusServerPlugin;
+import org.eclipse.sirius.ui.editor.SessionEditorPlugin;
+import org.eclipse.sirius.ui.editor.api.pages.AbstractSessionEditorPage;
+import org.eclipse.sirius.ui.editor.api.pages.PageProviderRegistry.PositioningKind;
+import org.eclipse.sirius.ui.editor.api.pages.PageUpdateCommandBuilder.PageUpdateCommand;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+
+/**
+ * A page in the session editor that displays the workflow configured for a session and allows the user to trigger the
+ * corresponding actions.
+ * <p>
+ * The implementations is based on a web application; the page simply embed a {@link Browser} component and points it to
+ * the URI of the application.
+ *
+ * @author pcdavid
+ */
+public class WorkflowPage extends AbstractSessionEditorPage {
+ /**
+ * The session.
+ */
+ private final Session session;
+
+ /**
+ * The browser component used to display the workflow web application.
+ */
+ private Browser browser;
+
+ /**
+ * Creates a new {@link WorkflowPage} for the specified session.
+ *
+ * @param s
+ * the session.
+ */
+ public WorkflowPage(Session s) {
+ super(s.getID(), Messages.WorkflowPage_tab_name);
+ this.session = Objects.requireNonNull(s);
+ }
+
+ @Override
+ protected void createFormContent(IManagedForm managedForm) {
+ super.createFormContent(managedForm);
+ FormToolkit toolkit = managedForm.getToolkit();
+ ScrolledForm scrolledForm = managedForm.getForm();
+ scrolledForm.setText(MessageFormat.format(Messages.WorkflowPage_header_title, session.getID()));
+ toolkit.decorateFormHeading(scrolledForm.getForm());
+
+ Composite body = managedForm.getForm().getBody();
+ body.setLayout(GridLayoutFactory.swtDefaults().create());
+
+ Composite subBody = toolkit.createComposite(body);
+ subBody.setLayout(GridLayoutFactory.swtDefaults().numColumns(2).equalWidth(false).margins(0, 0).create());
+ subBody.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ browser = new Browser(subBody, SWT.WEBKIT | SWT.FILL);
+ GridData browserGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ browserGridData.widthHint = 0;
+ browserGridData.heightHint = 0;
+ browser.setLayoutData(browserGridData);
+ browser.setUrl(getRootURL(this.session));
+ }
+
+ private String getRootURL(Session session) {
+ URI uri = session.getSessionResource().getURI();
+ if (uri.isPlatformResource()) {
+ @SuppressWarnings("restriction")
+ InetSocketAddress addr = SiriusServerPlugin.getPlugin().getServerAddress();
+ // Use this URL when using the frontend in dev mode.
+ //return "http://localhost:3000/projects/" + uri.segment(1); //$NON-NLS-1$
+ return String.format("http://%s:%d/projects/%s", addr.getHostString(),addr.getPort(), uri.segment(1)); //$NON-NLS-1$
+ } else {
+ return "http://localhost:8080/"; //$NON-NLS-1$
+ }
+ }
+
+ @Override
+ public Optional<String> getLocationId() {
+ return Optional.of(SessionEditorPlugin.DEFAULT_PAGE_ID);
+ }
+
+ @Override
+ public Optional<PositioningKind> getPositioning() {
+ return Optional.of(PositioningKind.AFTER);
+ }
+
+ @Override
+ public Optional<PageUpdateCommand> pageChanged(boolean isVisible) {
+ return Optional.empty();
+ }
+
+ @Override
+ public Optional<PageUpdateCommand> resourceSetChanged(ResourceSetChangeEvent resourceSetChangeEvent) {
+ Display.getDefault().asyncExec(() -> {
+ if (browser != null && !browser.isDisposed()) {
+ browser.refresh();
+ }
+ });
+ return Optional.empty();
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/WorkflowPagePlugin.java b/plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/WorkflowPagePlugin.java
new file mode 100644
index 0000000000..d609a175e7
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/WorkflowPagePlugin.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.ui.page;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.osgi.framework.BundleContext;
+
+public class WorkflowPagePlugin extends EMFPlugin {
+ /**
+ * The identifier of the plugin.
+ */
+ public static final String PLUGIN_ID = "org.eclipse.sirius.workflow.ui.page"; //$NON-NLS-1$
+
+ /**
+ * The sole instance of the plugin.
+ */
+ public static final WorkflowPagePlugin INSTANCE = new WorkflowPagePlugin();
+
+ /**
+ * The sole instance of the bundle activator.
+ */
+ private static Implementation plugin;
+
+ /**
+ * The constructor.
+ */
+ public WorkflowPagePlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The bundle activator.
+ *
+ * @author sbegaudeau
+ */
+ public static class Implementation extends EclipsePlugin {
+
+ /**
+ * The constructor.
+ */
+ public Implementation() {
+ super();
+ WorkflowPagePlugin.plugin = this;
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/WorkflowPageProvider.java b/plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/WorkflowPageProvider.java
new file mode 100644
index 0000000000..200f97570f
--- /dev/null
+++ b/plugins/org.eclipse.sirius.workflow.ui.page/src/org/eclipse/sirius/workflow/ui/page/WorkflowPageProvider.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.workflow.ui.page;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.function.Supplier;
+
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.ui.editor.SessionEditor;
+import org.eclipse.sirius.ui.editor.api.pages.AbstractSessionEditorPage;
+import org.eclipse.sirius.ui.editor.api.pages.PageProvider;
+
+/**
+ * Provides a {@link WorkflowPage} for the session editor.
+ *
+ * @author pcdavid
+ */
+public class WorkflowPageProvider extends PageProvider {
+ /**
+ * Prefix used to identify the pages.
+ */
+ private static final String PREFIX = "org.eclipse.sirius.workflow:"; //$NON-NLS-1$
+
+ @Override
+ public Map<String, Supplier<AbstractSessionEditorPage>> getPages(SessionEditor editor) {
+ Session s = editor.getSession();
+ Map<String, Supplier<AbstractSessionEditorPage>> result = new HashMap<>();
+ result.put(PREFIX + s.getID(), () -> new WorkflowPage(s));
+ return result;
+ }
+
+ @Override
+ public boolean provides(String pageId) {
+ if (pageId.startsWith(PREFIX)) {
+ String sid = pageId.substring(PREFIX.length());
+ return SessionManager.INSTANCE.getSessions().stream().anyMatch(s -> s.getID().equals(sid));
+ }
+ return false;
+ }
+}

Back to the top