Skip to main content


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] Fri, 10 February 2012 04:22 Go to next message
Maqsood Ahmed is currently offline Maqsood AhmedFriend
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 09:06 Go to previous message
Maqsood Ahmed is currently offline Maqsood AhmedFriend
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:Can I create Multiple infocenters on one Eclipse installation?
Goto Forum:
  


Current Time: Tue Mar 19 09:00:55 GMT 2024

Powered by FUDForum. Page generated in 0.01937 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top