Hey,

there is a Long discussion going on here: 
https://issues.apache.org/jira/browse/NETBEANS-1802

In short, I have the problem that NetBeans, forces me into one project type 
(here maven) when there are two or more files/folders of different Project 
types (pom.xml, package.json, etc.). So my case I have a project with a pom.xml 
and a package.json and NetBeans opens that project as maven. Which is not 
correct. But removing the pom.xml is not working, because I need it. So I 
preferred a project type switcher, but in the end as Geertjan and Milos already 
said, that doesn’t make sense. So in general it would be good to activate 
features from one project type into the other but not all at the same time. 
Because this will be a mess, mixed HTML5/JS Actions with Maven Actions, 
build/run will not work, because which will win?

There is another discussion with Geertjan and Milos but in private, I will 
summerize some Infos here:

TLDR;
Milos wrote:

„Yeah, not really much to add there that wasn't already mentioned in 
https://github.com/tropyx/NetBeansPuppet/issues/27 .
project types are semi-automatically identified by certain files in a directory 
and each directory can be exactly one project type. That's a core feature of 
netbeans project system. To allow switching you woud need to create one project 
type to bind them all. But really, you don't want a project type switcher, you 
want features from one project type in the other project type. That's how maven 
war/ear/ejb/apisupport support works, bridging editor features for certain 
content and have them available in the other. That's generally quite a bit of 
work for individual features and sometimes the bridging could be shady.
 
Alternatively you can just rewire your content to be 2 projects in 2 
directories. There still could be rough edges to it but it's likely the easiest 
way out.
 
Milos“


Me again:

„That could be another thing. As I said like the feature 
activation/deactivation which is already possible in HTML5 -> NodeJS. I can 
activate/deactivate nodejs features.

But I don’t want all features of both project types in one project. That will 
be a mess of actions shown in the context menu. To many project options, 
because now we have 2 projects. And what will happen for build/run? What will 
win? I will hit run or build and for me I need to change the building pipeline 
to node with grunt/gulp or npm and not using maven for this. So yes, It would 
be nice to have features from one project into the other one, BUT I will decide 
by my own whether I want them or not.“




So here is my proposal how that could work:

I prefer not being a dominant project, because the plugin for puppet dominants 
in this case. If there are problems with some projects with 2 different project 
types, I would expect a warning on the project with an Icon of a non specific 
project type and the exclamation mark as we have it for other projects with 
problems, that I can resolve (Missing dependencies, missing NPM installed, 
missing Bower, etc.).

If I resolve such a project I can choose which project type I want, by my own, 
not by NetBeans (Only for multiple project types). And when I choose one, for 
example HTML5, it should be saved as my default. And with this project type 
which could be maven and my saved HTML5, I should add/activate Maven features, 
because it is possible of that specific type of project.


At the end, I need to find a proper solution for that, I can’t be the only one 
who has this problem. I already have it with 3 projects.


Cheers

Chris

Reply via email to