Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-02-20 07:05:24 +0000
committerUwe Stieber2012-02-20 08:38:56 +0000
commitab8cd8c246dbb93b06f732f5a690114c77b8d4f4 (patch)
tree2b05fe06185529d356612bce07b8ccb010d5b47b /target_explorer/plugins/org.eclipse.tcf.te.launch.core
parent5e7e69a25a56b5a37634056d65c32e13c93ea3ad (diff)
downloadorg.eclipse.tcf-ab8cd8c246dbb93b06f732f5a690114c77b8d4f4.tar.gz
org.eclipse.tcf-ab8cd8c246dbb93b06f732f5a690114c77b8d4f4.tar.xz
org.eclipse.tcf-ab8cd8c246dbb93b06f732f5a690114c77b8d4f4.zip
Target Explorer: Decode peer model type launch context
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.launch.core')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/ContextSelectorPersistenceDelegate.java24
1 files changed, 16 insertions, 8 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/ContextSelectorPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/ContextSelectorPersistenceDelegate.java
index ac1f84bd0..f81436419 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/ContextSelectorPersistenceDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/ContextSelectorPersistenceDelegate.java
@@ -151,7 +151,7 @@ public class ContextSelectorPersistenceDelegate {
}
catch (IOException e) {
// Export to the string writer failed --> remove attribute from launch configuration
- if (CoreBundleActivator.getTraceHandler().getDebugMode() > 0) {
+ if (Platform.inDebugMode()) {
IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
"Launch framework internal error: " + e.getLocalizedMessage(), e); //$NON-NLS-1$
Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
@@ -292,7 +292,7 @@ public class ContextSelectorPersistenceDelegate {
}
catch (Exception e) {
// Import failed --> remove attribute from launch configuration
- if (CoreBundleActivator.getTraceHandler().getDebugMode() > 0) {
+ if (Platform.inDebugMode()) {
IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
"Launch framework internal error: " + e.getLocalizedMessage(), e); //$NON-NLS-1$
Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
@@ -400,7 +400,7 @@ public class ContextSelectorPersistenceDelegate {
try {
clazz = (Class<IModelNode>)CoreBundleActivator.getContext().getBundle().loadClass(lastType);
} catch (ClassNotFoundException e) {
- if (CoreBundleActivator.getTraceHandler().getDebugMode() > 0) {
+ if (Platform.inDebugMode()) {
IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
"Launch framework internal error: " + e.getLocalizedMessage(), e); //$NON-NLS-1$
Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
@@ -428,7 +428,7 @@ public class ContextSelectorPersistenceDelegate {
try {
clazz = (Class<IModelNode>)bundle.loadClass(lastType);
} catch (ClassNotFoundException e) {
- if (CoreBundleActivator.getTraceHandler().getDebugMode() > 0) {
+ if (Platform.inDebugMode()) {
IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
"Launch framework internal error: " + e.getLocalizedMessage(), e); //$NON-NLS-1$
Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
@@ -443,10 +443,18 @@ public class ContextSelectorPersistenceDelegate {
if (object != null) {
IStepContext context = (IStepContext)Platform.getAdapterManager().loadAdapter(object, IStepContext.class.getName());
if (context != null) {
- // Decodes the context object
- context.decode(lastData);
- if (!contexts.contains(context)) {
- contexts.add(context);
+ try {
+ // Decodes the context object
+ context.decode(lastData);
+ if (!contexts.contains(context)) {
+ contexts.add(context);
+ }
+ } catch (IOException e) {
+ if (Platform.inDebugMode()) {
+ IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
+ "Launch framework internal error: " + e.getLocalizedMessage(), e); //$NON-NLS-1$
+ Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
+ }
}
}
}

Back to the top