Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to open a messagedialog in a RAP application
How to open a messagedialog in a RAP application [message #1712481] Sun, 25 October 2015 17:01 Go to next message
Eclipse UserFriend
Hello guys. Smile

I'm trying to open a messagedialog in a RAP application by using this code

MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Test","Testtitle");


My problem seems to be, that I can't get a proper shell reference.
I'm new to rap and just edited the "hello world" example delivered by eclipse. What steps do I have to do to get this to work?
I did this steps:
1.) New plug-in project
2.) Template RAP Hello World
3.) Add org.eclipse.ui.workbench_3.107.0.v20150825-2206.jar
4.) Execute MessageDialog.openInformation as stated above

When I use the to String function I just get an empty array, but the debugger shows an ID.
I also get an error saying "java.lang.ClassNotFoundException: org.eclipse.ui.testing.TestableObject" when my application crashes.
Did I include a wrong jar?
Do I need to include another jar?
Might this be a problem because I use the simplified entrypoint?
public class BasicEntryPoint extends AbstractEntryPoint


Any help is greatly appreciated, I'm really stuck here. Sad
Re: How to open a messagedialog in a RAP application [message #1712580 is a reply to message #1712481] Mon, 26 October 2015 11:36 Go to previous messageGo to next message
Eclipse UserFriend
Hi, the correct shell comes from the current Display.
So :
Display.getCurrent().getActiveShell();
Re: How to open a messagedialog in a RAP application [message #1712627 is a reply to message #1712580] Mon, 26 October 2015 18:20 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your reply!
This results in the following error:
Quote:
java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IStatus.

I'm a RAP noob and just downloaded the complete bundle with eclipse.
Whenever I add a jar I get the next class not found error.
Is there a way to search the needed jars automatically?

//edit:
I solved the problem by copying and adding the jars from the mail example.
My new error is:
Quote:
java.lang.UnsupportedOperationException: Display#sleep() not supported in current operation mode.

This seems to be a never ending story for me. Razz

//edit2:
Adding dialog.setBlockOnOpen(false); to my jface dialog did the trick.
Thanks for your help!

[Updated on: Mon, 26 October 2015 19:22] by Moderator

Re: How to open a messagedialog in a RAP application [message #1712650 is a reply to message #1712627] Tue, 27 October 2015 04:23 Go to previous messageGo to next message
Eclipse UserFriend
I'd say something is wrong with your target. RAP works with bundles and plug-ins. You don't add jars to your project but to your target (you should have a .target file or go to WIndow>Preferences>PDE>Target Platform). Then you will be able to add that in your dependencies in your MANFIEST.MF plug-in file.

By the way don't use org.eclipse.ui.workbench. The org.eclipse.rap.ui.workbench replaces it. I think that's where your errors are coming from.
Re: How to open a messagedialog in a RAP application [message #1720034 is a reply to message #1712650] Wed, 13 January 2016 16:10 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I hava the same error as Martin.

I confirm that I use org.eclipse.ui.workbench.
But I cannot find the replacement plugin you are proposing : org.eclipse.rap.ui.workbench...

I use eclipse mars.
Any suggestion?

Thank you.
Re: How to open a messagedialog in a RAP application [message #1720039 is a reply to message #1712650] Wed, 13 January 2016 17:01 Go to previous messageGo to next message
Eclipse UserFriend
I add to my previous response that I insalled the rap tools from http://download.eclipse.org/rt/rap/tools/3.1

I still not have the org.eclipse.rap.ui.workbench plug-in...

Another information of my current work is that I am updating a working dev environement from eclipse helios to mars and I am not an OSGI expert.

One of the required bundle (in MANIFEST.MF) was org.eclipse.ui.
So when I remove org.eclipse.ui.workbench he is not happy!

Does what you propose mean that all org.eclipse.ui is "deprecated"?

Thank you!
Re: How to open a messagedialog in a RAP application [message #1720364 is a reply to message #1720039] Mon, 18 January 2016 03:33 Go to previous message
Eclipse UserFriend
Hello, try http://download.eclipse.org/rt/rap/3.1 repository from either sdk/equinox target/sdk as suggested on this page : https://eclipse.org/rap/downloads/ .

Regards.
Previous Topic:how to change the pespectivebar style in rap workbench as a navigation
Next Topic:Image and Hyperlink
Goto Forum:
  


Current Time: Fri Sep 19 02:56:00 EDT 2025

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

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

Back to the top