org.apache.tools.ant.PropertyHelper Java Examples
The following examples show how to use
org.apache.tools.ant.PropertyHelper.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OboProperty.java From owltools with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override public void execute() throws BuildException { super.execute(); PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(getProject()); Object asserted = propertyHelper.getProperty("oborelease.asserted"); if(asserted != null && asserted.toString().equals("yes")){ addProperty("oborelease.asserted.option", "--asserted"); }else{ addProperty("oborelease.asserted.option", ""); } Object simple = propertyHelper.getProperty("oborelease.simple"); if(simple != null && "yes".equals(simple.toString())){ addProperty("oborelease.simple.option", "--simple"); }else{ addProperty("oborelease.simple.option", ""); } /*Object oboIncludes = propertyHelper.getProperty("oborelease.oboincludes"); if(oboIncludes != null && oboIncludes.toString().trim().length()>0){ addProperty("oborelease.oboincludes.option", "-oboincludes " + oboIncludes); }else{ addProperty("oborelease.oboincludes.option", "" + oboIncludes); }*/ }
Example #2
Source File: AntRunner.java From spoofax with Apache License 2.0 | 5 votes |
public AntRunner(IResourceService resourceService, FileObject antFile, FileObject baseDir, Map<String, String> properties, @SuppressWarnings("unused") @Nullable URL[] classpaths, @Nullable BuildListener listener) { this.antProject = new Project(); final File localAntFile = resourceService.localFile(antFile); final File localBaseDir = resourceService.localPath(baseDir); // TODO: use classpaths antProject.setProperty(MagicNames.ANT_FILE, localAntFile.getPath()); antProject.setBaseDir(localBaseDir); antProject.init(); if(listener != null) { antProject.addBuildListener(listener); } final PropertyHelper propHelper = PropertyHelper.getPropertyHelper(antProject); antProject.addReference(MagicNames.REFID_PROPERTY_HELPER, propHelper); for(Entry<String, String> property : properties.entrySet()) { propHelper.setUserProperty(property.getKey(), property.getValue()); } final ProjectHelper projectHelper = ProjectHelper.getProjectHelper(); antProject.addReference(MagicNames.REFID_PROJECT_HELPER, projectHelper); projectHelper.parse(antProject, localAntFile); }
Example #3
Source File: DefaultAntBuilder.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
@SuppressWarnings("deprecation") private void doSetProperty(String property, Object newValue) { PropertyHelper.getPropertyHelper(getProject()).setUserProperty(null, property, newValue); }
Example #4
Source File: DefaultAntBuilder.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
@SuppressWarnings("deprecation") private void doSetProperty(String property, Object newValue) { PropertyHelper.getPropertyHelper(getProject()).setUserProperty(null, property, newValue); }
Example #5
Source File: DefaultAntBuilder.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
@SuppressWarnings("deprecation") private void doSetProperty(String property, Object newValue) { PropertyHelper.getPropertyHelper(getProject()).setUserProperty(null, property, newValue); }
Example #6
Source File: DefaultAntBuilder.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
@SuppressWarnings("deprecation") private void doSetProperty(String property, Object newValue) { PropertyHelper.getPropertyHelper(getProject()).setUserProperty(null, property, newValue); }
Example #7
Source File: GetOntologyId.java From owltools with BSD 3-Clause "New" or "Revised" License | 4 votes |
private void addProperty(String n, Object v) { PropertyHelper ph = PropertyHelper.getPropertyHelper(getProject()); ph.setNewProperty(n, v); }