|
|
|
|
Re: how to select a textviewer in the active shell? [message #553978 is a reply to message #552271] |
Thu, 19 August 2010 10:53  |
Eclipse User |
|
|
|
solved it!!!
here's the code (i got working)
protected void executeActionByToolTip(String toolTip) {
Object o = instanceOf(ToolItem.class);
Matcher<Widget> matcher = (Matcher<Widget>) o;
Object o2 = withTooltip(toolTip);
Matcher<Widget> matcher2 = (Matcher<Widget>) o2;
final ToolItem toolItem = (ToolItem) bot.activeEditor().bot().widget(allOf(matcher, matcher2));
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
Object data = toolItem.getData();
Action action = (Action) ((ActionContributionItem) data).getAction();
action.run();
}
});
}
better solutions are allways welcome
|
|
|
Powered by
FUDForum. Page generated in 0.04442 seconds