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 67712 - Insufficient description of DataLoader.defaultActions()
Summary: Insufficient description of DataLoader.defaultActions()
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-28 07:14 UTC by Marian Petras
Modified: 2008-12-22 20:33 UTC (History)
3 users (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 Marian Petras 2005-10-28 07:14:11 UTC
It is not clear from the Javadoc description of DataLoader.defaultActions() that
it is not necessary to override this method if method
DataLoader.actionsContext() is overridden and returns a non-null value.

Documentation of DataLoader.defaultActions() does not specify any default value
(value returned by the default implementation). The docs also states that it
should return null if actionsContext() is used. This implies that if the
programmer wants to use actionsContext(), they must override defaultActions() to
return null.

Suggested change:
Either specify the default value of defaultActions (null) or add a statement
that defaultActions() is not called if actionsContext() returns a non-null value.
Comment 1 Jesse Glick 2005-10-28 16:18:26 UTC
Yarda I think you added this. Do you have any preference about what to document?

BTW: original issue #64210
Comment 2 Jaroslav Tulach 2005-10-31 08:20:58 UTC
I do not understand what is the problem. Whether you override defaultActions 
or not, they are not going to be used if actionsContext is specified.  
 
I've put some text into the javadoc, but as I do not understand your request, 
I am closing as wont fix. If you have feeling there is need for improvement, 
please change the javadoc and attach patch here, I'll be glad to apply it. 
 
openide/loaders/src/org/openide/loaders/DataLoader.java,v  <--  
DataLoader.java 
new revision: 1.12 
Comment 3 Marian Petras 2005-10-31 09:35:04 UTC
The only problem was that I refused to remove method defaultActions() returning
always <null> as Petr Zajac and Jesse asked me to do. So I accept this bug's
status as WONTFIX and I will keep my impl. of defaultActions() in
PropertiesDataLoader.
Comment 4 Jesse Glick 2005-10-31 19:40:53 UTC
Please fix the Javadoc to actually say what the default value is (or that the
old method need not and should not be overridden), and fix the properties module.
Comment 5 Jaroslav Tulach 2005-11-01 07:52:52 UTC
I do not understand. Sorry. Why I would say that the old method need not be 
overriden or should not be overriden? That is implicit. The value is taken 
from NodeOp and can always different. So what I am supposed to document? 
 
Give me the java patch so I can evaluate it! I feel I will be capable to do 
that. Without it I am afraid I have to repeat that I do not understand. 
Comment 6 Jesse Glick 2005-11-03 00:33:49 UTC
x
Comment 7 Jesse Glick 2005-11-03 00:34:22 UTC
Fine, I'll do it myself...
Comment 8 Jesse Glick 2005-11-03 00:38:37 UTC
Checking in openide/loaders/src/org/openide/loaders/DataLoader.java;
/cvs/openide/loaders/src/org/openide/loaders/DataLoader.java,v  <--  DataLoader.java
new revision: 1.13; previous revision: 1.12
done
Checking in
properties/src/org/netbeans/modules/properties/PropertiesDataLoader.java;
/cvs/properties/src/org/netbeans/modules/properties/PropertiesDataLoader.java,v
 <--  PropertiesDataLoader.java
new revision: 1.27; previous revision: 1.26
done