Switch to Modern Mode: Make sure to use the *correct* context class loader

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Ensure the correct context class loader already in LegacyInitializer

This is actually "more correct" than the previous commit, but let's keep
both, just for safety reasons (somebody enterprisey might reset the
context class loader between LegacyInitializer and Switch to Modern Mode).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Defensive programming in DefaultLegacyService

When run in ij-legacy's tests, we cannot assume that there is a default
user interface at all.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Temporarily bump the version of the ImageJ 1.x dependency

ImageJ 1.48r has a critical fix regarding redirecting error messages that
we are about to use.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Verify that Switch to Modern Mode works

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge branch 'ij-legacy'

This topic branch addresses some Switch to Modern Mode issues with Fiji.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Fix bug preventing from opening scripts in the legacy editor

The way we looked at the stack trace (to prevent infinite recursion)
unfortunately prevented the legacy editor from being used all the
time because we looked at the complete stack trace, including the
calling function, which of course was found.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
MiniMaven: look into ImageJ's catch-all repository first of all

We worked a little bit on making ImageJ's Maven repository even more
useful than it already was, by making its 'public' repository include
even more cached artifacts.

Let's use it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
MiniMaven: fix metadata path for -SNAPSHOT versions

Previously, if the snapshot version information filled in correctly,
MiniMaven looked in the wrong place for maven-metadata-snapshot.xml.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
MiniMaven: report the path when XML parsing failed

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
MiniMaven: handle more maven-metadata-snapshot.xml formats

Jori Jenkins just encountered this maven-metadata-snapshot.xml:

	<?xml version="1.0" encoding="UTF-8"?>
	<metadata>
	  <groupId>org.scijava</groupId>
	  <artifactId>native-lib-loader</artifactId>
	  <version>2.0-20131121.164942-1</version>
	  <versioning>
	    <snapshot>
	      <buildNumber>1</buildNumber>
	    </snapshot>
	  <lastUpdated>20131121172100</lastUpdated>
	  </versioning>
	</metadata>

Let's teach MiniMaven to parse that, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge branch 'minimaven'

This topic branch fixes bugs that were detected by Jensen Jenkins,
building Fiji-daily.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
ServicePreprocessor: flesh out javadoc
Add a preprocessor for autofilling gateways
Mark the ImageJ gateway as discoverable
DefaultScriptService: add aliases for gateways

In particular, this allows scripts to write:

    // @ImageJ ij

Rather than needing to write out the FQCN like:

    // @imagej.ImageJ ij
Merge branch 'gateway-autofill'

This branch makes gateways such as imagej.ImageJ easier to use in
parameterized scripts. You can now write:

    // @ImageJ ij

And you'll get a perfectly serviceable ImageJ!
ScriptInfo: fix off-by-1 when parsing quoted text
DefaultScriptService: add big numbers as built-ins
MiniMaven: avoid depending on ij-core:tests

MiniMaven's tests used ij-core's tests' createTemporaryDirectory() method.
That comprised all of ij-core's functionality MiniMaven used.

Let's just copy that function so that the path is open to move MiniMaven
into its own repository.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>