File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Editing XSLT, and other Eclipse woes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Editing XSLT, and other Eclipse woes" Watch "Editing XSLT, and other Eclipse woes" New topic
Author

Editing XSLT, and other Eclipse woes

Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

I'm a dyed-in-the-wool IntelliJ user, I'm going to be forced to use Eclipse for an extended period now. Although Eclipse is far superior to the last time I played with it, there are (unsurprisingly) still a few things that are bugging me.

The biggest one is editing XML, especially XSLT. The built-in XML editor seems awfully weak. What's the best smart XSLT editor for Eclipse? I'd like it to be aware of the XSL schema like IntelliJ's is, so it can auto-complete contextually-appropriate element and attribute names.

Another one: I'm used to being able to navigate from a class to its JUnit test class and back with a single keystroke; I used an IntelliJ plugin that let you configrue some patterns to enable this. Does anybody know of anything similar for Eclipse?

Another one: is there a better JUnit runner plugin than the built-in one? The standard one isn't too bad, I guess, but it isn't configurable enough; in particular, I need to be able to set the default working directory for all test runs for a project. The existing thing requires you to set it for every run configuration independently.


[Jess in Action][AskingGoodQuestions]
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Originally posted by Ernest Friedman-Hill:

The biggest one is editing XML, especially XSLT. The built-in XML editor seems awfully weak. What's the best smart XSLT editor for Eclipse? I'd like it to be aware of the XSL schema like IntelliJ's is, so it can auto-complete contextually-appropriate element and attribute names.



What version of Eclipse are you using? IIRC the WST extensions will do this for you..

Originally posted by Ernest Friedman-Hill:

Another one: I'm used to being able to navigate from a class to its JUnit test class and back with a single keystroke; I used an IntelliJ plugin that let you configure some patterns to enable this. Does anybody know of anything similar for Eclipse?



Again depending on the version you can assign keyboard shortcuts to a multitude of operations, swapping between Unit test and class might be one of those. I assume you've looked in the Eclipse preferences key binding section?

Originally posted by Ernest Friedman-Hill:

Another one: is there a better JUnit runner plugin than the built-in one? The standard one isn't too bad, I guess, but it isn't configurable enough; in particular, I need to be able to set the default working directory for all test runs for a project. The existing thing requires you to set it for every run configuration independently.


Not that I've found , I have _exactly_ the same problem as yourself!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

Originally posted by Ernest Friedman-Hill:
I

The biggest one is editing XML, especially XSLT. The built-in XML editor seems awfully weak. What's the best smart XSLT editor for Eclipse? I'd like it to be aware of the XSL schema like IntelliJ's is, so it can auto-complete contextually-appropriate element and attribute names.

Eclipse maintains a DTD/schema catalog just like IntelliJ. And just like the IntelliJ one, it's semi-obscure, but once you've registered a DTD or schema, it will volunteer. Also, there should be XLST-specific editing capabilities in the basic JDE Eclipse, I think. Not as flashy as the IntelliJ stuff, but it works.

Another one: I'm used to being able to navigate from a class to its JUnit test class and back with a single keystroke; I used an IntelliJ plugin that let you configrue some patterns to enable this. Does anybody know of anything similar for Eclipse?

Not that I know of. I usually just put a link in the JavaDocs to the test class and shift-click to jump. That should work in just about all the current crop of IDEs.

Another one: is there a better JUnit runner plugin than the built-in one? The standard one isn't too bad, I guess, but it isn't configurable enough; in particular, I need to be able to set the default working directory for all test runs for a project. The existing thing requires you to set it for every run configuration independently.
You can set up a Debug/Run profile. But if I'm reading that right, what you should have is a JUnit test suite.


Customer surveys are for companies who didn't pay proper attention to begin with.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Ernest Friedman-Hill:
The biggest one is editing XML, especially XSLT. The built-in XML editor seems awfully weak. What's the best smart XSLT editor for Eclipse? I'd like it to be aware of the XSL schema like IntelliJ's is, so it can auto-complete contextually-appropriate element and attribute names.


The current version of Eclipse does indeed contain a built-in XML editor. Provided that you download a suitable version, e.g. "Eclipse IDE for Java Developers".

Originally posted by Ernest Friedman-Hill:
Another one: I'm used to being able to navigate from a class to its JUnit test class and back with a single keystroke; I used an IntelliJ plugin that let you configrue some patterns to enable this. Does anybody know of anything similar for Eclipse?


I believe moreUnit would do the trick for you. It has features that are downright wrong (like suggesting that you could generate a test method for a selected method in your production code) but also a couple of good ones:
1) it lets you jump between test class and production class with a keyboard shortcut
2) it moves the test class when you move the production class into a different package

Originally posted by Ernest Friedman-Hill:
Another one: is there a better JUnit runner plugin than the built-in one? The standard one isn't too bad, I guess, but it isn't configurable enough; in particular, I need to be able to set the default working directory for all test runs for a project. The existing thing requires you to set it for every run configuration independently.


Ernest. Dude. It's much better to make your tests portable and self-contained. Manually configuring your IDE to match what the build script does is like running a web server as root, giving your credit card to a woman, closing your eyes, and running circles with scissors in both hands.

I am curious why do you need to run the tests in a specific directory that isn't the project's root directory?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34


The current version of Eclipse does indeed contain a built-in XML editor. Provided that you download a suitable version, e.g. "Eclipse IDE for Java Developers".


It does, but it sucks compared to IDEA's. I was hoping for better.


I believe moreUnit would do the trick for you.


Thanks! I'm now a happy moreUnit user. The test navigation is the main thing.


Ernest. Dude. It's much better to make your tests portable and self-contained. Manually configuring your IDE to match what the build script does is like running a web server as root, giving your credit card to a woman, closing your eyes, and running circles with scissors in both hands.

I am curious why do you need to run the tests in a specific directory that isn't the project's root directory?


It's an old project controlled by our own own homespun CI scripts, and a pretty complicated build system. With some pain and hard work, it could all be redone, but it seems a shame to do it just to make Eclipse function, when it was so easy to do the equivalent thing with IDEA.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Editing XSLT, and other Eclipse woes