How to prevent CControl.read(File) to restore DefaultMultipleCDockable

I used DefaultMultipleCDockable as “opened” editor.

When I restart my app, I would like CControl to restore every other dockable ( simpleCDockable in fact), but not the MultipleCDockable ones.

I use the CControl.read() method, which works fine, but I can’t prevent it from restoring the MultipleCDockable too.

Is there a simple way to do that ?

Thanks.

here is my code btw, if it helps

		ThemeMap themes = dock.getThemes();
		themes.select(ThemeMap.KEY_ECLIPSE_THEME);
		dock.setMissingStrategy(MissingCDockableStrategy.PURGE);
		
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				if (conf.exists()) {
					
					LOG.fine("reloading docking confs from " + conf);
				/**/
					try {
						//dock.getResources().readPreferences();
						dock.read(conf);
					  } catch (IOException e) {// handled
						LOG.throwing("DockingModule", "createCControl", e);
					}/**/
				}
				else {
					//use the resource one
					DataInputStream stream = new DataInputStream(getClass().getResourceAsStream("docking.conf"));
					try {
						dock.read(stream);
					} catch (IOException e) {
						LOG.throwing("DockingModule", "createCControl from resources", e);
					}
				}
			}
		});
		/**/
		return dock;```

Let your MultipleCDockableFactory(s) return “null” when its “read”-method is called. If the factory does not create Dockables, no Dockables can be shown. (The framework should handle the “null” and not throw any kind of exception).

Hi Beni,

Thanks for the tip. As far as I have tested it works just as expected.