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 161751 Details for
Bug 303784
Keybindings for Team > Show Annotation and Show History don't work any more
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Show Annotation and Show History v01
team-v01.txt (text/plain), 3.71 KB, created by
Paul Webster
on 2010-03-11 10:04:35 EST
(
hide
)
Description:
Show Annotation and Show History v01
Filename:
MIME Type:
Creator:
Paul Webster
Created:
2010-03-11 10:04:35 EST
Size:
3.71 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.cvs.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.ui/plugin.xml,v >retrieving revision 1.286 >diff -u -r1.286 plugin.xml >--- plugin.xml 22 Dec 2009 11:45:22 -0000 1.286 >+++ plugin.xml 11 Mar 2010 15:00:28 -0000 >@@ -1321,11 +1321,13 @@ > description="%ShowAnnotationAction.tooltip" > categoryId="org.eclipse.team.cvs.ui.actionSet" > name="%ShowAnnotationAction.name" >+ defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction" > id="org.eclipse.team.cvs.ui.showAnnotation"/> > <command > description="%ShowHistoryAction.tooltip" > categoryId="org.eclipse.team.cvs.ui.actionSet" > name="%ShowHistoryAction.name" >+ defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.ShowHistoryAction" > id="org.eclipse.team.cvs.ui.showHistory"/> > <command > description="%AddAction.tooltip" >#P org.eclipse.team.ui >Index: src/org/eclipse/team/internal/ui/actions/TeamAction.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java,v >retrieving revision 1.49 >diff -u -r1.49 TeamAction.java >--- src/org/eclipse/team/internal/ui/actions/TeamAction.java 18 Apr 2008 09:11:32 -0000 1.49 >+++ src/org/eclipse/team/internal/ui/actions/TeamAction.java 11 Mar 2010 15:00:28 -0000 >@@ -480,22 +480,52 @@ > } > return null; > } >- >- private void execute(IWorkbenchWindow activeWorkbenchWindow, >- IWorkbenchPart part, ISelection selection) >- throws InvocationTargetException, InterruptedException { >+ >+ public void setEnabled(Object evaluationContext) { >+ IWorkbenchWindow activeWorkbenchWindow = (IWorkbenchWindow) HandlerUtil >+ .getVariable(evaluationContext, >+ ISources.ACTIVE_WORKBENCH_WINDOW_NAME); >+ if (activeWorkbenchWindow != null) { >+ ISelection selection = (ISelection) HandlerUtil.getVariable( >+ evaluationContext, ISources.ACTIVE_CURRENT_SELECTION_NAME); >+ if (selection == null) { >+ selection = StructuredSelection.EMPTY; >+ } >+ IWorkbenchPart part = (IWorkbenchPart) HandlerUtil.getVariable( >+ evaluationContext, ISources.ACTIVE_PART_NAME); >+ updateSelection(activeWorkbenchWindow, part, selection); >+ } >+ } >+ >+ /** >+ * Allows subclasses to check for ResourceMappings or CVS related inputs. >+ * >+ * @param input the editor input to consider for selection. >+ */ >+ protected void updateInput(IEditorInput input) { >+ IFile file = ResourceUtil.getFile(input); >+ if (file != null) { >+ selectionChanged((IAction) null, new StructuredSelection(file)); >+ } >+ } >+ >+ private void updateSelection(IWorkbenchWindow activeWorkbenchWindow, >+ IWorkbenchPart part, ISelection selection) { > // If the action is run from within an editor, try and find the > // file for the given editor. > if (part != null && part instanceof IEditorPart) { > IEditorInput input = ((IEditorPart) part).getEditorInput(); >- IFile file = ResourceUtil.getFile(input); >- if (file != null) { >- selectionChanged((IAction) null, new StructuredSelection(file)); >- } >+ updateInput(input); > } else { > // Fallback is to prime the action with the selection > selectionChanged((IAction) null, selection); > } >+ } >+ >+ private void execute(IWorkbenchWindow activeWorkbenchWindow, >+ IWorkbenchPart part, ISelection selection) >+ throws InvocationTargetException, InterruptedException { >+ updateSelection(activeWorkbenchWindow, part, selection); > // Safe guard to ensure that the action is only run when enabled. > if (isEnabled()) { > execute((IAction) null);
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 303784
:
161751
|
161758
|
161773