private void getPersistentDataLocation(List<String> lines, URI osgiInstallArea, URI configArea, LauncherData launcherData) { //TODO The setting of the -clean could only do properly once config.ini has been read if (launcherData.getFwPersistentDataLocation() == null) { launcherData.setFwPersistentDataLocation(URIUtil.toFile(configArea), ParserUtils.isArgumentSet(EquinoxConstants.OPTION_CLEAN, lines)); } }
private void getPersistentDataLocation(List lines, URI osgiInstallArea, URI configArea, LauncherData launcherData) { //TODO The setting of the -clean could only do properly once config.ini has been read if (launcherData.getFwPersistentDataLocation() == null) { launcherData.setFwPersistentDataLocation(URIUtil.toFile(configArea), ParserUtils.isArgumentSet(EquinoxConstants.OPTION_CLEAN, lines)); } }
throw new IllegalStateException(NLS.bind(Messages.exception_persistantLocationNotEqualConfigLocation, fwPersistentDataLocation.getAbsolutePath(), fwConfigLocation.getAbsolutePath())); } else launcherData.setFwPersistentDataLocation(fwConfigLocation, launcherData.isClean()); } else { if (fwPersistentDataLocation != null) { throw new IllegalStateException(Messages.exception_noLocations); fwConfigLocation = new File(home, "configuration"); //$NON-NLS-1$ launcherData.setFwPersistentDataLocation(fwConfigLocation, launcherData.isClean()); launcherData.setFwConfigLocation(fwConfigLocation);
throw new IllegalStateException(NLS.bind(Messages.exception_persistantLocationNotEqualConfigLocation, fwPersistentDataLocation.getAbsolutePath(), fwConfigLocation.getAbsolutePath())); } else launcherData.setFwPersistentDataLocation(fwConfigLocation, launcherData.isClean()); } else { if (fwPersistentDataLocation != null) { throw new IllegalStateException(Messages.exception_noLocations); fwConfigLocation = new File(home, "configuration"); //$NON-NLS-1$ launcherData.setFwPersistentDataLocation(fwConfigLocation, launcherData.isClean()); launcherData.setFwConfigLocation(fwConfigLocation);
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(); } }
private void initialize(boolean useFwPersistentData) { LauncherData launcherData = manipulator.getLauncherData(); ConfigData configData = manipulator.getConfigData(); BundleInfo[] bInfos = configData.getBundles(); if (!useFwPersistentData) { composeNewState(launcherData, configData, bInfos); return; } EquinoxManipulatorImpl.checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(launcherData); if (launcherData.isClean()) { composeNewState(launcherData, configData, bInfos); } else { if (manipulator.getLauncherData().getFwPersistentDataLocation() == null) { File installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), configData.getProperties(), launcherData); if (DEBUG) Log.log(LogService.LOG_DEBUG, this, "initialize(useFwPersistentDat)", "installArea=" + installArea); //$NON-NLS-1$ //$NON-NLS-2$ if (installArea == null) throw new IllegalStateException(Messages.exception_noInstallArea); File fwPersistentDataLocation = new File(installArea, "configuration"); //$NON-NLS-1$ manipulator.getLauncherData().setFwPersistentDataLocation(fwPersistentDataLocation, false); } if (!composeState(bInfos, null, manipulator.getLauncherData().getFwPersistentDataLocation())) composeNewState(launcherData, configData, bInfos); resolve(true); } }
private void initialize(boolean useFwPersistentData) { LauncherData launcherData = manipulator.getLauncherData(); ConfigData configData = manipulator.getConfigData(); BundleInfo[] bInfos = configData.getBundles(); if (!useFwPersistentData) { composeNewState(launcherData, configData, bInfos); return; } EquinoxManipulatorImpl.checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(launcherData); if (launcherData.isClean()) { composeNewState(launcherData, configData, bInfos); } else { if (manipulator.getLauncherData().getFwPersistentDataLocation() == null) { File installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), configData.getProperties(), launcherData); if (DEBUG) Log.log(LogService.LOG_DEBUG, this, "initialize(useFwPersistentDat)", "installArea=" + installArea); //$NON-NLS-1$ //$NON-NLS-2$ if (installArea == null) throw new IllegalStateException(Messages.exception_noInstallArea); File fwPersistentDataLocation = new File(installArea, "configuration"); //$NON-NLS-1$ manipulator.getLauncherData().setFwPersistentDataLocation(fwPersistentDataLocation, false); } if (!composeState(bInfos, null, manipulator.getLauncherData().getFwPersistentDataLocation())) composeNewState(launcherData, configData, bInfos); resolve(true); } }