Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2008-09-25 02:55:21 +0000
committerDarin Wright2008-09-25 02:55:21 +0000
commit7a48f5f4ee62fe5fc0bdb8f8dac763e57558bf1f (patch)
treeec0fd216042e43ebeb9ca8bf34d2ec4781b3889f
parent4b143a5926e14f453c4d6c4b38b070d743f68828 (diff)
downloadeclipse.platform.debug-7a48f5f4ee62fe5fc0bdb8f8dac763e57558bf1f.tar.gz
eclipse.platform.debug-7a48f5f4ee62fe5fc0bdb8f8dac763e57558bf1f.tar.xz
eclipse.platform.debug-7a48f5f4ee62fe5fc0bdb8f8dac763e57558bf1f.zip
Bug 248520 - NPE selecting launch config
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java8
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java16
2 files changed, 21 insertions, 3 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java
index 0d314d65d..d67553de1 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java
@@ -150,11 +150,19 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig
* @since 3.5
*/
protected LaunchConfiguration(String name, IContainer container) {
+ initialize();
setName(name);
setContainer(container);
}
/**
+ * Initialize any state variables - called first in the constructor.
+ * Subclasses must override as appropriate.
+ */
+ protected void initialize() {
+ }
+
+ /**
* Constructs a launch configuration on the given workspace file.
*
* @param file workspace .launch file
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java
index 962cf670a..0e4a860bb 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java
@@ -72,17 +72,17 @@ public class LaunchConfigurationWorkingCopy extends LaunchConfiguration implemen
* Whether this working copy has been modified since
* it was created
*/
- private boolean fDirty = false;
+ private boolean fDirty;
/**
* Indicates whether this working copy has been explicitly renamed.
*/
- private boolean fRenamed = false;
+ private boolean fRenamed;
/**
* Suppress change notification until created
*/
- private boolean fSuppressChange = true;
+ private boolean fSuppressChange ;
/**
* Constructs a working copy of the specified launch
@@ -100,6 +100,16 @@ public class LaunchConfigurationWorkingCopy extends LaunchConfiguration implemen
fSuppressChange = false;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.core.LaunchConfiguration#initialize()
+ */
+ protected void initialize() {
+ fDirty = false;
+ fRenamed = false;
+ fSuppressChange = true;
+ super.initialize();
+ }
+
/**
* Constructs a working copy of the specified launch configuration as its parent.
*

Back to the top