I understand the process of creating Eclipse plugins and adding buttons or menu items to Eclipse.
I would like to know how to create an Eclipse Plugin which should add a button to the eclipse menu and that button must invoke a GUI. How do I proceed with that?
The GUI will be a form where the user needs to select a bunch of options. How do I create this GUI form within a custom Eclipse plugin??
There's plenty of information already out there as long as you search using the correct names. Start with a simple plug-in then work your way up to creating Wizards.
Related
Some time ago I edited a node project in grails. Now every project, even if it has nothing to do with node, shows 5 node files when I do "new" to create a new file. (type script, node project file etc).
I now only have a grails 3 projects in Eclipse, with the usual groovy eclipse plugins installed.
When I want to create a new groovy file (e.g. a domain object, controller etc), I go to file->new, and I only see the 5 node entries, plus a few generic ones.
Is there any way to make it show "groovy class" in the new list, and not show the node related ones?
I thought facets might be for this, but my project has no facets configured (and eclipse still thinks its node), and there are no grails/groovy type facets).
Any suggestions? Not a show stopper obviously.
E.g. can I create my own facet without coding, or can I influence which file types appear on create new by project?
I could open up a DOS command box and do the grails command to create the classes, but his is more work, especially as it creates broken tests which have to be manually deleted after (until such point as we need tests)
Intellij ultimate is unfeasibly expensive, so that is not an option.
You should be able to customize what appears in the New drop-down using Window > Perspective > Customize Perspective.... In the dialog that comes up, click the Shortcuts tab and you can check or uncheck items that will show in the New drop-down.
You can also edit what options will show for the Show View and Open Perspective sub-menus from here.
I have to work on a project, where GUI is already given. I need to edit it, is there any way to open the Design view with WindowBuilder of this GUI?
I'm working on Eclipse and use WindowBuilder as plugin.
Plugin doesn't recognize it and can't parse automatically.
Any suggestions?
I think we cannot edit an existing GUI made without using websitebuilder plugin as it is not saved with the meta associated with files made using websitebuilder.
You can however create a new file with new GUI and copy code to previous file.
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.
The Eclipse content assist for PHP (and I'm assuming for other types as well) isn't using the currently active working set - it's searching ALL files in the project. How do I change it to only use the active working set?
When doing a Ctrl+Shift+R search, it was also looking for all files in the project (not what I wanted), until I clicked the small black triangle in that window and selected the working set I wanted it to use. Now it successfully only shows the files that match my search string in the working set. However, this doesn't change anything in the autocomplete content assist feature (i.e. doing a Ctrl+Space to complete the name of a function or variable). Is there any way to accomplish this?
I'm using Eclipse Indigo release, so it's very recent.
I'm afraid it's not possible the way you put it. Eclipse Working Sets just give you a way to organize your projects.
However you may want to take a look at Mylyn, which is fully integrated with Eclipse platform. Here and here is a nice overview of what you can do with Mylyn. But briefly, what it allows you to do is to create a task and maintain a context associated with it. This way, only the relevant files will be displayed in Project Explorer and autocomplete would suggest you only task-focused options.
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.