Sciology = Science + Technology

Commonsense in Technology

Archive for the ‘RCP’ Category

BayArea Eclipse DemoCamp roundup

Posted by sureshkrishna on November 21, 2008

I am excited to attend the much awaited DemoCamp and meet some Regional Community enthusiasts. Till now 21 got registered for the Regional Community and i am expecting this number to grow; i am sure that Bay Area has more companies working on Eclipse and its just the matter of time.

The DemoCamp started with the demo by Ingres Corporation – A quick tour of the Eclipse Data Tools Platform, which followed by an exciting presentation from Michael Galpin – Eclipse @ eBay.


I gave a presentation + demo on the Single Source; Three Runtimes, which definitely excited many people in the DemoCamp.

Francis Upton gave a nice presentation on the Oakland Software Data Transformer.


Oracle‘s Greg Stachnick gave a presentation and demo of the Oracle Enterprise Pack for Eclipse. I am definitely going to use this OEPE in future, it has nice WebLogic integration features.


I met Randy Kerber and discussed EMF stuff and experiences. We are yet to find some users for EMF so that we can have some interesting discussions.

Last but not the least, i thank Ingres Corporation for organizing this DemoCamp (, beer and pizza’s too :)) where all Eclipse enthusiasts had an opportunity to share their experiences. Hoping to see more participation from the other Bay Area companies in future.

Happy Eclipse-ing.

Posted in AJAX, Eclipse, EMF, RCP | Tagged: , , , | 2 Comments »

JFace Dialogs : which one is right for you ?

Posted by sureshkrishna on March 15, 2008

JFace framework of Eclipse provides many standard and useful dialogs and a framework to build custom dialogs and wizards. When the standard dialogs seems to be too simple for your plugin or RCP developement, one can extend the standard dialogs to suite their own needs. The aim of this article is to provide example oriented approach to dialogs and see in depth of all frequently used dialogs. I am hoping to have this article as the point of reference for many developers to get Dialogs overview.

Dialogs are modal UI components which would do some user interaction tasks. Traditionally Dialogs are used to enter a simple input, to select a choice from a list, to select multiple nodes from a tree, to inform about a success/failure from an operation, to input confirmations from the user, etc…

Eclipse provides standard dialogs from two different frameworks, SWT provides very basic dialogs like FontDialog, ColorDialog, DirectoryDialog, FileDialog and FontDialog. These SWT dialogs are coming out of the SWT as they are very basic and has close connection to the OS. All these Dialogs are available from org.eclipse.swt.widgets package from the org.eclipse.swt.<platform>.jar.

JFace provides a variety of Dialogs for the implementers to extend or to use them directly. Its interesting to look into variety of dialogs provided by JFace and i would leave the usage to your imagination and context. Rest of this article is mostly code, screen shots and less of textual description. I tried to keep the short, sweet and simple.

FileDialog: This is a SWT Dialog but worth mentioning under the general concept of the Dialogs.

“Instances of this class allow the user to navigate the file system and select or enter a file name. Note: Only one of the styles SAVE and OPEN may be specified.

IMPORTANT: This class is intended to be subclassed <em>only</em> within the SWT implementation.”

File Dialog

Information Dialogs: These dialogs are used to inform user about some event and take some necessary action. There are different Dialogs under this category.

ErrorDialog : A dialog to display one or more errors to the user, as contained in an IStatus object. If an error contains additional detailed information then a Details button is automatically supplied, which shows or hides an error details viewer when pressed by the user.

Error Dialog

MessageDialog : “A dialog for showing messages to the user. This concrete dialog class can be instantiated as is, or further subclassed as required.

Information Dialog
Question Dialog

InputDialog: This Dialog is used for a very general paradigm to process some input from the user. Generally its not recommended to use this for input of complex data and for large number of input fields.


PrinterDialog: “Instances of this class allow the user to select a printer and various print-related parameters prior to starting a print job. IMPORTANT: This class is intended to be subclassed only within the SWT implementation.

Print Dialog

ProgressMonitorDialog: This is a very important Dialog component most of the applications would use. This Dialog is used to represent any time consuming task or to provide a long running workspace task to the user. Proper care must be taken to show accurate information of progress information to the user.

Progress Dialog

TitleAreaDialog: “A dialog that has a title area for displaying a title and an image as well as a common area for displaying a description, a message, or an error message. This dialog class may be subclassed.

This is the class that i often use for “About MyCompany” kind of dialogs.

TitleArea Dialog

ElementListSelectionDialog:A class to select elements out of a list of elements.


ListDialog:A dialog that prompts for one element out of a list of elements. Uses IStructuredContentProvider to provide the elements and ILabelProvider to provide their labels.


TwoPaneElementSelector:A list selection dialog with two panes. Duplicated entries will be folded together and are displayed in the lower pane (qualifier).”


List SelectionDialog:A standard dialog which solicits a list of selections from the user. This class is configured with an arbitrary data model represented by content and label provider objects. The getResult method returns the selected elements.


ElementTreeSelectionDialog:A dialog class to select elements out of a tree structure.


CheckedTreeSelectionDialog: “A dialog class to select elements out of a tree structure”


Some Notes :

  • YesNoCancelListSelectionDialog has been Deprecated in 3.3 of Eclipse.
  • RCP Product extensions and custmizations can be done via AboutDialogs.
    • AboutDialog
    • AboutFeaturesDialog
    • AboutPluginsDialog
    • AboutSystemDialog

    Note : Above Dialogs are internal dialogs and not APIs. They are mentioned only as a reference.

  • PrintDialog is intended to be sub-classes by the clients and use it for identifying the printers and other parameters for print job.
  • SaveAsDialog is not available in Eclipse 3.3

Conclusion: Dialogs are a great way to present simple data and receive user input. Its very important to understand several Dialogs provided by JFace and use them appropriately.


Posted in 343278, Eclipse, Plugin, RCP, Uncategorized | Tagged: , , , | 15 Comments »

Any recommended strategy for eclipse plugin build ?

Posted by sureshkrishna on December 11, 2007

I am on a cross-road and i have too many choices to make. My requirement is pretty simple that i need to able to build the plugins and my RCP application via automated build. Our server side product runs on the cruise control and src code is in SVN; so, i would like to use the same infrastructure for eclipse plugin build too. Unfortunately i do not see or i am not aware of any of recommended strategies for the plugin build and also some tips on automated nightly builds. I am aware of the following strategies.

  • A simple ant script
  • Maven Project
  • PDE Build

Which of the above  strategies would anyone recommend and why ? For me i also have the requirement that my plugins should be compiled against a specific eclipse versions and we want to have this as an Eclipse IDE application.

Can anyone point me to the right resources ? And also its interesting to know the build system used by Eclipse and other  product leaders like Instantiations, Genuitec and Innopract.

Posted in Eclipse, Plug-ins, Plugin, RCP | Tagged: , , | 7 Comments »

Top 10 reasons to use eclipse…

Posted by sureshkrishna on October 13, 2007

  1. Eclipse is Free: I have seen very few organizations that would support you with expensive IDEs. As a developer if i need to play with, i dont have too many choices. Eclipse is free. I can download without too many hassles. Of course there are some other (i dont want to mention the names) IDEs for free too. But they don’t score in some other aspects. I get so many features for free.
  2. Eclipse Community & Industry Support: When i want to explain my boss and customers about eclipse, it important to know who is behind this project. Till now i had very few arguments about the credibility of the project and the people behind it. Especially the way it got spread through out the developer community from USA, Europe, and Asia is great. Developers celebrated eclipse’s birthday in Hyderabad, India in a huge way (doesn’t it say …).
  3. API Documentation: As a developer and technical lead, every one is interested to have a good API documentation so that the learning cycle is less. You don’t spend too much time in digging into unclear documentation. However good is the software, i want to have a good API documentation and eclipse has it.
  4. Free plugins: Once i have the base platform, i would want to use supporting and new features. And yes, many of VERY useful features are free. I have used so many plugins like findbugs, checkstyle, subclipse, etc… but in the end for IT departments its so nice to have something free and USEFUL.
  5. Code Samples: Sometimes i better understand with the help of code rather than reading some documentation. Eclipse has great code samples for all top level projects. Whoever starts SWT, JFace would definitely get lots of samples form snippets and also from the articles. Thanks to the guys who have supported all these.
  6. Design Philosophy: Many colleagues and subordinates have learned good design practices and programming patterns from eclipse code. Thanks to the book written by Gamma and Beck. Clean plugin architecture and clean interfaces.
  7. Customization : With the base platform around, you can do whatever you want to do. Users have the every possibility to customize their plugins that way they want.
  8. Extensibility : How else would we have seen the Java IDE, C++ IDE, Cobol IDE, PHP IDE, RCP Applications, etc…
  9. Productization: Its so easy to do productization. Changing the icons, splash screens, custom messages etc… Seeing some applications, you would not even recognize that they are built out of eclipse.
  10. Cross-Platform: A recent plugin i developed for a RIA/Web2.0 client, works on Windows, Linux and MacOSX; with the same code base and a single build. This is so much of a relief for many of the organizations who wants to develop the applications for multiple platforms.

Posted in Eclipse, Eclipse Performance, News, Plug-ins, Plugin, RCP | Tagged: , , , | Leave a Comment »

How to position Eclipse Dialogs and Messages at ceter of screen.

Posted by sureshkrishna on September 5, 2007

I want to share a common issues that most of the UI programmers come across. When we program with lots of dialogs and messages in any kind of applications, for the usability and predictability we would want most of them to be centered to the screen. In many cases when we use constructors for Dialogs, MessageDialogs, etc… very often we pass newly constructed Shell.

e.g. MessageDialog.openInfo(new Shell(), “Hi This is a test Message Dialog.”);

In the above case remember that we have not specified any of the co-ordinates and often we see that it takes different coordinates depending on the number of times that we invoke it. And each time you invoke, you wonder where the dialog will appear. I have been using a simple solution that solves this issue… Hope some of you will be able to use this code right away. I hope the following code is self explanatory 🙂

I have tested this with all screen resolutions and on Windows XP and OSX.

* All dialogs and messages will be passed with the centered shell.
* @return Shell
public static Shell getScreenCentredShell() {
Display display = PlatformUI.getWorkbench().getDisplay();
Shell centreShell = new Shell(display);
Point size = centreShell.computeSize(-1, -1);
Rectangle screen = display.getMonitors()[0].getBounds();
centreShell.setBounds((screen.width-size.x)/2, (screen.height-size.y)/2, size.x, size.y);
return centreShell;

Posted in Eclipse, Java, Plug-ins, Plugin, RCP, SWT | 50 Comments »

Dont blame Eclipse if you cant train your users !!!

Posted by sureshkrishna on August 29, 2007

This article is some thing that i want to write for a long time and i am writing it now :).  For reasons that we all know, many organizations have adopted Eclipse either as IDE for product development, ot IT customizes and offers it to the developers/users. Thats nice to hear….and i also see so mnay support calls and tickets to the IT and Sales guys, its very frustrating to educate some one over the phone or by mail.

Some of the Frequently Asked Questions :

  • Business Users  (still users ….)
    • Why should i use the workspace ?
    • Where are the projects created ?
    • Eclipse is hogging my CPU and Memory consumption
    • I found a useful plugin. How can i update a plugin ?
    • Where should i enter the license for this plugin ?
    • If an error occurs in eclipse, where should i look ?
    • Whats an error log ?
    • Whats a View and Perspective ? Where should i look for them …
    • When i am editing a file, why does it say that a file is changed on file system….
    • Where are preferences and properties ? Are they specific to a project ?
    • I want to open an existing project, i dont see that option (refering to Project Import)
    • Why cant i add/modify anything in the “Outline View” 🙂
    • Documentation and Help does not come with the installation
    • I want to develop c code, edit xmls etc…. can i do that in Eclipse
    • How do i know the version numbers of the plugins that i use ?
    • Should i set any environment variables….
  • Product Managers / Executives
    • Does eclipse work on Linux and Mac ?
    • I want to have a similar interface as Web 2.0 (all nice and cool effects…)
    • Should we train all our users on Java ?
    • Eclipse …. Its open source right…. is it reliable ?
    • If some thing goes wrong, whom should i blame 🙂

 And by now you know what i am talking about. I have had several problems in dealing with these kind of questions. You are quite lucky if all of your users, execs, etc…are in one single geo location and in one single office. But i am quite sure that many of the projects are not like this. We have development, sales, marketing and R&D divisions spread out and some times probably even different languages too :).

In many of the cases that i have seen, users are FORCED to use the tools and IDEs right from the day one. Now users try to get the every possible reason NOT to use it. I dont blame them, some times its frustrating to attend some of the support calls and trying to explain what a view and perspective is over the phone, but… You got to do what you got to do.

After all these years i see that there are definately obvious reason why you get these kind of questions.

Some of my recommendations for all those who want to roll out a Eclipse Application / RCP tools.

  • Executives / Product Managers
    • Any organization spends huge bucks on their tools and IDEs. This is a fact. You dont have the luxury of changing the tools every now-and-then. You got to choose some thing and thats gonna stay for a long time. So, please DO spend some time in getting to know eclipse on the ground level.
    • Eclipse + Open Source does not mean that there is no quality in software / its just for academics / just a Java IDE.
    • Dont ever think even with a commercial tool / IDE, you can get the things rectified in a super light years fast :).  I am sure that in reality that never happens, we raise the tickets, attach the logs, explalin the problem to the support, do some iterations and the finally…. you get some good or bad news. Does it ring bells…..
    • Before you take any decision on the Product Architecture and Product Suite, please DO consult some experts in eclipse to know what you are doing makes sense or not. The companies that i saw use Eclipse as one of the puzzle peices in the product suite.
    • You have to know what is possible and what is NOT possible. As an example… WEB 2.0 and Ajax kind of special and cool effects are nice, but please dont try to bring them into the Eclipse IDE/Applicaiton/Product. You just need to understand that an IDE is an IDE and WEB is a WEB 🙂 .
    • When you invest money on Eclipse, its not only as an IDE but also as an Application, as a RCP Product, Framework to build other applications, Data Integration Tools, etc… so know what eclispe can offer to you before you say anything.
  • Bussiness users / Developers  /Newbies…
    • If you are not a developer and never ever worked with an IDE, please do take a Training. Its worth a life time than getting frustrated with some small issues.
    • If Eclipse is delivered to you as a RCP application, there are two aspects of looking into the features. First is to see what are the features that RCP application provides, and second is to see what parts of eclipse features are available. Always understand that any RCP application or Eclipse IDE is made from Eclipse Plaltform (in many cases). So its important to know what you get by default and what you get from your own companies plugin distribution.
    • Ask your IT manager to arrange for a training and get the Yogic Knowledge 🙂

Posted in Business Manager, Eclipse, Eclipse Performance, IT User, Plug-ins, Plugin, RCP | 1 Comment »

org.eclipse.swt.SWTException: Unable to load graphics library [GDI+ is required] (java.lang.NoClassDefFoundError)

Posted by sureshkrishna on August 25, 2007

This is the SWTException that you might see on the W2K machine. This cause for this exception is absence of GDI+ library (gdiplus.dll) on Windows 2000. On WindowsXP and Vista they come by default and its taken care of.

Don’t be dis-hearted by this, you can download from Microsoft site and every thing should work fine. For those who want to have some additional information…〈=en&rss=ct2357lotus

Posted in Eclipse, Exceptions, Plug-ins, Plugin, PShelf, RCP, SWT, Uncategorized | 4 Comments »

Eclipse SWT Browser and Cross Browser compatibility

Posted by sureshkrishna on August 22, 2007

I have been using the Browser widget from past 1 year in my project which is targetted on AJAX and SOA kind of integration environments in Eclipse. As one can imagnine that the inbuilt browser capabilities are necessary on AJAX environement.

It was quite interesting in the initial stages to use the Browser and render the html and other widgets in the Windows environment. In time we moved on to the Linux and Mac OSX and then we had to really face some major challenges.

Especially the way Browser Widget renders the widgets on the Internal Browsers is weird. The same HTML DOM is rendered by an external browser in a different way on OSX and Linux and in external browser everything looks fine.

Some of the DOM rendering capabilities, Draggable events, etc…are kind of strange in the internal Browser. In that case the only thing we had to do was to support the External Browser invokation also when ever the internal Browser fails.

In the end becareful in “Why you want to use Browser Widget” and also “What you want to display” in it.

Posted in Browser, Eclipse, Java, Plug-ins, Plugin, RCP, SWT | 4 Comments »

At what level do you use eclipse ?

Posted by sureshkrishna on August 7, 2007

 Eclipse the ubiquitous platform has survived another challenge by releasing the Europa and i am already seeing the # of downloads. Initially it was Java IDE then RCP Platform then Tool Building Platform and now as i know its an eco-system of major frameworks, tools, runtimes and platform which can be extended for ANYTHING an NOTHING in particular. OK, i am not going to define what eclipse does and what not. The scope of my article is to highlight the problems i am solving with eclipse platform.
I have been using eclipse right from 2003 and built tools on Automotive Domain and Ajax&SOA Domain. I have been closely following the other implementations on different verticals. Several OEMs, ISVs, Startups, Universities and individuals have adopted the eclipse “principles” and they know what they are doing soon after they use it. All the content in this article is purely my personal views from my professional experience and do not correlate to any ones opinions dead or alive 😉
What can i do with Eclipse : I would want to start with highlighting the tasks which can be accomplished with eclipse. I am hoping that we will understand the differences between using the eclipse, developing the plugins, making an IDE out of eclipse and eclipse as an integration platform.

Eclipse an IDE
: This is what many of us know about the eclipse and what can it do. Its a Java IDE and java developers can create, modify, build the java projects in eclipse. It provides different features like code refactoring (one of the gr8 feature), syntax highlighting, syntax/code checks, code completion, code suggestions, compile, debug, jarring, etc… I have used for an year with out knowing what ELSE can eclipse do. In this use-case we are primarily involved in using the eclipse IDE features as is. I am sure that you are aware of different eclipse language ides like, JDT, CDT, Cobol, PHP editors amongst the most popular ones.
Eclipse Happy User.

Eclipse does Plugins : By this time you know that eclipse can be used to develop plugins and bootstrap in eclipse. Design Plugins in Eclipse -> Develop Plugins in Eclipse -> Test in Eclipse -> Run in Eclipse. A plugin is a logical group of some functionality that in turn can be run in eclipse. If there is no UI part that is associated, it can be used as a simple jar file. In any case its pretty common that we have some UI associated with the plugin. This can be run either on a normal eclipse platform or on a RCP environment.
A simplest plugin you can think of it is a Hello World application (damn…why always HelloWorld). You basically want to contribute an action item to the toolbar of eclipse and on click of that button you want to display a dialog with Hello World Message. Thus in this plugin, you just USEd the eclipse platform to add some functionality your current eclipse runtime.
Basic Plugin Developer.

Eclipse as a Platform :All of us know about the JDT, CDT, PHP language plugins. On this level of platform usage, we as developers are building the different kind of plugins and these they will be used by target audience, who in turn develop some applications with our language kit. Its like one of my colleague had developed Cobol Language toolkit for Fujitsu customer (of course they have released it to open source after some time). In my view i think of the some of the editors like JSF Editor, XML Editors, JSP Editor, JS Editor that fall under this category.
There are many companies that are using the Eclipse as their real time application configuration platform. Its like they have the metadata and the configuration of metadata is a big deal.
Advanced Plugin Developer.

Eclipse an Integration Framework :This is the highest level of integration and complex applications that i have seen with Eclipse. Here i am talking about different usecases. One of the nice example is to be able to create the entire development life cycle of your complex engineering activities in to the eclipse. Starting from System Requirements, Software Requirements, Component Design, Function Design, Coding, Unit Testing, Integration Testing, System Testing, Delivery and finally Issue Tracking into Eclipse. Dont feel apprehensive about the possibility, i am aware of some companies who have done this. This on the ground level means, to integrate different tools [editors, compilers, debuggers, configurators] into eclipse. The integration can be done done on sharing different data models/formats primarily on the EMF models.
Many companies have integrated some AJAX and SOA kind of applications. A typical of these applications would use Platform, WTP, ATF, DTP. The final application could be a RCP application or a plugin distributed via internet/intranet.
I also knew of many Data ETL companies that have started adopting the eclipse as their integration platform of their next generation tooling platform. Many have migrated from their conventional COM/DCOM and Perl based applications to java/eclipse.
Happy Application Integrator.

In the next article i want to highlight the different usecases that are prevailing in the automobile and web 2.0 industries.
In the end you need to know that Eclipse is an ECO System.
You have almost all plugins, tools and frameworks that you want to build/integrate your applications.

Till then Happy Application Integration with Eclipse.

Posted in AJAX, Automobile, Eclipse, EMF, GEF, GMF, Java, Plug-ins, Plugin, RCP, SOA, SWT, TPTP, Web Services | Leave a Comment »

Europa launched…

Posted by sureshkrishna on July 2, 2007

The long awaited europa launched few days ago and its really really cool. Releasing 21 eclipse projects at the same time is a tremendous work and they have did it again. I was very apprehensive about the initial stages of Callisto, whether it will be able to make it or not. Callisto it self was a great success and Europa has broken these records too.

Looks like europa has 17 million lines of code and the real nice thing i found is that now we have 2 different distributions for Java Developers and C/C++ Developers. That’s so cool, is nt it. Now the developers need to not remove/disable the parts that they dont want. And most importantly its slim.

Long live Eclipse. !!!

Posted in Eclipse, EMF, GEF, GMF, Plug-ins, Plugin, RCP, SWT | Leave a Comment »