Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 7168 Details for
Bug 48486
[ActionSets] Key bindings not working when Eclipse first opened
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Apply patch to ActionPresentation.java
BUG48486_org.eclipse.ui.internal.ActionPresentation (text/plain), 3.00 KB, created by
Kostas Sakellis
on 2003-12-15 13:55:21 EST
(
hide
)
Description:
Apply patch to ActionPresentation.java
Filename:
MIME Type:
Creator:
Kostas Sakellis
Created:
2003-12-15 13:55:21 EST
Size:
3.00 KB
patch
obsolete
>Index: ActionPresentation.java >=================================================================== >retrieving revision 1.11 >diff -u -r1.11 ActionPresentation.java >--- ActionPresentation.java 10 Dec 2003 21:14:39 -0000 1.11 >+++ ActionPresentation.java 15 Dec 2003 18:52:36 -0000 >@@ -29,7 +29,8 @@ > public class ActionPresentation { > private WorkbenchWindow window; > private HashMap mapDescToRec = new HashMap(3); >- >+ private HashMap invisibleBars = new HashMap(3); >+ > private class SetRec { > public SetRec(IActionSetDescriptor desc, IActionSet set, > SubActionBars bars) { >@@ -78,6 +79,8 @@ > SetRec rec = (SetRec)mapDescToRec.get(desc); > if (rec != null) { > mapDescToRec.remove(desc); >+ // Remove from the map that stores invisible bars >+ invisibleBars.remove(desc); > IActionSet set = rec.set; > SubActionBars bars = rec.bars; > if (bars != null) { >@@ -103,15 +106,14 @@ > if (!newList.contains(desc)) { > SetRec rec = (SetRec)mapDescToRec.get(desc); > if (rec != null) { >+ mapDescToRec.remove(desc); > IActionSet set = rec.set; > SubActionBars bars = rec.bars; > if (bars != null) { >+ SetRec invisibleRec = new SetRec(desc, set, bars); >+ invisibleBars.put(desc,invisibleRec); > bars.deactivate(); > } >- if (set != null) { >- set.dispose(); >- } >- rec.set = null; > } > } > } >@@ -123,33 +125,27 @@ > IActionSetDescriptor desc = (IActionSetDescriptor)iter.next(); > if (!mapDescToRec.containsKey(desc)) { > try { >- IActionSet set = desc.createActionSet(); >- SubActionBars bars = new ActionSetActionBars(window.getActionBars(), >- desc.getId()); >- SetRec rec = new SetRec(desc, set, bars); >+ SetRec rec; >+ // If the action bars and sets have already been created then >+ // reuse those action sets >+ if (invisibleBars.containsKey(desc)) { >+ rec = (SetRec)invisibleBars.get(desc); >+ if (rec.bars != null) { >+ rec.bars.activate(); >+ } >+ invisibleBars.remove(desc); >+ }else { >+ IActionSet set = desc.createActionSet(); >+ SubActionBars bars = new ActionSetActionBars(window.getActionBars(), >+ desc.getId()); >+ rec = new SetRec(desc, set, bars); >+ set.init(window, bars); >+ sets.add(set); >+ } > mapDescToRec.put(desc, rec); >- set.init(window, bars); >- sets.add(set); >- bars.activate(); > } catch (CoreException e) { > WorkbenchPlugin.log("Unable to create ActionSet: " + desc.getId());//$NON-NLS-1$ > } >- }else { >- SetRec rec = (SetRec)mapDescToRec.get(desc); >- IActionSet set = rec.set; >- SubActionBars bars = rec.bars; >- if (set == null) { >- try { >- bars.activate(); >- set = desc.createActionSet(); >- set.init(window,bars); >- rec.set = set; >- } catch (CoreException e) { >- WorkbenchPlugin.log("Unable to create ActionSet: " + desc.getId());//$NON-NLS-1$ >- } >- } >- >- > } > } > // We process action sets in two passes for coolbar purposes. First we process base contributions
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 48486
: 7168 |
7184