bigdataviewer/bigdataviewer-playground

DisplayService is not instantiated

tischi opened this issue · 6 comments

@NicoKiaru

In the latest master branch:

        ij = new ImageJ();
        ij.ui().showUI();
        final SourceAndConverterBdvDisplayService displayService = SourceAndConverterServices.getSourceAndConverterDisplayService();

The displayService is null for me. Do you have any idea why? Can I instantiate it somehow directly without relying on the magic?

Normally there's no issue, sometimes I noticed that you need to do a clean install to make it work again. Did you try that already ?

clean install did the trick.

but it is a bit scary...

could we add functionality to ensure this "by hand"?

This problem never happens in Fiji, it's just an annoyance in the IDE, related to scijava which, I think, looks for stuff in the jar for annotation parameter. So if your jar is outdated, you will have some issued. Since the jar is Fiji is always the 'good one' in Fiji, this issue will never happen.

I don't know how to ensure this by hand, unless making a configuration in the IDE which always run clean install before each run.

Can't we just add a method SourceAndConverterServices.initialise()?

If the scijava annotations are not right because of an out of sync jar, I don't see how you can initialise (we rely on scijava to detect actions for instance). But try and see if you can make it work ?

I see, you are saying all the other things would also not work!
In that case let's close the issue :-)