Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » view on the action open a dialog, feasibility?
view on the action open a dialog, feasibility? [message #991041] Mon, 17 December 2012 07:41
ocean xue is currently offline ocean xueFriend
Messages: 107
Registered: November 2011
Senior Member
View Snippet:(WindowBuilder automatically generated)

/**
* Create the actions.
*/
private void createActions() {
addAction = new OP003AddAction();
}

/**
* Initialize the toolbar.
*/
private void initializeToolBar() {
IToolBarManager toolbarManager = getViewSite().getActionBars().getToolBarManager();
toolbarManager.add(addAction);
}

Action Snippet:

public class OP003AddAction extends Action {

private static final long serialVersionUID = 1L;

public OP003AddAction() {
setId(IActionIdConstants.OP003_ADD_ACTION);
setText("add");
setToolTipText("add");
setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("eoffice", IImageConstants.ADD));
}

public void run() {
OP003AddDialog addDialog = new OP003AddDialog(Display.getCurrent().getActiveShell());
addDialog.open();
}
}

thanks
ocean

[Updated on: Mon, 17 December 2012 07:44]

Report message to a moderator

Previous Topic:[New Target Problem] Custom Theming of CTabFolder
Next Topic:How to cancel Display.timerExec for RWT? (tried timerExec(-1, runnable))
Goto Forum:
  


Current Time: Mon Dec 22 13:42:31 GMT 2014

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

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