// TODO: there has to be a better way to do this.
// find the data explorer top components
Collection<? extends DataExplorer> dataExplorers = Lookup.getDefault().lookupAll(DataExplorer.class);
for (DataExplorer de : dataExplorers) {
TopComponent explorerWin = de.getTopComponent();
Mode m = WindowManager.getDefault().findMode("explorer"); //NON-NLS
if (m != null) {
m.dockInto(explorerWin); // redock into the explorer mode
} else {
logger.log(Level.WARNING, "Could not find explorer mode and dock explorer window"); //NON-NLS
}
explorerWin.open(); // open that top component
}
// find the data content top component
TopComponent contentWin = DataContentTopComponent.findInstance();
Mode m = WindowManager.getDefault().findMode("output"); //NON-NLS
if (m != null) {
m.dockInto(contentWin); // redock into the output mode
} else {
logger.log(Level.WARNING, "Could not find output mode and dock content window"); //NON-NLS
}
contentWin.open(); // open that top component
}