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: | Adapt freeform to the new project extensibility APIs | ||
---|---|---|---|
Product: | projects | Reporter: | Antonin Nebuzelsky <anebuzelsky> |
Component: | Ant Freeform | Assignee: | Milos Kleint <mkleint> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | jglick, mkleint, pjiricka, sreimers |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 95049 | ||
Attachments: | complete patch of changes in freeform module and it's friend modules |
Description
Antonin Nebuzelsky
2006-12-05 09:24:40 UTC
Created attachment 38218 [details]
complete patch of changes in freeform module and it's friend modules
please review this non-compatible change in friend api. I removed custom Lookup and Customizer extending apis and replaced them by the new project extensibility apis. That means deleting relevant methods in ProjectNature interface and rewrite of all api friends codebase. Y01 I'd like to eliminate the TODO that is part of following change: + InstanceContent ic = new InstanceContent(); + Lookup context = new AbstractLookup(ic); + ic.add(project); + ic.add(project.getLookup().lookup(ProjectAccessor.class)); + ic.add(project.getLookup().lookup(AuxiliaryConfiguration.class)); + //TODO replace with generic apis.. + ic.add(ic); + + OptionListener listener = new OptionListener( project ); + dialog = ProjectCustomizer.createCustomizerDialog(CUSTOMIZER_FOLDER_PATH, context, null, listener, null ); I really do not like the reuse of InstanceContent as an API. It was never meant to be an API - it is just a helper support class. The API is Lookup, the SPI (and support) is Lookups, ProxyLookup, AbstractLookup, AbstractLookup.Content, InstanceContent, etc. That is why I'd like to find another way how to share data among individual panels. Imho, having such API would potentially be useful everywhere, not just in freefrom friend API and that is why I'd like to propose following changes: #1: allow a Category to have associated lookup - that means adding new factory method in the Category class. The lookup might or might not be used, depending on the usage of the Category. #2: However is the Category is used from ProjectCustomizer.createCustomizerDialog, it would be guaranteed that the content of the lookup is going to be added to the lookup passed back to the ProjectCustomizer.CompositeCategoryProvider.createComponent's lookup. Imho this is similar pattern used in Tools/Options where each panel can donate a context and gets context merged from all others back. re Y01: i've filed a separate issue for that #95049, because that is not only limited to freeform and it's friend APIs, but a generic project api enhancement. Is M7 still the target milestone? nope, let's make it M8, i'm sick and don't have access to my office computer where the changes reside. |