1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +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,6 +67,7 @@ public class LaunchTarget extends PlatformObject implements ILaunchTarget {
@Override @Override
public Map<String, String> getAttributes() { public Map<String, String> getAttributes() {
Map<String, String> attrs = new HashMap<>(); Map<String, String> attrs = new HashMap<>();
if (attributes != null) {
try { try {
for (String key : attributes.keys()) { for (String key : attributes.keys()) {
String value = attributes.get(key, null); String value = attributes.get(key, null);
@ -77,6 +78,7 @@ public class LaunchTarget extends PlatformObject implements ILaunchTarget {
} catch (BackingStoreException e) { } catch (BackingStoreException e) {
Activator.log(e); Activator.log(e);
} }
}
return attrs; return attrs;
} }

View file

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

View file

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