Peppe, my bad, was confused because of all the changes.
Peppe, Mike, anyway, some scolding necessary. could you guys please take care not to reformat whole classes unintendedly. and if you do intentionally write it into the commit message? ideally do the changes you want to do, commit the changes w/ a proper message and do the reformatting in a separate commit. Mike's 5818 and Peppe's 5832 reformat white space for the whole class, so it is difficult to follow up what the actual changes were. sorry, not trying to be harsh, just pointing out ..ede On 04.06.2018 15:02, Giuseppe Aruta wrote: > No. > How does it work in my case: checking if sextante raster layers are loaded > into OJ? > I added the following code to the class: > > > public EnableCheck createAtLeastNRasterImageLayersMustExistCheck(final int > n) { > return new EnableCheck() { > @Override > public String check(JComponent component) { > final LayerManager layerManager = workbenchContext > .getLayerManager(); > String msg; > if (n == 1) { > msg = > get("com.vividsolutions.jump.workbench.plugin.At-least-one-layerables-must-exist") > + " (" > + > get("org.openjump.core.rasterimage.AddRasterImageLayerWizard.Sextante-Raster-Image") > + ")"; > } else { > msg = getMessage( > > "com.vividsolutions.jump.workbench.plugin.At-least-n-layerables-must-exist", > new Object[] { n }) > + " (" > + > get("org.openjump.core.rasterimage.AddRasterImageLayerWizard.Sextante-Raster-Image") > + ")"; > ; > } > return (layerManager == null || n > layerManager > .getRasterImageLayers().size()) ? msg : null; > } > }; > } > > > Peppe > > 2018-06-04 14:49 GMT+02:00 <edgar.sol...@web.de <mailto:edgar.sol...@web.de>>: > > hey Peppe, > > On 04.06.2018 14:41, jump-pilot-svn--- via Jump-pilot-devel wrote: > > - public static EnableCheckFactory getInstance(){ > > - if (instance==null) > > - instance = new > EnableCheckFactory(JUMPWorkbench.getInstance().getContext()); > > - return instance; > > + public static EnableCheckFactory getInstance() { > > + if (instance == null) { > > + instance = new > EnableCheckFactory(JUMPWorkbench.getInstance() > > + .getContext()); > > + } > > + return instance; > > } > > are you aware of EnableCheckFactory.getInstance() which does exactly the > above but on the level the whole OJ? ..ede > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > <mailto:Jump-pilot-devel@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > <https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel> > > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel