Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323528

Summary: [EditorMgmt] Need getActiveEditorInput(ExecutionEvent) and getActiveEditorInputChecked(ExecutionEvent) in HandlerUtil
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: enhancement    
Priority: P3 CC: pwebster
Version: 3.7   
Target Milestone: 3.7 M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
HandlerUtil patch v1 none

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.