how to load a web start application into eclipse rcp - eclipse

I have a Webstart Apps/jnlp in which I would like to add into an already made rcp client. Can I integrate the web start application into the RCP so it will appear under the menu toolbar so if it was clicked it will load ithe application.If so How will I go about doing that, would it need to be place into as a plug-in?
Thanks for any help!

Check out this tutorial by Lars Vogel to learn how to use commands in Eclipse RCP (and enable command execution from menus).
Then, in your command handler, write the code that opens the web browser with the url of your application passed as parameter:
//Assuming 'url' is the url of your application
PlatformUI.getWorkbench().getBrowserSupport().createBrowser(null).openURL(url);
Also, check out this link to learn more about Eclipse RCP browser support. Since you didn't specify whether you want this to be opened with an internal or an external browser, you might want to tweak the code I posted.

Related

How to auto-refresh my browser on save while using Eclipse?

I(a beginner to development) use Eclipse IDE for developing web-applications and Apache Tomcat server. It becomes very tidious to refresh the browser everytime I want to see the changes I have made from my last refresh. Is there any plugin or code which can do this Auto-refresh work for me in Google Chrome?
I searched it on Google but was not able to find any good solutions.
Thanks in advance!

How to create Eclipse RCP application that behaves like a wizard?

I want create a installer by using Eclipse RCP. I need to give the user a wizard-like installer. This means user can do some options then click next. Or they can go back to previous page by click previous. Or they can cancel the installation by clicking cancel.
Here is my problem:
I don't know how to switch between views when clicking "next","previous". I need to create something like WizardPages and i can change between these pages?
I can't use JFace wizard because I'm required not to pop up any dialog.
I'm totally new to Eclipse RCP so please help!
thanks.
Maybe "StackLayout" is what you need.
Consider whether you actually want/need Eclipse RCP in this context. Eclipse RCP shines in complex applications with an extensive business domain and complex user interface.
An installer wizard, however, is very straightforward and static. I cannot imagine you requiring more than two or three user inputs. Your question is a bit like "I want to hear beautiful music. How do I program a robot to play the piano?"
It is much easier to limit yourself to using SWT and JFace. Use the JFace WizardDialog to make a nice installation wizard. You will find you will have never needed the Eclipse RCP framework.
See http://www.vogella.com/tutorials/EclipseWizards/article.html for a nice tutorial.
If you do think you need the features of the Eclipse RCP runtime framework, I suggest you follow the path below instead:
Create an RCP application (e.g. the sample 'Mail' application). A class will be created that is the main entry point in your application. This class will launch the Eclipse Workbench. Delete this code, and instead launch the WizardDialog.
A lot of things will not be available, such as menu's, views with drag-and-drop functionality, keybindings, etc. I cannot imagine you will need those things. However, you will benefit from the following Eclipse RCP features:
Eclipse launch framework. Ability to create a self-contained product including the JRE.
OSGi framework. Ability to easily add new plugins. Ability to use services, blueprint, etc.
JFace framework.
EMF (if you have a very complicated installation wizard)
All other eclipse plugins, although a lot of them may not work outside of the context of the Eclipse Workbench.
If you are convinced you need the full Eclipse Workbench, you can always do the following:
Define a 'base' perspective that is 'locked down'.
Use a Command to move from one perspective to the other. This will allow you to keep the previous wizard views open in other (hidden) perspectives.
Use Eclipse Contexts to hide all the standard Eclipse Workbench functionality, menu's, etc.
Since you are new to Eclipse RCP, I do not recommend learning the framework in the particular usecase of an Installation Wizard. You already need good knowledge of Eclipse RCP to be able to hack it this way, and it will not be a clean or nice implementation :-)

How gwt receives the request and loads the ui while in development mode?

I am new to GWT and understood the motive behind creating such good framework. However I could not understand how GWT builds the UI and shows while in development mode.
It is said that while bootstrapping .nocache.js file is loaded in the browser, then this file created a hidden iframe. Then depending on browser and language settings a .cache.html file is loaded in the iframe where all application logic resides.
What I could not understand is how gwt does this in development mode/ hosted mode. Because .cache.html files are not available in development mode. I assume that the sdk receives a request from .nocache.js file regarding the browser details and then generates a .cache.html file for that particular browser and that is loaded in the iframe. My question is how .nocache.js file sends a request to sdk to dynamically generate a .cache.html file? Or does it have something to do with hosted.html and the browser plugin? How the UI and RPC code is loaded while in development mode. For nocache.js file to send a request there must be a server program (Servlet) listening to the request and allowing GWt to start looking for entrypoint class and start generating the UI content.
I could not understand how gwt will come to know about the browser settings and generate the UI? Does hosted.html and browser plugin has something to do with the content generation?
I searched using google, but all my trials went useless. Or may be I searched using wrong search keys. Could anyone please tell me or point me to a link where it is clearly explained?
When an application is running in development mode, the Java Virtual Machine (JVM) is actually executing the application code as compiled Java bytecode, using GWT plumbing to connect to a browser window.
As of GWT 2.0, development mode uses a regular browser instead of an embedded browser. You can use any supported browser.
Out of process hosted mode (OOPHM) is an upcoming replacement for GWT hosted mode debugger. OOPHM allows one to use a standard browser (IE, Safari (32bit) and Firefox) for debugging GWT-client-side code.
With OOPHM you can:
do modifications to your widgets with no time consuming Java-to-JavaScript recompilation
set breakpoints to widget code.
use any advanced browser features and extensions not available in conventional hosted mode (Firebug for example).
Useful links:
https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging
http://code.google.com/p/google-web-toolkit/wiki/DesignOOPHM
http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHM
http://www.slideshare.net/allahbaksh/gwt-generators-and-oophm
Have a nice time.

start rcp application from another rcp application

I have an rcp eclipse application and from that application, using a context menu action I want to start a new rcp application .
How do I do that ?
Thank you.
As I see it, you have two options.
Either you create a dependency between the two RCPs and when the user clicks the menu, just instantiate the second RCPs main class.
Or you could execute the second RCP as an external command. That means you will have to know where it is installed.

How to add plugin with perspective and view to my own RCP app

I have a very basic RCP application (e3.7.1) with only one (Hello World) plugin. For reasons of code control I want to develop all perspectives and views in separate plugins. I have now set up one plugin with a perspective and a view. How do I get them into my main RCP plugin, e.g., where do I configure which extensions/extension points? I want the perspective and view to appear in the Perspective Menu as well.
How did you create you RCP application, did you create a .product definition ? did you create a feature ?
Basically Eclipse is based around plugins (OSGI bundles) and you can create view and perspective in different plugins. As long as your plugin is part of you RCP .product definition either as a plain plugin or into a feature definition, you should be able to export your RCP application with all the desired plugins.
If you are just talking about how to run them from Eclipse, you need to edit the run configuration and add all the plugin you need to activate in the Eclipse Application run configuration. This configuration is the on you use to launch the RCP application.
The set of view and perspective shortcuts in those menus is specific to current perspective.
If the perspective on which you want to make those shortcuts available is your own, then you need to call IPageLayout methods addShowViewShortcut() and addPerspectiveShortcut() from your IPerspectiveFactory. If you want to make those shortcuts available on someone else's perspective then use org.eclipse.ui.perspectiveExtensions extension point.