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 90562 - Adapt freeform to the new project extensibility APIs
Summary: Adapt freeform to the new project extensibility APIs
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Freeform (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks: 95049
  Show dependency tree
 
Reported: 2006-12-05 09:24 UTC by Antonin Nebuzelsky
Modified: 2007-02-20 10:41 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
complete patch of changes in freeform module and it's friend modules (239.71 KB, patch)
2007-02-08 07:31 UTC, Milos Kleint
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antonin Nebuzelsky 2006-12-05 09:24:40 UTC
See also issue 72091 which describes the changes for a different project type.
Comment 1 Milos Kleint 2007-02-08 07:31:09 UTC
Created attachment 38218 [details]
complete patch of changes in freeform module and it's friend modules
Comment 2 Milos Kleint 2007-02-08 07:39:07 UTC
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.
Comment 3 Jaroslav Tulach 2007-02-09 09:40:16 UTC
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.
Comment 4 Milos Kleint 2007-02-09 10:09:42 UTC
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.
Comment 5 sreimers 2007-02-17 08:56:26 UTC
Is M7 still the target milestone?
Comment 6 Milos Kleint 2007-02-17 09:27:21 UTC
nope, let's make it M8, i'm sick and don't have access to my office computer
where the changes reside.