Location localConfig = Activator.getDefault().getConfigurationLocation();
Activator activator = Activator.getDefault(); if (activator == null) throw new IOException(CommonMessages.activator_not_available); Location localConfig = activator.getConfigurationLocation();
	protected URL resolve() throws IOException {		String spec = url.getFile().trim();		if (spec.startsWith("/")) //$NON-NLS-1$			spec = spec.substring(1);		if (!spec.startsWith(CONFIG))			throw new IOException(NLS.bind(CommonMessages.url_badVariant, url.toString()));		String path = spec.substring(CONFIG.length() + 1);		// resolution takes parent configuration into account (if it exists)		Location localConfig = Activator.getDefault().getConfigurationLocation();		Location parentConfig = localConfig.getParentLocation();		// assume we will find the file locally		URL localURL = new URL(localConfig.getURL(), path);		if (!FILE_PROTOCOL.equals(localURL.getProtocol()) || parentConfig == null)			// we only support cascaded file: URLs			return localURL;		File localFile = new File(localURL.getPath());		if (localFile.exists())			// file exists in local configuration			return localURL;		// try to find in the parent configuration		URL parentURL = new URL(parentConfig.getURL(), path);		if (FILE_PROTOCOL.equals(parentURL.getProtocol())) {			// we only support cascaded file: URLs						File parentFile = new File(parentURL.getPath());			if (parentFile.exists()) {				// parent has the location				parentConfiguration = true;				return parentURL;			}		}		return localURL;	}