1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +02:00

Bug 547918 - Show launch config type in edit page title.

Allows users to understand better what launch configuration type
they are looking at.

Change-Id: Ib6239fa6ec14d955ed0ed850af5e3c7697ce9519
This commit is contained in:
Doug Schaefer 2019-06-04 13:47:52 -04:00
parent 65fdbea4c0
commit 3d3a8074b7
3 changed files with 14 additions and 11 deletions

View file

@ -67,15 +67,17 @@ public class LaunchTarget extends PlatformObject implements ILaunchTarget {
@Override
public Map<String, String> getAttributes() {
Map<String, String> attrs = new HashMap<>();
try {
for (String key : attributes.keys()) {
String value = attributes.get(key, null);
if (value != null) {
attrs.put(key, value);
if (attributes != null) {
try {
for (String key : attributes.keys()) {
String value = attributes.get(key, null);
if (value != null) {
attrs.put(key, value);
}
}
} catch (BackingStoreException e) {
Activator.log(e);
}
} catch (BackingStoreException e) {
Activator.log(e);
}
return attrs;
}

View file

@ -96,10 +96,11 @@ public class LaunchBarLaunchConfigDialog extends TitleAreaDialog implements ILau
ILaunchBarUIManager uiManager = Activator.getService(ILaunchBarUIManager.class);
ILabelProvider labelProvider = uiManager.getLabelProvider(descriptor);
String descName = labelProvider != null ? labelProvider.getText(descriptor) : descriptor.getName();
String typeName = workingCopy.getType().getName();
if (supportsTargets) {
setTitle(String.format(Messages.LaunchBarLaunchConfigDialog_Edit2, descName, mode.getLabel(), target.getId()));
setTitle(String.format(Messages.LaunchBarLaunchConfigDialog_Edit2, typeName, descName, mode.getLabel(), target.getId()));
} else {
setTitle(String.format(Messages.LaunchBarLaunchConfigDialog_Edit1, descName, mode.getLabel()));
setTitle(String.format(Messages.LaunchBarLaunchConfigDialog_Edit1, typeName, descName, mode.getLabel()));
}
} catch (CoreException e) {
Activator.log(e);

View file

@ -40,8 +40,8 @@ CannotEditLaunchConfiguration=Cannot edit this configuration.
NoLaunchModeSelected=No launch mode selected.
NoLaunchGroupSelected=No launch group found for the current selection.
LaunchBarLaunchConfigDialog_Edit1=Edit configuration %s for %s
LaunchBarLaunchConfigDialog_Edit2=Edit configuration %s for %s on %s
LaunchBarLaunchConfigDialog_Edit1=Edit %s configuration %s for %s
LaunchBarLaunchConfigDialog_Edit2=Edit %s configuration %s for %s on %s
LaunchBarLaunchConfigDialog_EditConfiguration=Edit Configuration
LaunchBarLaunchConfigDialog_LaunchConfigName=Launch Configuration Name:
LaunchBarLaunchConfigDialog_LCMustHaveName=Launch configuration must have a name