Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323528 - [EditorMgmt] Need getActiveEditorInput(ExecutionEvent) and getActiveEditorInputChecked(ExecutionEvent) in HandlerUtil
Summary: [EditorMgmt] Need getActiveEditorInput(ExecutionEvent) and getActiveEditorInp...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-24 13:52 EDT by Remy Suen CLA
Modified: 2010-12-07 08:04 EST (History)
1 user (show)

See Also:


Attachments
HandlerUtil patch v1 (2.54 KB, patch)
2010-11-08 15:58 EST, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2010-08-24 13:52:55 EDT
There's an ISources.ACTIVE_EDITOR_INPUT_NAME but no convenience method for retrieving them. You are forced to use getVariable(ExecutionEvent, String) and getVariableChecked(ExecutionEvent, String) instead.
Comment 1 Remy Suen CLA 2010-11-08 10:24:57 EST
I'm just going to add these two methods if you don't mind, Paul.
Comment 2 Paul Webster CLA 2010-11-08 10:32:08 EST
Go ahead
Comment 3 Remy Suen CLA 2010-11-08 15:58:53 EST
Created attachment 182663 [details]
HandlerUtil patch v1
Comment 4 Remy Suen CLA 2010-11-08 15:59:45 EST
(In reply to comment #3)
> Created an attachment (id=182663) [details]
> HandlerUtil patch v1

APIs added to CVS HEAD.
Comment 5 Remy Suen CLA 2010-11-11 09:17:34 EST
For the record, I requested this API while reviewing some EGit code that was calling HandlerUtil's getVariable(ExecutionEvent, String) manually.

See lines 263-264 and lines 289-290:
http://egit.eclipse.org/w/?p=egit.git;a=blob;f=org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/RepositoryActionHandler.java;h=933eb4d50bd3bbf9731a2bf939da12474906cf86;hb=HEAD
Comment 6 Remy Suen CLA 2010-12-07 08:04:00 EST
Verified by source code inspection with I20101206-1800 on Windows XP.