|
Bugzilla – Bug 817 |
'Add import...' in the script editor does not add package info |
Last modified: 2016-01-13 15:21:20 CST |
| ⚠ |
NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug. The Fiji project now uses GitHub Issues for issue tracking. Please file all new issues there. |
| 'Add import...' in the script editor does not add package info | |
|
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
- Open the script editor ('File > New > Script...') - change the language to Java ('Language > Java') - type any class name in the text window (e.g. 'IJ', 'GenericDialog', 'wtf') - select the word you just typed - 'Edit > Add import...' The script editor will just add a line with the selected text (e.g. import IJ; import GenericDialog; import wtf; ) without checking the existence of the class name in any known package. In previous versions, 'Add import...' used to add the fully qualified class paths, e.g. import ij.IJ; import ij.gui.GenericDialog; Information about your version of Java: os.arch => x86_64 os.name => Mac OS X os.version => 10.9.3 java.version => 1.6.0_65 java.vendor => Apple Inc. java.runtime.name => Java(TM) SE Runtime Environment java.runtime.version => 1.6.0_65-b14-462-11M4609 java.vm.name => Java HotSpot(TM) 64-Bit Server VM java.vm.version => 20.65-b04-462 java.vm.vendor => Apple Inc. java.vm.info => mixed mode java.awt.graphicsenv => apple.awt.CGraphicsEnvironment java.specification.name => Java Platform API Specification java.specification.version => 1.6 sun.cpu.endian => little sun.desktop => null file.separator => / The up-to-date check says: REMIND_LATER Information relevant to JAVA_HOME related problems: JAVA_HOME is set to: null imagej.dir => /Users/eglinger/Fiji-debug/Fiji.app Information about the version of each plugin: Activated update sites: ImageJ: http://update.imagej.net/ (last check:20140623222553) Fiji: http://fiji.sc/update/ (last check:20140624002555)Yes, I confirm that the auto-completion "support" was completely scratched from the script editor. It never worked, and I decided at some stage that I cannot be held responsible for cleaning up a Google Summer of Code project for which I was neither student nor mentor (and for which I already did a lot, a really big lot more than was my due as administrator for the Fiji organization). The auto-completion support was not really necessary for the "Add import" anyway. It's just that at some stage, the code to discover all available packages and classes needs to be reinstated. However, this requires a little care with regards to the separation of concern: Fiji's script editor was a pile of code that mixed GUI and function and Git support and a half-working auto-completion support and incomplete and inconsistent features that were available only for specific languages ("Edit>Add import", for example, is only available for Java! For no good reason, either). We can do much better than this! The auto-completion support, for example, is UI-agnostic. So it should not live in the same package as the script editor GUI. It is -- as the "Edit>Add import" command -- subject to language-specific code, so there needs to be a base interface in SciJava common (and either a new service or new API for the ScriptService), and the script languages need to implement said interfaces Unfortunately, we still have a couple of issues to address before we can go to address power users' issues involving heavy script development. This issue is therefore not on my immediate radar, even if I assign it to myself. In the meantime, everybody compelled to work on this is of course welcome to do so. Remember: Fiji is no longer a complaint-driven project, meaning that it is no longer enough to just complain and the work will be performed magically (it is actually not really magic when Mark, Curtis or I have do all the work...). Fiji is a collaboration-based project now.