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 142452 - CustomizerProvider: Usage docs missing
Summary: CustomizerProvider: Usage docs missing
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Tomas Stupka
URL: http://bits.netbeans.org/dev/javadoc/...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-31 18:25 UTC by Peter Nabbefeld
Modified: 2016-07-07 08:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Nabbefeld 2008-07-31 18:26:01 UTC
Javadoc does not contain enogh information to implement a CustomizerProvider. I've tried to implement one and added it
to my project's lookup. I've even tried to add it to META-INF/services. Hasn't worked either.
Comment 1 Jesse Glick 2008-07-31 19:36:17 UTC
In what sense did it "not work"? File > Project Properties was not enabled when it was in your project lookup?
Comment 2 Peter Nabbefeld 2008-07-31 20:12:57 UTC
Only default properties (name and one other, don't remember), but if I understand correct, a dialog panel should be
shown with a component of my own!? However, it should be clearly documented what is needed and what is to be expected at
which place - that would help very much, an it would make it easier to file bugs (if there are any ;-) ).
Comment 3 Peter Nabbefeld 2008-07-31 20:22:59 UTC
The second property is "Sort mode". Is there probably sth. additional necessary in the project's lookup? Or anything
which must not be there? Anything to add to the node? Probably an action to provide?
Comment 4 Milos Kleint 2008-08-01 06:55:54 UTC
your customizerprovider if put in project lookup shall have been called for you to create the dialog. if it didn't work,
please attach a sample project demonstrating the problem.

I don't understand your comments about sort mode.
Comment 5 Jesse Glick 2008-08-02 11:29:22 UTC
I'm afraid I don't understand the questions either. If there is a CustomizerProvider in your project's lookup then File
> Project Properties should be enabled, and when selected, should run your showCustomizer implementation. What more is
there to say?
Comment 6 Peter Nabbefeld 2008-08-02 16:27:30 UTC
Hmm, I've looked at java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/J2SELogicalViewProvider.java

There's a CommonProjectActions.customizeProjectAction() added to the created node. From the API I'd understand, that the
action should be automatically created for the CustomizerProvider provided in the lookup !?
Comment 7 Jesse Glick 2008-08-02 19:20:57 UTC
The lookup entry makes it possible for the action to be enabled. It is always present in the File menu; it you want it
in your context menu you need to add it. Ought to cross-link between Javadoc of CP and CPA.cPA.
Comment 8 Peter Nabbefeld 2008-08-04 11:35:56 UTC
Please, also describe the relationship between interface org.netbeans.spi.project.ActionProvider and the actions
supported in the logical view's node actions. The problem I see with the action provider is the mixture of predefined
constants with those I'd support by my own, which might result in conclicting names; it also might have performance
drawbacks. However, the API description says, an ActionProvider should be in the project's lookup.

The other thing is class org.netbeans.spi.project.ui.support.CommonProjectActions, which contains executable Actions,
which may be added to the view's node ...
Comment 9 Jesse Glick 2008-08-04 19:08:40 UTC
I'm not sure I followed any of the last comment. Best to use dev@openide.netbeans.org for general questions if you are
learning how to use the APIs. File (individual) issues for specific problems with Javadoc after you understand what you
are doing and can confirm that the Javadoc is incorrect or incomplete.
Comment 10 Peter Nabbefeld 2008-08-19 06:53:54 UTC
@jglick:
1. The more special some questions are, the less response on the dev lists :-(
2. Shouldn't the docs allow learning how to use the API - surely some developers are bored answering
   the same questions several times ...
3. My question is about implementation of the project's node:
   It seems, I can add named actions as well as "real" actions (implementing the Action interface and
   adding some code to it). So, how are these actions used? Are they just combined, or do they even interfere?
Comment 11 Jesse Glick 2008-08-21 00:02:46 UTC
Of course docs should allow you to learn how to use the APIs, but if they don't, you will need to learn from some other
source and then request that the docs be fixed in specific ways.

Your logical view can contain whatever Action's you like. For some standard ones, the Javadoc says e.g.

"Creates an action sensitive to the set of currently selected projects. When performed the action will call the given
command on the ActionProvider of the selected project(s). The action will only be enabled when exactly one project is
selected and the command is enabled in the project's action provider."

which is still correct. Whatever else you are asking about I don't understand. Probably you should look at some source
code using the APIs for examples.
Comment 12 Peter Nabbefeld 2008-08-25 07:47:40 UTC
@jglick:
Please, be so kind as to provide me with the link or at least the class or interface name, where I could find this
javadoc - couldn't find it, neither in ActionProvider nor CommonProjectActions.
Comment 14 Antonin Nebuzelsky 2010-03-29 14:10:40 UTC
Change of default owner.
Comment 15 Martin Balin 2016-07-07 08:39:03 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss