resolved = Platform.resolve(url); String AJDELocation = resolved.toExternalForm(); ajScript.printProperty("aspectj.plugin.home", AJDELocation);
URL resolved = Platform.resolve(toolsBundle.getEntry("/")); String ajdeLocation = resolved.toExternalForm(); resolved = Platform.resolve(weaverBundle.getEntry("/")); String weaverLocation = resolved.toExternalForm(); ajScript.printProperty("aspectj.plugin.home", ajdeLocation); ajScript.printProperty("aspectj.weaver.home", weaverLocation);
	public void print(AntScript script) {		if(script instanceof AJAntScript) {			AJAntScript ajScript = (AJAntScript)script;			Bundle bundle = Platform.getBundle(AspectJPlugin.TOOLS_PLUGIN_ID);			URL url = bundle.getEntry("/"); //$NON-NLS-1$			URL resolved;			try {				resolved = Platform.resolve(url);				String AJDELocation = resolved.toExternalForm();				ajScript.printProperty("aspectj.plugin.home", AJDELocation); //$NON-NLS-1$			} catch (IOException e) {			}									ajScript.printTab();			ajScript.println("<taskdef resource=\"org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties\">"); //$NON-NLS-1$			ajScript.printStartTag("classpath"); //$NON-NLS-1$			ajScript.print("<pathelement"); //$NON-NLS-1$			ajScript.printAttribute("path", "${aspectj.plugin.home}/ajde.jar", true); //$NON-NLS-1$ //$NON-NLS-2$			ajScript.println("/>"); //$NON-NLS-1$			ajScript.printEndTag("classpath"); //$NON-NLS-1$			ajScript.printEndTag("taskdef"); //$NON-NLS-1$						ajScript.printTab();			ajScript.print("<iajc"); //$NON-NLS-1$			ajScript.printAttribute("destDir", destdir, false); //$NON-NLS-1$			ajScript.printAttribute("failonerror", failonerror, false); //$NON-NLS-1$			ajScript.printAttribute("verbose", verbose, false); //$NON-NLS-1$			ajScript.printAttribute("fork", "true", false); //$NON-NLS-1$ //$NON-NLS-2$			ajScript.printAttribute("debug", debug, false); //$NON-NLS-1$			ajScript.printAttribute("bootclasspath", bootclasspath, false); //$NON-NLS-1$			ajScript.printAttribute("source", source, false); //$NON-NLS-1$			ajScript.printAttribute("target", target, false); //$NON-NLS-1$			ajScript.println(">"); //$NON-NLS-1$				ajScript.indent++;				ajScript.printStartTag("forkclasspath"); //$NON-NLS-1$			ajScript.indent++;			for (Iterator iter = classpath.iterator(); iter.hasNext();) {				String path = (String) iter.next();				ajScript.printTab();				ajScript.print("<pathelement"); //$NON-NLS-1$				ajScript.printAttribute("path", path, false); //$NON-NLS-1$				ajScript.print("/>"); //$NON-NLS-1$				ajScript.println();			}			// Add ajde.jar to this classpath too because we have forked			ajScript.print("<pathelement"); //$NON-NLS-1$			ajScript.printAttribute("path", "${aspectj.plugin.home}/ajde.jar", true); //$NON-NLS-1$ //$NON-NLS-2$			ajScript.println("/>"); //$NON-NLS-1$						ajScript.indent--;			ajScript.printEndTag("forkclasspath"); //$NON-NLS-1$				ajScript.printStartTag("srcdir"); //$NON-NLS-1$			ajScript.indent++;			for (int i = 0; i < srcdir.length; i++) {				ajScript.printTab();				ajScript.print("<pathelement"); //$NON-NLS-1$				ajScript.printAttribute("path", srcdir[i], false); //$NON-NLS-1$				ajScript.println("/>"); //$NON-NLS-1$			}			ajScript.indent--;			ajScript.printEndTag("srcdir"); //$NON-NLS-1$						ajScript.printEndTag("iajc"); //$NON-NLS-1$			ajScript.indent--;		}	}