debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/LaunchCreationWizardFactory.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;
- }
-}