diff options
author | Doug Schaefer | 2019-06-04 17:47:52 +0000 |
---|---|---|
committer | Doug Schaefer | 2019-06-04 17:47:52 +0000 |
commit | 3d3a8074b7652dd92c74beebeb7010c7938b41a6 (patch) | |
tree | f13ce80bbf7dcff63a50ffe8051e4f4364ad0de0 | |
parent | 65fdbea4c0f867a80489f821b005ff9f52e24055 (diff) | |
download | org.eclipse.cdt-3d3a8074b7652dd92c74beebeb7010c7938b41a6.tar.gz org.eclipse.cdt-3d3a8074b7652dd92c74beebeb7010c7938b41a6.tar.xz org.eclipse.cdt-3d3a8074b7652dd92c74beebeb7010c7938b41a6.zip |
Bug 547918 - Show launch config type in edit page title.LAUNCHBAR_2_3_0
Allows users to understand better what launch configuration type
they are looking at.
Change-Id: Ib6239fa6ec14d955ed0ed850af5e3c7697ce9519
3 files changed, 14 insertions, 11 deletions
diff --git a/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTarget.java b/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTarget.java index ab54170a7a0..917e53ba015 100644 --- a/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTarget.java +++ b/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTarget.java @@ -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; } diff --git a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java index b0bfcd881f1..d71aa55088b 100644 --- a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java +++ b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java @@ -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); diff --git a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/messages.properties b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/messages.properties index 7e52a79713a..58b4e7f7bd9 100644 --- a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/messages.properties +++ b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/messages.properties @@ -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 |