Eclipse: Launch plug-in from web page - eclipse

Is it possible to launch the Eclipse plug-in from a web page?
I'm working on a project where, ideally, I'd like to launch an Eclipse plug-in from a web application. The web application contains information related to the code then, when the user gets to a certain point, I'd like the user to be able to click an "Edit Code" button. At that point, I'd like Eclipse to launch for the selected code, meaning the context is passed over the Eclipse.

Related

Error launching Eclipse Application from Vogella Tutorial

I try to convert multiple Eclipse plugins into a single RCP-Application as described in Vogellas Tutorial (http://www.vogella.com/articles/EclipseRCP/article.html#plugin_creatinge4).
But when i launch the application i get the following error "java.lang.RuntimeException: No application id has been found".
Where is my mistake ?
"No application id has been found" almost always means that you're missing some required plug-ins. Go to the Run Configurations dialog, move over to the Plug-ins tab, and push the Validate Plug-ins button. You'll be presented with a small dialog showing the names of plugins whose constraints aren't being satisfed, often because on the aforementioned Plug-ins tab, those plugins don't have their check boxes selected.
The Add Required Plug-ins button on the Plug-ins tab will often fix the problems for you. If that doesn't work, take a closer look at the plugins that are listed and see if anything looks wonky; maybe a plugin that you know your application needs isn't on the list at all, because you forgot to add it to your workspace or your target platform?
If you still can't puzzle it out, search SO for [eclipse-rcp] "no application id" for more debugging ideas.

Eclipse plug-in development - Multiple workbanches/pages

I am developing an eclipse plugin application.
I have the following scenario:
Main application gui will be based on eclipse, a workbench with a page.
In this page there will be a toolbar, menu bar, some views and multiple editor.
Until now the task is standard.
But here is a "twist": I want to show a popup window (org.eclipse.jface.dialogs.Dialog) and in this dialog i want to insert another editor. In this editor I want to use GEF framework.
Currently I access page like this (which is used by all editors):
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
Eclipse, especially eclipse 3.x (Helios, Indigo) won't allow editors in dialogs gracefully. With no IEditorSite (the editor's link to the workbench page) many of the services it uses won't be available, and it might not even start.

Run Webapplication in Eclipse: don't open new Browser tab

I develop a Vaadin Application with Eclipse and two things are driving me crazy:
whenever I hit CTRL+F11 (run), Eclipse opens a new Browser tab, even if I already have one (or 50) of that Application open
if I don't have the project selected in the project explorer but some class instead, Eclipse opens "http://localhost:8080/WEB-INF/classes/org/somepackage/MyClass.java" instead, which does not run the Application but gives me an error
Those two things don't make it impossible for me but because they occur so frequently they are a big annoyance for my work so I would be really glad if someone could tell me how to fix this.

gwt4nb; running new project = blank page

I'm using gwt-2.4.0, netbeans 7.0.1, and I have GWT4NB installed.
I create a new project using "Java Web Application" project wizard, and I add the "Google Web Toolkit" framework when asked to add frameworks. The GWT installation folder is selected, and I choose a name for GWT Module etc etc etc.
After all that, I then debug the project, and get nothing but a blank page in my browser window. When I adjust the "title" tag in the "welcomeGWT.html" file and reload the page, that takes effect, but nothing in the EntryPoint class works...
I remember having this problem before (about 2 years ago when I started a previous project), and I thought I fixed that by adjusting something in one the configuration files, but I can't seem to track it down now.
So it's a brand new project, no code added or anything, and it does "run" but the GWT stuff doesn't work. The "GWT Development Mode" window does appear, and I can click the "Launch Default Browser" button which does work, but again, only the "welcomeGWT.html" page loads. I don't see any logging tabs appear in the window either (like it does in my other GWT project).
Anybody have any ideas? I suspect it's just a configuration error... ?
Apparently gwt4nb doesn't support gwt 2.4 at this point; switching to gwt 2.0.2 which I also have installed works correctly.

Developing an Eclipse Plugin and adding a submenu item to navigator

This is my first attempt at an Eclipse plugin- the plugin architecture is vast and a little overwhelming, but I've found a number of tutorials and how-to's online which is helping, but trying to do the following is driving me nuts:
I want to add a submenu item that is available in the navigator context menu when you right click on an Eclipse project.
I can get a submenu to appear on a project file or folder, but absolutely no idea how to have it appear on a project.
Would someone be so kind as to provide me with step by step instructions, starting with creating a new plugin-project? This is probably a lot to ask, but I can't seem to find an online guide that has just the right amount of detail. I specifically want to use the plugin-project wizard rather than hand code a plugin.xml file as I am not very familiar with the Eclipse plugin architecture.
Ok- I got it- it was simple, but I got lost in the noise of the API-
Create a new Plug-in Project using the Plugin-Project Wizard and when the wizard has launched...
1.
On the Plug-in Project page, use anything as the project name and 3.5 as target platform eclipse version
2.
On the Content page, skip ahead and just press next
3.
On the Templates page, select "plug-in with a popup menu" and press next
4.
On the Sample Popup Menu page, you will see that eclipse has prefilled the field
"Target Object's Class" with a value of "org.eclipse.core.resources.IFile".
This means that when your popup menu will only appear when you right-click on a file in
a project. As we want the menu to appear when we right click on a Project when
we are using the Navigator view, simply use "org.eclipse.core.resources.IProject" instead
5.
Finish
You can validate that your pop-up will appear as expected by right-clicking the MF file
and "Run-as" > Eclipse Application
Now to refactor the resulting code to use menuContributions and commands rather than objectContributions and actions :)
I think you have a similar question (menu in the package explorer) here:
Renaming packages in Eclipse (thanks to Rich Seller)
This could be a good start, and is a complete plugin project.
You should look into the Eclipse Common Navigator Framework there are a few tutorials on this side that tell you what to do in detail The Project Explorer is an implementation of the CNF. You should also consider using the Platform Commands to add your commands (and popup menu item) to the popup menu associated with the project explorer. It's somewhat easier to use commands than actions. You should be able to do it with by adding a Command in your plugin extensions. Unfortunately off the top of my head I don't know the right incantation to have the command appear in the project explorer. But you will be able to find it in these resources.