* @param mode
*/
public void launchFile(IFile file, String mode) throws CoreException {
// check for an existing launch config for the file
String path = file.getFullPath().toString();
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type = launchManager.getLaunchConfigurationType(Constants.NPM_LAUNCH_CONFIGURATION_TYPE_ID);
ILaunchConfiguration configuration = createLaunchConfiguration(type, path, file);
String goalString = null;
goalString = configuration.getAttribute(Constants.KEY_GOAL, Constants.BLANK_STRING);
if (Constants.BLANK_STRING.equals(goalString)) {
Shell shell = Activator.getActiveWorkbenchShell();