lahodaj commented on PR #7059:
URL: https://github.com/apache/netbeans/pull/7059#issuecomment-1948309816

   So, trying to understand the change here. The summary only speaks about 
ensuring missing ActionProvider does not cause NPEs, which certainly sounds 
correct - it is OK for projects to not have any particular service in their 
Lookup. Besides that, this change appears to modify the Lookup used for 
`isActionEnabled`, but only for that, not for `invokeAction`. I guess my 
concerns so far are:
   - adding the whole `FileObject.getLookup()` - but I understand this may 
match the usual content of the Lookup when running inside the whole NetBeans 
GUI, so this is not a huge concern.
   - adding the whole `Project.getLookup()` - this seems a bit more 
troublesome. Project Lookups are not (AFAIK) required to contain the reference 
to the Project (so this is potentially a breaking change), and also contain 
various services which may interact with global services, etc. Unless the 
corresponding Lookup in NB GUI contains the *content* of the current Project, 
then I'd be much happier if this was dropped.
   - please correct me if I am wrong, but: these changes are made only to the 
Lookup used for `isActionEnabled` ("test Lookup"), but not to the Lookup used 
for `invokeAction` ("invoke Lookup"). Sorry, but this seems clearly wrong to 
me. The invoke Lookup must be a (proper or improper) superset of the test 
Lookup, IMO. I.e. with this change, it seems to me the test Lookup contains 
`DataObject`, but the actual invoke Lookup does not(?). Not sure what is the 
`ActionProvider` that relies on `DataObject`s then supposed to do? (The Enso 
provider expects `DataObject` in `isActionEnabled` and `FileObject` in 
`invokeAction` - that is OK, but `ActionProvider`s should not be forced to 
balance between `DataObject`s and `FileObject`s this way.)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to