1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-12 18:55:38 +02:00

Bug 518121 - Support multiple terminal connectors with identical label

In case multiple terminal launcher delegates are registered with
identical label, the ID of a delegate is used as fallback instead
of the label in order to disambiguate.

This doesn't look pretty in the UI but it works and it's a generic
solution for an atypical problem.

Change-Id: I4028e1819f7405c2cb65eacf4e84f437900d884e
Signed-off-by: Martin Oberhuber <mober.at+eclipse@gmail.com>
This commit is contained in:
Martin Oberhuber 2017-06-13 10:44:54 +02:00
parent 3e539b7331
commit 7b52e3974c
3 changed files with 339 additions and 339 deletions

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tm.terminal.view.ui;singleton:=true
Bundle-Version: 4.2.100.qualifier
Bundle-Version: 4.3.0.qualifier
Bundle-Activator: org.eclipse.tm.terminal.view.ui.activator.UIPlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.expressions;bundle-version="3.4.400",

View file

@ -11,7 +11,7 @@
<relativePath>../../admin/pom-build.xml</relativePath>
</parent>
<version>4.2.100-SNAPSHOT</version>
<version>4.3.0-SNAPSHOT</version>
<artifactId>org.eclipse.tm.terminal.view.ui</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2016 Wind River Systems, Inc. and others. All rights reserved.
* Copyright (c) 2011, 2017 Wind River Systems, Inc. and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@ -427,7 +427,7 @@ public class LaunchTerminalSettingsDialog extends TrayDialog {
for (ILauncherDelegate delegate : delegates) {
if (delegate.isHidden() || isFiltered(selection, delegate)) continue;
String label = delegate.getLabel();
if (label == null || "".equals(label.trim())) label = delegate.getId(); //$NON-NLS-1$
if (label == null || "".equals(label.trim()) || label2delegate.containsKey(label)) label = delegate.getId(); //$NON-NLS-1$
label2delegate.put(label, delegate);
items.add(label);