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 227578 - Patch for: Maven projects: Show version in Projects and Files views root nodes - provide an option in the options dialog
Summary: Patch for: Maven projects: Show version in Projects and Files views root node...
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milos Kleint
Depends on: 194773 239961
  Show dependency tree
Reported: 2013-03-17 01:15 UTC by markiewb
Modified: 2014-01-03 15:16 UTC (History)
0 users

See Also:
Exception Reporter:

Proposed patch - draft (17.86 KB, patch)
2013-04-08 22:05 UTC, markiewb
Details | Diff
Patch in action - shows the modified option panel (130.48 KB, image/png)
2013-04-08 22:07 UTC, markiewb

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-03-17 01:15:11 UTC
This is a follow-up to 

EXPECTED: provide an option in the options dialog to set the global configuration for all projects
Comment 1 markiewb 2013-04-08 22:05:24 UTC
Created attachment 133383 [details]
Proposed patch - draft

@Milos: I like to propose the following patch which introduces the customization of the maven project node name from the maven options

The patch adds a combobox 
* with a default entry (which maps to the current standard, the entry in the preferences doesn't exist/will be removed)
* with predefined patterns (feel free to add/more entries)
* with custom... entry (which makes a textfield visible, where the user can enter its own pattern. The pattern syntax is explained in the tooltip. See screenshot which will be attached in the next post.)

The implementation works for my purposes except the following issues:
* the saved change isn't propagated to the project nodes. Currently you have to close and reopen a maven project to see the change. I think a displayname-changed event has to be created and fired. But where and how? @Milos: Can you help, please!?
* the content of the combobox is hardcoded and not externalized. IMHO this is a minor issue, but if you require this I will do it.

Please review and discuss. Thank you.
Comment 2 markiewb 2013-04-08 22:07:47 UTC
Created attachment 133384 [details]
Patch in action - shows the modified option panel
Comment 3 Milos Kleint 2013-04-09 11:35:32 UTC

i've added the listening in the preferences node in to change the name display and added some indication to the combobox that it was changed to enable the Apply button.

looks good in general, I had some doubts about the location on the options page, maybe it should be a bit higher up... well..

thanks for the contribution.