1 11 12 package org.eclipse.ant.internal.ui; 13 14 import org.eclipse.ant.core.IAntPropertyValueProvider; 15 import org.eclipse.core.runtime.IPath; 16 import org.eclipse.jdt.core.JavaCore; 17 18 29 public class AntPropertyValueProvider implements IAntPropertyValueProvider { 30 37 public String getAntPropertyValue(String propertyName) { 38 String value = null; 39 if ("eclipse.target".equals(propertyName)) { try { 41 IPath home= JavaCore.getClasspathVariable("ECLIPSE_HOME"); if (home != null) { 43 value = home.toFile().getAbsolutePath(); 44 if (value.endsWith("/")) { value = value.substring(0, value.length() - 1); 46 } 47 } 48 } catch (Exception e) { 49 AntUIPlugin.log(e); 50 } 51 } 52 return value; 53 } 54 } 55 | Popular Tags |