Importing Eclipse-generated GUI forms in to IntelliJ - java

I have a Java GUI application (Swing) that I built using Eclipse's designer. Most forms use Group layout, with the layouts/controls stuff written directly in the class constructor.
I have downloaded IntelliJ for evaluation, and succesfully imported my eclipse .project files and see them as modules in IntelliJ
Is there a way to get IntelliJ to understand this file and use its GUI designer? Right now, my form classes appear just as regular source code files.

There is no support for what you want to do automatically.

Related

How to identify a project (eclipse) type (RCP or other) to look at the code?

Please bear with me, if my question sounds bad.
I am working with a project (java eclipse), I had the code base in my office laptop, it works fine, now I need to get inside the code/project so that I can modify when needed.
I can code in java (intermediate level), but I am a beginner at eclipse stuff, specially eclipse application/plugins.
I am spending lots of time reading/watching different tutorials on eclipse (like vogella, o7planning, help.eclipse, etc.) but got confused on all these different stuff, RCP, SWT/jFace, Java GUI, windowbuilder, etc.
I need to know How "this" (my project that I'm working) got started? Is it a eclipse RCP? seems like a RCP, but there is no OSGi,
Here is a list of what it has (other than .java, JRE library, Plug-in dependencies),
META-INF, build.properties, a product file, a launch, h2 connectivity, a plugin.xml
From user point of view, this program has several menus, views,
I was able to open some views in windowbuilder editor (not all views/menus)
some java classes named as handler (part of name).
Any suggestions (reading materials) how to start with this project to understand it completely will be really helpful.
Is there any way to reproduce the whole project (using all the codes/java files that I already have)?
One way to do reverse engineering is by going through plugin.xml.
vogella is a good tutorial you will find all major eclipse rcp related tutorials.
You mentioned menu go through your plugin.xml you will find org.eclipse.ui.menus extension and associated handlers.
https://www.vogella.com/tutorials/EclipseCommands/article.html
Do your plugin project contains.xtend files go through https://www.eclipse.org/xtend/documentation/101_gettingstarted.html
Do your plugin project contains xtext files go through DSL
https://www.eclipse.org/Xtext/documentation/102_domainmodelwalkthrough.html

Open NetBeans Java project into IntelliJ IDEA 13

I've got a project written in Java language, i made it in NetBeans IDE, but now i want to migrate to IntelliJ IDEA, the problem is that when i try to open a form into IntelliJ GUI Designer i can't edit my forms, IntelliJ tells me that it's not compatible.
This post says that:
Currently there is no "Import NetBeans project" functionality in IntelliJ IDEA. However, in IntelliJ IDEA you can create a new project with existing sources. So in many cases moving the project to IDEA is not a complex operation, you can create a new project from existing sources using the "File | New Project" action. You can ask IntelliJ IDEA to use the same directory as your NetBeans project is using. IntelliJ IDEA then adds .iml file (idea module file) and .idea configuration directory. The NetBeans .nbproject directory and build.xml remain untouched, so you can continue using IntelliJ IDEA along with NetBeans.
But if i add the sources of my project to IDEA project i can't open my forms.
I've searched and found that using JFormDesigner would be an option, but i would like to know if there's another way, if not how would i use JFormDesigner?

Building RCP with support for Eclipse projects

I want to create an Eclipse RCP from our collection of already existing Eclipse plugins.
We have the pecularity that in our RCP we want the user to be able to open ("import") Eclipse projects (we distribute some of our features in bundles which come in the form of Eclipse projects. These should be registered in the workspace because a model server scans for the opened projects and loads them). Also, when I open files via File->open an exception is thrown from our internal editors: File opening intentionally only is possible if you load an imported resource.
For the moment, I have gotten the RCP to work by depending on org.eclipse.core.resources and org.eclipse.ui.navigator.resources. Thereby, I can import complete Eclipse projects. However, I am unsure[1] this is the correct/"intented" way of doing it (e.g. the navigator view is lacking icons per default) should I rather use the CNF?
The main thing is, we have to support loading/importing Eclipse projects in our RCP. Your answer is even helpful if you know other RCPs which allow to import Eclipse projects.
Regards
SuperUser
[1] http://wiki.eclipse.org/RCP_FAQ#Is_the_resources_plug-in_.28org.eclipse.core.resources.29_considered_part_of_the_Rich_Client_Platform.3F
If you are using org.eclipse.ui.navigator.resources then you are using the CNF (it's org.eclipse.ui.navigator).
The link you have is pretty outdated information, using the Eclipse Resources support in an RCP application will work fine (our product does it). And then if you want to package the application to work either as RCP or in an IDE environment you are one step closer. Also, despite what the link you provided says, don't be afraid to use stuff in org.eclipse.ui.ide if you need them. All you really need to be concerned about is to make sure you are only using classes that are actual Eclipse API, if you do that, then everything will work on future Eclipse versions. Anything that's public is Eclipse API unless it's marked in the Javadoc that it's not intended to be used by clients.
You should not be using the Resource Navigator as that has been deprecated and is not as general as the CNF.
As far as importing and exporting Eclipse projects with RCP, our product does that as well and it works fine.
I would say you are on the right track.

Java and JavaScript nature simultaneously

I have a larger maven multi-module project where multiple languages are involved. Now with Eclipse JDT and JSDT installed the code coloring works fine but code completion in JavaScript does not work very well which makes it hard to be productive. Eclipse does not seem to find JavaScript classes in my project so i am also not able to jump around JavaScript methods very easily. Mapping JavaScript classes seems also not possible since this is a Java project and i see no way to mix up project natures.
Is there a way to improve this behavior? Or are there any other JavaScript Plugins which are able to do so and work simultaneously with JDT?
You can definitely mix Java and JavaScript development in Eclipse. The Dynamic Web Project creates such a configuration by default.
To add JavaScript support to any Java project, do the following...
Project Properties -> Project Facets
Click on "Convert to faceted form" link
Check JavaScript and hit ok to close the dialog.
Make sure that you are in a perspective that has "Project Explorer" view as opposed to "Package Explorer", which is standard in Java perspective or open that view yourself. Unlike the Java-specific Package Explorer, the Project Explorer view accommodates different technology extensions, such as JavaScript.
Enjoy. Facets are somewhat like natures, but unlike natures the can be user-manipulated without hacking metadata files. New Eclipse tooling, like JSDT has been moving to providing facets to make enablement easier.
Does it work for you if you open up your .project file and add a new <nature> into the <natures> element? I've done that to apply the java nature to non-java projects which had other natures.

How to import java classes from other projects in NetBeans 6.8?

I have just started playing with Java, and I really like the language. I am using the NetBeans IDE, and I find one odd oversight. I can create a new class in a project, but NetBeans doesn't appear to support any way to import an existing class into a project.
I manage to get it done by going to some other project where the desired class already occurs, and then I copy/paste it into the source code folder of the new project, then change the package name at the top of the pasted file to match the package name of the new project.
Is there a nice direct way to do this from the NetBeans interface?
Thanks for any help on this.
In the Projects window you can expand the project that you are working on. Right Click on Libraries and select Add Project.... You will get a dialog allowing you to select another Netbeans Project with the Java classes that you wish to use.
You have to just make the .jar file of that/those java files which you want to use in another project.
right click on file->export->java->.jar then finish.
Now you can use these jar into your another project.
When you build the java project in netbeans it creates a jar file on the dist folder in the current project directory.
You can use this jar file for the other project as a package by adding this as ADD jar in the next project.I have tried this ,i am using my old project jar file for new project development.
Use the 'Clean and build' your project option from the netbeans application, that creates the 'dist' folder which you are looking for (and obviously can't find because you havn't cleaned&buld)
The netbeans itself creates .jar files and you can add the jar file to the current project you are working on.

Categories