public LauncherData getLauncherData() throws FrameworkAdminRuntimeException { loadDelegate(); return manipulator.getLauncherData(); }
public LauncherData getLauncherData() throws FrameworkAdminRuntimeException { loadDelegate(); return manipulator.getLauncherData(); }
void setFwJar(File fwJar) { manipulator.getLauncherData().setFwJar(fwJar); }
public IStatus undo(Map<String, Object> parameters) { Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR); String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG); if (programArg == null) return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROGRAM_ARG, ID)); String programArgValue = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG_VALUE); if (ActionConstants.PARM_IGNORE.equals(programArgValue)) return Status.OK_STATUS; if (programArg.startsWith("-")) //$NON-NLS-1$ manipulator.getLauncherData().removeProgramArg(programArg); return Status.OK_STATUS; } }
public IStatus undo(Map<String, Object> parameters) { Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR); String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG); if (programArg == null) return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROGRAM_ARG, ID)); String programArgValue = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG_VALUE); if (ActionConstants.PARM_IGNORE.equals(programArgValue)) return Status.OK_STATUS; if (programArg.startsWith("-")) //$NON-NLS-1$ manipulator.getLauncherData().removeProgramArg(programArg); return Status.OK_STATUS; } }
public IStatus undo(Map<String, Object> parameters) { Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR); String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG); if (programArg == null) return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROGRAM_ARG, ID)); if (programArg.startsWith("-")) {//$NON-NLS-1$ { manipulator.getLauncherData().addProgramArg(programArg); String programArgValue = (String) getMemento().get(ActionConstants.PARM_PROGRAM_ARG_VALUE); if (programArgValue != null) manipulator.getLauncherData().addProgramArg(programArgValue); } return Status.OK_STATUS; }
public IStatus undo(Map<String, Object> parameters) { Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR); String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG); if (programArg == null) return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROGRAM_ARG, ID)); if (programArg.startsWith("-")) {//$NON-NLS-1$ { manipulator.getLauncherData().addProgramArg(programArg); String programArgValue = (String) getMemento().get(ActionConstants.PARM_PROGRAM_ARG_VALUE); if (programArgValue != null) manipulator.getLauncherData().addProgramArg(programArgValue); } 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; }
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 Process launchByLauncher(Manipulator manipulator, File cwd) throws IOException { LauncherData launcherData = manipulator.getLauncherData(); if (launcherData.getLauncher() == null) throw new IllegalStateException(Messages.exception_launcherLocationNotSet); String[] cmdarray = new String[] {launcherData.getLauncher().getAbsolutePath()}; if (cwd == null) cwd = launcherData.getLauncher().getParentFile(); Process process = Runtime.getRuntime().exec(cmdarray, null, cwd); Log.log(LogService.LOG_DEBUG, "\t" + getStringOfCmd(cmdarray)); //$NON-NLS-1$ return process; }
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; }
private Process launchByLauncher(Manipulator manipulator, File cwd) throws IOException { LauncherData launcherData = manipulator.getLauncherData(); if (launcherData.getLauncher() == null) throw new IllegalStateException(Messages.exception_launcherLocationNotSet); String[] cmdarray = new String[] {launcherData.getLauncher().getAbsolutePath()}; if (cwd == null) cwd = launcherData.getLauncher().getParentFile(); Process process = Runtime.getRuntime().exec(cmdarray, null, cwd); Log.log(LogService.LOG_DEBUG, "\t" + getStringOfCmd(cmdarray)); //$NON-NLS-1$ return process; }
public BundleInfo[] save(Manipulator manipulator, boolean backup) throws IOException { List<BundleInfo> setToInitialConfig = new LinkedList<BundleInfo>(); List<BundleInfo> setToSimpleConfig = new LinkedList<BundleInfo>(); ConfigData configData = manipulator.getConfigData(); if (!divideBundleInfos(manipulator, setToInitialConfig, setToSimpleConfig, configData.getInitialBundleStartLevel())) return configData.getBundles(); File outputFile = getConfigFile(manipulator); URI installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()).toURI(); saveConfiguration(setToSimpleConfig.toArray(new BundleInfo[setToSimpleConfig.size()]), outputFile, installArea, backup); configData.setProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_CONFIGURL, outputFile.toURL().toExternalForm()); return orderingInitialConfig(setToInitialConfig); }
public BundleInfo[] save(Manipulator manipulator, boolean backup) throws IOException { List setToInitialConfig = new LinkedList(); List setToSimpleConfig = new LinkedList(); ConfigData configData = manipulator.getConfigData(); if (!divideBundleInfos(manipulator, setToInitialConfig, setToSimpleConfig, configData.getInitialBundleStartLevel())) return configData.getBundles(); File outputFile = getConfigFile(manipulator); URI installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()).toURI(); saveConfiguration((BundleInfo[]) setToSimpleConfig.toArray(new BundleInfo[setToSimpleConfig.size()]), outputFile, installArea, backup); configData.setProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_CONFIGURL, outputFile.toURL().toExternalForm()); return orderingInitialConfig(setToInitialConfig); }
public BundleInfo[] save(Manipulator manipulator, boolean backup) throws IOException { List<BundleInfo> setToInitialConfig = new LinkedList<BundleInfo>(); List<BundleInfo> setToSimpleConfig = new LinkedList<BundleInfo>(); ConfigData configData = manipulator.getConfigData(); if (!divideBundleInfos(manipulator, setToInitialConfig, setToSimpleConfig, configData.getInitialBundleStartLevel())) return configData.getBundles(); File outputFile = getConfigFile(manipulator); URI installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()).toURI(); saveConfiguration(setToSimpleConfig.toArray(new BundleInfo[setToSimpleConfig.size()]), outputFile, installArea, backup); configData.setProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_CONFIGURL, outputFile.toURL().toExternalForm()); return orderingInitialConfig(setToInitialConfig); }
private static void setLauncher(Manipulator manipulator, IProfile profile, String launcherName) { //Get the launcherData before changing the name so we don't lose anything from the old launcher.ini LauncherData launcherData = manipulator.getLauncherData(); if (launcherName != null) ((Profile) profile).setProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, launcherName); else ((Profile) profile).removeProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME); launcherData.setLauncher(Util.getLauncherPath(profile)); } }
private static void setLauncher(Manipulator manipulator, IProfile profile, String launcherName) { //Get the launcherData before changing the name so we don't lose anything from the old launcher.ini LauncherData launcherData = manipulator.getLauncherData(); if (launcherName != null) ((Profile) profile).setProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, launcherName); else ((Profile) profile).removeProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME); launcherData.setLauncher(Util.getLauncherPath(profile)); } }
public Process launch(Manipulator manipulator, File cwd) throws IllegalArgumentException, IOException, FrameworkAdminRuntimeException { SimpleBundlesState.checkAvailability(fwAdmin); Log.log(LogService.LOG_DEBUG, this, "launch(Manipulator , File )", ""); //$NON-NLS-1$ //$NON-NLS-2$ LauncherData launcherData = manipulator.getLauncherData(); if (launcherData.getLauncher() == null) return launchInMemory(manipulator, cwd); return launchByLauncher(manipulator, cwd); }
public Process launch(Manipulator manipulator, File cwd) throws IllegalArgumentException, IOException, FrameworkAdminRuntimeException { SimpleBundlesState.checkAvailability(fwAdmin); Log.log(LogService.LOG_DEBUG, this, "launch(Manipulator , File )", ""); //$NON-NLS-1$ //$NON-NLS-2$ LauncherData launcherData = manipulator.getLauncherData(); if (launcherData.getLauncher() == null) return launchInMemory(manipulator, cwd); return launchByLauncher(manipulator, cwd); }