Skip to content

Commit

Permalink
[2736] Add a starter project for beans related to the task meta-model
Browse files Browse the repository at this point in the history
Bug: #2736
Signed-off-by: Laurent Fasani <laurent.fasani@obeo.fr>
  • Loading branch information
lfasani committed Dec 13, 2023
1 parent 49712d2 commit 18b965a
Show file tree
Hide file tree
Showing 28 changed files with 1,125 additions and 58 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ info: {
=== New Features

- https://github.com/eclipse-sirius/sirius-web/issues/2735[#2735] [gantt] Contribute the first version of the Gantt representation.
- https://github.com/eclipse-sirius/sirius-web/issues/2736[#2736] [gantt] Add a starter project for beans related to task meta-model.

=== Improvements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@
<artifactId>sirius-components-task-edit</artifactId>
<version>2023.12.1</version>
</dependency>
<dependency>
<groupId>org.eclipse.sirius</groupId>
<artifactId>sirius-components-task-starter</artifactId>
<version>2023.12.1</version>
</dependency>
<dependency>
<groupId>fr.obeo.dsl.designer.sample.flow</groupId>
<artifactId>fr.obeo.dsl.designer.sample.flow</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.sirius.web.sample.task.configuration.view;
package org.eclipse.sirius.web.sample.gantt;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EPackage;
Expand All @@ -23,27 +23,26 @@
import org.springframework.context.annotation.Configuration;

/**
* Configuration of the EMF support for task.
* Configuration of the EMF support for task MM and representation description related to Task.
*
* @author lfasani
*/
@Configuration
public class TaskGanttEMFConfiguration {
public class GanttEMFConfiguration {

@Bean
EPackage viewGanttEPackage() {
return GanttPackage.eINSTANCE;
}

@Bean
@ConditionalOnProperty(prefix = "org.eclipse.sirius.web.features", name = "studioDefinition")
ChildExtenderProvider ganttChildExtenderProvider() {
return new ChildExtenderProvider(ViewPackage.eNS_URI, GanttItemProviderAdapterFactory.ViewChildCreationExtender::new);
AdapterFactory viewGanttAdapterFactory() {
return new GanttItemProviderAdapterFactory();
}

@Bean
@ConditionalOnProperty(prefix = "org.eclipse.sirius.web.features", name = "studioDefinition")
AdapterFactory ganttAdapterFactory() {
return new GanttItemProviderAdapterFactory();
ChildExtenderProvider ganttChildExtenderProvider() {
return new ChildExtenderProvider(ViewPackage.eNS_URI, GanttItemProviderAdapterFactory.ViewChildCreationExtender::new);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.sirius.web.sample.task.configuration.view;
package org.eclipse.sirius.web.sample.gantt;

import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.sirius.web.sample.task.configuration.view;
package org.eclipse.sirius.web.sample.gantt;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.sirius.web.sample.task.configuration.view;
package org.eclipse.sirius.web.sample.gantt;

import org.eclipse.sirius.components.view.View;
import org.eclipse.sirius.components.view.gantt.GanttDescription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.sirius.web.sample.task.configuration.view;
package org.eclipse.sirius.web.sample.gantt;

import java.util.List;
import java.util.UUID;
Expand All @@ -21,9 +21,9 @@
import org.eclipse.sirius.components.core.configuration.IStereotypeDescriptionRegistry;
import org.eclipse.sirius.components.core.configuration.IStereotypeDescriptionRegistryConfigurer;
import org.eclipse.sirius.components.core.configuration.StereotypeDescription;
import org.eclipse.sirius.components.task.starter.helper.StereotypeBuilder;
import org.eclipse.sirius.components.view.View;
import org.eclipse.sirius.components.view.ViewFactory;
import org.eclipse.sirius.web.sample.configuration.StereotypeBuilder;
import org.springframework.context.annotation.Configuration;

import io.micrometer.core.instrument.MeterRegistry;
Expand All @@ -34,7 +34,7 @@
* @author lfasani
*/
@Configuration
public class TaskViewsStereotypeDescriptionRegistryConfigurer implements IStereotypeDescriptionRegistryConfigurer {
public class ViewsStereotypeDescriptionRegistryConfigurer implements IStereotypeDescriptionRegistryConfigurer {

private static final UUID GANTT_VIEW_ID = UUID.nameUUIDFromBytes("gantt_view".getBytes());

Expand All @@ -44,7 +44,7 @@ public class TaskViewsStereotypeDescriptionRegistryConfigurer implements IStereo

private final StereotypeBuilder stereotypeBuilder;

public TaskViewsStereotypeDescriptionRegistryConfigurer(MeterRegistry meterRegistry) {
public ViewsStereotypeDescriptionRegistryConfigurer(MeterRegistry meterRegistry) {
this.stereotypeBuilder = new StereotypeBuilder(TIMER_NAME, meterRegistry);
}

Expand Down
1 change: 1 addition & 0 deletions packages/starters/backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@

<modules>
<module>sirius-components-starter</module>
<module>sirius-components-task-starter</module>
</modules>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<fileset name="all" enabled="true" check-config-name="Sirius" local="false">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
<filter name="FilesFromPackage" enabled="true">
<filter-data value="src/main/resources"/>
</filter>
</fileset-config>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
34 changes: 34 additions & 0 deletions packages/starters/backend/sirius-components-task-starter/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>sirius-components-task-starter</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Mon Sep 24 15:04:19 CEST 2007
eclipse.preferences.version=1
line.separator=\n
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=false
Loading

0 comments on commit 18b965a

Please sign in to comment.