Eclipse RCP user friendly GUI components - java

I am going to develop a Java application using Eclipse RCP, In fact I am new with this framework. My main problem is about this two issues:
If RCP plugins (if I am right) supports RTL UI and Languages?
Is there any set of UI components to be able to use them in desktop application? such as ribons and so on which exists for other languages like C#
I have searched a lot but could not find any good sources to answer these questions,
Thanks very much

An Eclipse RCP gets the same set of controls that Eclipse itself uses (since Eclipse is just an example of an Eclipse RCP). These are the SWT and Jface controls plus things Eclipse builds on top of those controls.
SWT support RTL, LTR, and mixed directions. Eclipse RCPs and plugins can support multiple languages with different directions (including different icons for each langauge).
For Eclipse e4 style RCPs you can also use JavaFX.

Related

Migrate EMF / GMF based eclipse 3 plugins to RCP

Some time ago I created a graphical editor with GMF ( xsd->ecore->emf->gmf).
Additionally I created plugins with different views, launchers (debugger) and more.
All those plugins were created with Eclipse Helios.
Now, I would like to create a RCP application out of my plugins.
I did a lot of internet research but still do not really understand how to begin.
I read this tutorial (http://www.vogella.com/tutorials/EclipseRCP/article.html#plugin_creatinge4) but I am still not sure what to do.
If I would do as told in this tutorial, I would have to build all the windows, editors, menus and so on manually, correct ?
And if so, how to get those default eclipse features in my RCP application, like: Create an empty project, starting my "New Diagram" Wizard, double click the diagram file in the project view to open the editor...and so on...
Do I really have to build all those features manually with the Application Model file ??
I really could use some pointers to the right direction.
Thanks in advance!
The tutorial you have found is describing the new e4 API. This does not support a lot of the older 3.x compatibility APIs so it is not suitable for using to build a RCP which uses plugins based on 3.x. The e4 API is good for building new RCPs which don't use 3.x plugins.
Instead you can still build a 3.x style RCP, see this tutorial for more details on doing that. The 3.x style RCP will continue to be supported for a long time.

How can I use eclipse to build a GUI? (I want to use only swing/awt and no other packages)

I usually write java code using a simple text editor and .bat files to compile and run. I'm not used to IDEs like Eclipse or Netbeans and as a result every GUI I've made so far has been written by hand.
Questions:
Can I use eclipse to build a GUI easily (e.g. drag-drop features)?
Can this generated code use only the basic java packages (swing, awt) and not any other package provided by the IDE?
I'm saying this because -correct me if I'm wrong- from what I have read so far, I understand that Eclipse and other IDEs use their own packages (to achieve better layouts for example). I would like to avoid this dependency and if possible copy-paste the code generated by Eclipse and then work in the simple way I'm used to.
Thanks in advance.
[edit]
Having tried it for a couple of days, I can now say that WindowsBuilder is exactly what I was looking for. Thank you for all your replies.
Eclipse uses the Standard Widget Toolkit (SWT, not included in JRE by default), Netbeans uses Swing (included).
Since recent Eclipse versions, it includes WindowBuilder to create Swing or SWT via drag'n'drop. WindowBuilder is even bidirectional, so code generation is supported as well as reflecting hand-made changes. It don't know if Netbeans includes this feature, too. In 'New' dialog of Eclipse you find everything you need under the WindowBuilder category.
Yes , You can use the feature of drag and Drop in java by going through these few Steps:
Help → Eclipse MarketPlace → WindowBuilder(Install)
Can I use eclipse to build a GUI easily (e.g. drag-drop features)?
Yes, go to the Marketplace and pull in WindowsBuilder; it supports bi-directional GUI drag-n-drop / direct-code editing.
Can this generated code use only the basic java packages (swing, awt) and not any other package provided by the IDE?
The code generated by the Swing Design tool is strictly Swing/AWT based.
It does offer design tools for SWT and GWT as well.
If you want to create Drag n Drop Swing GUI, you should try Netbeans. Eclipse may have a plugin but i usually find netbeans very good in GUI and it is also recommended by Sun for making Swing/AWT GUI
I haven't seen such in Eclipse. In Netbeans you can of course. But I am warning you! Create the GUI by hand. Netbeans is using GroupLayout to build drag and drop GUI, and that's a nightmare when you look at it!!! If eclipse has the same function, don't expect more than this!! Apart from that, not like .NET, most Java developers create everything by hand (Yes, real programming..That's why most say Java is hard). So, it is better if you can get used to it :)

How content assist works in Eclipse and how to mimic that functionality for my application

Can somebody help me on how content assist works in eclipse and how I mimic that functionality for my desktop java application?
Thanks!
Eclipse is built on SWT and JFace, in other words, it's part of the UI toolkit Eclipse interface is based on. Since you have a average desktop application I assume your program's GUI is Swing and I don't know about content proposals in the Swing toolkit.
Some links on the Eclipse Platform (<- overall name for technologies like SWT, JFace, more general plugin development):
Eclipse Wiki: JFace
Eclipse Wiki: JFace UI Framework -> Field Assist

Eclipse RCP with google Windowbuilder pro

Can I use Eclipse RCP framework with google's window builder pro for desktop application development.
I also want to know more about Eclipse RCP, what are the advantages when comapared to swing.
Yes you can use WindowBuilder Pro for Eclipse RCP development. Window Builder Pro has great support for SWT, JFace, and Eclipse RCP specific stuff like Views and Perspectives for example you can create perspectives in visual editor.
For second questions
You can directly compare Swing and Eclipse RCP, Swing equivalent is SWT, and they have comparable features. SWT has better OS native widgets look.
SWT is set of widgets that you can use. On top of SWT JFace is built- JFace is set of high level frameworks for MVC, wizards, databinding, working with table/treeview,combos ...
On top of SWT and JFace is Eclipse RCP is built which provides application framework for plugins, with support for extensions, perspectives/views,actions, menus, and basically for extendability.
As your first question, yes, WindowBuilder Pro can create SWT code.
As for the second, there are a lot of comparisons on the pros and cons of Swing vs RCP, and the core verdict is that It Depends. Personally I would reccomend going thr RCP route for any major work, but keep in mind that it's a complete stack and not just a widget toolkit, and the things you will need to learn are correspondingly more.

SWT or Swing for Plugin Project

I'm creating a plugin project that will have a menu and toolbar item, that when clicked, will open a dialog for user interaction (input, searching, etc.). Should I create the dialog using SWT or Swing?
One advantage of doing it in Swing is that you don't have to supply any other libraries, because Swing is part of JRE. With SWT you have to do it and you have to have separate dlls for specific platforms.
UPDATE:
Since you mentioned that you have to create Eclipse plugin, I think you have a clear choice here - SWT. It is what Eclipse is based on.
SWT.
Debate over the merits of Swing and SWT is irrelevant. Your plug-in will integrate with a platform built on SWT. Using the same user-interface toolkit will simplify your development and testing, and produce better results.
There are cases where it's useful to use Swing within Eclipse, such as when you have an existing codebase that would be impractical to port. There is an SWT/AWT bridge; I have not used it.
Like #eugener, I prefer Swing to SWT, but both are rich, well-maintained frameworks that will serve the purpose. NetBeans and Eclipse are widely used exemplars. SWT binaries for popular platforms aren't too hard to integrate. The SWT FAQ may offer some perspective.
You'll need some other criteria to decide.
Since you're integrating Code Barrel into Eclipse, and SWT is part of the Eclipse project...
Actually, you should be looking at the Eclipse Plug-in Architecture and see how it works.

Categories