/** * Verifies a main type name is specified by the given launch configuration, * and returns the main type name. * * @param configuration * launch configuration * @return the main type name specified by the given launch configuration * @exception CoreException * if unable to retrieve the attribute or the attribute is * unspecified */ public String verifyMainTypeName(ILaunchConfiguration configuration) throws CoreException { String name = getMainTypeName(configuration); if (name == null) { abort( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Main_type_not_specified_11, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE); } return name; } /**
/** * Verifies a main type name is specified by the given launch configuration, * and returns the main type name. * * @param configuration * launch configuration * @return the main type name specified by the given launch configuration * @exception CoreException * if unable to retrieve the attribute or the attribute is * unspecified */ public String verifyMainTypeName(ILaunchConfiguration configuration) throws CoreException { String name = getMainTypeName(configuration); if (name == null) { abort( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Main_type_not_specified_11, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE); } return name; } /**
/** * Verifies a Java project is specified by the given launch configuration, * and returns the Java project. * * @param configuration * launch configuration * @return the Java project specified by the given launch configuration * @exception CoreException * if unable to retrieve the attribute or the attribute is * unspecified */ public IJavaProject verifyJavaProject(ILaunchConfiguration configuration) throws CoreException { String name = getJavaProjectName(configuration); if (name == null) { abort( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Java_project_not_specified_9, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT); } IJavaProject project = getJavaProject(configuration); if (project == null) { abort( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Project_does_not_exist_or_is_not_a_Java_project_10, null, IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT); } return project; } /**
/** * Verifies a Java project is specified by the given launch configuration, * and returns the Java project. * * @param configuration * launch configuration * @return the Java project specified by the given launch configuration * @exception CoreException * if unable to retrieve the attribute or the attribute is * unspecified */ public IJavaProject verifyJavaProject(ILaunchConfiguration configuration) throws CoreException { String name = getJavaProjectName(configuration); if (name == null) { abort( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Java_project_not_specified_9, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT); } IJavaProject project = getJavaProject(configuration); if (project == null) { abort( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Project_does_not_exist_or_is_not_a_Java_project_10, null, IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT); } return project; } /**
IVMInstall vm = getVMInstall(configuration); if (vm == null) { abort( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_The_specified_JRE_installation_does_not_exist_4, null, abort( NLS.bind(LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_JRE_home_directory_not_specified_for__0__5, new String[]{vm.getName()}), null, abort( NLS.bind(LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_JRE_home_directory_for__0__does_not_exist___1__6, new String[]{vm.getName(),
IVMInstall vm = getVMInstall(configuration); if (vm == null) { abort( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_The_specified_JRE_installation_does_not_exist_4, null, abort( NLS.bind(LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_JRE_home_directory_not_specified_for__0__5, new String[]{vm.getName()}), null, abort( NLS.bind(LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_JRE_home_directory_for__0__does_not_exist___1__6, new String[]{vm.getName(),
/** * Returns the VM runner for the given launch mode to use when launching the * given configuration. * * @param configuration launch configuration * @param mode launch node * @return VM runner to use when launching the given configuration in the given mode * @throws CoreException if a VM runner cannot be determined * @since 3.1 */ public IVMRunner getVMRunner(ILaunchConfiguration configuration, String mode) throws CoreException { IVMInstall vm = verifyVMInstall(configuration); IVMRunner runner = vm.getVMRunner(mode); if (runner == null) { abort(NLS.bind(LaunchingMessages.JavaLocalApplicationLaunchConfigurationDelegate_0, new String[]{vm.getName(), mode}), null, IJavaLaunchConfigurationConstants.ERR_VM_RUNNER_DOES_NOT_EXIST); } return runner; }
/** * Returns the VM runner for the given launch mode to use when launching the * given configuration. * * @param configuration launch configuration * @param mode launch node * @return VM runner to use when launching the given configuration in the given mode * @throws CoreException if a VM runner cannot be determined * @since 3.1 */ public IVMRunner getVMRunner(ILaunchConfiguration configuration, String mode) throws CoreException { IVMInstall vm = verifyVMInstall(configuration); IVMRunner runner = vm.getVMRunner(mode); if (runner == null) { abort(NLS.bind(LaunchingMessages.JavaLocalApplicationLaunchConfigurationDelegate_0, new String[]{vm.getName(), mode}), null, IJavaLaunchConfigurationConstants.ERR_VM_RUNNER_DOES_NOT_EXIST); } return runner; }
if (dir != null) { if (!dir.isDirectory()) { abort( NLS.bind( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Working_directory_does_not_exist___0__12, return res.getLocation().toFile(); abort( NLS.bind( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Working_directory_does_not_exist___0__12, return res.getLocation().toFile(); abort( NLS.bind( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Working_directory_does_not_exist___0__12,
if (dir != null) { if (!dir.isDirectory()) { abort( NLS.bind( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Working_directory_does_not_exist___0__12, return res.getLocation().toFile(); abort( NLS.bind( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Working_directory_does_not_exist___0__12, return res.getLocation().toFile(); abort( NLS.bind( LaunchingMessages.AbstractJavaLaunchConfigurationDelegate_Working_directory_does_not_exist___0__12,