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 3934 - There should be a way how services (executors, compilers, ...) could specify on which object types they make sense.
Summary: There should be a way how services (executors, compilers, ...) could specify ...
Status: CLOSED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P3 normal (vote)
Assignee: rmatous
URL:
Keywords: API
: 19331 (view as bug list)
Depends on:
Blocks: 11099
  Show dependency tree
 
Reported: 1999-09-18 00:27 UTC by iformanek
Modified: 2008-12-22 16:17 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description iformanek 1999-09-18 00:27:49 UTC
The goal is, that only those that make sense are offered to the user - e.g. only AppletExecutor would be offered on applet classes without the main method.
Comment 1 Marek Grummich 2000-07-25 09:08:59 UTC
Priority is changed to P4 (normal).
Comment 2 Jaroslav Tulach 2000-12-01 13:58:59 UTC
Hopefully will be solved by new ExPropertyEditor for Services.
Comment 3 Jan Zajicek 2001-01-23 09:30:59 UTC
Automated change of version from Other to Dev.
Comment 4 Jan Chalupa 2001-03-12 09:33:56 UTC
Version: 'Dev' -> 3.2
Comment 5 David Strupl 2001-03-30 08:02:03 UTC
#8683 is almost done. ServiceTypeEditor allows setting of super class - that
solves this issue.

*** This issue has been marked as a duplicate of 8683 ***
Comment 6 Jesse Glick 2001-03-30 16:37:59 UTC
I don't understand why this is a duplicate. Having better ServiceType editors is
not the point. JavaNode should surely not be creating its Executor property to
permit AppletExecutor (when extending JApplet etc.) but not Install as Module
(Lite)! The executor alone knows whether it is applicable to some data object. I
consider this to still be a valid request--in fact it is becoming more important
as we get flooded with service types (so making P3 for dev version). An average
user trying to switch to Applet Execution would get lost scrolling through
different flavors of RMI deployment.
Comment 7 Jan Chalupa 2001-05-06 08:12:14 UTC
Target milestone -> 3.3
Comment 8 Peter Zavadsky 2001-10-06 11:00:21 UTC
Reassigned to services.
Comment 9 Jan Chalupa 2001-11-27 13:03:12 UTC
Target milestone -> 3.3.1.
Comment 10 Tomas Hurka 2002-01-31 09:55:02 UTC
*** Issue 19331 has been marked as a duplicate of this issue. ***
Comment 11 Jaroslav Tulach 2002-02-20 12:18:01 UTC
In my opinion resolved by ServiceTypeEditor. See
http://www.netbeans.org/download/apis/org/openide/explorer/doc-files/api.html#core_editors_custom_parameters
Comment 12 Jesse Glick 2002-02-20 15:03:06 UTC
I don't agree it is solved by ServiceTypeEditor, at least it is not
obvious how - the module containing the property has no knowledge of
the specifics of all possible service type values.

Please provide a specific example of how the Java module should ensure
that its list of executors includes only executors applicable to Java
sources. Also suggest how Ian's original request - provide
AppletExecutor only on real applets - should be satisfied. I don't
think it is possible. You could require that all Java-oriented
executors go into Services/Executor/java/ (though this style prevents
a single service from being used in multiple categories), but that
still does not help with AppletExecutor.

Furthermore a service type such an executor normally sanity-checks its
incoming arguments and just throws IOException or something arbitrary
if it is applied to something odd. It would be much more natural for a
programmer of that service type to just remove such code and convert
it into an isApplicableTo(...) method, rather than try to find the
correct folder to place the .settings into etc.; not to mention
convincing the owner of the module supplying the data object to change
the property editor, which involves synchronized changes to that
module and all modules providing services for it.

dev@openide?
Comment 13 Marek Grummich 2002-07-22 11:16:11 UTC
Set target milestone to TBD
Comment 14 Marek Grummich 2002-07-22 11:19:16 UTC
Set target milestone to TBD
Comment 15 rmatous 2002-08-02 16:40:39 UTC
I agree method isApplicableTo could be convenient. 
Comment 16 Jaroslav Tulach 2002-08-02 17:29:26 UTC
This enhancement is very old and I have a feeling it does not apply as
much to our current efforts for following reasons:

1. ServiceType is being replaced by Lookup
2. We would like to separate different parts of openide and
implementing this request would probably mean to do add isApplicableTo
(DataObject) method, which would make the separation even harder.
3. This issue could be influenced by the projects design, not sure how.

So I do not know, I suggest not to fix it at all. But if there is
stong will to do it, reopen it...
Comment 17 Jesse Glick 2002-08-02 18:21:14 UTC
Re. #1 - that does not really matter, even if you don't subclass
ServiceType the same considerations still apply - you have a pool of
services and you want to find which ones are relevant. What *would*
partially obviate the need for this change is if services were found
using JNDI, or using folder-constrained service type editors - for
example, if a JavaDataObject when looking for an executor searches
only in the context Services/Executor/Java/ then other modules can
influence the choice accordingly. This is still not great though - cf.
my previous example about AppletExecutor, and some services would need
to installed in duplicate in several JNDI areas.

Re. #2 - perhaps. However Executor, CompilerType, and DebuggerType
already have clear dependencies on org.openide.loaders in their public
method signatures, and we can hardly get rid of that without some
nasty bytecode tricks. isApplicableTo could accept Object rather than
DataObject, I suppose, to give us a head start.

Re. #3 - yes, it definitely could. A lot of other stuff probably will
be too, of course, e.g. CompilerSupport.getCompilerType(DataObject).
Comment 18 Marian Mirilovic 2003-07-21 13:58:42 UTC
verified,closed