Normal behaviour: If you have created an HTML5 project or using a folder with a package.json inside of it, NetBeans knows that this is an HTML5 project and opens this folder as an HTML5 project. If you have a pom.xml file inside a folder, NetBeans opens this folder as a Maven project.

Use-case with problems: If you have both files inside of it, due to configurations where you use the HTML5 project as your development environment and the pom part due to uploading an artifact to nexus, NetBeans priority number one is to load the pom.xml file while ignoring the package.json file. It is now covered as a maven project, even though you still have a package.json in it.

Another case happens with a mixed project of gradle and maven.

Sometimes you need the actions (configurating, building, running, etc.) from the one project type and sometimes you need it from the other. Both project types have different folder structure.


Solution: For those cases, it would be good, if we can enable/disable features from other project types to the current one, where it makes sense.


Possible UI: If NetBeans opens a project with 2 or more files, for different project types (pom.xml and package.json e.g.) I should have the option on the project type to enable features from the other project type, that could be possible, which is an HTML5 project.

There should be a different section, inside of the project properties like: HTML5 project type also detected. With all that stuff from the HTML5 project type, which will override some other stuff (building the project, running the project, etc.) by checkboxes.


Screenshot of such a possible UI:


In the screenshot, you can see 2 sections (Maven project - Current project type and HTML5 project) Inside of each sub section, which is available in both project types, it should be possible to override the current project settings, with the other project settings, with a checkbox in the section: Override current configuration with this configuration. It is similar to the formatting options, where I can set global formatting options and override them via the project specific formatting options.

A mixed icon could also be possible to mark those projects as not broken but with multiple project types. That icon could be generic.


Other solution (Switiching project type): If I override the source settings from the current project with the HTML5 project, the project view should switch to the HTML5 project, with the HTML5 icon, actions, nodes and childnodes. It will be irritating, if I can override configurations w/o using the project specific actions, folder/node structure, etc.

  • No labels

1 Comment

  1. This could be very tricky. Implementations tied to HTML5 projects are very likely to run queries like FileOwnerQuery.getOwner for a file - but unless this feature propagates to this query layer, they would get a Maven project. Depending on the implementation, it will error out, or simply won't work (would disable itself). 

    While the idea is very nice, it will IMHO require to dig deeper in the APIs; e.g. to allow asking for certain project type that owns the the file - that way clients whi actively look for something specific could eventually get the appropriate project, while uninterested clients would get the preferred one.