Problem [message #63110] |
Mon, 26 November 2007 07:16  |
Eclipse User |
|
|
|
Hi all,
I created a contextmenu for my treeviewer and a submenu depending on a
collection of actions, for the contextmenu.
Everythings works fine, except the presentation of my submenu. It should
display approx. 20-30 elements, but unfortunately the submenu is cut off
at the bottom edge of the browser window.
Has anybody an idea if it is a known bug, or how to fix this problem.
The code looks like this:
private void hookContextMenu() {
menuMgr = new MenuManager("#ContextMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
fillContextMenu(manager);
}
});
Menu menu = menuMgr.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
getSite().registerContextMenu(menuMgr, viewer);
}
private void fillContextMenu(IMenuManager manager) {
manager.add(createResourceSubMenu());
manager.add(new Separator());
manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
manager.add(new Separator());
manager.add(addAction);
manager.add(removeAction);
manager.add(editAction);
}
private MenuManager createResourceSubMenu() {
final MenuManager manager = new MenuManager("&Resource",
"Resource hinzufügen");
if (!typeActions.isEmpty()) {
for (IAction actionObject : typeActions) {
if (!actionObject.equals(null))
manager.add(actionObject);
}
} else {
logger.info("No Type Actions found");
}
return manager;
}
Thanks in advance
Cheers
Thomas
|
|
|
|
Re: Problem [message #63288 is a reply to message #63213] |
Tue, 27 November 2007 05:47  |
Eclipse User |
|
|
|
Hi Benny,
thanks for your quick answer.
Benjamin Muskalla schrieb:
> Hi Thomas,
>
> this really looks like a bug. The problem is that the real bug behind
> this does is not RAP-related but based on the underlying javascript
> library (qooxdoo). So you can open a bug at RAP to track the issue when
> this is fixed in qooxdoo itself.
>
> Greets
> Benny
>
> Thomas Hartmann wrote:
>> Hi all,
>>
>> I created a contextmenu for my treeviewer and a submenu depending on a
>> collection of actions, for the contextmenu.
>> Everythings works fine, except the presentation of my submenu. It
>> should display approx. 20-30 elements, but unfortunately the submenu
>> is cut off at the bottom edge of the browser window.
>>
>> Has anybody an idea if it is a known bug, or how to fix this problem.
>> The code looks like this:
>>
>> private void hookContextMenu() {
>> menuMgr = new MenuManager("#ContextMenu");
>> menuMgr.setRemoveAllWhenShown(true);
>> menuMgr.addMenuListener(new IMenuListener() {
>> public void menuAboutToShow(IMenuManager manager) {
>> fillContextMenu(manager);
>> }
>> });
>>
>> Menu menu = menuMgr.createContextMenu(viewer.getControl());
>>
>> viewer.getControl().setMenu(menu);
>> getSite().registerContextMenu(menuMgr, viewer);
>> }
>>
>>
>>
>>
>> private void fillContextMenu(IMenuManager manager) {
>> manager.add(createResourceSubMenu());
>> manager.add(new Separator());
>> manager.add(new
>> GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
>> manager.add(new Separator());
>> manager.add(addAction);
>> manager.add(removeAction);
>> manager.add(editAction);
>> }
>>
>> private MenuManager createResourceSubMenu() {
>> final MenuManager manager = new MenuManager("&Resource",
>> "Resource hinzufügen");
>> if (!typeActions.isEmpty()) {
>> for (IAction actionObject : typeActions) {
>> if (!actionObject.equals(null))
>> manager.add(actionObject);
>> }
>> } else {
>> logger.info("No Type Actions found");
>> }
>> return manager;
>> }
>>
>> Thanks in advance
>> Cheers
>>
>> Thomas
|
|
|
Powered by
FUDForum. Page generated in 0.03928 seconds