Bug 27868 - Allow usage of javax.swing.Action in Node's popup menu
Allow usage of javax.swing.Action in Node's popup menu
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Actions
3.x
PC Linux
: P2 (vote)
: 3.x
Assigned To: Peter Zavadsky
issues@platform
:
Depends on: 28780 28781 28782 28783 28784 28785 28786 28787 28789 28791 28792 28793 28794 28795 28796 28797 28799 28800 28801 28802 28803 28804 28830 28849 28909 28913 28914 28986 29416 29431 29813 29913 29927 29928 29929 30231 32374 32744
Blocks: 17597
  Show dependency treegraph
 
Reported: 2002-10-08 16:44 UTC by Jaroslav Tulach
Modified: 2008-12-23 14:22 UTC (History)
2 users (show)

See Also:
Issue Type: TASK
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2002-10-08 16:44:46 UTC
Looks already use actions, new data system as
well, it seems to be a high priority to allow
Action to be returned by Node and shown in
explorer's popup menu now when we have a chance of
incompatible changes.
Comment 1 Jaroslav Tulach 2002-10-10 15:58:04 UTC
Created a branch with initial implementation. It is rooted at
BLD200210100732 and called action_27868. So to get the code in the
branch do:

cd openide
cvs upd -r action_27868

and to check the diff of the work done on the branch:

cd openide
cvs diff -c -N -r BLD200210100732 -r action_27868

Comment 2 Peter Zavadsky 2002-10-15 14:16:10 UTC
I voted for this issue, since solving this, can eliminate use of
"pending node activator" what would fix issue #25337 (see there).
Comment 3 Peter Zavadsky 2002-11-13 17:26:11 UTC
I merged changes from [trunk] between BLD200210100732 and
BLD2002111231011 to the branch. To better try it out in curr builds.

Tags: action_27868_before_BLD200211121011_merge
      action_27868_after_BLD200211121011_merge
Comment 4 Peter Zavadsky 2002-11-14 09:53:20 UTC
I was trying it with "pendingnodeactivator" switched off. 
Seems it is running fine (except properties action which I badly
merged probably), even some cases I thought was problematic without it
and shouldn't be affected by this issue (switching workspaces).
Comment 5 Jaroslav Tulach 2002-11-15 10:42:28 UTC
Additional merge from main trunk necessary because introduction of new
API (3.21). 

cvs -j LD2002111231011 -j BLD200211140100 upd

the version tagged as: action_27868_after_BLD200211140100_merge
Comment 6 Jaroslav Tulach 2002-11-15 18:05:21 UTC
I have created a bunch of issues that still need to be done in order
to resolve this issue. Most of them are simple tests to be written to
ensure correctness of the implementation. But for example issue 28796
is more investigative.
Comment 7 Peter Zavadsky 2002-11-19 16:48:12 UTC
Branched core too from BLD200211190100 (needs to be synch with openide
later).
Comment 8 Peter Zavadsky 2002-11-21 10:28:05 UTC
Branched also scripting from BLD200211210100, due to issue #28907
Comment 9 Jaroslav Tulach 2002-12-10 07:51:37 UTC
I believe the arch work on issue 27868 is done and that the action stuff can be
merged to trunk. Passing to Peter to decide on schedule and do the merge.
Comment 10 Peter Zavadsky 2002-12-10 16:00:13 UTC
Merged changes from trunk(up to BLD200212100100) to branch
(modules openide, core, scripting):
tags: action_27868_before_BLD200212100100_merge,
      action_27868_after_BLD200212100100_merge.


Now it remains "only" to revise API changes and the "phase I" could be
merged into trunk.
Comment 11 Peter Zavadsky 2002-12-10 16:23:23 UTC
API changes:
1) ActionCloneable {  new interface for cloning action according context.
    Action clone(Lookup actionContext);
}
2) TopComponent.getLookup method for retrieving context for
TopComonent (contains activated nodes, and delegate to its action map
as default).
3) Support methods for creating popup menu and cloning action(could be
needless due to the interface) in Utilities, 
4) Yarda told also about something in NodeOp etc.

... but there seems to be some problems after merge :-(, looking at it
first.
Comment 12 Peter Zavadsky 2002-12-11 09:23:40 UTC
One problem was deserialized ExplorerPanel wasn't initialized properly
(i.e. its action map missed mappings for callback actions).

openide/../explorer/ExplorerPanel.java 1.32.84.5

Now remains problem with disabled customize action
Comment 13 Peter Zavadsky 2002-12-11 10:22:35 UTC
Also the last problem was fixed;

openide/../explorer/ExplorerPanel.java [1.3284.6]


Irrelevant note: Interestingly enough, on the branch before I was
always tested on newly created ExplorerPanel only, (not the
deserialized one), due to a big diff between trunk was not serialized
win sys and I didn't mind  :-(.


So now is the time to revisit API changes.
Comment 14 Peter Zavadsky 2002-12-11 13:05:14 UTC
I removed Utilitlies.actionClone method. It seems to be enough the
ActionCloneable interface for now.

Going to put the upcoming changes to [nbdev] discussion.
Comment 15 Peter Zavadsky 2003-01-06 14:29:17 UTC
Renamed ActionCloneable to ContextAwareAction (it extends Action
interface) and moved to org.openide.util package.
I also renamed the method to createContextAwareInstance.
That could be still changed, but I think it is now closer to the finish. 
Also refined some javadocs. 

Now going to look how to deprecate the actions and provide the new
actions method.
Comment 16 Peter Zavadsky 2003-01-09 13:48:18 UTC
Also was added method getActionMapKey to CallbackSystemAction, which
replaced the use of getValue("key") construct.
Preparing to merge.
Comment 17 Peter Zavadsky 2003-01-09 18:08:46 UTC
Merged into [trunk].

Tags: before_merge_action_27868,
      after_merge_action_27868

Affected modules: openide, core, scripting 
and editor/src/org/netbeans/modules/editor/NbEditorKit.java file.
Comment 18 Quality Engineering 2008-12-23 14:22:10 UTC
This issue had *1 votes* before move to platform component


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