public void setLauncher(File launcherFile) { if (previousLauncher == null && launcherFile != null && !launcherFile.equals(getLauncher())) previousLauncher = EquinoxManipulatorImpl.getLauncherConfigLocation(this); super.setLauncher(launcherFile); }
manipulator.getLauncherData().setLauncher(new File(home, "eclipse")); //$NON-NLS-1$ File installDirectory = new File(home);
@Override public void setLauncher(File launcherFile) { if (previousLauncher == null && launcherFile != null && !launcherFile.equals(getLauncher())) previousLauncher = EquinoxManipulatorImpl.getLauncherConfigLocation(this); super.setLauncher(launcherFile); }
private void loadDelegate() { if (manipulator != null) return; manipulator = getFrameworkManipulator(); if (manipulator == null) throw new IllegalStateException(Messages.failed_acquire_framework_manipulator); LauncherData launcherData = manipulator.getLauncherData(); launcherData.setFwConfigLocation(Util.getConfigurationFolder(profile)); launcherData.setLauncher(Util.getLauncherPath(profile)); launcherData.setLauncherConfigLocation(Util.getLauncherConfigLocation(profile)); launcherData.setOS(Util.getOSFromProfile(profile)); launcherData.setHome(Util.getInstallFolder(profile)); try { manipulator.load(); } catch (IllegalStateException e) { //if fwJar is not included, this exception will be thrown. But ignore it. LogHelper.log(Util.createError(Messages.error_loading_manipulator, e)); throw new IllegalStateException(Messages.error_loading_manipulator); } catch (FrameworkAdminRuntimeException e) { LogHelper.log(Util.createError(Messages.error_loading_manipulator, e)); } catch (IOException e) { LogHelper.log(Util.createError(Messages.error_loading_manipulator, e)); throw new IllegalStateException(Messages.error_loading_manipulator); } //TODO These values should be inserted by a configuration unit (bug 204124) manipulator.getConfigData().setProperty("eclipse.p2.profile", profile.getProfileId()); //$NON-NLS-1$ manipulator.getConfigData().setProperty("eclipse.p2.data.area", Util.getAgentLocation(agent).getRootLocation().toString()); //$NON-NLS-1$ }
private void initializeFrameworkManipulator(File config, File executable) { getFrameworkManipulator(); LauncherData launcherData = manipulator.getLauncherData(); launcherData.setFwPersistentDataLocation(config, true); launcherData.setLauncher(executable); if (executable == null) launcherData.setHome(config.getParentFile()); try { manipulator.load(); } catch (IllegalStateException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } catch (FrameworkAdminRuntimeException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } catch (IOException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } }
private void loadDelegate() { if (manipulator != null) return; manipulator = getFrameworkManipulator(); if (manipulator == null) throw new IllegalStateException(Messages.failed_acquire_framework_manipulator); LauncherData launcherData = manipulator.getLauncherData(); launcherData.setFwConfigLocation(Util.getConfigurationFolder(profile)); launcherData.setLauncher(Util.getLauncherPath(profile)); launcherData.setLauncherConfigLocation(Util.getLauncherConfigLocation(profile)); launcherData.setOS(Util.isMacOSBundled(profile) ? org.eclipse.equinox.p2.core.spi.Constants.MACOSX_BUNDLED : Util.getOSFromProfile(profile)); launcherData.setHome(Util.getInstallFolder(profile)); try { manipulator.load(); } catch (IllegalStateException e) { //if fwJar is not included, this exception will be thrown. But ignore it. LogHelper.log(Util.createError(Messages.error_loading_manipulator, e)); throw new IllegalStateException(Messages.error_loading_manipulator); } catch (FrameworkAdminRuntimeException e) { LogHelper.log(Util.createError(Messages.error_loading_manipulator, e)); } catch (IOException e) { LogHelper.log(Util.createError(Messages.error_loading_manipulator, e)); throw new IllegalStateException(Messages.error_loading_manipulator); } //TODO These values should be inserted by a configuration unit (bug 204124) manipulator.getConfigData().setProperty("eclipse.p2.profile", profile.getProfileId()); //$NON-NLS-1$ manipulator.getConfigData().setProperty("eclipse.p2.data.area", Util.getAgentLocation(agent).getRootLocation().toString()); //$NON-NLS-1$ }
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 void initializeFrameworkManipulator(File config, File executable) { getFrameworkManipulator(); LauncherData launcherData = manipulator.getLauncherData(); launcherData.setFwPersistentDataLocation(config, true); launcherData.setLauncher(executable); if (executable == null) launcherData.setHome(config.getParentFile()); try { manipulator.load(); } catch (IllegalStateException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } catch (FrameworkAdminRuntimeException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } catch (IOException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } }
private void initializeFrameworkManipulator(File config, File executable) { getFrameworkManipulator(); LauncherData launcherData = manipulator.getLauncherData(); launcherData.setFwPersistentDataLocation(config, true); launcherData.setLauncher(executable); if (executable == null) launcherData.setHome(config.getParentFile()); try { manipulator.load(); } catch (IllegalStateException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } catch (FrameworkAdminRuntimeException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } catch (IOException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } }
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)); } }