Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'target_explorer/plugins')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/EventListenerDelegate.java34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/AttachLaunchManagerDelegate.java15
2 files changed, 26 insertions, 23 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/EventListenerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/EventListenerDelegate.java
index e2bf6eed6..66fd835b2 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/EventListenerDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/EventListenerDelegate.java
@@ -58,23 +58,25 @@ public class EventListenerDelegate implements IEventListener {
IPersistenceDelegate delegate = PersistenceManager.getInstance().getDelegate(Map.class, launchConfigAttributes, false);
try {
Map<String, String> attributes = (Map<String,String>)delegate.read(Map.class, launchConfigAttributes, null);
- attributes.remove(ILaunchContextLaunchAttributes.ATTR_LAUNCH_CONTEXTS);
- attributes.remove(ICommonLaunchAttributes.ATTR_UUID);
- attributes.remove(ICommonLaunchAttributes.ATTR_LAST_LAUNCHED);
- final ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
- for (Entry<String, String> entry : attributes.entrySet()) {
- LaunchConfigHelper.addLaunchConfigAttribute(wc, entry.getKey(), entry.getValue());
- }
- ExecutorsUtil.executeInUI(new Runnable() {
- @Override
- public void run() {
- try {
- wc.doSave();
- }
- catch (Exception e) {
- }
+ if (attributes != null) {
+ attributes.remove(ILaunchContextLaunchAttributes.ATTR_LAUNCH_CONTEXTS);
+ attributes.remove(ICommonLaunchAttributes.ATTR_UUID);
+ attributes.remove(ICommonLaunchAttributes.ATTR_LAST_LAUNCHED);
+ final ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
+ for (Entry<String, String> entry : attributes.entrySet()) {
+ LaunchConfigHelper.addLaunchConfigAttribute(wc, entry.getKey(), entry.getValue());
}
- });
+ ExecutorsUtil.executeInUI(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ wc.doSave();
+ }
+ catch (Exception e) {
+ }
+ }
+ });
+ }
}
catch (Exception e) {
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/AttachLaunchManagerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/AttachLaunchManagerDelegate.java
index 4a6ece148..76d5b95d7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/AttachLaunchManagerDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/AttachLaunchManagerDelegate.java
@@ -122,15 +122,16 @@ public class AttachLaunchManagerDelegate extends DefaultLaunchManagerDelegate im
IPersistenceDelegate delegate = PersistenceManager.getInstance().getDelegate(Map.class, launchConfigAttributes, false);
try {
Map<String, String> attributes = (Map<String,String>)delegate.read(Map.class, launchConfigAttributes, null);
- attributes.remove(ILaunchContextLaunchAttributes.ATTR_LAUNCH_CONTEXTS);
- attributes.remove(ICommonLaunchAttributes.ATTR_UUID);
- attributes.remove(ICommonLaunchAttributes.ATTR_LAST_LAUNCHED);
- for (Entry<String, String> entry : attributes.entrySet()) {
- launchSpec.addAttribute(entry.getKey(), entry.getValue(), true);
+ if (attributes != null) {
+ attributes.remove(ILaunchContextLaunchAttributes.ATTR_LAUNCH_CONTEXTS);
+ attributes.remove(ICommonLaunchAttributes.ATTR_UUID);
+ attributes.remove(ICommonLaunchAttributes.ATTR_LAST_LAUNCHED);
+ for (Entry<String, String> entry : attributes.entrySet()) {
+ launchSpec.addAttribute(entry.getKey(), entry.getValue(), true);
+ }
}
}
- catch (Exception e) {
- }
+ catch (Exception e) { /* ignored on purpose */ }
}
}

Back to the top