minimal-j icon indicating copy to clipboard operation
minimal-j copied to clipboard

Eclipse Run Configuration Plug In

Open BrunoEberhard opened this issue 6 years ago • 0 comments

Minimal-J applications can be started with different frontend - ends just by configuration. There is also the shortcut to simply configurate the frontend in the main method. This also mostly done because it's faster with eclipse code completion.

At the moment there are 4 working frontends: html, swing, vaadin, lanterna (terminal).

It would be nice to have a special "run type" in eclipse for Minimal-J applications. In the configuration dialog it should be possible to select the used frontend and to switch other Minimal-J flags like "-DMjDevMode=true".

Every frontend has a main class with the same arguments. To start the application with swing, do something like:

java -cp .m2/repository/org/minimalj/example/helloWorld/1.0.0.0/helloWorld-1.0.0.0.jar:.m2/repository/org/minimalj/minimalj/1.15.0.1-SNAPSHOT/minimalj-1.15.0.1-SNAPSHOT.jar org.minimalj.frontend.impl.swing.Swing org.minimalj.example.helloworld.HelloWorldApplication

To start it as html application:

java -cp .m2/repository/org/minimalj/example/helloWorld/1.0.0.0/helloWorld-1.0.0.0.jar:.m2/repository/org/minimalj/minimalj/1.15.0.1-SNAPSHOT/minimalj-1.15.0.1-SNAPSHOT.jar:.m2/repository/org/nanohttpd/nanohttpd/2.3.1/nanohttpd-2.3.1.jar org.minimalj.frontend.impl.web.WebServer org.minimalj.example.helloworld.HelloWorldApplication

For lanterna or vaadin you need even more 3rd party jars (as you see in the special projects in the ext folder).

So the eclipse plugin should provide:

  • "Run with Swing Frontend", "Run with Html Frontend", "Run with Lantern Frontend", "Run with Vaadin Frontend" on a class that extends org.minimalj.application.Application
  • These actions should run the selected class with the frontend. The classpath has to set correctly.
  • In run configuration dialog there should be a dropdown to change the frontend and at least one checkbox for "MjDevMode". For html Frontend additional configuration for MjFrontendPort would be nice.

BrunoEberhard avatar Feb 08 '19 06:02 BrunoEberhard