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 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(); } }
manipulator.getLauncherData().setHome(new File(home));
private boolean initializeFromConfigFiles() { FrameworkAdmin fwk = LazyManipulator.getFrameworkAdmin(); if (fwk == null) return false; Manipulator manipulator = fwk.getManipulator(); LauncherData launcherData = manipulator.getLauncherData(); launcherData.setFwConfigLocation(configurationFolder != null ? configurationFolder : new File(installFolder, "configuration/config.ini")); //$NON-NLS-1$ launcherData.setHome(installFolder); try { manipulator.load(); } catch (IllegalStateException e) { return false; } catch (FrameworkAdminRuntimeException e) { return false; } catch (IOException e) { return false; } profileId = manipulator.getConfigData().getProperty("eclipse.p2.profile"); //$NON-NLS-1$ p2DataAreaURI = manipulator.getConfigData().getProperty("eclipse.p2.data.area"); //$NON-NLS-1$ return true; }
private boolean initializeFromConfigFiles() { FrameworkAdmin fwk = LazyManipulator.getFrameworkAdmin(); if (fwk == null) return false; Manipulator manipulator = fwk.getManipulator(); LauncherData launcherData = manipulator.getLauncherData(); launcherData.setFwConfigLocation(configurationFolder != null ? configurationFolder : new File(installFolder, "configuration/config.ini")); //$NON-NLS-1$ launcherData.setHome(installFolder); try { manipulator.load(); } catch (IllegalStateException e) { return false; } catch (FrameworkAdminRuntimeException e) { return false; } catch (IOException e) { return false; } profileId = manipulator.getConfigData().getProperty("eclipse.p2.profile"); //$NON-NLS-1$ p2DataAreaURI = manipulator.getConfigData().getProperty("eclipse.p2.data.area"); //$NON-NLS-1$ return true; }
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 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$ }