Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Problem
Problem [message #63110] Mon, 26 November 2007 12:16 Go to next message
Thomas Hartmann is currently offline Thomas HartmannFriend
Messages: 3
Registered: July 2009
Junior Member
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 #63213 is a reply to message #63110] Mon, 26 November 2007 17:30 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 237
Registered: July 2009
Senior Member
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
Re: Problem [message #63288 is a reply to message #63213] Tue, 27 November 2007 10:47 Go to previous message
Thomas Hartmann is currently offline Thomas HartmannFriend
Messages: 3
Registered: July 2009
Junior Member
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
Previous Topic:Generate RAP from RCP application
Next Topic:Splash Screen
Goto Forum:
  


Current Time: Thu Apr 25 14:50:18 GMT 2024

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

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

Back to the top