/** * Returns the normalized string form of the given config spec. This is useful for putting * in IU ids etc. Note that the result is not intended to be machine readable (i.e., parseConfigSpec * may not work on the result). * @param configSpec the config spec to format * @return the readable format of the given config spec */ protected String createIdString(String configSpec) { String[] config = parseConfigSpec(configSpec); return config[0] + '.' + config[1] + '.' + config[2]; }
/** * Returns the normalized string form of the given config spec. This is useful for putting * in IU ids etc. Note that the result is not intended to be machine readable (i.e., parseConfigSpec * may not work on the result). * @param configSpec the config spec to format * @return the readable format of the given config spec */ protected String createIdString(String configSpec) { String[] config = parseConfigSpec(configSpec); return config[0] + '.' + config[1] + '.' + config[2]; }
/** * Returns the normalized string form of the given config spec. This is useful for putting * in IU ids etc. Note that the result is not intended to be machine readable (i.e., parseConfigSpec * may not work on the result). * @param configSpec the config spec to format * @return the readable format of the given config spec */ protected String createIdString(String configSpec) { String[] config = parseConfigSpec(configSpec); return config[0] + '.' + config[1] + '.' + config[2]; }
/** * Returns the normalized string form of the given config spec. This is useful for putting * in IU ids etc. Note that the result is not intended to be machine readable (i.e., parseConfigSpec * may not work on the result). * @param configSpec the config spec to format * @return the readable format of the given config spec */ protected String createIdString(String configSpec) { String[] config = parseConfigSpec(configSpec); return config[0] + '.' + config[1] + '.' + config[2]; }
protected boolean matchConfig(String configSpec, boolean includeDefault) { String adviceConfigSpec = getConfigSpec(); if (adviceConfigSpec == null) return includeDefault; String[] full = AbstractPublisherAction.parseConfigSpec(configSpec); String[] partial = AbstractPublisherAction.parseConfigSpec(adviceConfigSpec); for (int i = 0; i < partial.length; i++) { String string = partial[i]; if (string != null && !string.equals(full[i])) return false; } return true; }
protected boolean matchConfig(String configSpec, boolean includeDefault) { String adviceConfigSpec = getConfigSpec(); if (adviceConfigSpec == null) return includeDefault; String[] full = AbstractPublisherAction.parseConfigSpec(configSpec); String[] partial = AbstractPublisherAction.parseConfigSpec(adviceConfigSpec); for (int i = 0; i < partial.length; i++) { String string = partial[i]; if (string != null && !string.equals(full[i])) return false; } return true; }
protected String createLDAPString(String configSpec) { String[] config = parseConfigSpec(configSpec); if (config[0] != null || config[1] != null || config[2] != null) { String filterWs = config[0] != null && !CONFIG_ANY.equalsIgnoreCase(config[0]) ? "(osgi.ws=" + config[0] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ String filterOs = config[1] != null && !CONFIG_ANY.equalsIgnoreCase(config[1]) ? "(osgi.os=" + config[1] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ String filterArch = config[2] != null && !CONFIG_ANY.equalsIgnoreCase(config[2]) ? "(osgi.arch=" + config[2] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if (filterWs.length() == 0 && filterOs.length() == 0 && filterArch.length() == 0) return null; return "(& " + filterWs + filterOs + filterArch + ")"; //$NON-NLS-1$ //$NON-NLS-2$ } return null; }
protected String createLDAPString(String configSpec) { String[] config = parseConfigSpec(configSpec); if (config[0] != null || config[1] != null || config[2] != null) { String filterWs = config[0] != null && !CONFIG_ANY.equalsIgnoreCase(config[0]) ? "(osgi.ws=" + config[0] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ String filterOs = config[1] != null && !CONFIG_ANY.equalsIgnoreCase(config[1]) ? "(osgi.os=" + config[1] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ String filterArch = config[2] != null && !CONFIG_ANY.equalsIgnoreCase(config[2]) ? "(osgi.arch=" + config[2] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if (filterWs.length() == 0 && filterOs.length() == 0 && filterArch.length() == 0) return null; return "(& " + filterWs + filterOs + filterArch + ")"; //$NON-NLS-1$ //$NON-NLS-2$ } return null; }
protected String createLDAPString(String configSpec) { String[] config = parseConfigSpec(configSpec); if (config[0] != null || config[1] != null || config[2] != null) { String filterWs = config[0] != null && !CONFIG_ANY.equalsIgnoreCase(config[0]) ? "(osgi.ws=" + config[0] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ String filterOs = config[1] != null && !CONFIG_ANY.equalsIgnoreCase(config[1]) ? "(osgi.os=" + config[1] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ String filterArch = config[2] != null && !CONFIG_ANY.equalsIgnoreCase(config[2]) ? "(osgi.arch=" + config[2] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if (filterWs.length() == 0 && filterOs.length() == 0 && filterArch.length() == 0) return null; return "(& " + filterWs + filterOs + filterArch + ")"; //$NON-NLS-1$ //$NON-NLS-2$ } return null; }
protected String createLDAPString(String configSpec) { String[] config = parseConfigSpec(configSpec); if (config[0] != null || config[1] != null || config[2] != null) { String filterWs = config[0] != null && !CONFIG_ANY.equalsIgnoreCase(config[0]) ? "(osgi.ws=" + config[0] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ String filterOs = config[1] != null && !CONFIG_ANY.equalsIgnoreCase(config[1]) ? "(osgi.os=" + config[1] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ String filterArch = config[2] != null && !CONFIG_ANY.equalsIgnoreCase(config[2]) ? "(osgi.arch=" + config[2] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if (filterWs.length() == 0 && filterOs.length() == 0 && filterArch.length() == 0) return null; return "(& " + filterWs + filterOs + filterArch + ")"; //$NON-NLS-1$ //$NON-NLS-2$ } return null; }
protected boolean filterMatches(IMatchExpression<IInstallableUnit> filter, String configSpec) { if (filter == null) return true; String[] config = parseConfigSpec(configSpec); return filter.isMatch(InstallableUnit.contextIU(config[0], config[1], config[2])); }
protected boolean filterMatches(IMatchExpression<IInstallableUnit> filter, String configSpec) { if (filter == null) return true; String[] config = parseConfigSpec(configSpec); return filter.isMatch(InstallableUnit.contextIU(config[0], config[1], config[2])); }
protected ExecutablesDescriptor computeExecutables(String configSpec) { String os = AbstractPublisherAction.parseConfigSpec(configSpec)[1]; // TODO here we should not assume that the executable is called "eclipse" return ExecutablesDescriptor.createDescriptor(os, "eclipse", computeExecutableLocation(configSpec)); //$NON-NLS-1$ }
protected boolean filterMatches(IMatchExpression<IInstallableUnit> filter, String configSpec) { if (filter == null) return true; String[] config = parseConfigSpec(configSpec); return filter.isMatch(InstallableUnit.contextIU(config[0], config[1], config[2])); }
protected ExecutablesDescriptor computeExecutables(String configSpec) { String os = AbstractPublisherAction.parseConfigSpec(configSpec)[1]; // TODO here we should not assume that the executable is called "eclipse" return ExecutablesDescriptor.createDescriptor(os, "eclipse", computeExecutableLocation(configSpec)); //$NON-NLS-1$ }
protected ExecutablesDescriptor computeExecutables(String configSpec) { // See if we know about an executables feature then use it as the source ExecutablesDescriptor result = ExecutablesDescriptor.createExecutablesFromFeature(location, configSpec); if (result != null) return result; // otherwise, assume that we are running against an Eclipse install and do the default thing String os = AbstractPublisherAction.parseConfigSpec(configSpec)[1]; return ExecutablesDescriptor.createDescriptor(os, executableName, location); } }
protected ExecutablesDescriptor computeExecutables(String configSpec) { // See if we know about an executables feature then use it as the source ExecutablesDescriptor result = ExecutablesDescriptor.createExecutablesFromFeature(location, configSpec); if (result != null) return result; // otherwise, assume that we are running against an Eclipse install and do the default thing String os = AbstractPublisherAction.parseConfigSpec(configSpec)[1]; return ExecutablesDescriptor.createDescriptor(os, executableName, location); } }
protected ExecutablesDescriptor computeExecutables(String configSpec) { // See if we know about an executables feature then use it as the source ExecutablesDescriptor result = ExecutablesDescriptor.createExecutablesFromFeature(location, configSpec); if (result != null) return result; // otherwise, assume that we are running against an Eclipse install and do the default thing String os = AbstractPublisherAction.parseConfigSpec(configSpec)[1]; return ExecutablesDescriptor.createDescriptor(os, executableName, location); } }
protected boolean filterMatches(IMatchExpression<IInstallableUnit> filter, String configSpec) { if (filter == null) return true; String[] config = parseConfigSpec(configSpec); return filter.isMatch(InstallableUnit.contextIU(config[0], config[1], config[2])); }
protected ExecutablesDescriptor computeExecutables(String configSpec) { String os = AbstractPublisherAction.parseConfigSpec(configSpec)[1]; // TODO here we should not assume that the executable is called "eclipse" return ExecutablesDescriptor.createDescriptor(os, "eclipse", computeExecutableLocation(configSpec)); //$NON-NLS-1$ }