SciJava Command File Extensions

@imagejan @haesleinhuepf
I can’t get the file-extension filter to work:

That’s my code:

@Plugin(type = Command.class, menuPath = "Plugins>Multi Modal Data Viewer>View Multiple XML/HDF5 Images" )
public class ViewMultipleBdvImagesCommand implements Command
{
	@Parameter ( visibility = ItemVisibility.MESSAGE  )
	String message = "Select images";

	@Parameter ( label = "Choose input files", style = "files, extensions:xml" )
	public File[] inputFiles;

	public void run()
	{
		final MultiModalDataViewer viewer = new MultiModalDataViewer( inputFiles );
	}
}

And that’s the file extension:

1 Like

Sorry for not replying until now.

The filter should work actually. It’s just the string representation in the dropdown that is a bit cryptic as it’s the toString of the file filter instance.

See my reply on this issue:

as well as these related issues in scijava-ui-swing and scijava-common: