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.
Summary: | Default name of new Gruntfile should be Gruntfile | ||
---|---|---|---|
Product: | platform | Reporter: | Vladimir Riha <vriha> |
Component: | Data Systems | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | apireviews, jbecicka, kganfield, mentlicher, mkleint, tmysik |
Priority: | P3 | Keywords: | API_REVIEW_FAST |
Version: | 8.0 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Proposed Patch - Data Systems - API change
Proposed Patch - Project UI Proposed Patch - Web Client Project Suggested patch for openide.loaders and projectui Fix for html5 project is would be really easy Proposed Patch - Data Systems - API change |
Description
Vladimir Riha
2013-12-01 20:11:47 UTC
unfortunately I have no idea how to force the wizard to use name "gruntfile.js" Reassigning for evaluation: I need to create gruntfile.js from template. Default name must be "Gruntfile.js", but the wizard adds prefix "new" to default name. How can I force the wizard not to add "new" prefix to the name? New file wizard for Karma has "custom" new file name, have a look at [1] maybe something similar could be done for Grunt? [1] /javascript.karma/src/org/netbeans/modules/javascript/karma/ui/wizard/NewKarmaConfWizardIterator.java (In reply to Vladimir Riha from comment #3) > New file wizard for Karma has "custom" new file name, have a look at [1] > maybe something similar could be done for Grunt? > > [1] > /javascript.karma/src/org/netbeans/modules/javascript/karma/ui/wizard/ > NewKarmaConfWizardIterator.java I really don't want to create full wizarditerator just to change default name... The new prefix is added by projectui/src/org/netbeans/modules/project/ui/SimpleTargetChooserPanelGUI.java in initValues() method. org.openide.loaders.TemplateWizard has a targetName property, but it it's used as a container, without any initialization. Perhaps, in TemplateWizard.setTemplateImpl(), the targetName property could be initialized according to some obj's primary file attribute? E.g. "targetName". Moving to openide.loaders for evaluation/implementation. If it's fixed, this patch is necessary in SimpleTargetChooserPanelGUI to respect the documentName: http://hg.netbeans.org/core-main/rev/47665cd22e40 Integrated into 'main-silver', will be available in build *201401180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/47665cd22e40 User: mentlicher@netbeans.org Log: #239028: Respect the original documentName, if provided. Created attachment 144197 [details]
Proposed Patch - Data Systems - API change
Created attachment 144198 [details]
Proposed Patch - Project UI
Created attachment 144199 [details]
Proposed Patch - Web Client Project
Please review this API change in module Datasystems API (openide.loaders) (attachment 144197 [details]): New attribute "targetName" in annotation o.n.api.templates.TemplateRegistration. Miloš, please check proposed changes in module projectui (attachment 144198 [details]). Tomáš, please review the patch for module web.clientproject (attachment 144199 [details]). Thank you. Created attachment 144201 [details]
Suggested patch for openide.loaders and projectui
Created attachment 144202 [details]
Fix for html5 project is would be really easy
Jardo - we did the same patch independently of each other :) Please ignore my 2 patches. The patch seems fine to me. Thanks a lot for it! Created attachment 144207 [details] Proposed Patch - Data Systems - API change > Jardo - we did the same patch independently of each other :) Good timing :-) Thank you very much for the patches. Martin has noticed that you use bundleValue for the new attribute in TemplateProcessor in your patch, which can be quite useful. So I'm borrowing this idea. If there are no objections, I'll integrate the patch tomorrow. Thank you for reviewing. Integrated as http://hg.netbeans.org/core-main/rev/ca43ab0ff568 Thank you for reporting and help. Integrated into 'main-silver', will be available in build *201401310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/ca43ab0ff568 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #239028: Default name of new Gruntfile should be Gruntfile Thank you, verified Product Version: NetBeans IDE Dev (Build 201401310001) Java: 1.8.0-ea; Java HotSpot(TM) Client VM 25.0-b66 Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b125 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb) |