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

Summary: Patch for: Maven projects: Show version in Projects and Files views root nodes - provide an option in the options dialog
Product: projects Reporter: markiewb
Component: MavenAssignee: Milos Kleint <mkleint>
Severity: normal Keywords: PATCH_AVAILABLE
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 194773, 239961    
Bug Blocks:    
Attachments: Proposed patch - draft
Patch in action - shows the modified option panel

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.