che-server/samples/sample-plugin-wizard
Artem Zatsarynnyi 1ba5f63d8f Merge branch 'master' into spi 2017-06-29 17:45:59 +03:00
..
che-sample-plugin-wizard-ide Merge branch 'master' into spi 2017-06-29 17:45:59 +03:00
che-sample-plugin-wizard-server RELEASE: Set next development version 2017-06-29 07:59:05 +00:00
che-sample-plugin-wizard-shared RELEASE: Set next development version 2017-06-29 07:59:05 +00:00
README.md Remove unnecessary gwt.xml instructions (#5317) 2017-06-14 13:57:44 +03:00
pom.xml RELEASE: Set next development version 2017-06-29 07:59:05 +00:00

README.md

Description

The Plugin Wizard is a demo plugin showing:

  • a new project type for a programming language called "x" and gives it a pretty name of "Sample Project Type"
  • a wizard that adds a compiler version property.
  • a new file type for X source code
  • a sample action that is invoked from within the help menu

Plugin overview

Create a new Project Type

Create a new File Type

Create a new Action

How to build sample-plugin-wizard plugin

The plugin-wizard extension has a client-side (IDE) part and an server part. It also includes some code shared between the IDE and the server. You have to introduce the extension as a dependency in /che/assembly/assembly-ide-war/pom.xml.

Add:

...
<dependency>
  <groupId>org.eclipse.che.sample</groupId>
  <artifactId>che-sample-plugin-wizard-ide</artifactId>
</dependency>
<dependency>
  <groupId>org.eclipse.che.sample</groupId>
  <artifactId>che-sample-plugin-wizard-shared</artifactId>
</dependency>
...

You can insert the dependency anywhere in the list. After you have inserted it, run mvn sortpom:sort and maven will order the pom.xml for you.

Introduce the server part of the extension as a dependency in /che/assembly/assembly-wsagent-war.

Add:

...
<dependency>
  <groupId>org.eclipse.che.sample</groupId>
  <artifactId>che-sample-plugin-wizard-server</artifactId>
</dependency>
<dependency>
  <groupId>org.eclipse.che.sample</groupId>
  <artifactId>che-sample-plugin-wizard-shared</artifactId>
</dependency>
...

You can insert the dependency anywhere in the list. After you have inserted it, run mvn sortpom:sort and maven will order the pom.xml for you.

3- Rebuild Eclipse Che

# Build a new IDE.war
# This IDE web app will be bundled into the assembly
cd che/assembly/assembly-ide-war
mvn clean install

# Create a new web-app that includes the server-side extension
cd che/assembly/assembly-wsagent-war
mvn clean install

# Creates a new workspace agent that includes new web app w/ your extension
cd assembly/assembly-wsagent-server
mvn clean install

# Create a new Che assembly that includes all new server- and client-side extensions
cd assembly/assembly-main
mvn clean install

4- Run Eclipse Che

# Start Che using the CLI with your new assembly
# Replace <local-repo> with the path to your Che repository, to use local binaries in your local image
# Replace <version> with the actual version you are working on
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock \
                    -v <local-path>:/data \
                    -v <local-repo>:/repo \
                       eclipse/che:<version> start --debug

Documentation resources