Does Eclipse have a GUI builder out-of-the-box? - java

I'm using Eclipse for Android coding. I wanted to make another version of my application for Desktops, but couldn't find any option to add a JFrame layout or something.
I found out that there's a plugin provided by Google called "Window Builder", and a variety of other plugins, but in Netbeans I don't have to download any kind of plugin, it comes with it.
Does Eclipse have a GUI-building support out-of-the-box (without any plugins)?

No, you will need a plugin for that.

The Eclipse RCP - Rich Client Platform is the library you are looking for, this is a getting started tutorial.
RCP is the eclipse based Swing like library used to build eclipse itself, similar to the Netbeans Platfom.

Related

Netbeans scala javadocs missing in Netbeans 8.0

I've been looking into scala lately and from the conciseness and language features I'm completely thrilled.
I have netbeans 8.0 running on ubuntu 12.04 and downloaded scala, edited netbeans.conf (netbeans_default_options="-J-Dscala.home=...), installed plugins from plugin manager inside netbeans (ALL OF THEM). Then, I created scala project (not maven one) and tried out autocomplete. It works, compiles, runs, however, it shows no document found in autocompletion.
This is how I added javadocs Tools > Scala platforms > javadoc tab
I tried adding following ways:
added the entire scala api doc zip from http://downloads.typesafe.com/scala/2.11.2/scala-docs-2.11.2.zip
extracted the previous zip to scala-home folder under $SCALA_HOME/docs/javadocs/scala-docs-2.11.2 and added that
same as 2 but added $SCALA_HOME/docs/javadocs/scala-docs-2.11.2/api in netbeans
None of these pick up documentation! Of course, I could live without it, but it's such a killer for such a concise language where I could just find out stuff instantly from autocompletion. Also, I don't want to use eclipse special ide for scala because I don't want to throw out all the experience with netbeans out of the window and learn new IDE.
P.S. - Netbeans navigator also seem not to work in scala.
And I wonder why there's so little content on google for such a wonderful language?
There is no need to change to IntelliJ. Use the right build tool -sbt or Maven- and everything works fine.
In Netbeans you can use e.g. free Application Servers.
Netbeans support for scala seems pathetic so I just decided to jump to IntelliJ IDEA. It was little bit of learning curve but I'm glad I did because now everything was working (autocomplete, documentation, awesome SBT support etc. etc.)

How to Use JavaFX in Eclipse Swing Project

I'm wanting to use a few JavaFX components in a Swing app (notably JFXPanel for its HTML 5 rendering support). My app is currently set up in Eclipse 4.3 (Kepler) and I have the latest Java 7 JDK installed on my machine.
This tutorial from Oracle suggests that all you have to do is just refer to a JavaFX class and it'll work in a Swing app. So I type in JFXPanel panel = new JFXPanel(), but Eclipse does not recognize it as a valid Java class. It does recognize other Java 7 classes, like java.nio.
I can't figure out how to get Eclipse to recognize JavaFX classes. This question was previously answered about JavaFX in Eclipse. The first response said that you need to start by creating a new JavaFX project, which I can't do because I already have a fairly developed Swing app. The second is to use the e(fx)clipse plugin, but the tutorial also seems to require this. If there's something special I have to do in order to get a non-JavaFX project in Eclipse to use JavaFX classes, I can't figure out how to do it.
The problem with JavaFX is that it is not on the default classpath so eclipse won't find it (and your exported swing application won't either unless you use the oracle packaging utility!).
So you have 2 options:
a) you install e(fx)clipse and modify the projects Buildpath to include the JavaFX-SDK library.
b) you add the jfxrt.jar yourself to the projects Buildpath (you don't need anything else).
e(fx)clipse would give you extra support for FX development. The version that can be installed into Kepler can be found at http://download.eclipse.org/efxclipse/updates-nightly/site

What makes eclipse for RCP different from eclipse classic?

I understand that I need RCP for eclipse plugin and eclipse RCP development. However, as I have some crashes, and software installation issues, I guess I have to use eclipse classic until the issues are solved.
What makes eclipse for RCP different from eclipse classic?
I checked eclipse download page, and to me it seems like that eclipse classic doesn't have any feature whereas RCP has a lot.
Are the features only difference between the two choices?
If so, can I download the features/plugins to use all the RCP features in eclipse classic without any problems?
All the downloads on the eclipse.org page are only predefined packages of generally available Eclipse plugins. So you can always install any plugin into any existing Eclipse installation (assuming no dependency conflicts). The package selection on the download site only determines what is pre-installed (and it is hard to disable the pre-installed features).
For RCP development you need the JDT and PDE features. Both the "classic" as well as "for RCP development" packages contain those, so it is still your choice.
If you really want a minimalistic Eclipse suited to your needs, then install the "Platform Runtime Binary" from http://download.eclipse.org/eclipse/downloads/drops4/R-4.2.1-201209141800/, which is an "empty" Eclipse. Afterwards install only your chosen plugins using the update manager.

Java SWT autocomplete for Eclipse

I'm manipulating SWT library for Java with Eclipse. It's cool however something is missing. Eclipse doesn't propose any thing concern SWT, Ctrl-Space seems losing its magic.
I'd like to know if we can add Autocompletation for SWT and Do you know any cool site to learn SWT
Thanks
If you are creating a project that uses SWT, and you'd like to have all the SWT source and Javadoc available while you're coding, you probably want to use the PDE version of Eclipse. This version comes with all of the source and documentation for all of the SWT, JFace, and Eclipse RCP classes, and provides useful functionality if you are ultimately going to create an RCP application or plug-ins for one.
No auto-completion? That's not supposed to happen. Does your project compile? Do you have the swt.jar in your build path? Does the JDK version work with the SWT version?
Anyway if you want all the documentation, completion etc, if you're using IDE Eclipse, you need both swt.jar and swt.zip - the source. Add swt.jar to build path, tie swt.zip for source and build the project. If still doesn't work try Refresh and build again.

Importing Liferay portlet into Eclipse IDE

I have a question regarding the development of liferay portlets using the liferay plugin SDK. My question goes mainly in the setup of the development IDE. The suggested one would be to use Netbeans IDE which I also tried out, but it appears to run very slowly on my machine while Eclipse is quite performant.
The setup for Netbeans IDE is the following
Go to the directory \portlets
Run the create.bat (or sh file depending on the OS) to create a new sample portlet
Run Netbeans IDE, create a new "Java free form project" and point it to the directory of the created sample portlet
That's it, pretty simple.
For the mentioned reasons above (and because I'm a lot more familiar with Eclipse) I'd like to import the project into Eclipse the same way. Is there a way for doing it without having to change too much in the original structure of the created sample portlet and the according build.xml (ant file)?? I tried already to create a new project out of the build.xml ant file of the created sample portlet, however in this way it doesn't include me the source code.
I didn't also find great tutorials on the web...
Could someone help me with this, pointing out online tutorials or give me some hints.
Thanks
I know your pain. Starting to work with Liferay needs much time. I you do not want to edit the existing source, but only crate your own portlets, you can download the plugins SDK from the 'Additional Files' section on the Liferay website. This provides ant scripts, to create a simple JSR compliant portlet, and to create all necessary things, to create a sound Eclipse project, for example:
ant -Dportlet.name=<project name> -Dportlet.display.name="<portlet title>" create
Than cd into the directory of your created portlet an do:
ant setup-eclipse
After that you should be able to create a new project from the sources in that directory in Eclipse, which can then be deployed via another ant script to the running tomcat instance. If you already know somthing about portlet programming, you shoud be pretty much settled now. If not, try to find documentation about JSR portlet programming first, before looking into Liferay specifig portlet development.
Liferay has now released an official set of Eclipse plugins that support portlet development. Here is the installation guide for installing the eclipse plugins:
Liferay IDE Installation Guide
Also there is a getting started guide that shows what to do after installation to actually setting up your first portlet project.
Getting Started Tutorial
Liferay IDE uses the Plugins SDK from Liferay under the covers to do all the work. If you already have existing projects that you created with the Plugins SDK those can be imported into Liferay IDE as well.
Importing existing Projects
you can find the tutorial for deploying liferay in eclipse
http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Development+Environment+(Windows)
No clue about Liferay's specifics, but in general, I'd do this:
Follow the steps 1 and 2 from your NB setup list
Create a new Dynamic web project (or a Java project if you don't need the web project's features) in Eclipse
Import the contents of sample portlet directory by doing Import -> File system in Eclipse
Adjust the project's Java source directory to point to the generated sample portlet source directory (that should now appear in your project)
Adjust classpath of the project, point it to LR lib folders, ...
If there's a generated build.xml, check if it can be used to deploy to LR, or to produce builds.
As of March 2011, there is some official Liferay support for NetBeans and as noted before, there is official support for Eclipse ( In the Marketplace). The Documentarian uses Eclipse himself, though many examples just use the Plugins-SDK with shell scripts, ant scripts and no IDE.
We are fighting with Liferay on Eclipse, Eclipse seems buggy and unpredictable, but we are also new to J2EE and Eclipse ( so discount this last comment a bit), and I have our portlet files setup in a separate area for SVN, requiring a refactor-move, refactor is definitely buggy.
You should be aware that there is a book for developers on the way from the official documentarian - we've bought the early release and found it useful. He does cover some IDE issues. See Manning press.
The Liferay sample portlets ( there are many) are not set up for Eclipse projects, and you'll have to import some java files and jump through some Eclipse hoops to get them into a running Eclipse project you can develop.

Categories

Resources