Archive for the 'Eclipse' Category

Eclipse Galileo

Monday, July 13, 2009 | Email This Post | | 718 views
(Eclipse, J2EE, Programming/Coding, Softwares, Tech)

For those Java developers who think that Eclipse is best Java community could ever get out of Open Source other than Java itself, here is the latest release code-named Galileo. Galileo is this year’s release from Eclipse with 33 projects. Last year’s release Ganymede contained 23 projects in comparison.

 

galileo

 

Of course this release is not only meant for JEE developers but for lot many others developers in different domains. Galileo has come in different packages like its predecessors. Different packages have different capabilities and are targeted for specific developer communities. The summary can be found in following table available over Eclipse website -

 

Eclipse Packages

 

Being much into Java, JEE, Modeling and PHP development and little lesser into Plugin Development, Reports, Mobile or C/C++ on different OSs, following are my review comments on latest Eclipse release.

Highlighted functionalities added in Eclipse platform are -

  • Brand new update manager and plugin-installation UI referred to as p2

update manager

  • CDT package has got new and improved debugger for managing parallel programming.
  • Shortcut keys for going between different opened editors and multiple tabs in same editor simplified – along-with Ctrl+F6/Ctrl+Shift+F6, Ctrl+PgDn/Ctrl+PgUp for previous or next editor and Alt+PgDn/Alt+PgUp for previous or next tab.
  • Rectangular selection can be done in editor. Use default shortcut key Alt+Shift+A and you can select any text in rectangular pattern –

rectangular selection

  • In XMLs, fully qualified class-names are hyperlinked.
  • Hyperlinked method calls inside code provide option to go to declaration or implementation

hover 3.5

  • Auto-completion for constructors is included-

constructor auto-completion

  • Hyperlinks in JavaDoc headers (Java / JEE)
  • inheritDoc tag support is included for JavaDoc.
  • The Validation model works quite well as compared to its annoying behavior at some times in Ganymede
  • Compare view is updated and now it includes many new features like hyperlinks, hover displays JavaDoc and outlining etc.

compare view

  • Word document comparison includes Word compare support for showing changes as per revisions
  • New toString() generator has been included

toString

  • Breadcrumb in Debug mode has been enhanced and now it shows active debug context
  • Modeling is one thing which I liked a lot in this release (EMP) showing the emergence of Modeling in pragmatic approach.
  • Now PDT provides internal support for PHP 5.3. PDT has been one of the ambitious projects from Eclipse Development team for quite long time and it has nurtured very well since its first release. Have been using it now and then and realize its power for development of full-fledged PHP web projects.

 

I was little disappointed on finding some of my favorite plugins not working in Galileo – Eclipse team should get serious about downward compatibility of plugins. Also you can face problems while doing development  in emf where you might get errors referring to line numbers while there are no line numbers in source code and there will be errors which appear in dialog boxes than in panes.

  

No Comments » | Spread the word:

A Day wasted or A Day utilized

Tuesday, June 2, 2009 | Email This Post | | 140 views
(Corporates, Eclipse, Infy, J2EE, Just like that!, Personal, Programming/Coding, Work)

Sometimes it is frustrating to remain stuck in a problem which you thought is as simple as can be overcome in couple of minutes but you spend almost whole day in figuring out that problem. A problem which makes you recall your old stupid days once again, the one which might make you feel as if you have wasted your day in resolving it. In the end, when you find out the solution which was actually that simple, you might think that it is right to to call it as a day wasted.

 

In my case, I preferred to call it a day well utilized to learn something basic which we generally prefer to forget or put in backside of memory. This was the day when I wasn’t able to find solution to a problem which might have not taken more than 10 minutes to a software kid if he had been knowing what exactly has to be done. For me, it went on and on for more than 8 hours as parallel activity with my work to find out the dead simple solution.

 

The problem in my case was that a specific file type wasn’t opening in the way it should have opened in my favorite IDE (Eclipse). It was being opened in different color syntax and I wasn’t able to get code assist/content assist in the way I was expecting for JSP files. I copied/recopied/re-re-copied and so on… the fresh installation of IDE, tried to compare it with the one I was working on, exchanged the core files and experiments in as many different ways as I could but still the problem remained the same. Yeah, of course, (I know you are brilliant enough to have already thought that out) – googled again and again and again in all these hours. Also tried to migrate my existing setup to fresh setup but of no use. Finally (or perhaps not) I had started thinking of giving up on all my tries. Just then this simple piece of code over web brought sparkle in my eyes –

 

You have missed out one thing that we have to make the ABC viewer as the default viewer for *.xyz files under Windows->Preferences->general->Editors->File Associations.

 

Thanks to the brilliant lady who provided the unwanted and perhaps not so important solution to that problem – not to forget it was what exactly I wanted and hence wasn’t useless in my case at all. Once again many thanks to this intelligent gal for this simple looking but generally overlooked solution. In this specific case, I had to go to File Associations inside Eclipse and change the association of my file to different/default editor. Stupid me!

In general for any file, if we aren’t able to view a file in the way we want it to appear, all we have to do is to change the editor in which it opens.

 

No Comments » | Spread the word:

createConfigurationContextFromFileSystem in Axis2

Friday, February 27, 2009 | Email This Post | | 927 views
(Apache, Eclipse, J2EE, Programming/Coding)

There is a problem when you try to start building web-service of auto-generated Axis2 java model from WSDL file. When you start working on stub, default constructor cerates ConfigurationContext with null parameters which means it is empty and therefore you can’t engage any module with thw ServiceClient created from this ConfigurationContext. For example you may want to engage addressing module for dual mode asynchronous web-service implementation as -

_serviceClient.engageModule("addressing");

And you keep getting error that addressing module can’t be engaged as –

org.apache.axis2.AxisFault: Unable to engage module : addressing
at org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:333)

To overcome this problem, you need to specify the axis2 locations specifically while creating ConfigurationContext. Therefore  instead using default constructor which goes like -

ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null)

, you need to change it to -

ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(repository, path)

 

Here repository is location of axis2 module/package folder and path is the respective location of axis2.xml (configuration file). Make sure that the respective modules are placed inside modules/repository folder of repository path given. Foe example, you can try following sample code for creating ConfigurationContext - 

ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(“c:\\axis2\\WEB-INF”, “conf/axis2.xml”)

This syntax will work if you have axis2 path set in your class path. Otherwise, you may need to use following syntax - 

ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(“c:\\axis2\\WEB-INF”, “c:\\axis2\\conf\\axis2.xml”)

In this way, you get handle of axis2 modules and related dependencies. Now you can engage any addressing module after ceating the ServiceClient from this ConfigurationContext. The sample code goes as follows –

…

ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(“c:\\axis2\\WEB-INF”, “c:\\axis2\\conf\\axis2.xml”);

ServiceClient service = new ServiceClient( configContext, null );

…

…

service.engageModule("addressing");

…

Or you can try storing these static path variables in system resources/classpath and then referring them in your code as those variables like -

…

ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(“axisPath”, “axisXMLPath”);

ServiceClient service = new ServiceClient( configContext, null );

…

…

service.engageModule("addressing");

…

You may also like to visit Apache Axis2 FAQ page – http://ws.apache.org/axis2/faq.html

  

1 Comment » | Spread the word:

Eclipse and Axis2

Monday, November 17, 2008 | Email This Post | | 557 views
(Apache, Eclipse, Programming/Coding)

Even after so many years of development there is something even Eclipse can’t help out with and that is – too many unknown errors which Eclipse team keeps trying to figure out. One such recent error that I came across is when you are integrating Apache Axis2 with Eclipse. It reads like –

 

"Exception occurred while reading or writing file {0}The Axis2 facets cannot be installed since the Axis2 runtime location has not been set.

Please go to the Web Services preference page and set the Axis2 runtime location under Axis2 Preferences."

 

And comes up even when Axis2 is configured properly. So not a matter of worry for the developer but it is a thing Eclipse messes up internally and you can’t get it right after repeated tries. So what you are supposed to do to get out of this problem? Simplest solution –

Clean install Eclipse, set Axis2 preferences once again to point to a clean fresh Axis2 directory inside Preferences > Web-Services (the way you did with previous one) and there you go. No more problems which proves it was an error which had to do with Eclipse only.

 

Long way to go for Open Source. Oh yes, why long way because still it demands an out-of-world hardware configuration which can make a PC not just run but fly. Have you got a chance to run Eclipse on a system with 501 MB RAM, even it was by a mistake? It was just a fantasy that I wanted to happen and when it happened, it turned out to be more like a tragedy than fantasy but then there is one thing common between both – they can never be forgotten!!

  

1 Comment » | Spread the word: