This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 217087 - Creating a new module under a parent
Summary: Creating a new module under a parent
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-20 08:59 UTC by mienamoo
Modified: 2013-01-25 14:27 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mienamoo 2012-08-20 08:59:04 UTC
One of the differences between Ant and Maven support for NetBeans Platform applications that has always bugged me is the fact that you cannot right-click on the parent's modules node in Projects view and create a new module. I realise that the pom packaging is not specific to NetBeans Platform apps, and so at first I didn't suggest putting anything like this in. However, this morning I got an idea for a generic implementation. :)

What I would like to be able to do is this:

For any parent pom project, I would like to be able to choose Create New Module... (or something to that effect) from the context menu for the Modules node. That should then start the New Project wizard, with the Maven category already selected. And (most important and useful part!) when you get to the page where you pick the project location, it should by default be the location of the parent pom.
Comment 1 Milos Kleint 2012-08-30 08:21:18 UTC
there is no api to call the new project wizard right now (not to speak of configuring it)
Comment 2 mienamoo 2012-08-30 09:05:08 UTC
Ah yes indeed. I see for the Ant case the specific wizard for creating the new module is run directly and not via the larger project wizard. Which would not work in this case of course...
Comment 3 Milos Kleint 2013-01-24 15:07:00 UTC
Create new Module... action added on Modules node in maven projects. starts the project wizard with maven category preselected.

https://hg.netbeans.org/core-main/rev/021157efa98e
adds a new constant that can be used to initialize the new project wizard with a custom parent project directory path. only the constant introduced in CommonProjectActions class is the new API.



https://hg.netbeans.org/core-main/rev/5f7ee42dd898
introduces a private contract to inject yet more properties, like parent project's groupId or version. Not advertized as API
Comment 4 Quality Engineering 2013-01-25 03:01:38 UTC
Integrated into 'main-golden', will be available in build *201301250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/021157efa98e
User: Milos Kleint <mkleint@netbeans.org>
Log: #217087 new wizard able to pick up the parent directory from Action's properties as initial value
Comment 5 mienamoo 2013-01-25 14:27:38 UTC
Works like a charm! Thanks! :D