public String getPatch() { String patch = dom.getAttributeValue("patch"); if (patch == null) { return "false"; } else { return patch; } } }
public Object value (Element node) { return node.getAttributeValue (name); } }
@Override public String getId() { // this is Maven specific, used to match credentials and mirrors return dom.getAttributeValue("id"); }
public String getMatch() { String match = dom.getAttributeValue("match"); if (match == null) { return "compatible"; } else { return match; } }
public String getId() { // this is Maven specific, used to match credentials and mirrors return dom.getAttributeValue( "id" ); }
@Override public boolean includeSource() { switch (includeSourceMode) { case ignore: return false; case force: return true; default: return Boolean.parseBoolean(dom.getAttributeValue("includeSource")); } } }
@Override public boolean includeSource() { switch (includeSourceMode) { case ignore: return false; case force: return true; default: return Boolean.parseBoolean(dom.getAttributeValue("includeSource")); } } }
@Override public URI getLocation() { try { return new URI(dom.getAttributeValue("location")); } catch (URISyntaxException e) { // this should be checked earlier (but is currently ugly to do) throw new RuntimeException(e); } }
/** * @deprecated The installation format (packed/unpacked) shall be specified through the bundle's * Eclipse-BundleShape manifest header. The feature.xml's unpack attribute may not * be supported in a future version of Tycho. */ @Deprecated public boolean isUnpack() { return Boolean.parseBoolean(dom.getAttributeValue("unpack")); }
@Override public URI getLocation() { try { return new URI(dom.getAttributeValue("location")); } catch (URISyntaxException e) { // this should be checked earlier (but is currently ugly to do) throw new RuntimeException(e); } }
@Override public IncludeMode getIncludeMode() { String attributeValue = dom.getAttributeValue("includeMode"); if ("slicer".equals(attributeValue)) { return IncludeMode.SLICER; } else if ("planner".equals(attributeValue) || attributeValue == null) { return IncludeMode.PLANNER; } throw new TargetDefinitionSyntaxException( "Invalid value for attribute 'includeMode': " + attributeValue + ""); }
@Override public IncludeMode getIncludeMode() { String attributeValue = dom.getAttributeValue("includeMode"); if ("slicer".equals(attributeValue)) { return IncludeMode.SLICER; } else if ("planner".equals(attributeValue) || attributeValue == null) { return IncludeMode.PLANNER; } throw new TargetDefinitionSyntaxException("Invalid value for attribute 'includeMode': " + attributeValue + ""); }
public String getDescriptionURL() { Element descElement = dom.getChild("description"); if (descElement != null) { return descElement.getAttributeValue("url"); } return null; }
public String getLicenseURL() { Element licenseElement = dom.getChild("license"); if (licenseElement != null) { return licenseElement.getAttributeValue("url"); } return null; }
public List<Element> getSelfCapabilities() { List<Element> selfCapabilities = new ArrayList<>(1); List<Element> providedCapabilities = getProvidedCapabilites(); if (providedCapabilities == null) return selfCapabilities; for (Element capability : providedCapabilities) { if (getId().equals(capability.getAttributeValue(NAME)) && P2_IU_NAMESPACE.equals(capability.getAttributeValue(NAMESPACE))) selfCapabilities.add(capability); } return selfCapabilities; }
public boolean getWindowsUseIco() { Element winDom = dom.getChild("win"); if (winDom == null) { return false; } boolean useIco = Boolean.parseBoolean(winDom.getAttributeValue("useIco")); return useIco; }
public Map<String, String> getLinuxIcon() { Element linuxDom = dom.getChild("linux"); if (linuxDom == null) { return Collections.emptyMap(); } Map<String, String> linux = new HashMap<>(); putIfNotNull(linux, ICON_LINUX, linuxDom.getAttributeValue(ICON_LINUX)); return Collections.unmodifiableMap(linux); }
public Map<String, String> getLinuxIcon() { Element linuxDom = dom.getChild( "linux" ); if ( linuxDom == null ) { return Collections.emptyMap(); } Map<String, String> linux = new HashMap<String, String>(); putIfNotNull( linux, ICON_LINUX, linuxDom.getAttributeValue( ICON_LINUX ) ); return Collections.unmodifiableMap( linux ); }
public String getMacIcon() { Element domLauncher = dom.getChild("launcher"); if (domLauncher == null) { return null; } Element linux = domLauncher.getChild("macosx"); if (linux == null) { return null; } return linux.getAttributeValue("icon"); }
private ConfigIni(Element configIniElement) { useDefault = "default".equals(configIniElement.getAttributeValue("use")); linuxConfigIni = getOsSpecificConfigIni(configIniElement, "linux"); macosxConfigIni = getOsSpecificConfigIni(configIniElement, "macosx"); solarisConfigIni = getOsSpecificConfigIni(configIniElement, "solaris"); win32ConfigIni = getOsSpecificConfigIni(configIniElement, "win32"); }