Comments (3)
@ctrueden confirmed, I also cannot reproduce the original issue (tested both on Mac OSX Yosemite and on Windows 7).
However, your example Groovy script above now throws an exception EDIT: alright, I just had to change the package name (org.scijava.ui.swing.script.AutoImporter
):
groovy.lang.MissingPropertyException: No such property: net for class: Script2
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50)
at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231)
at Script2.run(Script2.groovy:11)
at org.scijava.plugins.scripting.groovy.GroovyScriptEngine.eval(GroovyScriptEngine.java:303)
at org.scijava.plugins.scripting.groovy.GroovyScriptEngine.eval(GroovyScriptEngine.java:122)
at org.scijava.plugins.scripting.groovy.GroovyScriptEngine.eval(GroovyScriptEngine.java:114)
at javax.script.AbstractScriptEngine.eval(Unknown Source)
at org.scijava.script.ScriptModule.run(ScriptModule.java:177)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
from scijava-ui-swing.
I was able to replicate the bug on Linux with the Java-8 version of Fiji. (Sadly, on my particular OS X machine, an old version of javax.vecmath.Point3f
is permanently available from /System/Library/Java/Extensions/vecmath.jar
.)
However, on OS X, this Groovy script:
// @PluginService pluginService
// @ScriptService scriptService
// Convenience method for use with Map<String, ? extends Collection<? extends Object>> objects
// In this case, AutoImporter#getDefaultImports() returns a Map<String, List<String>>
java.util.Map.metaClass.pkg {
for (key in delegate.keySet())
if (delegate.get(key).contains(it)) return key
}
autoImporterPlugins = pluginService.getPluginsOfType(net.imagej.ui.swing.script.AutoImporter)
println("Found " + autoImporterPlugins.size() + " AutoImporter plugins")
autoImporter = pluginService.createInstance(autoImporterPlugins.get(0))
lang = scriptService.getLanguageByName("jython")
importsMap = autoImporter.getDefaultImports()
// sanity check for ImageJ 1.x class
println("-- Searching for PlugIn --")
println(importsMap.pkg("PlugIn"))
// look for old Java 3D class
println("-- Searching for Point3f --")
println(importsMap.pkg("Point3f"))
outputs:
Found 1 AutoImporter plugins
-- Searching for PlugIn --
ij.plugin
-- Searching for Point3f --
null
Which has me a bit baffled!
Will return to investigate more another day.
from scijava-ui-swing.
I can no longer reproduce this bug on my system.
Perhaps relatedly, my upgrade to macOS Sierra last night wiped out everything in my /System/Library/Java/Extensions
folder except for MRJToolkit.jar
.
@imagejan When you have a moment, would you please try to reproduce on your end, and close this issue if you cannot do so?
from scijava-ui-swing.
Related Issues (20)
- Sliders and scroll bars should scale to stepSize HOT 1
- Handle missing min/max gracefully for sliders/scrollbars HOT 3
- Provide a way to save results from swing table HOT 11
- Support html hyperlinks in labels and messages
- Fix procedure of how to create update site HOT 1
- Respect multiple styles in chooseFile and chooseFiles methods
- No parameter attribute for number formats HOT 1
- Warning status popup displayed twice
- SwingFileWidget: support 'pattern' style HOT 1
- Harmonize file filter logic for File inputs
- SwingFileWidget: support copying from widget text
- Add FlatLaf as a L&F option HOT 1
- Unusable viewport in tables
- Allow showing file list widget instead of file chooser HOT 3
- Add test for stepSize=null
- Move non-Swing-specific object handling upstream HOT 1
- Improve scroll behavior in Swing input dialog HOT 5
- NPE from SwingObjectWidget HOT 7
- Spinners are missing up/down arrows with FlatLaf HOT 5
- Console Menu bar is not aware of Log tab
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scijava-ui-swing.