Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 90562 - Adapt freeform to the new project extensibility APIs
Adapt freeform to the new project extensibility APIs
Status: RESOLVED FIXED
Product: projects
Classification: Unclassified
Component: Ant Freeform
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Milos Kleint
issues@projects
plan60
:
Depends on:
Blocks: 95049
  Show dependency treegraph
 
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
:


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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo