Sciology = Science + Technology

Commonsense in Technology

  • Archives

  • Pictures

Archive for the ‘Plug-ins’ Category

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.
Advertisements

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

Persist your EMF Objects with Teneo

Posted by sureshkrishna on October 9, 2007

JMatter, NakedObjects and EMF are few technologies that i have been interested recently. That fact that all these technologies allows to create the model, generate the code for UI and finally persist the UI State in Object Reational Databases, makes me get excited about these. Without the help of these frameworks, some business usecases which needs the domain model/metadata to be persisted in the databases does require a lot of hand-coding and often requires long months of implementation. JMatter and Naked Object are supposedly generate the OR mapping from the domain data to the direct database tables with the help of the Hibernate mapping.

For all the EMF and Eclipse lovers it would be difficult to change their applications to JMatter or NakedObjects.  And one reason that i do not want to do it right now is that these frameworks are yet to support the SWT and interop with EMF models. For the Object relational database persistence of the metadata and domain models i found the Teneo project from eclipse to be quite promising.

What is Teneo : Teneo is the eclipse sub-project from  EMFT, which aims at providing the database persistency solution for EMF using Hibernate or JPOX/JDO 2.0. It supports automatic creation of EMF to Relational Mappings and the related database schemas. EMF Objects can be queried and stored using the advanced queries like HQL and JDOQL.

Why use Teneo

  • Teneo allows you to start with your model (UML or XML Schema) and automatically generate the java source code and object-relational mappings.
  • Teneo takes over much (or even all) of the manual work of creating relational mapping schemes.
  • Teneo supports JPA annotations on model level, this keeps your java code clean from persistency specific constructs.
  • The integration with EMF allows you to generate Eclipse RCP editors which persist automatically to a relational database.

And More  Teneo automatically maps the EMF model to a Hibernate OR mapping. The automatic mapping can be done in-memory when your application is initialized or a separate hibernate mapping file can be generated. The generated hbm file can be adapted manually and used in the runtime layer. To handle the EMF resource management and also the Hibernate mappings, a special runtime layer called EMF-Hibernate Runtime layer was developed. Teneo takes care of instantiating the EMF Objects and getters/setters for EFeatures of EMF from database.

This project is definitely a great relief to the EMF and Eclipse developers. Now everyone can persist their models in the Databases with a cleaner Hibernate implementation.

References

Posted in Eclipse, EMF, Java, JMatter, Naked Objects, Plug-ins, Plugin | Tagged: , , , , , , | 4 Comments »

What do you do with Eclipse ?

Posted by sureshkrishna on October 7, 2007

Eclipse the ubiquitous platform has survived another challenge by releasing the Europa and the incredible download numbers speak for it. Initially it was perceived as a Java IDE  then Tool development Environment, then RCP  Platform, then Tool Integration Platform and now its an eco-system of platform, application frameworks, tools, runtimes and especially Eclipse is a universal tool platform – an open, extensible IDE for anything, but nothing in particular. The intent of the article is to highlight the different areas of the industry and how eclipse is used by different category of users.

The Eclipse open source community has over 60 open source projects. These projects can be conceptually organized into seven different “pillars” or categories:

  1. Enterprise Development
  2. Embedded and Device Development
  3. Rich Client Platform
  4. Rich Internet Applications
  5. Application Frameworks
  6. Application Lifecycle Management (ALM)
  7. Service Oriented Architecture (SOA)

The list gives a fair understanding of the different areas where eclipse is getting popular and also the business verticals, which can be transformed. It is very interesting to see what eclipse means to different people. Following scenarios give a better understanding of what can be done with eclipse (and the rest are for your imagination…)

Eclipse – Java IDE

As comprehended in early 2000 (even now after the europa release), its a Java IDE with which java developers can create, modify, debug, build the java projects. Eclipse provides different features like code refactoring, syntax highlighting, syntax/code checks, code completion, quick fix, compile/build, team integration with CVS, debug, jarring, etc… In this use-case scenario eclipse is being primarily used as Java IDE. Eclipse + JDT  = Java IDE. Eclipse Platform contains basic UI elements (swt, jface), runtime, help system, debug support, search support and some other IDE elements. Java IDE can be downloaded from Eclipse Site.

Java IDE

Eclipse – Plugin/Tool Development IDE

Along the similar lines of the Java IDE, the C/C++ development tools, PHP development tools, Cobol development tools, etc… have brought fabulous features in the Eclipse eco-system. These development tools not only improved the productivity of the developers but also Myth-Busters for many managers, developers. This gave the real meaning for eclipse, an open, extensible IDE for anything, but nothing in particular. Vendors were successfully able to adopt the Eclipse Platform and build several tools and Language Editors around it. The ground rule of “Everything is a contribution” perfectly fits in this scenario.
PDE (Plugin Development Environment) and JDT (Java Development Tools) are the ones that support and enable this use-case. A plugin can be developed, debugged, deployed with the help of these two tools. PHP Editor Plugin is developed with the help of the PDE and JDT. When a developer is using Eclipse to develop the PHP, it looks as though eclipse is a PHP IDE. In this scenario, the developer might not necessarily know that there is PDE and JDT in the eclipse that has been used. Thus depending on the user and what he is trying to achieve, the perception changes.

Eclipse + Ruby on Rails = RadRails
Eclipse + Ruby on Rails = 3rdRails
Eclipse + JDT = Java IDE
Eclipse + PHP = PHP IDE
Eclipse + CDT = C/C++ IDE
<!–[if !supportLineBreakNewLine]–>
<!–[endif]–>

IDE Framework


Eclipse – RCP

Application development requires a platform to relay upon, where an organization’s software product lines can be built. A Rich Client Platform (RCP) of eclipse uses the windowing and UI features of the underlying OS platform. It enables the application to use the native look-and-feel, native widgets, and all available UI features. In the end users and IT departments wants to have a uniform architecture, look-and-feel over all the applications. Eclipse RCP is considered as the minimal set of plugins that are required to build rich applications. In short if the SDK capabilities and Platform capabilities are removed, the resulting set of plugins would be RCP.
An interesting set of applications can be built with the help of Eclipse RCP.

Few examples from Open Source RCP applications included, but not limited to…

<!–[if !supportLists]–>·        <!–[endif]–>JPMorgan’s Banking application

<!–[if !supportLists]–>·        <!–[endif]–>Maestro – NASA Space Mission Management

<!–[if !supportLists]–>·        <!–[endif]–>GumTree – Australian Nuclear Science and Technology Organization – GumTree is an open source multi-platform scientific workbench for performing scientific experiment under a server-client environment. It provides easy-to-use graphical user interface for instrument data acquisition, online or offline data visualization and analysis.

<!–[if !supportLists]–>·        <!–[endif]–>RSSOwlApplications that collect data from RSS-compliant sites are called RSS readers or “aggregators.” RSSOwl is such an application.

<!–[if !supportLists]–>·        <!–[endif]–>Talend Open Studio 1.0Talend Open Studio is the first ETL open source software provider for data integration tools (ETL: Extract, Transform, Load)

Following are examples for Commercial plugins

<!–[if !supportLists]–>·        <!–[endif]–>Actuate BIRT Report DesignerThe Actuate BIRT Report Designer is a powerful tool for designing and deploying reports against data sources ranging from typical business SQL databases, to XML data sources, to in-memory Java objects.

<!–[if !supportLists]–>·        <!–[endif]–>BSI CRM on EclipseThis customer relationship management (CRM) solution is a fully configured RCP application to support the whole customer contact process from first contact to the successful project implementation and also retention management.

<!–[if !supportLists]–>·        <!–[endif]–>IBM Workplace Client Technology – IBM Workplace Client Technology is a strategic new IBM framework to enable the creation of server-managed rich client applications.

<!–[if !supportLists]–>·        <!–[endif]–>MyEclipse – SNAPs – Lightweight, Individual, Task-Based Developement Tools FREE as Part of the MyEclipse Distribution. MyEclipse SNAPs (Simple Non-integrated Applications) are special-purpose, Windows-integrated applications that are targeted for quick, non-IDE based development tasks.

If required, one can use plugins other than core RCP plugins e.g. one might want to use the help plugins, search plugins etc.

RCP

Eclipse – Tools Framework

Plugins makes eclipse what ever one wants it to be. For the tool integrators, this is a universal platform on which everyone can contribute and extend on. Tool development on Eclipse leverages the existing platform infrastructure to contribute and/or extend the existing functionality.

Many of such tools that are popular are like

<!–[if !supportLists]–>·        <!–[endif]–>Web Tools Project (WTP)

<!–[if !supportLists]–>·        <!–[endif]–>Eclipse Modeling Framework (EMF)

<!–[if !supportLists]–>·        <!–[endif]–>Graphical Editing Framework (GEF)

<!–[if !supportLists]–>·        <!–[endif]–>Business Intelligence and Reporting Tools (BIRT)

<!–[if !supportLists]–>·        <!–[endif]–>Test and Performance Tooling Project (TPTP)

<!–[if !supportLists]–>·        <!–[endif]–>Aptana Web2.0 IDE

<!–[if !supportLists]–>·        <!–[endif]–>MyEclipse

Tool Framework

Eclipse – Application Framework

For enterprises it makes sense to have a single application framework so that all the tools and frameworks can be built upon. Individuals and enterprises can leverage frameworks and tools provided by the eclipse eco-system and also benefit from the different release time lines of eclipse. One of the examples is to be able to create the entire development life cycle of a complex engineering activity flow of an organization in to the eclipse. Various development stages like, system requirements, software requirements, component design, function design, coding, unit testing, integration testing, system testing, delivery and finally the Issue Tracking can be integrated into Eclipse. On the technical level this transforms to writing new tools/plugins if necessary, using plugins from 3rd party vendors, using the tools and frameworks from eclipse community and finally completing the maze by integration.

Genuitec is one of the companies that extensively use the Eclipse platform and other frameworks on the eclipse to have a set of seamless integration of tools.

Innopract based its products like Yoxos and RAP on the eclipse platform.

Application Framework

Summary
Eclipse is an IDE and application framework for anything and nothing in particular. It totally depends on the user/developer’s perception and what is targeted to achieve with the help of eclipse. With the contribution rules of eclipse and platform architecture, its easy to contribute ones own functionality and/or extend the eclipse.

References :
1) Eclipse Platform Overview http://www.eclipse.org/platform/overview.php
2) Eclipse House Rules http://udig.refractions.net/help/index.jsp?topic=/net.refractions.udig.doc/html/Eclipse%20House%20Rules.html
3) Eclipse RCP Applications http://www.eclipse.org/community/example_rcp_applications_v2.pdf

Posted in Eclipse, EMF, Java, JFace, Plug-ins, Plugin | Tagged: , , , | 2 Comments »

Eclipse 3.3 and NetBeans 6.0 compared !

Posted by sureshkrishna on October 5, 2007

I am so happy to be working on Eclipse platform from past 5 years. I have been playing with eclipse 3.3 from past few weeks. With too many ads on java sites about the NetBeans 6.0 Beta release, i was intrigued to have a look into it. NetBeans does come in a variety of flavours and selectable modules. I found very similar categories that i see in Eclipse, i really liked the matrix of different downloads it has.
Following are some of the modules from NetBeans and i tried to give equivalent in Eclipse.

Java SE= Base IDE + Java SE [equivalent to JDT ]
C/C++= Base IDE + C/C++ [equivalent to CDT]
Ruby= Base IDE + Ruby [ Dynamic Language Tool Kit]
Mobility= Base IDE + Java SE + Mobility Pack [Embedded and Device Development ]
Web & J2EE= Base IDE + Java SE + Web & J2EE + GlassFish v2 + Tomcat [equivalent to WTP without GlassFish and Tomcat]
All= Web & J2EE + SOA + UML + Ruby + C/C++ [I dont know what to say…]

I anyway installed the “All NetBeans Pack” and some i could go through it with few humps. Any way finally it takes 500 mb of disk space. In the end i worked few hours on Net Beans to find out quick feature set and good things about the modern IDEs. I am definitely looking for features which are coming as best of both the worlds. I did see many applications built on the NetBeans platform too and these products were great. I saw many of the graphical editors on NetBeans.

Anyway following is the criteria where i was looking into both the IDEs…

Installation: Eclipse comes as a simple zip file which need to be unzipped. That’s it you are ready to use the IDE. NetBeans comes as an exe and during the installation time it asks for the JDK location. Some how i did not like this as it could have automatically taken from system settings as eclipse does.

Startup Times: I have tested both on a laptop with Intel Pentium Dual Core 1.6GHz and 1GB Ram. I have only an IE and Windows explorer programs opened. Eclipse WTP All in One SDK 2.0 could start in 20 seconds once i chose the workspace. NetBeans 6. Beta takes around 80-85 seconds to start up once the splash screen comes.

Source Code Editing: This is quite interesting time for me in both the editors. Both has Code Folding, Code Completion, Code Formatting, Instant Syntax Checks, Code Coloring, Syntax Highlighting, etc. In my view both IDEs have great tools for editing. I am writing these experiences from my Java Editor experience.

Even though i felt some of the functions like in NetBeans are little slow. Some times thay take long time before the code suggestions comes as a list. I am not sure if this is because this is a beta version.

Compile and Build : Both have good support for Compile, Build, Clean functions. Both have Save participants and of course who would not like this.

Debugging Support : Both do have the debugging support. But i am not sure how good is the NetBeans Debugging support, if some one wants to write a new debugger with the help of Net Beans.

Some how the debugging is not intuitive in NetBeans, i closed few example project that’s came along and had only my example project (by name com.simple.solutions.testnetbeans). When i invoke the debug action on NetBeans, it does take some time before some thing happens. I am also worried that each time i launch the degug, the Feed Runner application comes up. And i am perplexed in the same way as you are right now. In the end i do not have a good experience on Netbeans in debugging a simple HelloWorld program.

Refactoring: Basic refactoring techniques are present in both the IDEs. But Eclipse does have advanced refactoring functions. e.g. when extracting a method, eclipse does show how the method looks like. Some time it also suggests the input parameters for a method.

Version Control: Eclipse and NetBeans comes with a good Team support. Eclipse comes with CVS by default. Subversion plugin can be additionally installed. What i really liked about the NetBeans is that it has both CVS and SubVersion support by default.

Help System: Eclipse and NetBeans does have help system. I am slightly disappointed by the performance of the NetBeans. I have no clue what happens when i click on the “Help Contents” menu item. I dont see the mouse icon and there is a huge hard disk activity. I did feel that transition between the pages also takes some time.

Search System: For sure Eclipse does have a advanced search system. NetBeans have a file level an project level search and replace system. But Eclipse definitely have more than that. Eclipse has File Search, Java Search and Plugin Search. And i personally use these a lot and definately miss them in Net beans.

UI Response: What ever may be the reason, Eclipse is definitely faster and it has better response times than NetBeans. Of course its the matter of how i percieve when i do a particular action in the IDE.

Profiling: Awesome in NetBeans. I like this feature which is a part of NetBeans by default. Eclipse does have some profiling tools, but they need to be downloaded additionally.

Perspective: Last but not the least, this is some thing that i definitely miss in the NetBeans. Perspecives is a great concept interms of developement and also as when an application is developed. We often develop applciations for different users and in my experience, perspectives in eclipse does a lot more than pne can imagine.

In the end in terms of features both have good feature and qualifications as IDEs to improve developers productivity. For some of the obvious reasons, i feel that NetBeans need to catch up with performance and UI feel. NetBeans does not even show a wait state icon when some long running activity is happening. The Feed Burner example takes too much of time to start up and  some how my experience is rugged. 

Kudos to eclipse, for its wonderful nimbleness and flawless releases. There are some other categories that i did not consider as i am not sure if i can really compare this in NetBeans. Like the EMF, GEF, GMF, DTP, ATF, RAP, etc… Last but not the least, Workspace concept is some thing that i really like in eclipse. Not sure if there is an equivalent stuff in Net Beans.

Posted in CVS, Eclipse, Eclipse Performance, Net Beans 6.0, Plug-ins, Plugin | Tagged: , | 19 Comments »

Is “Naked Objects” trying to address similar problems as “EMF” ?

Posted by sureshkrishna on October 2, 2007

Yesterday i was going through the article from the Naked Objects about their platform and architecture. Once i gone through some of their articles and website, i had an impression that its also solving subset/similar set of problems solved by EMF.

For the ones who is not familiar with the Naked Objects, its “an open source Java-based application development platform. It’s called Naked Objects because all you need to develop are your domain objects – the Naked Objects platform auto-creates an object-oriented user interface (giving you the choice of different styles) and the underlying database (using Hibernate)“.

Thus the developer has to develop only the domain model and the UI and Persistence mechanism is auto-generated by the platform. I tried to draw some categories on which i felt Naked Objects is in similar lined as EMF.

Domain Model : Naked Objects requires the entire domain model to be developed in plain java and the domain validations to be described in each of the domain class. That means that domain class will contains the data + behavior + validations. Last but not the lease, each class must implement a NakedObject interface.

All the eclipse projects that i have worked on till date, have EMF models designed as domain models. Mostly created right from the scratch (Omondo, Together, or plain ECore Editor) or from schema. In my view i have always used custom diagnostics/validations for each domain class. In principle i do have my validations on each class.

UI Generation : Naked Objects framework does generate the Web and RCP kind of UIs. I have seen the demos of both the UI and its definitely appealing.  At this point of time, i am not sure how they tackled the “Separation of Concerns”. I really like the differentiation between the View, Content and Label providers level. Not sure if we do have the access to change the editors and custom UI thats generated.

Of course regarding EMF, it does generate the Edit and Editor Plugins along with the Model. I love this separation of concerns about the Content and Labels for the Viewers.  Though the generated editor does contain different kinds of editors, i am at will to change them. I can change what ever i want from this Editor.

Rapid Application Development : Yes in my view both of them does support a very fast development of applications and validation of concepts (though i have not used Naked Objects, i am making this claim on what is mentioned their site and what i have seen in demos) .

In the end i guess in both the frameworks, developers will need to change the UI. As i believe we do need some custom User Interface all the time. Every customer is unique and every customer wants a different UI.

Persistence : Naked Objects claims that it can persist the data directly via hibernate. I feel this is a real good feature, as many a times i do need a persistence mechanism. I would say this is definitely an advancement.

EMF does provide the XML and XMI as the default persistence mechanisms. I did use the Oracle Toplink as a persistence layer for EMF. Of course we do also have the hibernate support, but i have not personally used it.

Interesting thing would be if Naked Objects working with Eclipse. That means i get a similar UI and Persistence mechanism in addition to what EMF provides.

Posted in Eclipse, EMF, Hibernate, Naked Objects, Plug-ins, Plugin, Top Link | 4 Comments »

Help me with PermGen:OutOfMemoryException

Posted by sureshkrishna on September 28, 2007

I have a plugin developed for and AJAX based application with the help of Platform + EMF + WTP combination.
Many of the clients who report this out of memory have following conditions…
# Eclipse or Windows OS is not shut down for a long time; nearly for days.
# After a long time of inactivity on eclipse, Whenever a client clicks on any of the action or an editor, application just hangs.
# When a client is working on this application for a long time CPU goes 100% and except killing the eclipse application there is not other way.
Of course at this point of time i have no idea, what makes application crash with PermGen Error. There could be some thing wrong with the plugins that we made, but at the same time i dont get any error log for this PermGen:OutOfMemoryException.

I would appreciate if anyone can let me know about some of the utilities that i can use to find out the root cause.

Anykind of suggestions and solutions will be appreciated.

Posted in Eclipse, Eclipse Performance, Java, OutOfMemoryError, Plug-ins, Plugin | 13 Comments »

JSON2XML TreeViewer plugin for Eclipse

Posted by sureshkrishna on September 24, 2007

I have been working on the WEB2.0 platform from past one year. All the while i was looking out for simple plugins for eclipse to visualize and analyze the  json that either i built or got from server.

  • It is so much of a pain to really construct the JSON and then to debug to see if we have inserted the data at the right children.
  • When the complexity of the JSON grows, its difficult to see which are arrays and which are maps.
  • What if you need to test if the JSON is syntactically correct ? (of course we can send the request to  the server and get a response with a error header, but this is not what we want in most of cases)
  • When JSON is well formatted with the correct tabs it looks good else its a coffee-break time to see the JSON as formatted text

After looking at all these issues, i have written a small plugin to convert the JSON to XML and a Tree Response. This enables you to…

  • View the JSON as XML text
  • View JSON as Hierarchical Tree
  • Get immediate response if JSON is wrong.

http://www.eclipseplugincentral.com/Web_Links-index-req-viewlink-cid-1071.html

http://sourceforge.net/project/showfiles.php?group_id=205573

I would love to get any of your feedback and response. I would be working on this plugin in the future, so your improvement request are well considered.

Posted in Eclipse, Java, JSON, Plug-ins, Plugin, TreeView, XML | 11 Comments »

TOP 10 Eclipse Shortcuts

Posted by sureshkrishna on September 15, 2007

Most of us who are using eclipse for at least 1 year are familiar with the shortcuts. Its been quite challenging to know and remember all the shortcuts during the development time. And of course we dont need all of them. I have been collecting some shortcuts based on the user experiences and the way they develop software. Following TOP 10 Eclipse Shortcuts helps everyone in their happy day coding.

  1. Ctrl + Shift + O : Organize imports
  2. Ctrl + Shift + T : Open Type
  3. Ctrl + Shift + F4 : Close all Opened Editors
  4. Ctrl + O : Open declarations
  5. Ctrl + E : Open Editor
  6. Ctrl + / : Line Comment
  7. Alt + Shift + R : Rename
  8. Alt + Shift + L : extract to Local Variable
  9. Alt + Shift + M : extract to Method
  10. F3 : Open Declaration

Let me explain how i got these TOP 10 shortcuts.

  • I start developing a plugin. As the development goes i want to refactor the code with “Alt + Shift + L” and “Alt + Shift + L” and “Alt + Shift + M“.
  • And not i have many methods and probably 500+ lines of code in java file. A typical development involves commenting and uncommenting via “Ctrl + /” (Even though we have shortcuts for Block Commenting, looks like many developers use more of Ctrl + /).
  • As we comment and uncomment and many more class references, we have so many imports that need to be cleaned. We do copy very often from one class to another class, now i want to organize my imports by “Ctrl + Shift + O
  • Now i want to find variable and method declarations via “Ctrl + O“.
  • In the course of development i would like to view/analyze the declarations of the methods or classes via “F3″.
  • All well till now, i want to use an interface/class and want to search for it via “Ctrl + Shift + T“.
  • By the time we do all this we have too many editors opened and we would like to navigate among multiple open editors via “Ctrl + E“.
  • And finally you feel frustrated with so many opened editors and want to close all of them via “Ctrl + Shift + F4“.

Posted in Eclipse, Java, Plug-ins, Plugin | 68 Comments »

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 | 52 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 »