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.
Related
I'm trying to have a standard code style for my project, and I have found http://editorconfig.org/, that is a standard for that. I like it very much, and Intellij supports it (we use Intellij).
But I have read a lot and I havenĀ“t found how I can export all my code styles of Intellij to a .editorconfig file. I only can export them to an XML that is only for Intellij.
Or is there any webpage where I can read ALL the editorconfig domain specific properties for Java? In the editorconfig github wiki they only have a few.
Go to "File->Settings (Preferences in OS X)->Editor->Code Style". At the bottom of the right pane there is a section for Editor Config options, which now includes an "Export" button. This will only export formatting options that are available in the Editor Config specification.
To include advanced options from IDEA you will have to save IntelliJ specific files with the project.
If you want to do this without saving the entire ".idea" folder and "*.iml" files, you can also export the IDEA configuration to an xml file and save in a place where everyone can get to it.
In "File->Settings->Editor->Code Style". At the top of the right pane, there will be a "Scheme" field with an dropdown of options.
Next to the dropdown is a cog/gear image that will expand to give
some options depending on which scheme you have selected.
The two options you need are the "Export..." option and the "Import Scheme"
options which do what their names imply.
With later Intellijs (I'm using 2020.1), the configuration export is available via Settings -> Editor -> Code Style and then the gear icon. See the screenshot below, and the selected menu options:
In newer versions #Pytrys solution does not work anymore. Now you have to do it with File -> New -> EditorConfig file:
Don't think IntelliJ will do this for you.
You'll probably have to Export IntelliJ's Code Styles as a "Code Style XML File" and then manually parse that to your EditorConfig file. Or find a parser on the internet.
To export all your Code Styles from IntelliJ:
Hit "Ctrl + Alt + S".
Editor > Code Style.
Click the "Manage" button next to where IntelliJ states your Scheme.
Export > Export as Code Style XML File.
HTH
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.
How to enable syntax highlighting in Eclipe Indigo? I write in Java. I installed this plugins for more comfortable usage on small screens, but even if I turn it off - all the words in editor are black:(
You may set your coloring preferences by
Window->Preferences-> Java->Editor->Syntax Coloring
Make sure you are using the Java perspective (or Java EE) as well. You should be able to see the name of the active perspective and/or editor in the title bar.
To be 100% sure, you can always right click on the file in question and Open With->Java Editor to ensure that it is the Java editor that is open for your file.
Eclipse remembers which editor you last used to open a file and keeps opening it with that editor, even if you've installed a better one later. Right-click on the file and force it to open with the Java Editor using the "Open With..." menu. If you're not getting any coloring at all, you might just be using the wrong editor.
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
I created a .java file with NetBeans 6.9 GUI builder. Then I transfered the file to my LInux machine and tried to open it up and continue editing with the GUI builder.
But I notice that I don't have the option for the GUI builder anymore. As in be able to drag and drop buttons and all that.
Any ideas or suggestions?
Swing classes depend on two files: The .java source file and a .form file. You need both to be able to keep working in Netbeans.
Swing classes depend on two files: The .java source file and a .form file. these two files should be same name,same path. then double click the .java file , you can switch it between 'source' and design.
I see two options:
Learn to handcode GUI's. JFrame is super simple! Here is a very nice tutorial.
Re-Install NetBeans. This should reset everything to the default setting. But, it will keep your projects intact.