Longstanding Eclipse issues - fix them finally, please

Eclipse is the best IDE ever. It's the most stable, most popular, most- a lot of things. The developers that write the Eclipse code have T-shirts that say that - they are that proud. The code-base is said to be awesome - I don't have time to check. But, there are some longstanding issues.

First, SVN client. There's a CVS client that comes with Eclipse. SVN is way more popular. Put the client inside finally. I'm sick of solving numerous JavaHL issues. Fix it. I don't care how, just do it.

Second, Tomcat is the best web container ever and most popular in development. Integrate it better. There are numerous issues with debugging, redeployment and so on. These problems are so old. Fix 'em NOW.

Third, installing plugins is soooo slow. So very slow.

Fourth, web development is not that well integrated. WTP is still buggy, there are issues with configurations, deployment and so on.

Update: Fifth, autocomplete should put jdk classes/interfaces first!!! This is so important. Screenshot:

WTF is antlr.collections?! Are you kidding me?

Now, I'm trying to launch a main method without the "String... args" parameters and Eclipse cannot find it. This is also a longstanding problem.

This works:

public static void main(String... args)

This does not (eclipse cannot find the method):

public static void main()

I'm pretty sure there's a solution, but I'm not going to waste time searching for it.

I've wasted time with compilation, memory, various configurations with xml and whitespace also.

There are always solutions, but this is wasted time. What are the developers working on? Stupid pointless features? Fix these please. Please.

How to make Eclipse validate XSL (and of course XML) files

Intro on Eclipse

Eclipse has two major bundles:

  • Eclipse IDE for Java Developers
  • Eclipse IDE for Java EE Developers.

Info here: http://www.eclipse.org/downloads/

The major difference is that Eclipse for JavaEE includes the Web Tools Platform (WTP). WTP has editors, designers, JavaEE perspective, new projects and so on.

I generally prefer to use the ‘Java’ perspective as opposed to the ‘JavaEE’ perspective, because the latter is too cluttered, but the one thing from WTP without which I cannot live is the XML editor. There are variations for XSL transformations and XML Schemas.

XML Schemas (XSD)

By default Eclipse can validate XML Schemas, because it has the schema for XSDs. Did you get this one? Let’s try again. XSD is a language written in xml that defines rules for xml files who want to conform to certain rules. This allows us to validate such files versus a schema. Finally XSD is also XML, so there is a special XSD Schema that defines how to write XSD Schemas. And the dog catches its tail.

XML Schema language is also defined in DTD. DTD is the predecessor of XSD.

Anyway, if you want to learn more, go to W3C Schools - the best place to learn XML, XSD, XSLT. This is also the official site of WWW Consortium (W3C) which handles the expert groups that define these standards.

Where is XSL.xsd?

XSL is written in xml, so there is an XSD Schema that defines how to write XSL files.

The schema for XSLT 2.0 (2007 revision) is here: http://www.w3.org/2007/schema-for-xslt20.xsd (the most up-to-date)
The DTD for XSLT 1.0 (1999 revision) is here: http://www.w3.org/TR/1999/REC-xslt-19991116.xml (I couldn’t find XSD for XSL 1.0, maybe because XSL 1.0 is too old)

So the only thing I need to do is put XSL.xsd in Eclipse?

Yes. Here’s how: go to Window –> Preferences and then to XML –> XML Catalogs:

(XML Catalogs are a very interesting topic. There’s an article on them in this blog here)

Eclipse 3.5 preferences

Then "Add”:

Add XML Catalog from http

There are 3 ways to add an XML Schema to Eclipse

  1. Via an URL (as in the picture)
  2. Via a workspace location
  3. Via a file on the file system

How do we validate?

Here’s how:

Validate button in Eclipse

Via the "Validate" button on the context menu on any XML/XSL file.

The exact same thing can be performed for any XML File that has to be validated against an XML Schema (or DTD, of course)