public IStatus undo(Map<String, Object> parameters) { String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM); if (jvmArg == null) return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM, ID)); // make a backup - even if it is null String previous = (String) getMemento().get(ActionConstants.PARM_PREVIOUS_VALUE); LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData(); launcherData.setJvm(previous == null ? null : new File(previous)); return Status.OK_STATUS; }
public IStatus execute(Map<String, Object> parameters) { String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM); if (jvmArg == null) return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM, ID)); LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData(); File previous = launcherData.getJvm(); File jvm = "null".equals(jvmArg) ? null : new File(jvmArg); //$NON-NLS-1$ // make a backup - even if it is null getMemento().put(ActionConstants.PARM_PREVIOUS_VALUE, previous == null ? null : previous.getPath()); launcherData.setJvm(jvm); return Status.OK_STATUS; }
public IStatus execute(Map<String, Object> parameters) { String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM); if (jvmArg == null) return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM, ID)); LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData(); File previous = launcherData.getJvm(); File jvm = "null".equals(jvmArg) ? null : new File(jvmArg); //$NON-NLS-1$ // make a backup - even if it is null getMemento().put(ActionConstants.PARM_PREVIOUS_VALUE, previous == null ? null : previous.getPath()); launcherData.setJvm(jvm); return Status.OK_STATUS; }
public IStatus undo(Map<String, Object> parameters) { String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM); if (jvmArg == null) return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM, ID)); // make a backup - even if it is null String previous = (String) getMemento().get(ActionConstants.PARM_PREVIOUS_VALUE); LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData(); launcherData.setJvm(previous == null ? null : new File(previous)); return Status.OK_STATUS; }
private void getVM(List lines, URI launcherFolder, LauncherData launcherData) { String vm = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_VM, lines); if (vm == null) return; URI VMFullPath; try { VMFullPath = URIUtil.makeAbsolute(FileUtils.fromPath(vm), launcherFolder); launcherData.setJvm(URIUtil.toFile(VMFullPath)); ParserUtils.setValueForArgument(EquinoxConstants.OPTION_VM, VMFullPath.toString(), lines); } catch (URISyntaxException e) { Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, vm)); return; } }
private void getVM(List<String> lines, URI launcherFolder, LauncherData launcherData) { String vm = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_VM, lines); if (vm == null) return; URI VMFullPath; try { VMFullPath = URIUtil.makeAbsolute(FileUtils.fromPath(vm), launcherFolder); launcherData.setJvm(URIUtil.toFile(VMFullPath)); ParserUtils.setValueForArgument(EquinoxConstants.OPTION_VM, VMFullPath.toString(), lines); } catch (URISyntaxException e) { Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, vm)); return; } }