Removed/added refactored class name which was missing in last commit RCL_2_4
authorjohn.dean.3@nokia.com
Fri, 06 Nov 2009 12:39:13 -0600
branchRCL_2_4
changeset 568 ee4c4ca48716
parent 567 019adf6accac
child 570 fdb299cc88b4
Removed/added refactored class name which was missing in last commit
debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/LaunchCreationWizardFactory.java
debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/LaunchCreationWizardInstance.java
--- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/LaunchCreationWizardFactory.java	Fri Nov 06 12:28:33 2009 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-package com.nokia.cdt.internal.debug.launch.wizard;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-
-/**
- * Created for purposes of dependency injection on the LaunchCreationWizard.
- * This factory allows for other factories to be substituted at runtime, for
- * purposes of injecting at runtime LaunchCreationWizard sub-classes created by
- * the ATF
- * 
- */
-public class LaunchCreationWizardFactory {
-	
-	// This is an abstract factory which maintains here the actual factory
-	ILaunchCreationWizardFactory factory;
-	
-	private LaunchCreationWizardFactory() {
-		setDefault();
-	}
-	
-	/**
-	 * Returns the LaunchCreationWizard generated by the factory.
-	 */
-	public LaunchCreationWizard get(IProject project, String configurationName, 
-			List<IPath> mmps, List<IPath> exes, IPath defaultExecutable,  
-			boolean isEmulation, boolean emulatorOnly, String mode) throws Exception {
-		return factory.get(project, configurationName, mmps, exes, defaultExecutable, isEmulation, emulatorOnly, mode);
-	}
-	
-	/**
-	 * Sets the factory to the default product implementation.  Used by the default initializer and to clear a dependency previously set
-	 */
-	public void setDefault() {
-		set(new ILaunchCreationWizardFactory() {
-			
-			public LaunchCreationWizard get(IProject project, String configurationName,
-					List<IPath> mmps, List<IPath> exes, IPath defaultExecutable,
-					boolean isEmulation, boolean emulatorOnly, String mode)
-					throws Exception {
-				return new LaunchCreationWizard(project, configurationName, mmps, exes, defaultExecutable, isEmulation, emulatorOnly, mode);
-
-			}
-		});
-	}
-	
-	/**
-	 * Intended to be used by tests to inject a custom factory
-	 */
-	public void set(ILaunchCreationWizardFactory factory) {
-		this.factory = factory;
-	}
-	
-	static private LaunchCreationWizardFactory abstractFactory = null;
-	
-	/**
-	 * Returns the singleton
-	 * @return
-	 */
-	public static LaunchCreationWizardFactory getInstance() {
-		if (abstractFactory == null) {
-			abstractFactory = new LaunchCreationWizardFactory();
-		}
-		return abstractFactory;
-	}
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/LaunchCreationWizardInstance.java	Fri Nov 06 12:39:13 2009 -0600
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+package com.nokia.cdt.internal.debug.launch.wizard;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+
+/**
+ * Created for purposes of dependency injection on the LaunchCreationWizard.
+ * This instance allows for other factories to be substituted at runtime, for
+ * purposes of injecting at runtime LaunchCreationWizard sub-classes created by
+ * the automated tests
+ * 
+ */
+public class LaunchCreationWizardInstance {
+	
+	// The delegate factory
+	ILaunchCreationWizardFactory factory;
+	
+	static private LaunchCreationWizardInstance instance = null;
+	
+	/**
+	 * Returns the singleton
+	 * @return
+	 */
+	public static LaunchCreationWizardInstance getInstance() {
+		if (instance == null) {
+			instance = new LaunchCreationWizardInstance();
+		}
+		return instance;
+	}
+	
+	private LaunchCreationWizardInstance() {
+		setDefault();
+	}
+	
+	/**
+	 * Returns the LaunchCreationWizard generated by the factory.
+	 */
+	public LaunchCreationWizard create(IProject project, String configurationName, 
+			List<IPath> mmps, List<IPath> exes, IPath defaultExecutable,  
+			boolean isEmulation, boolean emulatorOnly, String mode) throws Exception {
+		return factory.create(project, configurationName, mmps, exes, defaultExecutable, isEmulation, emulatorOnly, mode);
+	}
+	
+	/**
+	 * Sets the factory to the default product implementation.  Used by the default initializer and to clear a dependency previously set
+	 */
+	public void setDefault() {
+		set(new ILaunchCreationWizardFactory() {
+			
+			public LaunchCreationWizard create(IProject project, String configurationName,
+					List<IPath> mmps, List<IPath> exes, IPath defaultExecutable,
+					boolean isEmulation, boolean emulatorOnly, String mode)
+					throws Exception {
+				return new LaunchCreationWizard(project, configurationName, mmps, exes, defaultExecutable, isEmulation, emulatorOnly, mode);
+
+			}
+		});
+	}
+	
+	/**
+	 * Intended to be used by tests to inject a custom factory
+	 */
+	public void set(ILaunchCreationWizardFactory factory) {
+		this.factory = factory;
+	}
+}