Mode mode = WindowManager.getDefault().findMode(customModeName);
if (mode != null) {
StringBuilder message = new StringBuilder("Found custom mode, setting: "); //NON-NLS
message.append(customModeName);
logger.log(Level.INFO, message.toString());
mode.dockInto(this);
} else {
StringBuilder message = new StringBuilder("Could not find mode: "); //NON-NLS
message.append(customModeName);
message.append(", will dock into the default one"); //NON-NLS