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: | Better heuristics for detecting targets | ||
---|---|---|---|
Product: | projects | Reporter: | _ tboudreau <tboudreau> |
Component: | Ant Freeform | Assignee: | David Konecny <dkonecny> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | apireviews, dkonecny |
Priority: | P2 | Keywords: | API, API_REVIEW_FAST |
Version: | 4.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: | proposed API change |
Description
_ tboudreau
2004-12-20 18:33:11 UTC
Implemented in TargetMappingPanel - currently just looks for Ant target names exactly matching IDE command name, which is not enough. BTW we may need to make an API change to support this well - the constructor for TargetDescriptor (org.netbeans.modules.ant.freeform.spi) only permits one String defaultTarget, but it should probably be a list of regular expressions matching likely targets, or something like that. Created attachment 19548 [details]
proposed API change
This is trivial change in not yet released API and therefore I would like to do incompatible change and fix all clients. This is friend API and so I know all the clients. The change is in TargetDescriptor which attribute will be changed from String (name of Ant target to which IDE action usually maps) to List of regular expressions. Thanks for review. I guess that's a List<String>? Or List<Pattern>? List<String>. I will add the comment to signature. Or do you think it should be Pattern? It would be more efficient but on the other hand performance is not concern here and String is simpler for clients. Neccessary API change finished. Initial list of regular expressions is: build = "build", "compile", "jar", "dist", "all", ".*jar.*" clean = "clean", ".*clean.*" javadoc = "javadoc", "javadocs", "docs", "doc", ".*javadoc.*", ".*doc.*" run = "run", "start", ".*run.*", ".*start.*" test = "test", ".*test.*" debug = "debug", ".*debug.*" Can be easily extended/changed. Tested on couple of foreign Ant projects and work way better. Fill free to suggest other expressions or directly fix it in ant/freeform/src/org/netbeans/modules/ant/freeform/ui/TargetMappingPanel.java Fixed in: Checking in ant/freeform/manifest.mf; new revision: 1.7; previous revision: 1.6 Checking in ant/freeform/src/org/netbeans/modules/ant/freeform/spi/TargetDescriptor.java; new revision: 1.3; previous revision: 1.2 Checking in ant/freeform/src/org/netbeans/modules/ant/freeform/ui/TargetMappingPanel.java; new revision: 1.29; previous revision: 1.28 Checking in java/freeform/nbproject/project.xml; new revision: 1.5; previous revision: 1.4 Checking in web/freeform/nbproject/project.xml; new revision: 1.5; previous revision: 1.4 Checking in web/freeform/src/org/netbeans/modules/web/freeform/WebProjectNature.java; new revision: 1.4; previous revision: 1.3 Checking in j2ee/ejbfreeform/nbproject/project.xml; new revision: 1.6; previous revision: 1.5 Checking in j2ee/ejbfreeform/src/org/netbeans/modules/j2ee/ejbfreeform/EJBProjectNature.java; new revision: 1.6; previous revision: 1.5 *** Issue 53540 has been marked as a duplicate of this issue. *** |