Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Cheat Sheet : Access Editor & Switch Pages
Cheat Sheet : Access Editor & Switch Pages [message #795108] Thu, 09 February 2012 23:22 Go to next message
Maqsood Ahmed is currently offline Maqsood Ahmed
Messages: 41
Registered: September 2010
Member
Hello everyone,

I have a cheatSheet which opens a new wizard, on completion of the wizard.
The user selects Finish and a Editor is opened,

Now my question is :

Is it possible to provide commands in the cheat sheet which will switchPages in the
editor? My goal is to get the Editor Page and work with it(Press a button on the screen etc.. ).

Thanks
Mak
Re: Cheat Sheet : Access Editor & Switch Pages [message #796627 is a reply to message #795108] Sun, 12 February 2012 04:06 Go to previous message
Maqsood Ahmed is currently offline Maqsood Ahmed
Messages: 41
Registered: September 2010
Member
Hello all,

I found out how to hook an action to our cheat sheet.

in the <item> OR <subitem> tag add the following element
<action pluginId="com.xyz.abc.myplugin.ui" class="com.xyz.abc.myplugin.ui.handlers.CheatSheetActionHandler" param1="stringParamter" />


The CheatSheetActionHandler
run(String[] params, ICheatSheetManager manager) { IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); ... 
method will be called, where you can use access the editor and eventually get the required page/section etc..

I found this useful tutorial

I have a differnt cheatSheet plugin & CheatSheet handler in the plugin where my editor is, so that i don't have to worry about imports Razz

Ciao
Mak
Previous Topic:Has anyone successfully used the update commands available for infocenter?
Next Topic:How to share css files between Features
Goto Forum:
  


Current Time: Wed Jul 23 06:08:51 EDT 2014

Powered by FUDForum. Page generated in 0.01854 seconds