Posts Tagged ‘Eclipse Plugin’

ModelGoon 4.4.1

Sunday, April 17th, 2011

ModelGoon 4.4.1 is now available. This release contains bug fixes on Class and Interaction diagrams. As I am currently working on round-trip features, they are available as beta. Feel free to contact me for suggestions or comments on round-trip implementations.

As usual, updates can be made via the Eclipse update menu, and here is the archive site : Download Archive Site Here.

I hope you continue to enjoy ModelGoon and always welcome your feedback. Don’t forget to support ModelGoon @ the Marketplace by adding it to your favorites.

ModelGoon 4.4.0 Released

Sunday, April 10th, 2011

ModelGoon 4.4.0 is now available, it contains major improvements on Class and Interaction Diagrams :

  • Connections can be routed manually
  • User can create and edit notes on the diagram
  • User can define associations type : Simple, Aggregation or Composition (with the context menu)

Existing diagrams are fully compatible with ModelGoon 4.4.0. I will soon update the user’s guide.

As usual, updates can be made via the Eclipse update menu, and here is the archive site : Download Archive Site Here.

I hope you continue to enjoy ModelGoon and always welcome your feedback. Don’t forget to support ModelGoon @ the Marketplace by adding it to your favorites.

Building Eclipse plugins with Maven

Tuesday, March 8th, 2011

In this short tutorial I will explain how to build Eclipse plugin with Maven and Tycho. I decided to write this tutorial as I struggled to manage to build ModelGoon in an “industrial” manner with Maven. This tutorial supposes that the reader has a good knowledge of Maven builds and Eclipse Plugins structure.

Introduction :

Building an Eclipse plugin with maven is quite different from building other Java applications. OSGi bundles are stored in  p2 repositories (as Maven uses m2 repositories) and defines their versions and dependencies in the Manifest ; Maven uses the POM. In order to perform the build, we will use a maven plugin called Tycho and the M2Eclipse plugin with Tycho support.

What I did for ModelGoon is to create a Maven multi-module project containing :

  • the plugin’s implementation
  • the test plugin : contains all unit tests
  • the feature
  • the update site
  • the target platform description

In the next sections I will only focus on the Tycho specific part.

Parent Project Configuration :

The parent Project’s POM adds the declaration of “tycho-maven-maven” and describes the target platform’s configuration.

<
packaging>pom</packaging>

…..

<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<resolver>p2</resolver>
<pomDependencies>consider</pomDependencies>
<target>
<artifact>
<groupId>org.modelgoon</groupId>
<artifactId>TargetPlatform</artifactId>
<version>4.2.0-SNAPSHOT</version>
<classifier>platform</classifier>
</artifact>
</target>
</configuration>
</plugin>

Target Platform Configuration :

First of all we need to create a target Definition :  “New->Plugin Development->Target Definition”
Then we add referenced p2 repositories in it. This is where the tycho plugin will search for plugins bundles. For instance :
-  http://download.eclipse.org/eclipse/updates/3.6 Official Eclipse p2 repository
-  http://download.eclipse.org/tools/gef/updates/releases GEF’s p2 repository
Note that it is also possible to work will a local repository if there is no internet connexion available. In this case, just create an update site project, add all of the proposed bundles, and host it on a local web server.
The project packaging must be “pom” :
<packaging>pom</packaging>

Then just add the following line into the project’s pom.xml :
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>platform.target</file>
<type>target</type>
<classifier>platform</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>

Plugin Project Configuration :

The packaging has to be :
<packaging>eclipse-plugin</packaging>
Here comes Tycho’s configuration part :
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<resolver>p2</resolver>
<target>
<artifact>
<groupId>org.modelgoon</groupId>
<artifactId>TargetPlatform</artifactId>
<version>4.2.0-SNAPSHOT</version>
<classifier>platform</classifier>
</artifact>
</target>
</configuration>
</plugin>
Note that it is still possible to include standard Maven dependencies inside the POM.

Test Project Configuration :

Only the packaging differs from the Plugin project configuration. It has to be :
<packaging>eclipse-test-plugin</packaging>

Feature configuration :

In this part, there is no need for tycho configuration just define the packaging as :
<packaging>eclipse-feature</packaging>

Update Site configuration :

Define the packaging :
<packaging>eclipse-update-site</packaging>
I also added this in the plugins section :
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<allowConflictingDependencies>true</allowConflictingDependencies>
</configuration>
</plugin>

Thanks for reading, hope it helps!

Class Diagram Tutorial

Tuesday, March 8th, 2011

Thanks to oanacioara!

Sequence Diagrams screencast

Sunday, January 9th, 2011

ModelGoon 4.0.0 – Sequence Diagram

Sunday, January 2nd, 2011

First of all I would like to wish you all a happy new year.

Here is the fourth major version of ModelGoon. The brand new feature is to build sequence diagram from a method’s body. At this time, it supports only the first level sequence and the diagram  can only be exported to an image. I decided to release this first version of the Sequence Diagram thought it is incomplete and I am waiting for users feedback in order to focus on the most useful features. So feel free to contact me for suggestions or issues.

Here is an exported Sequence Diagram built from real world source code.


Here are the usage steps :

  1. From the Package Explorer view or from a Class Diagram View, right click on a Method.
  2. Select “Initialize Sequence Diagram” from the context menu
  3. The diagram will appear in the center of the workbench
  4. Right click on the diagram show a context menu.

Check out this page for installation instructions.

The dropins folder installation binary can be downloaded here.

Overall Communication Diagram Screenshot

Saturday, December 11th, 2010

I finally decided to implement an overall Communication Diagram, in short it is a Communication Diagram without the sequence numbers. Here is a screenshot of this new feature which will be available soon.