Open JoelProminic opened 5 years ago
My idea is to define a set of common actions that will be in the menu for all Java and Grais projects. These menu actions would be configured with reasonable defaults for new and imported projects:
Action Java Maven Java Gradle Grails Clean clean clean clean Build package build compile Build & Run clean package exec:java run run-app Build Release clean install clean publishToMavenLocal war
I would like to support this idea. At this moment respective project-types' build-plugin classes holds static command references for the above menu options, i.e. when 'Build & Run' may hold 'run' command in Gradle build-plugin class, in Grails build-plugin class this reference maybe 'clean run' etc. These referencing will going to be change as menu-options changed dynamically (between projects).
We have been trying to figure out how to handle the menu actions for Java and Grails projects: https://github.com/prominic/Moonshine-IDE/issues/465#issuecomment-499840602 https://github.com/prominic/Moonshine-IDE/issues/519#issuecomment-492854514 https://github.com/prominic/Moonshine-IDE/issues/570
I think the Grails/Gradle/Maven commands fall into two categories:
I'd like to make both of these cases easy to use and flexible. I think #570 is on the right track for case 2, and I have a proposed idea for case 1 below.
My idea is to define a set of common actions that will be in the menu for all Java and Grais projects. These menu actions would be configured with reasonable defaults for new and imported projects:
NOTE: this uses the execution logic from https://github.com/prominic/Moonshine-IDE/issues/547#issuecomment-490290118 rather than the existing Build & Run which runs "java -jar" in a second step. This will be more generic, but it also requires the projects to have the "exec" (Maven) or "application" (Gradle) plugins configured.
This may not fit all projects, so Moonshine would provide an interface in the project settings to edit the commands. The commands would be saved to the project file.
For example, the user might want updates like this:
If the default commands are adequate for the user, the will not need to worry about this interface.
The user could also hijack one of these menu actions if they want to use it for another common command. The menu item name would not be updated, however.
We could also consider allowing the user to add additional custom menu items, or rename the existing menu items, but I this is too complicated for now.
I'd like to discuss this before we start implementing this feature.