protected String getIUDescription(IInstallableUnit iu) { // Get the iu description in the default locale String description = iu.getProperty(IInstallableUnit.PROP_DESCRIPTION, null); if (description == null) description = ""; //$NON-NLS-1$ return description; }
private static boolean hasHigherFidelity(IInstallableUnit iu, IInstallableUnit currentIU) { if (Boolean.parseBoolean(currentIU.getProperty(IInstallableUnit.PROP_PARTIAL_IU)) && !Boolean.parseBoolean(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU))) return true; return false; }
public InstalledIUElement(Object parent, String profileId, IInstallableUnit iu) { super(parent); this.profileId = profileId; this.iu = iu; this.isPatch = iu == null ? false : Boolean.valueOf(iu.getProperty(InstallableUnitDescription.PROP_TYPE_PATCH)); }
private boolean isPureIU(IInstallableUnit iu) { if ("true".equals(iu.getProperty(AuthoredIUAction.IU_TYPE))) return true; return false; }
public boolean isGroup(IInstallableUnit iu) { String isGroup = iu==null ? null : iu.getProperty("org.eclipse.equinox.p2.type.group"); return Boolean.valueOf(isGroup); } }
/** * Test if the {@link IInstallableUnit} is a category. * @param iu the element being tested. * @return <tt>true</tt> if the parameter is a category. */ public static boolean isCategory(IInstallableUnit iu) { String value = iu.getProperty(PROP_TYPE_CATEGORY); if (value != null && (value.equals(Boolean.TRUE.toString()))) return true; return false; }
/** * Test if the {@link IInstallableUnit} is a group. * @param iu the element being tested. * @return <tt>true</tt> if the parameter is a group. */ public static boolean isGroup(IInstallableUnit iu) { String value = iu.getProperty(PROP_TYPE_GROUP); if (value != null && (value.equals(Boolean.TRUE.toString()))) return true; return false; }
/** * Test if the {@link IInstallableUnit} is a patch. * @param iu the element being tested. * @return <tt>true</tt> if the parameter is a patch. */ public static boolean isPatch(IInstallableUnit iu) { String value = iu.getProperty(PROP_TYPE_PATCH); if (value != null && (value.equals(Boolean.TRUE.toString()))) return true; return false; }
public static Set<String> getIncludedUIs(IInstallableUnit iu) { Set<String> includedIUs = new LinkedHashSet<>(); String prop = iu.getProperty(INCLUDED_IUS); if (prop != null) { StringTokenizer st = new StringTokenizer(prop, ","); while (st.hasMoreTokens()) { includedIUs.add(st.nextToken()); } } return includedIUs; } }
private String getIUString(IInstallableUnit iu) { if (iu == null) return Messages.PlanAnalyzer_Items; // Get the iu name in the default locale String name = iu.getProperty(IInstallableUnit.PROP_NAME, null); if (name != null) return name; return iu.getId(); }
public Object getManagedProperty(Object client, String memberName, Object key) { if (indexProvider != null) return indexProvider.getManagedProperty(client, memberName, key); if (client instanceof IInstallableUnit && memberName.equals(InstallableUnit.MEMBER_TRANSLATED_PROPERTIES)) { IInstallableUnit iu = (IInstallableUnit) client; return key instanceof KeyWithLocale ? iu.getProperty(((KeyWithLocale) key).getKey()) : iu.getProperty(key.toString()); } return null; }
void updateDetailsArea() { java.util.List<IInstallableUnit> selected = installedIUGroup.getSelectedIUs(); if (selected.size() == 1) { String description = selected.get(0).getProperty(IInstallableUnit.PROP_DESCRIPTION, null); if (description != null) { detailsArea.setText(description); return; } } detailsArea.setText(""); //$NON-NLS-1$ }
private String getMergeKey(IInstallableUnit iu) { String mergeKey = iu.getProperty(IInstallableUnit.PROP_NAME, null); if (mergeKey == null || mergeKey.length() == 0) { mergeKey = iu.getId(); } return mergeKey; }
public String getName() { if (iu != null) { return iu.getProperty(IInstallableUnit.PROP_NAME, null); } return pe.getLabel(null); }
private String getIUString(IInstallableUnit iu) { if (iu == null) return Messages.PlanAnalyzer_Items; // Get the iu name in the default locale String name = iu.getProperty(IInstallableUnit.PROP_NAME, null); if (name != null) return name; return iu.getId(); }
private static String getIUString(IInstallableUnit iu) { if (iu == null) return Messages.PlanAnalyzer_Items; // Get the iu name in the default locale String name = iu.getProperty(IInstallableUnit.PROP_NAME, null); if (name != null) return name; return iu.getId(); }
public static org.eclipse.tycho.ArtifactKey toTychoArtifact(IInstallableUnit unit) { // TODO 428889 unit test & add more cases if (Boolean.valueOf(unit.getProperty(InstallableUnitDescription.PROP_TYPE_GROUP))) { // TODO 428889 check suffix String id = unit.getId(); return new DefaultArtifactKey(ArtifactType.TYPE_ECLIPSE_FEATURE, id.substring(0, id.length() - ".feature.group".length()), unit.getVersion().toString()); } throw new IllegalArgumentException(unit.toString()); }
public static IStatus getInstallHandlerStatus(IProvisioningPlan plan) { IQueryResult<IInstallableUnit> result = plan.getAdditions().query(QueryUtil.createIUAnyQuery(), null); for (Iterator<IInstallableUnit> iterator = result.iterator(); iterator.hasNext();) { IInstallableUnit iu = iterator.next(); if (iu != null && iu.getProperty(ECLIPSE_INSTALL_HANDLER_PROP) != null) return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, NLS.bind(ProvUIMessages.UpdateManagerCompatibility_ItemRequiresUpdateManager, iu.getId())); } return Status.OK_STATUS; }
private void addExternalMavenArtifact(DefaultP2ResolutionResult result, IArtifactFacade mavenArtifact, IInstallableUnit iu) { String id = iu.getId(); String version = iu.getVersion().toString(); String mavenClassifier = iu.getProperty(RepositoryLayoutHelper.PROP_CLASSIFIER); File location = mavenArtifact.getLocation(); addMavenArtifact(result, iu, id, version, mavenClassifier, location); }
public String getText(Object element) { if (element instanceof RemedyElementCategory) return ((RemedyElementCategory) element).getName(); if (element instanceof RemedyIUDetail) { RemedyIUDetail iu = (RemedyIUDetail) element; String label = iu.getIu().getProperty(IInstallableUnit.PROP_NAME, null); if (label == null) label = iu.getIu().getId(); return label; } return super.getText(element); }