Problem with paste, undo & redo action on coolbar [message #893281] |
Tue, 03 July 2012 09:01 |
Eclipse User |
|
|
|
Hey everyone,
I have a little problem that I can't resolved... I need help please!!
In my RCP application, I have a menu bar and a toolbar( or coolbar) with custom actions and standard actions like CLOSE, COPY, PASTE, ...
Theses standard actions allow to manage a text editor that I open in a second perspective by clicking on an item of the first perspective. (So the text editor is not initially opened)
My application works fine, the export of the product on windows works fine too but with the export on linux I have some identified problems:
The actions PASTE, UNDO & REDO create errors if they are on the toolbar (but no problems if they are on the menu bar). All others actions works fine on both.
So I think its because PASTE, UNDO & REDO actions need a special implementation or because the texteditor is not initially opened.
My code is like this:
In ActionBarAdvisor.java (All my actions are defined like the paste action):
private IWorkbench pasteAction;
protected void makeActions(IWorkbenchWindow window) {
.
.
pasteAction = ActionFactory.PASTE.create(window);
register(pasteAction);
.
.
}
protected void fillCoolBar(ICoolBarManager coolBar) {
IToolBarManager toolBar = new ToolBarManager(coolBar.getStyle());
coolBar.add(toolBar);
.
.
toolBar.add(pasteAction);
.
.
}
I can't resolved my problem because the application start without problems, theses specifics actions appears on the coolbar but cause collaterals problems (the method HandlerUtil.getActiviteSite(event) of my handler return null and lead to errors).
Why COPY, CUT works fien but not PASTE and with this problem only appears on Linux??
Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.03523 seconds