Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration dialog generation from array @Parameters fails #17

Open
stelfrich opened this issue Jun 2, 2017 · 2 comments
Open

Configuration dialog generation from array @Parameters fails #17

stelfrich opened this issue Jun 2, 2017 · 2 comments
Assignees

Comments

@stelfrich
Copy link
Member

MyBuddyDemoPlugin does not generate a correct configuration dialog with the @Paramters, instead:

@gab1one
Copy link
Member

gab1one commented Jun 2, 2017

I did some debugging and found this bug is caused by array parameters.

  @Parameter
        private double[] testDouble;

will not work, but

@Parameter
        private double testDouble;

will.

This bug occurs both within the fragmentDemo and buddyDemo projects, so I don't think it is caused by the different way those plugins are discovered.

@dietzc dietzc self-assigned this Jun 2, 2017
@stelfrich stelfrich changed the title Configuration dialog generation from @Parameters fails Configuration dialog generation from array @Parameters fails Aug 17, 2017
@imagejan
Copy link

I stumbled upon this issue because I have a plugin that requires both a double[] input and some "normal" inputs (i.e. numbers, booleans, etc.).

After quite some headache, I discovered that this might be because for double[] inputs (while supported via column binding), the SwingInputHarvester throws an exception here:

try {
harvester.buildPanel(m_inputPanel, harvesterModule);
} catch (final ModuleException e) {
LOGGER.error("ImageJ plugin creation for plugin " + harvesterModule.getDelegateObject()
+ " failed during the ImageJ dialog creation.");
e.printStackTrace();
}

... so the "ImageJ Dialog" part of the input dialog cannot be rendered.


I figured that a workaround is to declare the double[] parameter as required = false, so that the input harvester is happy even if it cannot generate a widget for this parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants