I sync my eclipse between 2 systems and sometimes Eclipse loses all the projects in the explorer. I can add them back with no problem, but then my Window Builder plugin forgets which files were created with Window Builder.
I have to create a new Window Builder file and paste the same code back into the new file that I can use Window Builder.
Is there some way I can select a Java file to tell Window Builder that it can edit it?
Import your project > Go right click on class you want to open with WB > Open with > WindowBuilder Editor
Related
In Eclipse, one can choose a File in Editor, right click and hight-light the file in Project Explorer. That will expand the tree, and one can see the file highlighted.
I'm wondering how one can accomplish the same in Intellij IDEA.
There is a shortcut: ALT + F1 then select 1.Project View.
Or you can press Scroll from Source button:
If you're a fan of keyboard shortcuts like me, you can also assign one via Settings - Keymap
Adding to Ruslan answer, you can also decide to automate the process and keep the Project ToolWindow always in sync with the currently opened editor.
Just tick the Autoscroll * menu items.
Was finding this problem with Eclipse(Kepler) over the last week, so downloaded Eclipse (Luna) and checked out the relevent project into an entirely new workspace.
I'm using *.str files for a particular project (they are standard editor files anyway - short for 'string'). But Eclipse wants to open such files as macVim files:
I have NO file associations set for *.str files:
...althought I do use macVim to open them in the underlying operating system. So I change the system editor to TextEdit and Eclipse happily now wants them to open in TextEdit - but I want to open them in the eclipse editor! (appart from anything else, I've got to develop an editor plugin for *.str files.
How can I convince Eclipse that it can open *.str in it's own editors without having to resort to the system editor?
EDIT - follow the answers - my understanding is this. If Eclipse doens't know what the file is, it will ask the system. If you ask it to open in a particular editor it will overlay that information on that particular file, and to make it happen in general (and change the icon) you need to add a file association.
You can add a a File Associations for '*.str' and set the Associated Editor to 'Text Editor'. Eclipse will use this for files that you have not yet opened.
For files that you have already opened Eclipse will be remembering the editor you last used, so for these right click on the file and use 'Open With > Text Editor'. You should only have to do this once.
Right click on the file, select open with, and there should be three options (Text Editor/System Editor/Default). Selecting text editor should associate it with eclipse (from within eclipse only) in future.
I'm new to Eclipse and SWT, just found that WindowBuilder is a good tool for UI design.
However, when I download the sample Phonebook and opened it, it doesn't show the normal
Source | Design | Bindings
tabs at the bottom of the file. The file was treated as a normal java file. Is there anything I can do to let them show as they are when I create an SWT designer file?
Right-click on the Java file and choose Open with... to select the WindowBuilder editor.
if the file is not appearing in the windowbuilder then there is somehting wrong with the content of file and windowbuilder is unable to parse the file. I would suggest you to create a new file and view in the window builder.
Supposedly creating a new GUI form should be a simple matter of right-clicking your project, package or src folder and go New > GUI Form. The problem is I don't have that option. I've created a Java project and it compiles and runs fine.
But the only options I get under New are Java Class, File, Package, HTML File, and JavaScript File.
Really old question, but if I got here someone else may as well...
So, step by step:
Make sure that the "UI designer" is enabled:
File -> Settings -> Plugins -> UI Designer (checked)
The parent (root) folder must be market as "source root"
Right click on the folder -> Mark Directory as -> Source root
Create a package from the "src" folder:
Right click on the "src" folder -> New -> Package
Create the new form:
Right click on the package -> new GUI Form
PS. I'm not sure, but I reckon it's possible to skip the package step...
Double check that you have UI Designer enabled in Settings | Plugins.
You need the create a package, and after you can create GUI forms.
You need to create a package, and have open a class file within the package, and THEN you can create GUI forms. The options in the File -> New menu change depending on what kind of file you are currently editing.
I know this is an old thread, but it still deserves a straight answer. I had to right click the package itself inside the project directories. You cannot use the "file > new" option. So once you create your package, right click the directory you want the files created in, go to new > GUI Form
In the latest version it's like this:
I had this problem and the only change I needed to do was to use one word in the input fields for the New GUI Form dialog. When I tried clicking the OK button no error message or warnings were displayed, just nothing happened. Probably a pretty obvious thing, but worth sharing in case anyone else runs into it.
At Project > Properties > Java Build Path > Libraries tab
you click Add Jars button, you will see the JAR Selection dialog.
I like to open this JAR Selection dialog on my plugin code.
How to open this?
With the Eclipse RCP edition (which you must have since you are developing a plugin), you can use the Plugin Spy (Alt+Shift+F1) and see what exact class you need:
alt text http://img541.imageshack.us/img541/2232/eclipsetreesel.png
It is based on org.eclipse.jdt.internal.ui.viewsupport.FilteredElementTreeSelectionDialog (strangely absent from the sources of org.eclipse.jdt.internal.ui.viewsupport), derived from org.eclipse.ui.dialogs.ElementTreeSelectionDialog.
If you want to see how it is opened, you need to have a look to the global window opening that dialog:
alt text http://img41.imageshack.us/img41/1903/eclipselibclass.png
It is the org.eclipse.jdt.internal.ui.preferences.BuildPathsPropertyPage, from which you can infer the various action classes associated with the button and see how it works.