@Override public String getProperty(String key) { return profile.getProperty(key); }
/** * Returns the install folder for the profile, or <code>null</code> * if no install folder is defined. */ public static File getInstallFolder(IProfile profile) { String folder = profile.getProperty(IProfile.PROP_INSTALL_FOLDER); return folder == null ? null : new File(folder); }
public static boolean isMacOSBundled(IProfile profile) { String environments = profile.getProperty(IProfile.PROP_ENVIRONMENTS); if (environments == null) return false; if (environments.indexOf(Constants.MACOSX_BUNDLED + "=true") != -1) //$NON-NLS-1$ return true; return false; }
/** * Returns the install folder for the profile, or <code>null</code> * if no install folder is defined. */ public static File getInstallFolder(IProfile profile) { String folder = profile.getProperty(IProfile.PROP_INSTALL_FOLDER); return folder == null ? null : new File(folder); }
public static File getLauncherConfigLocation(IProfile profile) { String launcherConfig = profile.getProperty(IProfile.PROP_LAUNCHER_CONFIGURATION); return launcherConfig == null ? null : new File(launcherConfig); }
private static List<String> getListProfileProperty(IProfile profile, String key) { List<String> listProperty = new ArrayList<String>(); String dropinRepositories = profile.getProperty(key); if (dropinRepositories != null) { StringTokenizer tokenizer = new StringTokenizer(dropinRepositories, PIPE); while (tokenizer.hasMoreTokens()) { listProperty.add(tokenizer.nextToken()); } } return listProperty; }
private static List<String> getListProfileProperty(IProfile profile, String key) { List<String> listProperty = new ArrayList<String>(); String dropinRepositories = profile.getProperty(key); if (dropinRepositories != null) { StringTokenizer tokenizer = new StringTokenizer(dropinRepositories, PIPE); while (tokenizer.hasMoreTokens()) { listProperty.add(tokenizer.nextToken()); } } return listProperty; }
private static Map<String, String> getEnvFromProfile(IProfile profile) { String environments = profile.getProperty(IProfile.PROP_ENVIRONMENTS); if (environments == null) return null; Map<String, String> result = new HashMap<String, String>(); for (StringTokenizer tokenizer = new StringTokenizer(environments, ","); tokenizer.hasMoreElements();) { //$NON-NLS-1$ String entry = tokenizer.nextToken(); int i = entry.indexOf('='); String key = entry.substring(0, i).trim(); String value = entry.substring(i + 1).trim(); result.put(key, value); } return result; }
public void setProfileProperty(String name, String value) { String currentValue = profile.getProperty(name); if (value == null && currentValue == null) return; operands.add(new PropertyOperand(name, currentValue, value)); }
@Override public void setProfileProperty(String name, String value) { String currentValue = profile.getProperty(name); if (value == null && currentValue == null) return; operands.add(new PropertyOperand(name, currentValue, value)); }
@Override protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) { parameters.put(PARM_INSTALL_FOLDER, profile.getProperty(IProfile.PROP_INSTALL_FOLDER)); return super.initializePhase(monitor, profile, parameters); }
public static File getConfigurationFolder(IProfile profile) { String config = profile.getProperty(IProfile.PROP_CONFIGURATION_FOLDER); if (config != null) return new File(config); return new File(getInstallFolder(profile), "configuration"); //$NON-NLS-1$ }
public static File getConfigurationFolder(IProfile profile) { String config = profile.getProperty(IProfile.PROP_CONFIGURATION_FOLDER); if (config != null) return new File(config); return new File(getInstallFolder(profile), "configuration"); //$NON-NLS-1$ }
protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) { parameters.put(PARM_INSTALL_FOLDER, profile.getProperty(IProfile.PROP_INSTALL_FOLDER)); return super.initializePhase(monitor, profile, parameters); }
public static URI getBundlePoolLocation(IProvisioningAgent agent, IProfile profile) { String path = profile.getProperty(IProfile.PROP_CACHE); if (path != null) return new File(path).toURI(); IAgentLocation location = getAgentLocation(agent); if (location == null) return null; return location.getDataArea(Activator.ID); }
public static URI getBundlePoolLocation(IProvisioningAgent agent, IProfile profile) { String path = profile.getProperty(IProfile.PROP_CACHE); if (path != null) return new File(path).toURI(); IAgentLocation location = getAgentLocation(agent); if (location == null) return null; return location.getDataArea(Activator.ID); }
public IStatus execute(Map<String, Object> parameters) { Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR); IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE); getMemento().put(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, profile.getProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME)); String launcherName = (String) parameters.get(ActionConstants.PARM_LAUNCHERNAME); setLauncher(manipulator, profile, launcherName); return Status.OK_STATUS; }
public IStatus execute(Map<String, Object> parameters) { Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR); IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE); getMemento().put(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, profile.getProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME)); String launcherName = (String) parameters.get(ActionConstants.PARM_LAUNCHERNAME); setLauncher(manipulator, profile, launcherName); return Status.OK_STATUS; }
public static File getLauncherPath(IProfile profile) { String name = profile.getProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME); if (name == null || name.length() == 0) name = "eclipse"; //$NON-NLS-1$ String relativePath = getLauncherRelativePath(name, getOSFromProfile(profile), getInstallFolder(profile)); return relativePath == null ? null : new File(getInstallFolder(profile), relativePath); }
public static File getLauncherPath(IProfile profile) { String name = profile.getProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME); if (name == null || name.length() == 0) name = "eclipse"; //$NON-NLS-1$ String launcherName = getLauncherName(name, (isMacOSBundled(profile) ? Constants.MACOSX_BUNDLED : getOSFromProfile(profile)), getInstallFolder(profile)); return launcherName == null ? null : new File(getInstallFolder(profile), launcherName); }