in plugins/org.apache.karaf.eik.ui/src/main/java/org/apache/karaf/eik/ui/console/KarafRemoteConsole.java [192:229]
protected String computeName() {
String label = null;
final IProcess process = getProcess();
final ILaunchConfiguration config = process.getLaunch().getLaunchConfiguration();
label = process.getAttribute(IProcess.ATTR_PROCESS_LABEL);
if (label == null) {
if (config == null) {
label = process.getLabel();
} else {
// check if PRIVATE config
if (DebugUITools.isPrivate(config)) {
label = process.getLabel();
} else {
String type = null;
try {
type = config.getType().getName();
} catch (final CoreException e) {
}
final StringBuffer buffer = new StringBuffer();
buffer.append("Remote shell connection to: ");
buffer.append(config.getName());
if (type != null) {
buffer.append(" ["); //$NON-NLS-1$
buffer.append(type);
buffer.append("] "); //$NON-NLS-1$
}
buffer.append(process.getLabel());
label = buffer.toString();
}
}
}
if (process.isTerminated()) {
return MessageFormat.format("<disconnected> {0}", (Object[]) new String[] { label });
}
return label;
}