[52408] First pass at contributors via containers/plugins.
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeanDecorator.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeanDecorator.java
index 7441d38..8c4904a 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeanDecorator.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/BeanDecorator.java
@@ -11,13 +11,13 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BeanDecorator.java,v $
- *  $Revision: 1.4 $  $Date: 2004/03/10 00:40:28 $ 
+ *  $Revision: 1.5 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 
 import org.eclipse.jem.java.JavaClass;
 import java.net.URL;
-import java.util.Map;
+
 /**
  * <!-- begin-user-doc -->
  * A representation of the model object '<em><b>Bean Decorator</b></em>'.
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoAdapterFactory.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoAdapterFactory.java
index 4da967e..ac60726 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoAdapterFactory.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoAdapterFactory.java
@@ -11,16 +11,18 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BeaninfoAdapterFactory.java,v $
- *  $Revision: 1.1 $  $Date: 2003/10/27 17:17:59 $ 
+ *  $Revision: 1.2 $  $Date: 2004/03/22 23:49:10 $ 
  */
 import java.lang.ref.ReferenceQueue;
 import java.lang.ref.WeakReference;
 import java.util.*;
 
+import org.eclipse.core.resources.IProject;
 import org.eclipse.emf.common.notify.Adapter;
 import org.eclipse.emf.common.notify.Notifier;
 import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
 
+import org.eclipse.jem.internal.beaninfo.core.*;
 import org.eclipse.jem.internal.java.beaninfo.IIntrospectionAdapter;
 import org.eclipse.jem.internal.proxy.core.ProxyFactoryRegistry;
 /**
@@ -83,6 +85,10 @@
 		markAllStale(); // At this point in time we need to mark them all stale because we are recycling. MarkAllStale also closes the registry.
 		return getRegistry();
 	}
+	
+	public IProject getProject() {
+		return fInfoSupplier.getProject();
+	}
 
 	/**
 	 * Close ALL adapters. Also remove the adapters so that they
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoClassAdapter.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoClassAdapter.java
index 5f3d951..b7472a5 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoClassAdapter.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoClassAdapter.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BeaninfoClassAdapter.java,v $
- *  $Revision: 1.6 $  $Date: 2004/02/20 00:43:53 $ 
+ *  $Revision: 1.7 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 import java.io.FileNotFoundException;
@@ -36,6 +36,7 @@
 import org.eclipse.emf.ecore.xmi.XMIResource;
 
 import org.eclipse.jem.internal.beaninfo.*;
+import org.eclipse.jem.internal.beaninfo.core.*;
 import org.eclipse.jem.internal.proxy.core.*;
 
 import com.ibm.etools.emf.event.EventFactory;
@@ -508,61 +509,67 @@
 		JavaClass jc = getJavaClass();
 		Resource mergeIntoResource = jc.eResource();
 		ResourceSet rset = mergeIntoResource.getResourceSet();
+		String className = getJavaClass().getName();
 		if (!alreadyRetrievedRoot && (rootOnly || jc.getSupertype() == null)) {
 			// It is a root class. Need to merge in root stuff.
-			BeaninfoPlugin.OverridePathSearch searcher =
-				BeaninfoPlugin.getPlugin().getOverrideSearch(ROOT);
-			applyExtensionDocTo(rset, jc, ROOT_OVERRIDE, searcher);
+			applyExtensionDocTo(rset, jc, ROOT_OVERRIDE, ROOT, ROOT);
 			if (rootOnly)
 				return;
 		}
 
-		String baseOverridefile = getJavaClass().getName() + OVERRIDE_EXTENSION; // getName() returns inner classes with "$" notation, which is good. //$NON-NLS-1$
-		BeaninfoPlugin.OverridePathSearch searcher =
-			BeaninfoPlugin.getPlugin().getOverrideSearch(getJavaClass().getJavaPackage().getPackageName());		
-		applyExtensionDocTo(rset, jc, baseOverridefile, searcher);
+		String baseOverridefile = className + OVERRIDE_EXTENSION; // getName() returns inner classes with "$" notation, which is good. //$NON-NLS-1$
+		applyExtensionDocTo(rset, jc, baseOverridefile, getJavaClass().getJavaPackage().getPackageName(), className);
 	}
 	
-	protected void applyExtensionDocTo(ResourceSet rset, EObject mergeIntoEObject, String baseOverridefile, BeaninfoPlugin.OverridePathSearch searcher) {
-		for (String[] paths = searcher.getNextPath(); paths != null; paths = searcher.getNextPath()) {
-			String overridepath = searcher.getUnmatchedPath();
-			String overridefile = baseOverridefile;
-			if (overridepath.length() > 0)
-				overridefile = overridepath + '/' + overridefile;
-			for (int i = 0; i < paths.length; i++) {
-				String filename = paths[i] + overridefile;
-				Resource overrideRes = null;
-				URI uri = URI.createURI(filename);
-				try {
-					overrideRes = rset.getResource(uri, true);
-		
-					EventUtil util = EventFactory.eINSTANCE.createEventUtil(mergeIntoEObject, rset);
-					util.doForwardEvents(overrideRes.getContents());
-				} catch (WrappedException e) {
-					// FileNotFoundException is ok
-					if (!(e.exception() instanceof FileNotFoundException)) {
-						if (e.exception() instanceof IOException && e.getMessage() == null)
-							;	// TODO remove this when bugzilla fixed so that throws FileNotFound again. https://bugs.eclipse.org/bugs/show_bug.cgi?id=51649
-						else if (e.exception() instanceof CoreException
-							&& ((CoreException) e.exception()).getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND) {
-							// This is ok. Means uri_mapping not set so couldn't find in Workspace, also ok.
-						} else {
-							BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO, 0, "Error loading file\"" + filename + "\"", e.exception())); //$NON-NLS-1$ //$NON-NLS-2$						
+	protected void applyExtensionDocTo(final ResourceSet rset, final EObject mergeIntoEObject, final String overrideFile, String packageName, String className) {
+		BeaninfoPlugin.getPlugin().applyOverrides(getAdapterFactory().getProject(), packageName, className, rset, 
+			new BeaninfoPlugin.IOverrideRunnable() {
+				/* (non-Javadoc)
+				 * @see org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin.IOverrideRunnable#run(java.lang.String)
+				 */
+				public void run(String overridePath) {
+					Resource overrideRes = null;
+					URI uri = URI.createURI(overridePath+overrideFile);
+					try {
+						overrideRes = rset.getResource(uri, true);
+						run(overrideRes);
+					} catch (WrappedException e) {
+						// FileNotFoundException is ok
+						if (!(e.exception() instanceof FileNotFoundException)) {
+							if (e.exception() instanceof IOException && e.getMessage() == null)
+								;	// TODO remove this when bugzilla fixed so that throws FileNotFound again. https://bugs.eclipse.org/bugs/show_bug.cgi?id=51649
+							else if (e.exception() instanceof CoreException
+								&& ((CoreException) e.exception()).getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND) {
+								// This is ok. Means uri_mapping not set so couldn't find in Workspace, also ok.
+							} else {
+								BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "Error loading file\"" + overridePath + "\"", e.exception())); //$NON-NLS-1$ //$NON-NLS-2$						
+							}
 						}
+						// In case it happened after creating resource but during load. Need to get rid of it in the finally.	
+						overrideRes = rset.getResource(uri, false);				
+					} catch (Exception e) {
+						// Couldn't load it for some reason.
+						BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "Error loading file\"" + overridePath + "\"", e)); //$NON-NLS-1$ //$NON-NLS-2$
+						overrideRes = rset.getResource(uri, false); // In case it happened after creating resource but during load.
+			
+					} finally {
+						if (overrideRes != null)
+							rset.getResources().remove(overrideRes); // We don't need it around once we do the merge.
 					}
-					overrideRes = rset.getResource(uri, false);
-					// In case it happened after creating resource but during load.					
-				} catch (Exception e) {
-					// Couldn't load it for some reason.
-					BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO, 0, "Error loading file\"" + filename + "\"", e)); //$NON-NLS-1$ //$NON-NLS-2$
-					overrideRes = rset.getResource(uri, false); // In case it happened after creating resource but during load.
-		
-				} finally {
-					if (overrideRes != null)
-						rset.getResources().remove(overrideRes); // We don't need it around once we do the merge.
 				}
-			}
-		}
+				
+				/* (non-Javadoc)
+				 * @see org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin.IOverrideRunnable#run(org.eclipse.emf.ecore.resource.Resource)
+				 */
+				public void run(Resource overrideRes) {
+					try {
+						EventUtil util = EventFactory.eINSTANCE.createEventUtil(mergeIntoEObject, rset);
+						util.doForwardEvents(overrideRes.getContents());
+					} catch (WrappedException e) {
+						BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "Error processing file\"" + overrideRes.getURI() + "\"", e.exception())); //$NON-NLS-1$ //$NON-NLS-2$						
+					}
+				}
+			});
 	}
 
 	/**
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoModelSynchronizer.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoModelSynchronizer.java
index cc1551d..f2cd486 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoModelSynchronizer.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoModelSynchronizer.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BeaninfoModelSynchronizer.java,v $
- *  $Revision: 1.2 $  $Date: 2004/02/06 20:43:00 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 import java.util.*;
@@ -24,6 +24,7 @@
 import org.eclipse.jdt.core.*;
 
 import org.eclipse.jem.internal.adapters.jdom.JavaModelListener;
+import org.eclipse.jem.internal.beaninfo.core.*;
 /**
  * This class listens for changes to the java model and flushs the
  * appropriate class introspection.
@@ -56,7 +57,7 @@
 		getAdapterFactory().closeAll(clearResults);
 	}
 
-	protected BeaninfoAdapterFactory getAdapterFactory() {
+	public BeaninfoAdapterFactory getAdapterFactory() {
 		return fAdapterFactory;
 	}
 
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoPlugin.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoPlugin.java
deleted file mode 100644
index d5a1e67..0000000
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoPlugin.java
+++ /dev/null
@@ -1,326 +0,0 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
-/*******************************************************************************
- * Copyright (c)  2001, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials 
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- *  $RCSfile: BeaninfoPlugin.java,v $
- *  $Revision: 1.5 $  $Date: 2004/03/06 11:28:26 $ 
- */
-
-
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-
-import com.ibm.wtp.common.logger.proxy.Logger;
-import com.ibm.wtp.logger.proxyrender.EclipseLogger;
-
-import org.eclipse.jem.internal.proxy.core.ProxyPlugin;
-
-/**
- * The plugin class for the org.eclipse.jem.internal.proxy.core plugin.
- */
-
-public class BeaninfoPlugin extends Plugin {
-	public static final String PI_BEANINFO = "org.eclipse.jem.beaninfo";	// Plugin ID, used for QualifiedName. //$NON-NLS-1$
-	public static final String PI_BEANINFO_REGISTRATIONS = "registrations";	// ID of the registrations extension point. //$NON-NLS-1$
-	public static final String PI_BEANINFO_OVERRIDES = "overrides";	// ID of the overrides extension point. //$NON-NLS-1$
-	
-	public static final String PI_VARIABLE = "variable";	// <variable> in extension point. //$NON-NLS-1$
-	public static final String PI_CONTAINER = "container"; // <container> in extension point. //$NON-NLS-1$	
-	public static final String PI_PATH = "path";	// <path="..."> in extension point. //$NON-NLS-1$
-	public static final String PI_CONTRIBUTOR = "contributor";	// <contributor ...> or contributor="..." in extension point //$NON-NLS-1$
-
-	public static final String PI_PACKAGE = "package";	// <package="..." in extension point. //$NON-NLS-1$
-	
-	private static BeaninfoPlugin BEANINFO_PLUGIN = null;
-		
-	public BeaninfoPlugin(IPluginDescriptor pluginDescriptor) {	
-		super(pluginDescriptor);
-		BEANINFO_PLUGIN = this;
-	}
-	
-	/**
-	 * Accessor method to get the singleton plugin.
-	 */
-	public static BeaninfoPlugin getPlugin() {
-		return BEANINFO_PLUGIN;
-	}
-	
-	
-	
-	// Map of registered beaninfos, mapped key is path, value is BeaninfoRegistration[].
-	// It is allowed to have more than one. They will be concatenated together when used.
-	private Map beaninfos = null;
-	private Map getBeaninfoRegistrations() {
-		if (beaninfos == null) {
-			beaninfos = new HashMap(30);
-			processRegistrationExtensionPoint();
-		}
-		return beaninfos;
-	}
-	
-	// Corresponding arrays, that map one to the other.
-	// Fragments is the array of package fragments, as paths (per plugin), that are registered.
-	// Paths are the corresponding array of file paths array (as strings). They are retrieved
-	// by the same index as the matching fragment index and plugin index.
-	private IPath[][] fragments;
-	private String[][][] paths;
-	
-	public class OverridePathSearch {
-		protected IPath packagePath;
-		protected int nextPlugin = 0;
-		protected int nextIndex = 0;
-		protected int matchIndex = -1;
-		
-		protected OverridePathSearch(IPath packagePath) {
-			this.packagePath = packagePath;
-			if (fragments == null)
-				processOverridesExtensionPoint();
-		}
-		
-		/**
-		 * Get the next array of paths that match.
-		 * Returns null if there are no more.
-		 */
-		public String[] getNextPath() {
-			while (nextPlugin < fragments.length) {
-				while (nextIndex < fragments[nextPlugin].length) {
-					matchIndex = nextIndex++;
-					if (fragments[nextPlugin][matchIndex].isPrefixOf(packagePath))
-						return paths[nextPlugin][matchIndex];
-				}
-				nextPlugin++;	// Step up to next plugin
-				nextIndex = 0;
-			}
-			matchIndex = -1;	// Not found
-			return null;
-		}
-		
-		/**
-		 * Return the unmatched portion of the package name
-		 * for the current entry. For example, if the
-		 * package was "java.awt" and the current match
-		 * path was "java", then the unmatched portion
-		 * would be returned as "awt". If it matched exactly,
-		 * it would return "". And if this is being called
-		 * when it shouldn't it will return null. It will
-		 * return it in directory form. (i.e. "xyz/qxr").
-		 */
-		public String getUnmatchedPath() {
-			if (matchIndex != -1) {
-				IPath match = fragments[nextPlugin][matchIndex];
-				return packagePath.removeFirstSegments(match.segmentCount()).toString();
-			}
-			
-			return null;
-		}		
-	}
-			
-
-	/**
-	 * Return the searcher for the given package name.
-	 */
-	public OverridePathSearch getOverrideSearch(String packageName) {
-		return new OverridePathSearch(new Path(packageName.replace('.', '/')));
-	}
-	
-	private Logger logger;
-	public Logger getLogger() {
-		if (logger == null)
-			logger = EclipseLogger.getEclipseLogger(this);
-		return logger;
-	}
-	
-	
-	/**
-	 * Register one registration for the path.
-	 * The path must be a classpath variable for the first segment. It won't be looked for otherwise.
-	 * If it is only one segment long, then it is for the variable itself, and it will be used
-	 * for all paths that start with that variable. This allows several different jars within 
-	 * the variable's path to share the same beaninfo registration information.
-	 */
-	public void registerBeaninfoRegistration(IPath path, BeaninfoRegistration registration) {
-		BeaninfoRegistration[] registered = (BeaninfoRegistration[]) getBeaninfoRegistrations().get(path);
-		if (registered == null)
-			registered = new BeaninfoRegistration[] {registration};
-		else {
-			BeaninfoRegistration[] old = registered;
-			registered = new BeaninfoRegistration[old.length+1];
-			System.arraycopy(old, 0, registered, 0, old.length);
-			registered[old.length] = registration;
-		}
-		
-		getBeaninfoRegistrations().put(path, registered);
-	}
-	
-	/**
-	 * Register multiple registrations for the path.
-	 * The path must be a classpath variable for the first segment. It won't be looked for otherwise.
-	 * If it is only one segment long, then it is for the variable itself, and it will be used
-	 * for all paths that start with that variable. This allows several different jars within 
-	 * the variable's path to share the same beaninfo registration information.
-	 */	
-	public void registerBeaninfoRegistration(IPath path, BeaninfoRegistration[] registrations) {
-		BeaninfoRegistration[] registered = (BeaninfoRegistration[]) getBeaninfoRegistrations().get(path);
-		if (registered == null) {
-			registered = new BeaninfoRegistration[registrations.length];
-			System.arraycopy(registrations, 0, registered, 0, registrations.length);
-		} else {
-			BeaninfoRegistration[] old = registered;
-			registered = new BeaninfoRegistration[old.length+registrations.length];
-			System.arraycopy(old, 0, registered, 0, old.length);
-			System.arraycopy(registrations, 0, registered, old.length, registrations.length);
-		}
-		
-		getBeaninfoRegistrations().put(path, registered);
-	}
-	
-	/**
-	 * Return the registrations for a specified path. Return null if not registered.
-	 */
-	public BeaninfoRegistration[] getRegistrations(IPath path) {
-		return (BeaninfoRegistration[]) getBeaninfoRegistrations().get(path);
-	}
-
-	protected void processRegistrationExtensionPoint() {
-		// Read in the registration information from the extensions.
-		// We'll first gather together in Lists, and then send as arrays at one time to register them.
-		HashMap registrations = new HashMap();
-		IExtension[] extensions = getDescriptor().getExtensionPoint(PI_BEANINFO_REGISTRATIONS).getExtensions();
-		// Need to be in plugin order so that first ones processed have no dependencies on others.
-		HashMap pluginDescriptorsToExtensions = new HashMap(extensions.length);
-		for (int i = 0; i < extensions.length; i++) {
-			IPluginDescriptor desc = extensions[i].getDeclaringPluginDescriptor();
-			IExtension[] ext = (IExtension[]) pluginDescriptorsToExtensions.get(desc);
-			if (ext == null)
-				pluginDescriptorsToExtensions.put(desc, new IExtension[] {extensions[i]});
-			else {
-				// More than one extension defined in this plugin.
-				IExtension[] newExt = new IExtension[ext.length + 1];
-				System.arraycopy(ext, 0, newExt, 0, ext.length);
-				newExt[newExt.length-1] = extensions[i];
-				pluginDescriptorsToExtensions.put(desc, newExt);
-			}
-		}
-		
-		IPluginDescriptor[] ordered = ProxyPlugin.orderPlugins(pluginDescriptorsToExtensions.keySet());
-		for (int i = 0; i < ordered.length; i++) {
-			IExtension[] exts = (IExtension[]) pluginDescriptorsToExtensions.get(ordered[i]);
-			for (int j = 0; j < exts.length; j++) {			
-				IConfigurationElement[] configs = exts[j].getConfigurationElements();
-				for (int k = 0; k < configs.length; k++) {
-					IConfigurationElement iConfigurationElement = configs[k];
-					if (PI_VARIABLE.equals(iConfigurationElement.getName()) || PI_CONTAINER.equals(iConfigurationElement.getName())) {
-						boolean hasContributor = iConfigurationElement.getAttributeAsIs(PI_CONTRIBUTOR) != null || iConfigurationElement.getChildren(PI_CONTRIBUTOR).length > 0;
-						String varpathstr = iConfigurationElement.getAttributeAsIs(PI_PATH);
-						if (varpathstr == null)
-							continue;	// Not proper format.
-						IPath varpath = new Path(varpathstr);
-						List varentry = (List) registrations.get(varpath);
-						if (varentry == null) {
-							varentry = new ArrayList(1);
-							registrations.put(varpath, varentry);
-						}
-						IConfigurationElement[] beaninfos = iConfigurationElement.getChildren(BeaninfoNature.sBeaninfos);
-						for (int l = 0; l < beaninfos.length; l++) {
-							IConfigurationElement root = beaninfos[l];
-							BeaninfoRegistration reg = new BeaninfoRegistration(BeaninfosDoc.readEntry(new ConfigurationElementReader(), root, null));
-							if (hasContributor) {
-								reg.setVariableElement(iConfigurationElement);
-								hasContributor = false;	// Only the first one for this variable needs it. The others would only be dups.
-							}
-							varentry.add(reg);
-						}
-					}
-				}
-			}
-		}
-		
-		// Now we've processed all of the extensions.
-		Iterator regItr = registrations.entrySet().iterator();
-		while (regItr.hasNext()) {
-			Map.Entry entry = (Map.Entry) regItr.next();
-			List registrationsList = (List) entry.getValue();
-			registerBeaninfoRegistration((IPath) entry.getKey(), (BeaninfoRegistration[]) registrationsList.toArray(new BeaninfoRegistration[registrationsList.size()]));			
-		}
-	}
-	
-	protected void processOverridesExtensionPoint() {
-		// We are processing this once because it is accessed often (once per introspected class per project).
-		// This can add up so we get it together once here.
-		// Read in the overrides information from the extensions.
-		// Read in the registration information from the extensions.
-		IExtension[] extensions = getDescriptor().getExtensionPoint(PI_BEANINFO_OVERRIDES).getExtensions();
-		// Need to be in plugin order so that first ones processed have no dependencies on others.
-		HashMap pluginDescriptorsToExtensions = new HashMap(extensions.length);
-		for (int i = 0; i < extensions.length; i++) {
-			IPluginDescriptor desc = extensions[i].getDeclaringPluginDescriptor();
-			IExtension[] ext = (IExtension[]) pluginDescriptorsToExtensions.get(desc);
-			if (ext == null)
-				pluginDescriptorsToExtensions.put(desc, new IExtension[] {extensions[i]});
-			else {
-				// More than one extension defined in this plugin.
-				IExtension[] newExt = new IExtension[ext.length + 1];
-				System.arraycopy(ext, 0, newExt, 0, ext.length);
-				newExt[newExt.length-1] = extensions[i];
-				pluginDescriptorsToExtensions.put(desc, newExt);
-			}
-		}
-		
-		// Now order them so we process in required order.
-		HashMap overrideMap = new HashMap();	// Working override map per plugin
-		IPluginDescriptor[] ordered = ProxyPlugin.orderPlugins(pluginDescriptorsToExtensions.keySet());
-		fragments = new IPath[ordered.length][];
-		paths = new String[ordered.length][][];
-		for (int i = 0; i < ordered.length; i++) {
-			IExtension[] exts = (IExtension[]) pluginDescriptorsToExtensions.get(ordered[i]);
-			overrideMap.clear();
-			for (int j = 0; j < exts.length; j++) {			
-				IConfigurationElement[] configs = exts[j].getConfigurationElements();
-				for (int k = 0; k < configs.length; k++) {
-					IConfigurationElement iConfigurationElement = configs[k];
-					// Don't care about the element name, we show <overrides...> in the example, but really don't care. It just needs path and package.
-					String packageName = iConfigurationElement.getAttributeAsIs(PI_PACKAGE);
-					String path = iConfigurationElement.getAttributeAsIs(PI_PATH);			
-					if (packageName != null && packageName.length() > 0 && path != null && path.length() > 0) {
-						IPath packPath = new Path(packageName.replace('.', '/'));
-						if (path.charAt(path.length()-1) != '/' && path.charAt(path.length()-1) != '\\')
-							path += '/';
-						String[] sofar = (String[]) overrideMap.get(packPath);
-						if (sofar == null)
-							sofar = new String[] {path};
-						else {
-							String[] old = sofar;
-							sofar = new String[old.length+1];
-							System.arraycopy(old, 0, sofar, 0, old.length);
-							sofar[old.length] = path;
-						}
-						overrideMap.put(packPath, sofar);
-					}
-				}
-			}
-			
-			// Now construct the arrays for this plugin
-			int size = overrideMap.size();
-			fragments[i] = new IPath[size];
-			paths[i] = new String[size][];
-			Iterator itr = overrideMap.entrySet().iterator();
-			int ii=-1;
-			while (itr.hasNext()) {
-				Map.Entry entry = (Map.Entry) itr.next();
-				fragments[i][++ii] = (IPath) entry.getKey();
-				paths[i][ii] = (String[]) entry.getValue();
-			}
-		}
-	}
-}
-
-
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeanInfoContributorAdapter.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeanInfoContributorAdapter.java
new file mode 100644
index 0000000..facbded
--- /dev/null
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeanInfoContributorAdapter.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/*
+ *  $RCSfile: BeanInfoContributorAdapter.java,v $
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
+ */
+package org.eclipse.jem.internal.beaninfo.core;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import org.eclipse.core.resources.IResourceStatus;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IPluginDescriptor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin.IContributorOverrideRunnable;
+import org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo;
+ 
+/**
+ * A default implementation of IBeanInfoContributor for users to subclass. Default does nothing.
+ * 
+ * @since 1.0.0
+ */
+public class BeanInfoContributorAdapter implements IBeanInfoContributor {
+	
+	/**
+	 * An empty array of BeaninfoEntry. Available for subclasses to return if they
+	 * decide there is nothing to return.
+	 */
+	public static final BeaninfoEntry[] EMPTY_BEANINFO_ENTRIES = new BeaninfoEntry[0];
+	
+	/**
+	 * Return true if the given fragment is part of the package. Used by subclasses to determine
+	 * if a override associated with a given fragment should be used for the package.
+	 * 
+	 * @param fragment
+	 * @param packagePath
+	 * @return
+	 * 
+	 * @since 1.0.0
+	 */
+	protected boolean isFragment(IPath fragment, IPath packagePath) {
+		return fragment.isPrefixOf(packagePath);
+	}
+	
+	/**
+	 * Return the unmatched portion of the package path from a fragment. Used by subclasses
+	 * to get the part of the package path that is after the fragment. This is then used to
+	 * append to the path from the override to get the full path to override files for this
+	 * package.
+	 * 
+	 * @param fragment
+	 * @param packagePath
+	 * @return
+	 * 
+	 * @since 1.0.0
+	 */
+	protected String getUnmatchedPath(IPath fragment, IPath packagePath) {
+		return fragment.removeFirstSegments(packagePath.segmentCount()).toString();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jem.internal.beaninfo.core.IBeanInfoContributor#getBeanInfoEntryContributions(org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo)
+	 */
+	public BeaninfoEntry[] getBeanInfoEntryContributions(IConfigurationContributionInfo info) {
+		return EMPTY_BEANINFO_ENTRIES;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jem.internal.beaninfo.core.IBeanInfoContributor#runOverrides(org.eclipse.core.runtime.IPath, String, org.eclipse.emf.ecore.resource.ResourceSet, org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin.IContributorOverrideRunnable)
+	 */
+	public void runOverrides(IPath packagePath, String className, ResourceSet rset, IContributorOverrideRunnable runnable) {
+		// Default is do nothing
+	}
+	
+	/**
+	 * Subclasses can use this helper method to get the override resource from the given plugin. 
+	 * 
+	 * @param plugin the plugin to use.
+	 * @param relativePath path of file relative to the plugin.
+	 * @param resource set to load into.
+	 * @param runnable the runnable that is being used for the override. It is used to determine if resource already used once.
+	 * @return the resource or <code>null</code> if couldn't be loaded or if it was already used once.
+	 * 
+	 * @since 1.0.0
+	 */
+	protected Resource loadOverrideResource(IPluginDescriptor plugin, String relativePath, ResourceSet rset, BeaninfoPlugin.IContributorOverrideRunnable runnable) {
+		URI uri = URI.createURI(plugin.getInstallURL().toString()+relativePath);
+		if (runnable.resourceContributed(uri))
+			return null;	// Already contributed once.
+		Resource result = null;
+		try {
+			result = rset.getResource(uri, true);
+		} catch (WrappedException e) {
+			// FileNotFoundException is ok
+			if (!(e.exception() instanceof FileNotFoundException)) {
+				if (e.exception() instanceof IOException && e.getMessage() == null)
+					;	// TODO remove this when bugzilla fixed so that throws FileNotFound again. https://bugs.eclipse.org/bugs/show_bug.cgi?id=51649
+				else if (e.exception() instanceof CoreException
+					&& ((CoreException) e.exception()).getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND) {
+					// This is ok. Means uri_mapping not set so couldn't find in Workspace, also ok.
+				} else {
+					BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "Error loading file\"" + uri + "\"", e.exception())); //$NON-NLS-1$ //$NON-NLS-2$						
+				}
+			}
+			// In case it happened after creating resource but during load. Need to get rid of it in the finally.
+			result = null;
+			Resource res = rset.getResource(uri, false);
+			if (res != null)
+				rset.getResources().remove(res);
+		} catch (Exception e) {
+			// Couldn't load it for some reason.
+			BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "Error loading file\"" + uri + "\"", e)); //$NON-NLS-1$ //$NON-NLS-2$
+			// In case it happened after creating resource but during load. Need to get rid of it in the finally.
+			result = null;
+			Resource res = rset.getResource(uri, false);
+			if (res != null)
+				rset.getResources().remove(res);
+		};
+		return result;
+	}
+	
+}
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoEntry.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoEntry.java
similarity index 74%
rename from plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoEntry.java
rename to plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoEntry.java
index f5958e4..00a0eaf 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoEntry.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoEntry.java
@@ -1,4 +1,4 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
+package org.eclipse.jem.internal.beaninfo.core;
 /*******************************************************************************
  * Copyright (c)  2001, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
@@ -11,23 +11,18 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BeaninfoEntry.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/08 00:48:00 $ 
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 import java.util.ArrayList;
-
-import org.eclipse.jem.internal.proxy.core.ProxyPlugin;
+import java.util.List;
+import java.util.logging.Level;
 
 import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jdt.core.*;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
 import org.w3c.dom.*;
 
 /**
@@ -49,8 +44,8 @@
 	public static final int BIE_PLUGIN = 100;	// Beaninfo jar can be found in a plugin.
 
 	static int kindFromString(String kindStr) {
-		if (kindStr == null)
-			return -1;
+		if (kindStr == null || kindStr.length() == 0)
+			return BIE_PLUGIN;	// Default to plugin. If coming from beaninfoconfig, there should always be kind. But if coming from plugin.xml there shouldn't be one.
 		if (kindStr.equalsIgnoreCase("con"))
 			return IClasspathEntry.CPE_CONTAINER;
 		if (kindStr.equalsIgnoreCase("var")) //$NON-NLS-1$
@@ -111,6 +106,9 @@
 
 			case IClasspathEntry.CPE_VARIABLE :
 				return JavaCore.newVariableEntry(path, null, null, isExported);
+			
+			case IClasspathEntry.CPE_CONTAINER:
+				return JavaCore.newContainerEntry(path, isExported);
 
 		}
 
@@ -142,6 +140,14 @@
 		} else {
 			if (path.isAbsolute())
 				pluginPath = path;
+			else {
+				// Kludge This should only be a plugin type if from configuration element. So we will cast to that
+				// and get the plugin id to create an absolute plugin path.
+				if (element instanceof IConfigurationElement) {
+					pluginPath = new Path('/'+((IConfigurationElement) element).getDeclaringExtension().getNamespace()).append(path);
+				} else
+					return null;	// Not valid because can't have plugin from .beaninfoconfig file.
+			}
 		}
 
 		ArrayList searchpaths = new ArrayList();
@@ -164,13 +170,10 @@
 				cpEntry,
 				(SearchpathEntry[]) searchpaths.toArray(new SearchpathEntry[searchpaths.size()]),
 				isExported);
-		else if (pluginPath != null)
-			return new BeaninfoEntry(
+		else return new BeaninfoEntry(
 				pluginPath,
 				(SearchpathEntry[]) searchpaths.toArray(new SearchpathEntry[searchpaths.size()]),
 				isExported);
-		else
-			return null;
 	}
 
 	protected IClasspathEntry entry; // Store it as a classpath entry for convienence. It is the RAW classpath entry. This is only used when pointing to something other than a plugin.
@@ -260,62 +263,80 @@
 	public IClasspathEntry getClasspathEntry() {
 		return entry;
 	}
-	
+
 	/**
-	 * Return the resolved classpath for this entry. This is the path to the 
-	 * beaninfo jar.
-	 * Returns either:
-	 * 1) a string if a single jar,
-	 * 2) an IProject if it is a project,
-	 * 3) a String[] if it is a jar (including from any fragments) in a plugin. The [0] entry should be the one directly from the plugin, the rest will be from fragments.
-	 * It can return null if the path could not be computed.
+	 * Return the resolved classpaths. Each entry in the array will be either:
+	 * 1) IProject - If it is a project type entry. Want the whole project
+	 * 2) String - an absolute external path to a jar
+	 * 3) IPath - a path to a plugin jar. The first segment is the plugin id, the rest is the path relative to that plugin.
+	 *            
+	 * 
+	 * @param javaProject
+	 * @return The array of paths, or <code>null</code> if no paths.
+	 * 
+	 * @since 1.0.0
 	 */
-	public Object getClasspath() {
+	public Object[] getClasspath(IJavaProject javaProject) {
 		if (entry != null) {
 			// It is a standard CPE Entry.
 			IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+			List paths = new ArrayList(1);
 			IClasspathEntry resolvedEntry = JavaCore.getResolvedClasspathEntry(entry);
-			switch (resolvedEntry.getEntryKind()) {
-				case IClasspathEntry.CPE_PROJECT :
-					IProject reqProject = (IProject) root.findMember(resolvedEntry.getPath().lastSegment());
-					// Project entries only have one segment.
-					if (reqProject != null && reqProject.isOpen())
-						return reqProject;
-					else
-						return null;
-
-				case IClasspathEntry.CPE_SOURCE :
-					reqProject = (IProject) root.findMember(resolvedEntry.getPath().segment(0));
-					// Find project from the first segment.
-					IJavaProject javaProject = JavaCore.create(reqProject);
-					if (javaProject != null) {
-						try {
-							IPath outputLocation = javaProject.getOutputLocation();
-							IResource resource = root.findMember(outputLocation);
-							if (resource != null) {
-								return resource.getLocation().toString();
-							}
-						} catch(JavaModelException e) {
-						}
-					}
-					break;
-
-				case IClasspathEntry.CPE_LIBRARY :
-					IResource library = root.findMember(resolvedEntry.getPath());
-					// can be external or in workspace
-					return (library != null) ? library.getLocation().toString() : resolvedEntry.getPath().toString();
-			}
-		} else {
-			IPluginDescriptor descr = Platform.getPluginRegistry().getPluginDescriptor(pluginPath.segment(0));
-			if (descr != null)
-				return ProxyPlugin.getPlugin().localizeFromPluginDescriptorAndFragments(
-					descr,
-					pluginPath.removeFirstSegments(1).toString());
-		}
+			resolveEntry(root, paths, resolvedEntry, javaProject);
+			return paths.toArray();
+		} else if (pluginPath != null) 
+			return new Object[] {pluginPath};
+		
 		return null;
 
 	}
 	
+	private void resolveEntry(IWorkspaceRoot root, List paths, IClasspathEntry entry, IJavaProject javaProject) {
+		switch (entry.getEntryKind()) {
+			case IClasspathEntry.CPE_PROJECT :
+				IProject reqProject = (IProject) root.findMember(entry.getPath().lastSegment());
+				// Project entries only have one segment.
+				if (reqProject != null && reqProject.isOpen())
+					paths.add(reqProject);
+				break;
+
+			case IClasspathEntry.CPE_SOURCE :
+				reqProject = (IProject) root.findMember(entry.getPath().segment(0));
+				// Find project from the first segment.
+				IJavaProject jProject = JavaCore.create(reqProject);
+				if (jProject != null) {
+					try {
+						IPath outputLocation = jProject.getOutputLocation();
+						IResource resource = root.findMember(outputLocation);
+						if (resource != null) {
+							paths.add(resource.getLocation().toString());
+						}
+					} catch(JavaModelException e) {
+					}
+				}
+				break;
+
+			case IClasspathEntry.CPE_LIBRARY :
+				IResource library = root.findMember(entry.getPath());
+				// can be external or in workspace
+				paths.add((library != null) ? library.getLocation().toString() : entry.getPath().toString());
+				break;
+				
+			case IClasspathEntry.CPE_CONTAINER:
+				try {
+					IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), javaProject);
+					if (container != null) {
+						IClasspathEntry[] entries = container.getClasspathEntries();
+						for (int i = 0; i < entries.length; i++) {
+							resolveEntry(root, paths, entries[i], javaProject);
+						}
+					}
+				} catch (JavaModelException e) {
+					BeaninfoPlugin.getPlugin().getLogger().log(e, Level.WARNING);
+				}			
+		}
+	}
+
 	public int getKind() {
 		return entry != null ? entry.getEntryKind() : BIE_PLUGIN;
 	}
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoNature.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoNature.java
similarity index 60%
rename from plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoNature.java
rename to plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoNature.java
index 7aac844..a748c6b 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoNature.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoNature.java
@@ -1,4 +1,4 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
+package org.eclipse.jem.internal.beaninfo.core;
 /*******************************************************************************
  * Copyright (c)  2001, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
@@ -11,12 +11,13 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BeaninfoNature.java,v $
- *  $Revision: 1.9 $  $Date: 2004/03/08 00:48:00 $ 
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 import java.io.*;
 import java.text.MessageFormat;
 import java.util.*;
+import java.util.logging.Level;
 
 import org.apache.xerces.jaxp.DocumentBuilderFactoryImpl;
 import org.apache.xml.serialize.*;
@@ -29,10 +30,11 @@
 import org.eclipse.emf.ecore.resource.ResourceSet;
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.jdt.core.*;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.w3c.dom.*;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
 import org.xml.sax.InputSource;
 
+import org.eclipse.jem.internal.beaninfo.adapters.*;
 import org.eclipse.jem.internal.java.adapters.JavaXMIFactoryImpl;
 import org.eclipse.jem.internal.java.beaninfo.IIntrospectionAdapter;
 import org.eclipse.jem.internal.java.init.JavaInit;
@@ -48,9 +50,11 @@
 
 public class BeaninfoNature implements IProjectNature {
 
-	public static final String NATURE_ID = "org.eclipse.jem.beaninfo.BeanInfoNature"; //$NON-NLS-1$
+	public static final String NATURE_ID = BeaninfoPlugin.PI_BEANINFO_PLUGINID + ".BeanInfoNature"; //$NON-NLS-1$
 	public static final String P_BEANINFO_SEARCH_PATH = ".beaninfoConfig"; //$NON-NLS-1$
-	// Persistent key
+	
+	public static final QualifiedName CONFIG_INFO_SESSION_KEY = new QualifiedName(BeaninfoPlugin.PI_BEANINFO_PLUGINID, "CONFIG_INFO");
+	public static final QualifiedName BEANINFO_CONTRIBUTORS_SESSION_KEY = new QualifiedName(BeaninfoPlugin.PI_BEANINFO_PLUGINID, "BEANINFO_CONTRIBUTORS");
 
 	private ResourceTracker resourceTracker;
 	// This class listens for changes to the beaninfo paths file, and if changed it marks all stale
@@ -93,6 +97,19 @@
 		else
 			return createRuntime(project);
 	}
+	
+	/**
+	 * Return whether this project has a BeanInfo runtime turned on.
+	 * 
+	 * @param project
+	 * @return <code>true</code> if it has the a BeanInfo runtime.
+	 * @throws CoreException
+	 * 
+	 * @since 1.0.0
+	 */
+	public static boolean hasRuntime(IProject project) throws CoreException {
+		return project.hasNature(NATURE_ID);
+	}
 
 	/**
 	 * Test if this is a valid project for a Beaninfo Nature. It must be
@@ -114,7 +131,7 @@
 			throw new CoreException(
 				new Status(
 					IStatus.ERROR,
-					BeaninfoPlugin.PI_BEANINFO,
+					BeaninfoPlugin.PI_BEANINFO_PLUGINID,
 					0,
 					MessageFormat.format(
 						BeaninfoPlugin.getPlugin().getDescriptor().getResourceString(BeaninfoProperties.INTROSPECTFAILED),
@@ -194,9 +211,10 @@
 				// will also be loaded into this resourceset. So to find it we need to go in here and try.
 				//
 				// However, if not found we won't go and try to load the resource. That could load in the wrong place.
-				// TODO Because of a bug in XMLHandler.getPackageFromURI(), it doesn't use getResource(...,true) and it tries instead
+				// Kludge: Because of a bug (feature :-)) in XMLHandler.getPackageFromURI(), it doesn't use getResource(...,true) and it tries instead
 				// to use uri inputstream to load the package when not found. This bypasses our special create resource and so
 				// packages are not automatically created. So we need to do load on demand here instead if it is a java protocol.
+				// EMF will not be fixing this. It is working as designed.
 				return getResourceSet().getResource(uri, JavaXMIFactoryImpl.SCHEME.equals(uri.scheme()));
 			}
 
@@ -274,6 +292,10 @@
 				public void closeRegistry() {
 					BeaninfoNature.this.closeRegistry();
 				}
+				
+				public IProject getProject() {
+					return BeaninfoNature.this.getProject();
+				}
 			});
 			fSynchronizer =
 				new BeaninfoModelSynchronizer(
@@ -302,6 +324,13 @@
 		synchronized (this) {
 			reg = fRegistry;
 			fRegistry = null;
+			try {
+				// Wipe out the Session properties so that they are recomputed.
+				getProject().setSessionProperty(CONFIG_INFO_SESSION_KEY, null);
+				getProject().setSessionProperty(BEANINFO_CONTRIBUTORS_SESSION_KEY, null);			
+			} catch (CoreException e) {
+				BeaninfoPlugin.getPlugin().getLogger().log(e, Level.INFO);
+			}
 		}
 		if (reg != null) {
 			reg.removeRegistryListener(registryListener);
@@ -312,8 +341,10 @@
 	public synchronized ProxyFactoryRegistry getRegistry(IProgressMonitor pm) {
 		if (fRegistry == null) {
 			try {
-					fRegistry = ProxyLaunchSupport.startImplementation(fProject, "Beaninfo", //$NON-NLS-1$
-							new IConfigurationContributor[] { getConfigurationContributor()}, pm);
+				ConfigurationContributor configurationContributor =  (ConfigurationContributor) getConfigurationContributor();
+				configurationContributor.setNature(this);
+				fRegistry = ProxyLaunchSupport.startImplementation(fProject, "Beaninfo", //$NON-NLS-1$
+					new IConfigurationContributor[] { configurationContributor}, pm);
 				fRegistry.addRegistryListener(registryListener);
 			} catch (CoreException e) {
 				BeaninfoPlugin.getPlugin().getLogger().log(e.getStatus());
@@ -351,9 +382,7 @@
 	private static final String ENCODING = "UTF-8"; //$NON-NLS-1$
 	static final String sBeaninfos = "beaninfos"; // Root element name //$NON-NLS-1$
 	/**
-	 * Get the persistent search path. The object returned is a copy of the
-	 * list, and it can be modified, but it won't be reflected back into the
-	 * nature.
+	 * Get the persistent search path. It is copy.
 	 */
 	public BeaninfosDoc getSearchPath() {
 		BeaninfosDoc bdoc = null;
@@ -378,7 +407,7 @@
 		} catch (CoreException e) {
 			BeaninfoPlugin.getPlugin().getLogger().log(e.getStatus());
 		} catch (Exception e) {
-			BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO, 0, "", e));
+			BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO_PLUGINID, 0, "", e));
 		}
 		return bdoc;
 	}
@@ -537,64 +566,202 @@
 		return new ConfigurationContributor(getSearchPath());
 	}
 
-	private static final IPath JRE_LIB_VARIABLE_PATH = new Path(JavaRuntime.JRELIB_VARIABLE);	// TODO Remove when we handle containers
-	private class ConfigurationContributor implements IConfigurationContributor {
+	private static class ConfigurationContributor extends ConfigurationContributorAdapter {
 
-		BeaninfosDoc doc;
-		List computedSearchPath = new ArrayList();
-		// Compute the search path as we compute the classpaths. This is saved because it will be used in a separate call.
-		HashSet visitedVariablepaths; // Visited registered variable paths, so we don't visit them again.
-		List variableContributors = new ArrayList(0); // Variable contributors that were found.
+		private BeaninfosDoc doc;
+		List computedSearchPath;
+				
+		// The nature. If the nature is not set then this contributor is one
+		// used by some other later proxy registry to get the beaninfo classes into their paths. In that case
+		// we can expect the config info to be in the session variable for our use. Otherwise we will need to
+		// add it here. Also don't set searchpath stuff if not nature because only the beaninfo one will do introspection.
+		private BeaninfoNature nature;	
+		
+		private IConfigurationContributionInfo info;
+		private IBeanInfoContributor[] explicitContributors;
 
 		public ConfigurationContributor(BeaninfosDoc doc) {
 			this.doc = doc;
 		}
 
-		/**
-		 * Method to update any class paths with any
-		 * paths that need to be added to a VM. In this case, it is
-		 * the proxyvm.jar that needs to be added. This jar contains
-		 * the common code that is required by any VM for proxy
-		 * support.
+		/*
+		 * Set that this is the nature contributor. Not null, means that this is the contributor being
+		 * used to setup the registry for the project's beaninfo nature. null (default) means that this
+		 * is one created to add to some editor's registry.
+		 * 
+		 * Note: This MUST be set before initialize is called or it will not work correctly. If not set, it 
+		 * will be considered not for BeanInfo nature directly.
 		 */
-		public void contributeClasspaths(IConfigurationContributionController controller) throws CoreException {
-			// Need to find any additional beaninfo jars. They can be pointed to within this projects path,
-			// or they can be found in pre-req'd project (assuming they are exported).
-			HashSet visitedProjects = new HashSet();
-			visitedVariablepaths = new HashSet();
+		public void setNature(BeaninfoNature nature) {
+			this.nature = nature;
+			if (nature != null)
+				computedSearchPath = new ArrayList(3);	// We will be gathering this info.
+		}
+		
+		private static final String PI_CLASS = "class";
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributor#initialize(org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo)
+		 */
+		public void initialize(IConfigurationContributionInfo info) {
+			this.info = info;
 			try {
-				contributeClasspathsForProject(controller, getProject(), visitedProjects, doc);
-				// Add the beaninfovm.jar and any nls to the end of the classpath.
-				controller.contributeClasspath(BeaninfoPlugin.getPlugin(), "vm/beaninfovm.jar", IConfigurationContributionController.APPEND_USER_CLASSPATH, true); //$NON-NLS-1$
-			} finally {
-				visitedVariablepaths = null;
-			}
-
-			// Now turn the var elements into contributors.
-			for (ListIterator itr = variableContributors.listIterator(); itr.hasNext();) {
-				IConfigurationElement v = (IConfigurationElement) itr.next();
-				IConfigurationContributor contrib = null;
-				try {
-					contrib = (IConfigurationContributor) v.createExecutableExtension(BeaninfoPlugin.PI_CONTRIBUTOR);
-				} catch (ClassCastException e) {
-					BeaninfoPlugin.getPlugin().getLogger().log(new Status(IStatus.WARNING, BeaninfoPlugin.PI_BEANINFO, 0, "", e)); //$NON-NLS-1$
+				if (info.getJavaProject().getProject().getSessionProperty(CONFIG_INFO_SESSION_KEY) == null) {
+					// First time for this nature, or first time after registry reset. Need to compute the info.
+					// It is possible for this to be called BEFORE the first usage of BeanInfo. The editor usually
+					// brings up the editor's registry before it gets anything from BeanInfo.
+					
+					// Save it for override processing. That happens over and over later after all config processing is done.
+					info.getJavaProject().getProject().setSessionProperty(CONFIG_INFO_SESSION_KEY, info);
+					
+					List contributorsList = new ArrayList(10);
+					if (!info.getContainerIds().isEmpty()) {
+						// Run through all of the visible container ids that are applicable and get BeanInfo contributors.
+						Iterator containerIdItr = info.getContainerIds().entrySet().iterator();
+						while (containerIdItr.hasNext()) {
+							Map.Entry entry = (Map.Entry) containerIdItr.next();
+							if (((Boolean) entry.getValue()).booleanValue()) {
+								IConfigurationElement[] contributors = BeaninfoPlugin.getPlugin().getContainerIdContributors(
+										(String) entry.getKey());
+								if (contributors != null) {
+									for (int i = 0; i < contributors.length; i++) {
+									try {
+										Object contributor = contributors[i].createExecutableExtension(PI_CLASS);
+										if (contributor instanceof IBeanInfoContributor)
+											contributorsList.add(contributor);
+									} catch (CoreException e) {
+										BeaninfoPlugin.getPlugin().getLogger().log(e, Level.WARNING);
+									}
+								}
+							}
+}
+						}						
+					}
+					
+					if (!info.getPluginIds().isEmpty()) {
+						// Run through all of the visible plugin ids that are applicable and get BeanInfo contributors.
+						Iterator pluginIdItr = info.getPluginIds().entrySet().iterator();
+						while (pluginIdItr.hasNext()) {
+							Map.Entry entry = (Map.Entry) pluginIdItr.next();
+							if (((Boolean) entry.getValue()).booleanValue()) {
+								IConfigurationElement[] contributors = BeaninfoPlugin.getPlugin().getPluginContributors(
+										(String) entry.getKey());
+								if (contributors != null) {
+									for (int i = 0; i < contributors.length; i++) {
+									try {
+										Object contributor = contributors[i].createExecutableExtension(PI_CLASS);
+										if (contributor instanceof IBeanInfoContributor)
+											contributorsList.add(contributor);
+									} catch (CoreException e) {
+										BeaninfoPlugin.getPlugin().getLogger().log(e, Level.WARNING);
+									}
+								}
+							}
+}
+						}
+					}
+					
+					// Save it for all beaninfo processing (and configuration processing if they implement proxy configuration contributor).
+					explicitContributors = (IBeanInfoContributor[]) contributorsList.toArray(new IBeanInfoContributor[contributorsList.size()]);
+					info.getJavaProject().getProject().setSessionProperty(BEANINFO_CONTRIBUTORS_SESSION_KEY, explicitContributors);
+				} else {
+					explicitContributors = (IBeanInfoContributor[]) info.getJavaProject().getProject().getSessionProperty(BEANINFO_CONTRIBUTORS_SESSION_KEY);
 				}
-
-				itr.set(contrib); // Set to what should be used, null is valid for not found.
-				if (contrib != null)
-					contrib.contributeClasspaths(controller);
+			} catch (CoreException e) {
+				BeaninfoPlugin.getPlugin().getLogger().log(e);
 			}
 		}
+		
+		public void contributeClasspaths(final IConfigurationContributionController controller) throws CoreException {
+			// Contribute for this project
+			contributeClasspathsForProject(controller, info.getJavaProject().getProject(), doc, true);
+						
+			if (!info.getProjectPaths().isEmpty()) {
+				// Run through all of the visible projects and contribute the classpaths (which come from the BeanInfo docs, if they have any).
+				IWorkspaceRoot root = info.getJavaProject().getProject().getWorkspace().getRoot();
+				Iterator projIter = info.getProjectPaths().entrySet().iterator();
+				while (projIter.hasNext()) {
+					Map.Entry entry = (Map.Entry) projIter.next();
+					if (((Boolean) entry.getValue()).booleanValue()) {
+						IResource res = root.findMember((IPath) entry.getKey());
+						if (res instanceof IProject && ((IProject) res).isOpen() && BeaninfoNature.hasRuntime((IProject) res))
+							contributeClasspathsForProject(controller, (IProject) res, BeaninfoNature.getRuntime((IProject) res)
+									.getSearchPath(), false);
+					}
+				}
+			}			
+			
+			if (!info.getContainerIds().isEmpty()) {
+				// Run through all of the visible container ids that are applicable.
+				Iterator containerIdItr = info.getContainerIds().entrySet().iterator();
+				while (containerIdItr.hasNext()) {
+					Map.Entry entry = (Map.Entry) containerIdItr.next();
+					if (((Boolean) entry.getValue()).booleanValue()) {
+						processBeaninfoEntries(BeaninfoPlugin.getPlugin().getContainerIdBeanInfos((String) entry.getKey()),
+								controller, info.getJavaProject());
+					}
+				}
+				
+			}
+			
+			if (!info.getPluginIds().isEmpty()) {
+				// Run through all of the visible plugin ids that are applicable.
+				Iterator pluginIdItr = info.getPluginIds().entrySet().iterator();
+				while (pluginIdItr.hasNext()) {
+					Map.Entry entry = (Map.Entry) pluginIdItr.next();
+					if (((Boolean) entry.getValue()).booleanValue()) {
+						processBeaninfoEntries(BeaninfoPlugin.getPlugin().getPluginBeanInfos((String) entry.getKey()), controller, info.getJavaProject());
+					}
+				}
+				
+			}
+			
+			if (!info.getContainers().isEmpty()) {
+				// Run through all of the visible containers that implement IBeanInfoContributor and ask them for the contributions.
+				Iterator containerItr = info.getContainers().entrySet().iterator();
+				while (containerItr.hasNext()) {
+					Map.Entry entry = (Map.Entry) containerItr.next();
+					if (((Boolean) entry.getValue()).booleanValue()) {
+						if (entry.getKey() instanceof IBeanInfoContributor)
+							processBeaninfoEntries(((IBeanInfoContributor) entry.getKey()).getBeanInfoEntryContributions(info),
+									controller, info.getJavaProject());
+					}
+				}
+				
+			}			
+				
+			// And finally run through the explicit contributors.				
+			for (int i = 0; i < explicitContributors.length; i++) {
+				final IBeanInfoContributor contributor = explicitContributors[i];
+				processBeaninfoEntries(contributor.getBeanInfoEntryContributions(info), controller, info.getJavaProject());
+				if (contributor instanceof IConfigurationContributor) {
+					Platform.run(new ISafeRunnable() {
+						public void handleException(Throwable exception) {
+							// do nothing. by default platform logs.
+						}
 
-		private IClasspathEntry get(IClasspathEntry[] array, InternalCPEntry cpe) {
+						public void run() throws Exception {;
+							if (contributor instanceof IConfigurationContributor)
+								((IConfigurationContributor) contributor).contributeClasspaths(controller);
+						}
+					});
+				}
+			}
+			
+			// Add the beaninfovm.jar and any nls to the end of the classpath.
+			controller.contributeClasspath(BeaninfoPlugin.getPlugin().getDescriptor(), "vm/beaninfovm.jar", IConfigurationContributionController.APPEND_USER_CLASSPATH, true); //$NON-NLS-1$
+		}
+
+		private IClasspathEntry get(IClasspathEntry[] array, SearchpathEntry se) {
 			for (int i = 0; i < array.length; i++) {
-				if (cpe.equals(array[i]))
+				if (array[i].getEntryKind() == se.getKind() && array[i].getPath().equals(se.getPath()))
 					return array[i];
 			}
-
 			return null;
 		}
 
+		private static final IBeaninfosDocEntry[] EMPTY_ENTRIES = new IBeaninfosDocEntry[0];
+		
 		/*
 		 * Contribute classpaths for the specified project. If doc is passed in, then this is the top level and
 		 * all should be added. If no doc, then this is pre-req'd project, and then we will handle exported entries only.
@@ -602,81 +769,35 @@
 		protected void contributeClasspathsForProject(
 			IConfigurationContributionController controller,
 			IProject project,
-			HashSet visitedProjects,
-			BeaninfosDoc doc)
+			BeaninfosDoc doc,
+			boolean toplevelProject)
 			throws CoreException {
-			if (visitedProjects.contains(project))
-				return;
-			visitedProjects.add(project);
-
+			
 			IJavaProject jProject = JavaCore.create(project);
 			IClasspathEntry[] rawPath = jProject.getRawClasspath();
 
-			// List of classpath entries for this project that have already been processed in the search path list.
-			// This is so that at the end when we process the classpath to add in any implicit beaninfos/search paths,
-			// we know these had been explicitly handled already.
-			List contributedICPEs = new ArrayList();
-			InternalCPEntry working = new InternalCPEntry(); // A working copy that we keep reusing.
-
 			// Search path of this project
-			IBeaninfosDocEntry[] entries = null;
-			if (doc != null)
-				entries = doc.getSearchpath();
-			else {
-				BeaninfosDoc adoc = BeaninfoNature.getRuntime(project).getSearchPath();
-				entries = adoc != null ? adoc.getSearchpath() : new IBeaninfosDocEntry[0];
-			}
-
-			IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+			IBeaninfosDocEntry[] entries = (doc != null) ? doc.getSearchpath() : EMPTY_ENTRIES;
 
 			for (int i = 0; i < entries.length; i++) {
 				IBeaninfosDocEntry entry = entries[i];
 				if (entry instanceof BeaninfoEntry) {
 					BeaninfoEntry be = (BeaninfoEntry) entry;
-					if (doc != null || be.isExported()) {
-						// First project or this is an exported beaninfo
-						Object cp = be.getClasspath();
-						if (cp instanceof IProject)
-							controller.contributeProject((IProject) cp);
-						else if (cp instanceof String)
-							controller.contributeClasspath((String) cp, IConfigurationContributionController.APPEND_USER_CLASSPATH);
-						else if (cp instanceof String[]) {
-							String[] cps = (String[]) cp;
-							for (int j = 0; j < cps.length; j++) {
-								controller.contributeClasspath(cps[j], IConfigurationContributionController.APPEND_USER_CLASSPATH);
-							}
-						} else
-							continue; // It was an invalid entry, don't add in its searchpaths.
-
-						// Now add in the package names.
-						SearchpathEntry[] sees = be.getSearchPaths();
-						for (int j = 0; j < sees.length; j++) {
-							SearchpathEntry searchpathEntry = sees[j];
-							if (!computedSearchPath.contains(searchpathEntry.getPackage()))
-								computedSearchPath.add(searchpathEntry.getPackage());
-						}
+					if (toplevelProject || be.isExported()) {
+						// First project or this is an exported beaninfo, so we process it.
+						processBeaninfoEntry(be, controller, jProject);
 					}
-				} else {
+				} else if (nature != null){
 					// Just a search path entry. There is no beaninfo jar to pick up.
+					// We have a nature, so we process search path.
 					SearchpathEntry se = (SearchpathEntry) entry;
-					working.setEntry(se.getKind(), se.getPath());
-					int cndx = contributedICPEs.indexOf(working);
-					if (cndx == -1) {
-						InternalCPEntry icpe = new InternalCPEntry(working.getKind(), working.getPath());
-						contributedICPEs.add(icpe); // Keep a record that this entry has been used.
-						if (doc == null) {
-							// This is the first time we've found this entry and we are in a nested project, find the raw classpath entry to see
-							// if this entry is exported. Only do it if exported. (Note: exported is only used on non-source. Source are always exported).
-							IClasspathEntry cpe = get(rawPath, icpe);
-							if (cpe == null || (cpe.getEntryKind() != IClasspathEntry.CPE_SOURCE && !cpe.isExported())) {
-								icpe.setIsExported(false); // Mark it as exported so if found again it won't be used.
-								continue; // Not exist or not exported, so we don't want it here either.
-							}
+					if (!toplevelProject) {
+						// We are in a nested project, find the raw classpath entry to see
+						// if this entry is exported. Only do it if exported. (Note: exported is only used on non-source. Source are always exported).
+						IClasspathEntry cpe = get(rawPath, se);
+						if (cpe == null || (cpe.getEntryKind() != IClasspathEntry.CPE_SOURCE && !cpe.isExported())) {
+							continue; // Not exist or not exported, so we don't want it here either.
 						}
-					} else {
-						InternalCPEntry icpe = (InternalCPEntry) contributedICPEs.get(cndx);
-						if (doc == null && !icpe.isExported())
-							continue; // We've already determined it is not exported, so don't use it.
 					}
 
 					String pkg = se.getPackage();
@@ -685,144 +806,54 @@
 						if (!computedSearchPath.contains(pkg))
 							computedSearchPath.add(pkg);
 					} else {
-						// Process if this is an implicit search path kind of entry.
-						// I.e. It is just kind/path and no packagename. This means
-						// find the implicit searchpaths for this entry and put them
-						// in order here now. This can only be used on implicit kind
-						// of classpath entries. Any others don't have any implicit search paths
-						// so they are processed, just ignored.
-						processImplicitSearchPath(controller, visitedProjects, root, se.getKind(), se.getPath());
+						// We no longer allow this, but just to be on safe side we test for it.
 					}
-
 				}
 			}
-
-			// Now we need to go through our raw classpath to handle any not already handled.
-			// We only handle implicit search path from the project or registered variable.
-			for (int i = 0; i < rawPath.length; i++) {
-				IClasspathEntry entry = rawPath[i];
-				working.setEntry(entry);
-				if (contributedICPEs.contains(working))
-					continue; // We've already handled it above.
-				processImplicitSearchPath(controller, visitedProjects, root, entry.getEntryKind(), entry.getPath());
-			}
-
 		}
 
-		protected void processImplicitSearchPath(
+		protected void processBeaninfoEntries(
+			BeaninfoEntry[] entries,
 			IConfigurationContributionController controller,
-			HashSet visitedProjects,
-			IWorkspaceRoot root,
-			int kind,
-			IPath path)
+			IJavaProject javaProject)
 			throws CoreException {
-			// Use the implicit search path from the project or registered variable.
-			// For now, only projects.
-			if (kind == IClasspathEntry.CPE_PROJECT) {
-				IProject reqProject = (IProject) root.findMember(path.lastSegment());
-				// Project entries only have one segment.
-				if (reqProject != null && reqProject.isOpen())
-					contributeClasspathsForProject(controller, reqProject, visitedProjects, null);
-			} else if (kind == IClasspathEntry.CPE_VARIABLE || kind == IClasspathEntry.CPE_CONTAINER) {
-				// We only handle variables as being registered.
-				// TODO - Hack to deal with containers for SWT till we get the proper solution
-				if (path == null || path.segmentCount() == 0)
-					return; // No path information to process.
-				// First we handle the generic kind of for just the variable itself (which is segment 0).
-				IPath varpath = path.segmentCount() == 1 ? path : path.removeLastSegments(path.segmentCount() - 1);
-				if (!visitedVariablepaths.contains(varpath)) {
-					visitedVariablepaths.add(varpath);
-					BeaninfoRegistration[] registrations = BeaninfoPlugin.getPlugin().getRegistrations(varpath);
-					if (registrations != null)
-						processBeaninfoRegistrations(registrations, controller);
-				}
+			for (int i = 0; i < entries.length; i++)
+				processBeaninfoEntry(entries[i], controller, javaProject);
+		}
 
-				// Now process for the specific path (which would be variable followed by some subpaths).
-				if (path.segmentCount() > 1 && !visitedVariablepaths.contains(path)) {
-					visitedVariablepaths.add(path);
-					BeaninfoRegistration[] registrations = BeaninfoPlugin.getPlugin().getRegistrations(path);
-					if (registrations != null)
-						processBeaninfoRegistrations(registrations, controller);
-				}
-			} 
-
-			if (kind == IClasspathEntry.CPE_CONTAINER) {
-				// KLUDGE TODO For now we can't really handle containers, we will simply hard-code and only handle JRE container to JRE_LIB stuff.
-				if (path == null || path.segmentCount() == 0)
-					return; // No path information to process.
-				if (path.segment(0).equals(JavaRuntime.JRE_CONTAINER)) {
-					if (!visitedVariablepaths.contains(JRE_LIB_VARIABLE_PATH)) {
-						visitedVariablepaths.add(JRE_LIB_VARIABLE_PATH);
-						BeaninfoRegistration[] registrations = BeaninfoPlugin.getPlugin().getRegistrations(JRE_LIB_VARIABLE_PATH);
-						if (registrations != null)
-							processBeaninfoRegistrations(registrations, controller);							
-					}
+		protected void processBeaninfoEntry(
+			BeaninfoEntry entry,
+			IConfigurationContributionController controller,
+			IJavaProject javaProject)
+			throws CoreException {
+			Object[] cps = entry.getClasspath(javaProject);
+			for (int j = 0; j < cps.length; j++) {
+				Object cp = cps[j];
+				if (cp instanceof IProject)
+					controller.contributeProject((IProject) cp);
+				else if (cp instanceof String)
+					controller.contributeClasspath((String) cp, IConfigurationContributionController.APPEND_USER_CLASSPATH);
+				else if (cp instanceof IPath) {
+					IPath path = (IPath) cp;
+					IPluginDescriptor pd = Platform.getPluginRegistry().getPluginDescriptor(path.segment(0));
+					if (pd != null)
+						controller.contributeClasspath(pd, path.removeFirstSegments(1).toString(), IConfigurationContributionController.APPEND_USER_CLASSPATH, true);
 				}
 			}
-		}
 
-		protected void processBeaninfoRegistrations(
-			BeaninfoRegistration[] registrations,
-			IConfigurationContributionController controller)
-			throws CoreException {
-			for (int i = 0; i < registrations.length; i++)
-				processBeaninfoRegistration(registrations[i], controller);
-		}
-
-		protected void processBeaninfoRegistration(
-			BeaninfoRegistration registration,
-			IConfigurationContributionController controller)
-			throws CoreException {
-			BeaninfosDoc doc = registration.getDoc();
-			if (doc == null)
-				return;
-
-			IConfigurationElement varElement = registration.getVariableElement();
-			if (varElement != null)
-				variableContributors.add(varElement);
-
-			IBeaninfosDocEntry[] entries = doc.getSearchpath();
-
-			for (int i = 0; i < entries.length; i++) {
-				IBeaninfosDocEntry entry = entries[i];
-				if (entry instanceof BeaninfoEntry) {
-					BeaninfoEntry be = (BeaninfoEntry) entry;
-					Object cp = be.getClasspath();
-					if (cp instanceof IProject)
-						controller.contributeProject((IProject) cp);
-					else if (cp instanceof String)
-						controller.contributeClasspath((String) cp, IConfigurationContributionController.APPEND_USER_CLASSPATH);
-					else if (cp instanceof String[]) {
-						String[] cps = (String[]) cp;
-						for (int j = 0; j < cps.length; j++) {
-							controller.contributeClasspath(cps[j], IConfigurationContributionController.APPEND_USER_CLASSPATH);	
-						}					
-					} else
-						continue; // It was an invalid entry, don't add in its searchpaths.
-
-					// Now add in the package names.
-					SearchpathEntry[] sees = be.getSearchPaths();
-					for (int j = 0; j < sees.length; j++) {
-						SearchpathEntry searchpathEntry = sees[j];
-						if (!computedSearchPath.contains(searchpathEntry.getPackage()))
-							computedSearchPath.add(searchpathEntry.getPackage());
-					}
-				} else {
-					// Just a search path entry. There is no beaninfo jar to pick up. The paths will be in the current classpath probably from the bean classes jar that this registration matches.
-					// There should be no paths or kinds. It should only be packagename.
-
-					String pkg = ((SearchpathEntry) entry).getPackage();
-					if (pkg != null) {
-						// Explicit search path
-						if (!computedSearchPath.contains(pkg))
-							computedSearchPath.add(pkg);
-					}
+			if (nature != null) {
+				// Now add in the package names.
+				SearchpathEntry[] sees = entry.getSearchPaths();
+				for (int j = 0; j < sees.length; j++) {
+					SearchpathEntry searchpathEntry = sees[j];
+					if (!computedSearchPath.contains(searchpathEntry.getPackage()))
+						computedSearchPath.add(searchpathEntry.getPackage());
 				}
 			}
 		}
 
 		public void contributeToConfiguration(final ILaunchConfigurationWorkingCopy config) {
-			for (int i = 0; i < variableContributors.size(); i++) {
+			for (int i = 0; i < explicitContributors.length; i++) {
 				final int ii = i;
 				Platform.run(new ISafeRunnable() {
 					public void handleException(Throwable exception) {
@@ -830,92 +861,33 @@
 					}
 
 					public void run() throws Exception {
-						IConfigurationContributor contrib = (IConfigurationContributor) variableContributors.get(ii);
-						if (contrib != null)
-							contrib.contributeToConfiguration(config);
+						IBeanInfoContributor contributor = explicitContributors[ii];
+						if (contributor instanceof IConfigurationContributor)
+							((IConfigurationContributor) contributor).contributeToConfiguration(config);
 					}
 				});
-			}
+			}			
 		}
 
-		public void contributeToRegistry(ProxyFactoryRegistry registry) {
-			setProxySearchPath(registry, computedSearchPath);
-			for (int i = 0; i < variableContributors.size(); i++) {
-				IConfigurationContributor contrib = (IConfigurationContributor) variableContributors.get(i);
-				if (contrib != null)
-					contrib.contributeToRegistry(registry);
-			}
+		public void contributeToRegistry(final ProxyFactoryRegistry registry) {
+			if (nature != null)
+				nature.setProxySearchPath(registry, computedSearchPath);
+			for (int i = 0; i < explicitContributors.length; i++) {
+				final int ii = i;
+				Platform.run(new ISafeRunnable() {
+					public void handleException(Throwable exception) {
+						// do nothing. by default platform logs.
+					}
+
+					public void run() throws Exception {
+						IBeanInfoContributor contributor = explicitContributors[ii];
+						if (contributor instanceof IConfigurationContributor)
+							((IConfigurationContributor) contributor).contributeToRegistry(registry);
+					}
+				});
+			}			
 		}
 	}
 
-	/*
-	 * An internal type CPEntry because an actual
-	 * entry also tests attachments, but we are only interested
-	 * in kind/path.
-	 * 
-	 * Note: This must not be used in a Hash... because its hashCode
-	 * doesn't work for this. This is because there is no hashCode
-	 * that we could compute that would allow IClasspathEntry's and
-	 * InternalCPEntry's that are semantically equal to hash to the same value.
-	 */
-	private static class InternalCPEntry {
-		int kind;
-		IPath path;
-		boolean isExported = true;
-
-		public InternalCPEntry(int kind, IPath path) {
-			setEntry(kind, path);
-		}
-
-		public InternalCPEntry() {
-		}
-
-		/*
-		 * Set if this entry is exported or not. This is not involved in
-		 * the equality test.
-		 */
-		public boolean isExported() {
-			return isExported;
-		}
-
-		public void setIsExported(boolean isExported) {
-			this.isExported = isExported;
-		}
-
-		public int getKind() {
-			return kind;
-		}
-
-		public IPath getPath() {
-			return path;
-		}
-
-		public boolean equals(Object o) {
-			if (this == o)
-				return true;
-
-			if (o instanceof IClasspathEntry) {
-				IClasspathEntry ce = (IClasspathEntry) o;
-				return kind == ce.getEntryKind() && path.equals(ce.getPath());
-			}
-
-			if (o instanceof InternalCPEntry) {
-				InternalCPEntry ice = (InternalCPEntry) o;
-				return kind == ice.kind && path.equals(ice.path);
-			}
-
-			return false;
-		}
-
-		public void setEntry(IClasspathEntry entry) {
-			setEntry(entry.getEntryKind(), entry.getPath());
-		}
-
-		public void setEntry(int kind, IPath path) {
-			this.kind = kind;
-			this.path = path;
-		}
-
-	}
 
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoPlugin.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoPlugin.java
new file mode 100644
index 0000000..7e74be5
--- /dev/null
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoPlugin.java
@@ -0,0 +1,544 @@
+package org.eclipse.jem.internal.beaninfo.core;
+/*******************************************************************************
+ * Copyright (c)  2001, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/*
+ *  $RCSfile: BeaninfoPlugin.java,v $
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
+ */
+
+
+import java.util.*;
+import java.util.logging.Level;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.*;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jdt.core.IClasspathContainer;
+
+import org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo;
+import org.eclipse.jem.internal.proxy.core.ProxyPlugin;
+import org.eclipse.jem.internal.proxy.core.ProxyPlugin.ContributorExtensionPointInfo;
+
+import com.ibm.wtp.common.logger.proxy.Logger;
+import com.ibm.wtp.logger.proxyrender.EclipseLogger;
+
+/**
+ * The plugin class for the org.eclipse.jem.internal.proxy.core plugin.
+ */
+
+public class BeaninfoPlugin extends Plugin {
+	public static final String PI_BEANINFO_PLUGINID = "org.eclipse.jem.beaninfo";	// Plugin ID, used for QualifiedName. //$NON-NLS-1$
+	public static final String PI_BEANINFO_OVERRIDES = "overrides";	// ID of the overrides extension point. //$NON-NLS-1$
+	
+	private static BeaninfoPlugin BEANINFO_PLUGIN = null;
+		
+	public BeaninfoPlugin(IPluginDescriptor pluginDescriptor) {	
+		super(pluginDescriptor);
+		BEANINFO_PLUGIN = this;
+	}
+	
+	/**
+	 * Accessor method to get the singleton plugin.
+	 */
+	public static BeaninfoPlugin getPlugin() {
+		return BEANINFO_PLUGIN;
+	}
+	
+	
+	private Map containerIdsToBeaninfoEntryContributions;
+	private Map pluginToBeaninfoEntryContributions;
+	private Map containerIdsToContributors;
+	private Map pluginToContributors;
+	/*
+	 * Override contributions from extension point.
+	 * ocFragments: Array of fragments paths. When a match is found for a path, the index
+	 * 		is the index into the ocContainerIds and ocPluginIds array for the contributions.
+	 * ocContainerIds: The first dimension is the index of the fragment that the list of OverrideContributions is for.
+	 * 		The second dimension is the array of contributions for that fragment, one per container id.
+	 * ocPluginIds: The first dimension is the index of the fragment that the list of OverrideContributions is for.
+	 * 		The second dimension is the array of contributions for that fragment, one per plugin id.
+	 * 
+	 * If a particular fragment doesn't have any entries of container and/or plugin, then EMPTY_OC is used for that
+	 * entry so that we don't need to check for null.
+	 * 
+	 * How this is used is for a particular path requested, the ocFragments will be searched for the fragments that
+	 * are appropriate, then the index of the entry is used to walk through the OC[] array returned from the ocContainerIds
+	 * or ocPluginIds. Each contribution would be checked to see if the container id/plugin id is in the visible classpath (through 
+	 * the info data stored in the persistent property). If it is, then the overrides from that contribution will be used.
+	 */
+	private IPath ocFragments[];
+	private OverrideContribution[][] ocContainerIds;
+	private OverrideContribution[][] ocPluginIds;
+	
+	private static final OverrideContribution[] EMPTY_OC = new OverrideContribution[0];	// Used for an empty contribution list for a fragment.
+
+	public BeaninfoEntry[] getContainerIdBeanInfos(String containerID) {
+		if (containerIdsToBeaninfoEntryContributions == null)
+			processBeanInfoContributionExtensionPoint();
+		return (BeaninfoEntry[]) containerIdsToBeaninfoEntryContributions.get(containerID);
+	}
+	
+	public BeaninfoEntry[] getPluginBeanInfos(String pluginid) {
+		if (pluginToBeaninfoEntryContributions == null)
+			processBeanInfoContributionExtensionPoint();
+		return (BeaninfoEntry[]) pluginToBeaninfoEntryContributions.get(pluginid);
+	}
+	
+	public IConfigurationElement[] getPluginContributors(String pluginid) {
+		if (pluginToContributors == null)
+			processBeanInfoContributionExtensionPoint();
+		return (IConfigurationElement[]) pluginToContributors.get(pluginid);
+	}	
+	
+	public IConfigurationElement[] getContainerIdContributors(String containerID) {
+		if (containerIdsToContributors == null)
+			processBeanInfoContributionExtensionPoint();
+		return (IConfigurationElement[]) containerIdsToContributors.get(containerID);
+	}	
+	
+	public static final String PI_BEANINFO_CONTRIBUTION_EXTENSION_POINT = PI_BEANINFO_PLUGINID+".registrations";
+	public static final String PI_REGISTRATION = "registration";
+	public static final String PI_BEANINFO = "beaninfo"; 
+	public static final String PI_OVERRIDE = "override";
+	public static final String PI_CONTRIBUTOR = "contributor";
+	public static final String PI_PACKAGE = "package";
+	public static final String PI_PATH = "path";
+	
+	protected void processBeanInfoContributionExtensionPoint() {
+		ContributorExtensionPointInfo info = ProxyPlugin.processContributionExtensionPoint(PI_BEANINFO_CONTRIBUTION_EXTENSION_POINT);
+		ConfigurationElementReader reader = new ConfigurationElementReader();
+		// Process the container IDs first.
+		containerIdsToBeaninfoEntryContributions = new HashMap(info.containerToContributions.size());
+		Map fragmentsToIds = new HashMap(info.containerToContributions.size());
+		for (Iterator iter = info.containerToContributions.entrySet().iterator(); iter.hasNext();) {
+			Map.Entry entry= (Map.Entry) iter.next();
+			String containerid = (String) entry.getKey();
+			IConfigurationElement[] configElements = (IConfigurationElement[]) entry.getValue();
+			for (int i = 0; i < configElements.length; i++) {
+				IConfigurationElement element = configElements[i];
+				if (PI_REGISTRATION.equals(element.getName())) {
+					IConfigurationElement[] children = element.getChildren();
+					for (int j = 0; j < children.length; j++) {
+						IConfigurationElement child = children[j];
+						if (PI_BEANINFO.equals(child.getName())) {
+							// This is a beaninfo entry
+							BeaninfoEntry be = BeaninfoEntry.readEntry(reader, child, null);
+							if (be != null)
+								addEntry(containerIdsToBeaninfoEntryContributions, containerid, be);
+						} else if (PI_OVERRIDE.equals(child.getName())) {
+							addOverrideEntry(fragmentsToIds, true, containerid, child);
+						}
+					}
+				} else if (PI_CONTRIBUTOR.equals(element.getName())) {
+						if (containerIdsToContributors == null)
+							containerIdsToContributors = new HashMap(5);	// These are rare, don't create until necessary.
+						addEntry(containerIdsToContributors, containerid, element);
+					}
+				}
+			}
+			
+		// Now go through and turn all of the contribution lists into arrays.
+		for (Iterator iter = containerIdsToBeaninfoEntryContributions.entrySet().iterator(); iter.hasNext();) {
+			Map.Entry entry = (Map.Entry) iter.next();
+			entry.setValue(((List) entry.getValue()).toArray(new BeaninfoEntry[((List) entry.getValue()).size()]));
+		}
+		
+		if (containerIdsToContributors == null)
+			containerIdsToContributors = Collections.EMPTY_MAP;	// Since we don't have any.
+		else {
+			for (Iterator iter = containerIdsToContributors.entrySet().iterator(); iter.hasNext();) {
+				Map.Entry entry = (Map.Entry) iter.next();
+				entry.setValue(((List) entry.getValue()).toArray(new IConfigurationElement[((List) entry.getValue()).size()]));
+			}			
+		}
+				
+		// Now process the plugin IDs.
+		pluginToBeaninfoEntryContributions = new HashMap(info.pluginToContributions.size());		
+		for (Iterator iter = info.pluginToContributions.entrySet().iterator(); iter.hasNext();) {
+			Map.Entry entry= (Map.Entry) iter.next();
+			String pluginId = (String) entry.getKey();
+			IConfigurationElement[] configElements = (IConfigurationElement[]) entry.getValue();
+			for (int i = 0; i < configElements.length; i++) {
+				IConfigurationElement element = configElements[i];
+				if (PI_REGISTRATION.equals(element.getName())) {
+					IConfigurationElement[] children = element.getChildren();
+					for (int j = 0; j < children.length; j++) {
+						IConfigurationElement child = children[j];
+						if (PI_BEANINFO.equals(child.getName())) {
+							// This is a beaninfo entry
+							BeaninfoEntry be = BeaninfoEntry.readEntry(reader, child, null);
+							if (be != null)
+								addEntry(pluginToBeaninfoEntryContributions, pluginId, be);
+						} else if (PI_OVERRIDE.equals(child.getName())) {
+							addOverrideEntry(fragmentsToIds, false, pluginId, child);
+						}
+					}
+				} else if (PI_CONTRIBUTOR.equals(element.getName())) {
+						if (pluginToContributors == null)
+							pluginToContributors = new HashMap(5);	// These are rare, don't create until necessary.
+						addEntry(pluginToContributors, pluginId, element);
+					}
+				}
+			}
+			
+		// Now go through and turn all of the contribution lists into arrays.
+		for (Iterator iter = pluginToBeaninfoEntryContributions.entrySet().iterator(); iter.hasNext();) {
+			Map.Entry entry = (Map.Entry) iter.next();
+			entry.setValue(((List) entry.getValue()).toArray(new BeaninfoEntry[((List) entry.getValue()).size()]));
+		}
+		
+		if (pluginToContributors == null)
+				pluginToContributors = Collections.EMPTY_MAP;	// Since we don't have any.
+		else {
+			for (Iterator iter = pluginToContributors.entrySet().iterator(); iter.hasNext();) {
+				Map.Entry entry = (Map.Entry) iter.next();
+				entry.setValue(((List) entry.getValue()).toArray(new IConfigurationElement[((List) entry.getValue()).size()]));
+			}			
+		}
+		
+		// Now handle the entire list of fragments.
+		ocFragments = new IPath[fragmentsToIds.size()];
+		ocContainerIds = new OverrideContribution[ocFragments.length][];
+		ocPluginIds = new OverrideContribution[ocFragments.length][];
+		Iterator iter;
+		int fragIndex;
+		for (iter = fragmentsToIds.entrySet().iterator(), fragIndex=0; iter.hasNext(); fragIndex++) {
+			Map.Entry mapEntry = (Map.Entry) iter.next();
+			ocFragments[fragIndex] = (IPath) mapEntry.getKey();
+			Map[] mapValue = (Map[]) mapEntry.getValue();
+			if (mapValue[0] == null)
+				ocContainerIds[fragIndex] = EMPTY_OC;
+			else {
+				Map containers = mapValue[0];
+				OverrideContribution[] ocContribution = ocContainerIds[fragIndex] = new OverrideContribution[containers.size()];
+				int ocIndex;
+				Iterator ocIterator;
+				for (ocIterator = containers.entrySet().iterator(), ocIndex=0; ocIterator.hasNext(); ocIndex++) {
+					Map.Entry containerEntry = (Map.Entry) ocIterator.next();
+					OverrideContribution oc = ocContribution[ocIndex] = new OverrideContribution();
+					oc.id = (String) containerEntry.getKey();
+					List[] ocLists = (List[]) containerEntry.getValue();
+					oc.pluginIds = (String[]) ocLists[0].toArray(new String[ocLists[0].size()]);
+					oc.paths = (String[]) ocLists[1].toArray(new String[ocLists[1].size()]);
+				}
+			}
+			if (mapValue[1] == null)
+				ocPluginIds[fragIndex] = EMPTY_OC;
+			else {
+				Map plugins = mapValue[1];
+				OverrideContribution[] ocContribution = ocPluginIds[fragIndex] = new OverrideContribution[plugins.size()];
+				int ocIndex;
+				Iterator ocIterator;
+				for (ocIterator = plugins.entrySet().iterator(), ocIndex=0; ocIterator.hasNext(); ocIndex++) {
+					Map.Entry pluginEntry = (Map.Entry) ocIterator.next();
+					OverrideContribution oc = ocContribution[ocIndex] = new OverrideContribution();
+					oc.id = (String) pluginEntry.getKey();
+					List[] ocLists = (List[]) pluginEntry.getValue();
+					oc.pluginIds = (String[]) ocLists[0].toArray(new String[ocLists[0].size()]);
+					oc.paths = (String[]) ocLists[1].toArray(new String[ocLists[1].size()]);
+				}
+			}			
+		}
+	}
+	
+	/*
+	 * Add an entry to the map. If the key doesn't exist, create an entry as an array. Then add the entry to array.
+	 */
+	private void addEntry(Map map, Object key, Object entry) {
+		List mapEntry = (List) map.get(key);
+		if (mapEntry == null) {
+			mapEntry = new ArrayList(1);
+			map.put(key, mapEntry);
+		}
+		mapEntry.add(entry);
+	}
+	
+	/*
+	 * Add an entry to the map.
+	 * id is the container/plugin id.
+	 * 
+	 * The structure of the map is:
+	 * 	key: fragment name
+	 * 	value: Map[2], where [0] is for container ids, and [1] is for plugin ids.
+	 * 		Map[x]:
+	 * 			key: container/plugin id
+	 * 			value: List[2], where [0] is list of plugin ids for the override, and [1] is list of paths for the override files relative to that plugin id.
+	 * 
+	 * After all done these maps/list will be boiled down to the arrays that will be used for lookup.
+	 */
+	private void addOverrideEntry(Map map, boolean container, Object id, IConfigurationElement entry) {
+		
+		String packageName = entry.getAttributeAsIs(PI_PACKAGE);
+		String plugin = null;
+		String pathString = entry.getAttributeAsIs(PI_PATH);
+		IPath fragment = null; 
+		if (packageName != null && packageName.length() > 0 && pathString != null && pathString.length() > 0) { 
+			fragment = new Path(packageName.replace('.', '/'));
+			if (pathString.charAt(pathString.length()-1) != '/')
+				pathString += '/';
+			if (pathString.charAt(0) != '/')
+				plugin = entry.getDeclaringExtension().getNamespace();
+			else {
+				if (pathString.length() > 4) {
+					int pend = pathString.indexOf('/', 1);
+					if (pend == -1 || pend >= pathString.length()-1)
+						return;	// invalid
+					plugin = pathString.substring(1, pend);
+					pathString = pathString.substring(pend+1);
+				} else
+					return;	// invalid
+			}
+		}
+		if (pathString.length() < 2)
+			return;	// invalid
+
+		Map[] mapEntry = (Map[]) map.get(fragment);
+		if (mapEntry == null) {
+			mapEntry = new HashMap[2];
+			map.put(fragment, mapEntry);
+		}
+		
+		if (container) {
+			if (mapEntry[0] == null)
+				mapEntry[0] = new HashMap(2);
+		} else {
+			if (mapEntry[1] == null)
+				mapEntry[1] = new HashMap(2);			
+		}
+		
+		List[] idEntry = (List[]) mapEntry[container ? 0 : 1].get(id);
+		if (idEntry == null) {
+			idEntry = new List[] {new ArrayList(1), new ArrayList(1)};
+			mapEntry[container ? 0 : 1].put(id, idEntry);
+		}
+
+		idEntry[0].add(plugin);
+		idEntry[1].add(pathString);
+	}	
+			
+	/*
+	 * This is an list of overrides that are available as a contribution for a specific fragment.
+	 * <ul>
+	 * <li>The id of this contribution. Either container or plugin id depending on which list it was in..
+	 * <li>The plugins array lists the plugin ids for all of the paths in this contribution.
+	 * <li>The paths array lists the folder path under that corresponding plugin from "pluginIds".
+	 * </ul> 
+	 * <p>
+	 * 
+	 * @since 1.0.0
+	 */
+	private static class OverrideContribution {
+		public String id;
+		public String[] pluginIds;
+		public String[] paths;
+	}
+	
+	/**
+	 * The runnable to use to override. This will be called in sequence
+	 * for each override path found. It is send in on the apply overrides call.
+	 * 
+	 * @since 1.0.0
+	 * @see BeaninfoPlugin#applyOverrides(IProject, String, String, ResourceSet, IOverrideRunnable)
+	 */
+	public interface IOverrideRunnable {
+		/**
+		 * This will be called with the path to use. It will be called over and over for every
+		 * override path found for a package. The path will be complete, including trailing '/'.
+		 * It will be in a URI format for a directory. Just append the filename to get a complete path.
+		 * 
+		 * @param overridePath
+		 * 
+		 * @since 1.0.0
+		 */
+		public void run(String overridePath);
+		
+		/**
+		 * This will be called with the actual resource to use. This will be called by special contributors that want
+		 * a special explicit override resource to be used.
+		 * <p>
+		 * Contributors should use the ResourceSet that was passed into them. This is so that anything java class that
+		 * the override resource points to will be found.
+		 * <p>
+		 * This resource will be automatically removed by BeanInfo after being applied. It must not be left around because
+		 * in the process of being applied it will be modified, so it could not be reused. 
+		 *  
+		 * @param overrideResource
+		 * 
+		 * @since 1.0.0
+		 */
+		public void run(Resource overrideRes);
+	}
+	
+	/**
+	 * This will be passed
+	 * 
+	 * @since 1.0.0
+	 */
+	public interface IContributorOverrideRunnable extends IOverrideRunnable {
+		
+		/**
+		 * This can be called by BeanInfo contributor for overrides to see if the path (path is for run(path) method)
+		 * has already been contributed once for this class. It can be used to save time. However, not necessary because
+		 * BeanInfo will not permit it to be contributed more than once for a class.
+		 * 
+		 * @param path
+		 * @return <code>true</code> if used already.
+		 * 
+		 * @since 1.0.0
+		 */
+		public boolean pathContributed(String path);
+		
+		/**
+		 * This can be called by BeanInfo contributor for overrides to see if the URI (path is for run(resource) method)
+		 * has already been contributed once for this class. It can be used to save time. However, not necessary because
+		 * BeanInfo will not permit the URI to be contributed more than once for a class.
+		 * 
+		 * @param resourceURI
+		 * @return <code>true</code> if used already.
+		 * 
+		 * @since 1.0.0
+		 */
+		public boolean resourceContributed(URI resourceURI);
+	}
+	
+	/**
+	 * Apply the runnable to all of the override paths that are applicable to the 
+	 * given package name. The package name uses '.' to delineate the fragments of the name,
+	 * i.e. use "<code>java.lang</code>" as a package name.
+	 * 
+	 * @param project the project to run against.
+	 * @param packageName
+	 * @param className class name of the class that is being overridden.
+	 * @param resource set that contributors can use to temporarily load dynamic override files.
+	 * @param runnable
+	 * 
+	 * @since 1.0.0
+	 */
+	public void applyOverrides(IProject project, String packageName, final String className, final ResourceSet rset, final IOverrideRunnable runnable) {
+		final IPath packagePath = new Path(packageName.replace('.', '/')+'/');
+		try {
+			IConfigurationContributionInfo info = (IConfigurationContributionInfo) project.getSessionProperty(BeaninfoNature.CONFIG_INFO_SESSION_KEY);
+			final IBeanInfoContributor[] explicitContributors = (IBeanInfoContributor[]) project.getSessionProperty(BeaninfoNature.BEANINFO_CONTRIBUTORS_SESSION_KEY);
+			
+			for (int fragmentIndex = 0; fragmentIndex < ocFragments.length; fragmentIndex++) {
+				if (ocFragments[fragmentIndex].isPrefixOf(packagePath)) {
+					String leftOver = null;	// The left over portion of the package. This will be set first time needed. 
+					OverrideContribution[] cntrContributions = ocContainerIds[fragmentIndex];
+					for (int ocindex = 0; ocindex < cntrContributions.length; ocindex++) {
+						OverrideContribution contribution = cntrContributions[ocindex];
+						Boolean visible = (Boolean) info.getContainerIds().get(contribution.id);
+						if (visible != null && visible.booleanValue()) {
+							for (int cindex = 0; cindex < contribution.pluginIds.length; cindex++) {
+								IPluginDescriptor pd = Platform.getPluginRegistry().getPluginDescriptor(contribution.pluginIds[cindex]);
+								if (pd != null) {
+									if (leftOver == null)
+										leftOver = getLeftOver(ocFragments[fragmentIndex], packagePath);
+									runnable.run(pd.getInstallURL().toString()+contribution.paths[cindex]+leftOver);
+								}
+							}
+						}
+					}
+					
+					OverrideContribution[] pluginContributions = ocPluginIds[fragmentIndex];
+					for (int ocindex = 0; ocindex < pluginContributions.length; ocindex++) {
+						OverrideContribution contribution = pluginContributions[ocindex];
+						Boolean visible = (Boolean) info.getPluginIds().get(contribution.id);
+						if (visible != null && visible.booleanValue()) {
+							for (int cindex = 0; cindex < contribution.pluginIds.length; cindex++) {
+								IPluginDescriptor pd = Platform.getPluginRegistry().getPluginDescriptor(contribution.pluginIds[cindex]);
+								if (pd != null) {
+									if (leftOver == null)
+										leftOver = getLeftOver(ocFragments[fragmentIndex], packagePath);
+									runnable.run(pd.getInstallURL().toString()+contribution.paths[cindex]+leftOver);
+								}
+							}
+						}
+					}
+				}
+			}
+
+			final Set usedPaths = new HashSet(10);	// Set of used paths. So that the contributors don't supply a path already used. This could cause problems if they did.
+			final IContributorOverrideRunnable contribRunnable = new IContributorOverrideRunnable() {
+				public void run(String overridePath) {
+					if (!usedPaths.contains(overridePath)) {
+						usedPaths.add(overridePath);
+						runnable.run(overridePath);
+					}
+				}
+				
+				public void run(Resource overrideRes) {
+					if (!usedPaths.contains(overrideRes.getURI())) {
+						usedPaths.add(overrideRes.getURI());
+						try {
+							runnable.run(overrideRes);
+						} finally {
+							overrideRes.getResourceSet().getResources().remove(overrideRes);
+						}
+					}
+				}
+				
+				public boolean pathContributed(String path) {
+					return usedPaths.contains(path);
+				}
+				
+				public boolean resourceContributed(URI resourceURI) {
+					return usedPaths.contains(resourceURI);
+				}
+			};
+			
+			// Run through the containers that implement IBeanInfoContributor.
+			for (Iterator iter = info.getContainers().entrySet().iterator(); iter.hasNext();) {
+				Map.Entry mapEntry = (Map.Entry) iter.next();
+				final IClasspathContainer container = (IClasspathContainer) mapEntry.getKey();
+				if (container instanceof IBeanInfoContributor && ((Boolean) mapEntry.getValue()).booleanValue()) {
+					Platform.run(new ISafeRunnable() {
+						public void handleException(Throwable exception) {
+							// Standard run logs to .log
+						}
+						public void run() throws Exception {
+							((IBeanInfoContributor) container).runOverrides(packagePath, className, rset, contribRunnable);						
+						}
+					});
+				}
+			}
+			
+			// Run through the explicint contributors.
+			for (int i=0; i<explicitContributors.length; i++) {
+				final int ii = i;
+				Platform.run(new ISafeRunnable() {
+					public void handleException(Throwable exception) {
+						// Standard run logs to .log
+					}
+					public void run() throws Exception {
+						explicitContributors[ii].runOverrides(packagePath, className, rset, contribRunnable);						
+					}
+				});
+			}			
+		} catch (CoreException e) {
+			getLogger().log(e, Level.INFO);
+		}
+	}
+	
+	private String getLeftOver(IPath fragment, IPath packagePath) {
+		return packagePath.removeFirstSegments(fragment.segmentCount()).toString();
+	}
+	
+	private Logger logger;
+	public Logger getLogger() {
+		if (logger == null)
+			logger = EclipseLogger.getEclipseLogger(this);
+		return logger;
+	}
+}
+
+
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoRegistration.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoRegistration.java
similarity index 94%
rename from plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoRegistration.java
rename to plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoRegistration.java
index ba8c376..ef74369 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfoRegistration.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfoRegistration.java
@@ -1,4 +1,4 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
+package org.eclipse.jem.internal.beaninfo.core;
 /*******************************************************************************
  * Copyright (c)  2001, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BeaninfoRegistration.java,v $
- *  $Revision: 1.1 $  $Date: 2003/10/27 17:17:59 $ 
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 import org.eclipse.core.runtime.IConfigurationElement;
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfosDoc.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfosDoc.java
similarity index 95%
rename from plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfosDoc.java
rename to plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfosDoc.java
index 0847370..9042f1f 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/BeaninfosDoc.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/BeaninfosDoc.java
@@ -1,4 +1,4 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
+package org.eclipse.jem.internal.beaninfo.core;
 /*******************************************************************************
  * Copyright (c)  2001, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BeaninfosDoc.java,v $
- *  $Revision: 1.1 $  $Date: 2003/10/27 17:17:59 $ 
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
  */
 import java.util.ArrayList;
 
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/ConfigurationElementReader.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/ConfigurationElementReader.java
similarity index 94%
rename from plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/ConfigurationElementReader.java
rename to plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/ConfigurationElementReader.java
index 9c9ce0c..223e6f9 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/ConfigurationElementReader.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/ConfigurationElementReader.java
@@ -1,4 +1,4 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
+package org.eclipse.jem.internal.beaninfo.core;
 /*******************************************************************************
  * Copyright (c)  2001, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
@@ -11,13 +11,14 @@
  *******************************************************************************/
 /*
  *  $RCSfile: ConfigurationElementReader.java,v $
- *  $Revision: 1.1 $  $Date: 2003/10/27 17:17:59 $ 
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 import java.lang.reflect.Array;
 
 import org.eclipse.core.runtime.IConfigurationElement;
 
+
 /**
  * For reading from IConfigurationElements
  * @version 	1.0
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/DOMReader.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/DOMReader.java
similarity index 94%
rename from plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/DOMReader.java
rename to plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/DOMReader.java
index 9368770..1a065a7 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/DOMReader.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/DOMReader.java
@@ -1,4 +1,4 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
+package org.eclipse.jem.internal.beaninfo.core;
 /*******************************************************************************
  * Copyright (c)  2001, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
@@ -11,13 +11,14 @@
  *******************************************************************************/
 /*
  *  $RCSfile: DOMReader.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/08 00:48:00 $ 
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
+
 /**
  * The internal class for reading dom elements.
  * @version 	1.0
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeanInfoContributor.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeanInfoContributor.java
new file mode 100644
index 0000000..b0eae80
--- /dev/null
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeanInfoContributor.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/*
+ *  $RCSfile: IBeanInfoContributor.java,v $
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
+ */
+package org.eclipse.jem.internal.beaninfo.core;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo;
+ 
+/**
+ * Interface for BeanInfo contributors. Supplied either as additional interface on a IClasspathContainer, or as
+ * an explicit contributor for BeanInfos from the manifest files.
+ * 
+ * @since 1.0.0
+ */
+public interface IBeanInfoContributor {
+	
+	/**
+	 * Return the BeanInfoEntry contributions that are needed.
+	 * @param info
+	 * @return
+	 * 
+	 * @since 1.0.0
+	 */
+	public BeaninfoEntry[] getBeanInfoEntryContributions(IConfigurationContributionInfo info);
+	
+	/**
+	 * For the given package path run the override contributions through the runnable.
+	 * 
+	 * @param packagePath
+	 * @param className the className of the class that the overrides is for. This can be used in very special cases to provide exact override files instead of letting the path be searched. An example would be for providing a file that isn't the same name as the class.
+	 * @param resource set that contributors can use to temporarily load dynamic override files.
+	 * @param runnable
+	 * 
+	 * @since 1.0.0
+	 */
+	public void runOverrides(IPath packagePath, String className, ResourceSet rset, BeaninfoPlugin.IContributorOverrideRunnable runnable);
+}
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/IBeaninfoSupplier.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeaninfoSupplier.java
similarity index 83%
rename from plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/IBeaninfoSupplier.java
rename to plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeaninfoSupplier.java
index 75011b3..5cc0163 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/IBeaninfoSupplier.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeaninfoSupplier.java
@@ -1,4 +1,4 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
+package org.eclipse.jem.internal.beaninfo.core;
 /*******************************************************************************
  * Copyright (c)  2001, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
@@ -11,10 +11,12 @@
  *******************************************************************************/
 /*
  *  $RCSfile: IBeaninfoSupplier.java,v $
- *  $Revision: 1.1 $  $Date: 2003/10/27 17:17:59 $ 
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 
+import org.eclipse.core.resources.IProject;
+
 import org.eclipse.jem.internal.proxy.core.ProxyFactoryRegistry;
 /**
  * Interface to supply information for beaninfo to decouple
@@ -41,5 +43,13 @@
 	 * reconstructed.
 	 */
 	public void closeRegistry();
+	
+	/**
+	 * Return the project that this supplier is for.
+	 * @return
+	 * 
+	 * @since 1.0.0
+	 */
+	public IProject getProject();
 
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/IBeaninfosDocEntry.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeaninfosDocEntry.java
similarity index 90%
rename from plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/IBeaninfosDocEntry.java
rename to plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeaninfosDocEntry.java
index 8055c34..75162d0 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/IBeaninfosDocEntry.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IBeaninfosDocEntry.java
@@ -1,4 +1,4 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
+package org.eclipse.jem.internal.beaninfo.core;
 /*******************************************************************************
  * Copyright (c)  2001, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: IBeaninfosDocEntry.java,v $
- *  $Revision: 1.1 $  $Date: 2003/10/27 17:17:59 $ 
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 import org.eclipse.core.resources.IProject;
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/IReader.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IReader.java
similarity index 92%
rename from plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/IReader.java
rename to plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IReader.java
index 4d3722b..fa7d83c 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/IReader.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/IReader.java
@@ -1,4 +1,4 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
+package org.eclipse.jem.internal.beaninfo.core;
 /*******************************************************************************
  * Copyright (c)  2001, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: IReader.java,v $
- *  $Revision: 1.1 $  $Date: 2003/10/27 17:17:59 $ 
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
  */
 /**
  * This is internal interface for reading beaninfoConfig either through IConfigurationElements or
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/Init.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/Init.java
similarity index 92%
rename from plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/Init.java
rename to plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/Init.java
index da0cf7b..abdab10 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/Init.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/Init.java
@@ -1,4 +1,4 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
+package org.eclipse.jem.internal.beaninfo.core;
 /*******************************************************************************
  * Copyright (c)  2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
@@ -11,11 +11,12 @@
  *******************************************************************************/
 /*
  *  $RCSfile: Init.java,v $
- *  $Revision: 1.1 $  $Date: 2003/10/27 17:17:59 $ 
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
  */
 import org.eclipse.emf.ecore.resource.ResourceSet;
 import org.eclipse.emf.ecore.util.EcoreUtil;
 
+import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoAdapterFactory;
 import org.eclipse.jem.internal.java.beaninfo.IIntrospectionAdapter;
 import org.eclipse.jem.internal.proxy.core.ProxyFactoryRegistry;
 
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/SearchpathEntry.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/SearchpathEntry.java
similarity index 97%
rename from plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/SearchpathEntry.java
rename to plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/SearchpathEntry.java
index 579fc53..7e4933b 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/SearchpathEntry.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/SearchpathEntry.java
@@ -1,4 +1,4 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
+package org.eclipse.jem.internal.beaninfo.core;
 /*******************************************************************************
  * Copyright (c)  2001, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: SearchpathEntry.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/08 00:48:00 $ 
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 import org.eclipse.core.resources.IProject;
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/SpecialResourceSet.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/SpecialResourceSet.java
similarity index 93%
rename from plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/SpecialResourceSet.java
rename to plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/SpecialResourceSet.java
index 701ef25..d015ae8 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/SpecialResourceSet.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/SpecialResourceSet.java
@@ -1,4 +1,4 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
+package org.eclipse.jem.internal.beaninfo.core;
 /*******************************************************************************
  * Copyright (c)  2001, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: SpecialResourceSet.java,v $
- *  $Revision: 1.3 $  $Date: 2004/02/24 19:33:46 $ 
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 import com.ibm.wtp.internal.emf.workbench.ProjectResourceSetImpl;
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/Utilities.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/Utilities.java
similarity index 98%
rename from plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/Utilities.java
rename to plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/Utilities.java
index 44a3dc3..a81ae2e 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/adapters/Utilities.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/core/Utilities.java
@@ -1,4 +1,4 @@
-package org.eclipse.jem.internal.beaninfo.adapters;
+package org.eclipse.jem.internal.beaninfo.core;
 /*******************************************************************************
  * Copyright (c)  2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: Utilities.java,v $
- *  $Revision: 1.2 $  $Date: 2004/01/13 16:17:00 $ 
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:10 $ 
  */
 import java.lang.reflect.InvocationTargetException;
 import java.util.Iterator;
@@ -23,11 +23,10 @@
 import org.eclipse.emf.ecore.resource.ResourceSet;
 
 import org.eclipse.jem.internal.beaninfo.*;
-import org.eclipse.jem.java.*;
-import org.eclipse.jem.java.JavaURL;
-import org.eclipse.jem.java.Method;
+import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoProxyConstants;
 import org.eclipse.jem.internal.java.adapters.ReflectionAdaptor;
 import org.eclipse.jem.internal.proxy.core.*;
+import org.eclipse.jem.java.*;
 
 /**
  * Beaninfo (introspection) utilities methods
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeanDecoratorImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeanDecoratorImpl.java
index 158690f..af661da 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeanDecoratorImpl.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/BeanDecoratorImpl.java
@@ -11,15 +11,13 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BeanDecoratorImpl.java,v $
- *  $Revision: 1.10 $  $Date: 2004/03/10 00:39:58 $ 
+ *  $Revision: 1.11 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.util.*;
 import java.util.Collection;
-import java.util.Iterator;
 import java.util.logging.Level;
 
 import org.eclipse.emf.common.notify.Notification;
@@ -35,16 +33,13 @@
 import org.eclipse.jem.internal.beaninfo.BeanDecorator;
 import org.eclipse.jem.internal.beaninfo.BeaninfoPackage;
 import org.eclipse.jem.internal.beaninfo.FeatureAttributeValue;
-import org.eclipse.jem.internal.beaninfo.adapters.*;
 import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoProxyConstants;
-import org.eclipse.jem.internal.beaninfo.adapters.Utilities;
+import org.eclipse.jem.internal.beaninfo.core.*;
 import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jem.internal.proxy.core.*;
 import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;
 import org.eclipse.jem.internal.proxy.core.IStringBeanProxy;
 import org.eclipse.jem.internal.proxy.core.ThrowableProxy;
 
-import com.ibm.wtp.logger.proxyrender.EclipseLogger;
 /**
  * <!-- begin-user-doc -->
  * An implementation of the model object '<em><b>Bean Decorator</b></em>'.
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/EventSetDecoratorImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/EventSetDecoratorImpl.java
index ebe5d06..bf998ef 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/EventSetDecoratorImpl.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/EventSetDecoratorImpl.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: EventSetDecoratorImpl.java,v $
- *  $Revision: 1.4 $  $Date: 2004/03/08 21:25:33 $ 
+ *  $Revision: 1.5 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 
@@ -43,7 +43,7 @@
 
 import org.eclipse.jem.internal.beaninfo.*;
 import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoProxyConstants;
-import org.eclipse.jem.internal.beaninfo.adapters.Utilities;
+import org.eclipse.jem.internal.beaninfo.core.Utilities;
 import org.eclipse.jem.internal.proxy.core.*;
 import org.eclipse.jem.java.*;
 /**
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/IndexedPropertyDecoratorImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/IndexedPropertyDecoratorImpl.java
index 9f02f3d..ab6b432 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/IndexedPropertyDecoratorImpl.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/IndexedPropertyDecoratorImpl.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: IndexedPropertyDecoratorImpl.java,v $
- *  $Revision: 1.2 $  $Date: 2004/01/13 16:17:00 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 
@@ -30,7 +30,7 @@
 import org.eclipse.jem.internal.beaninfo.BeaninfoPackage;
 import org.eclipse.jem.internal.beaninfo.IndexedPropertyDecorator;
 import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoProxyConstants;
-import org.eclipse.jem.internal.beaninfo.adapters.Utilities;
+import org.eclipse.jem.internal.beaninfo.core.Utilities;
 import org.eclipse.jem.java.JavaClass;
 import org.eclipse.jem.java.Method;
 import org.eclipse.jem.internal.proxy.core.IMethodProxy;
diff --git a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/PropertyDecoratorImpl.java b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/PropertyDecoratorImpl.java
index 1a73de3..f25a92e 100644
--- a/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/PropertyDecoratorImpl.java
+++ b/plugins/org.eclipse.jem.beaninfo/beaninfo/org/eclipse/jem/internal/beaninfo/impl/PropertyDecoratorImpl.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: PropertyDecoratorImpl.java,v $
- *  $Revision: 1.2 $  $Date: 2004/01/13 16:17:00 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:49:10 $ 
  */
 
 
@@ -33,7 +33,7 @@
 import org.eclipse.jem.internal.beaninfo.BeaninfoPackage;
 import org.eclipse.jem.internal.beaninfo.PropertyDecorator;
 import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoProxyConstants;
-import org.eclipse.jem.internal.beaninfo.adapters.Utilities;
+import org.eclipse.jem.internal.beaninfo.core.Utilities;
 import org.eclipse.jem.java.JavaClass;
 import org.eclipse.jem.java.Method;
 import org.eclipse.jem.internal.proxy.core.IBeanProxy;
diff --git a/plugins/org.eclipse.jem.beaninfo/build.properties b/plugins/org.eclipse.jem.beaninfo/build.properties
index f1b4ce1..43df901 100644
--- a/plugins/org.eclipse.jem.beaninfo/build.properties
+++ b/plugins/org.eclipse.jem.beaninfo/build.properties
@@ -4,7 +4,8 @@
                beaninfo.jar,\
                vm/beaninfovm.jar,\
                about.html,\
-               .options
+               .options,\
+               schema/
 jars.compile.order = vm/beaninfovm.jar,\
                      beaninfo.jar
 src.includes = about.html,\
diff --git a/plugins/org.eclipse.jem.beaninfo/plugin.properties b/plugins/org.eclipse.jem.beaninfo/plugin.properties
index bbcf62c..0ebff3d 100644
--- a/plugins/org.eclipse.jem.beaninfo/plugin.properties
+++ b/plugins/org.eclipse.jem.beaninfo/plugin.properties
@@ -10,12 +10,13 @@
 ###############################################################################
 #
 # $Source: /cvsroot/webtools/jeetools.move/webtools.javaee.git/plugins/org.eclipse.jem.beaninfo/plugin.properties,v $
-# $Revision: 1.2 $  $Date: 2004/02/14 18:36:32 $
+# $Revision: 1.3 $  $Date: 2004/03/22 23:49:10 $
 #
 
 
 pluginName=Java EMF Model BeanInfo (Introspection) Support
 providerName = Eclipse.org
 beaninfoNatureName=Java Model BeanInfo Nature
+registrations.extensionpoint.name=BeanInfo extension registrations
 
 INTROSPECT_FAILED_EXC_ = Introspection failed on class "{0}." msg="{1}."
\ No newline at end of file
diff --git a/plugins/org.eclipse.jem.beaninfo/plugin.xml b/plugins/org.eclipse.jem.beaninfo/plugin.xml
index e39d3a1..1f83ecc 100644
--- a/plugins/org.eclipse.jem.beaninfo/plugin.xml
+++ b/plugins/org.eclipse.jem.beaninfo/plugin.xml
@@ -4,7 +4,7 @@
    name="%pluginName"
    version="1.0.0"
    provider-name="%providerName"
-   class="org.eclipse.jem.internal.beaninfo.adapters.BeaninfoPlugin">
+   class="org.eclipse.jem.internal.beaninfo.core.BeaninfoPlugin">
 
    <runtime>
       <library name="beaninfo.jar">
@@ -26,95 +26,10 @@
       <import plugin="com.ibm.wtp.common.util"/>
       <import plugin="com.ibm.wtp.emf.workbench"/>
       <import plugin="org.eclipse.osgi"/>
-      
    </requires>
 
 
-<!-- This extension point is for registering beaninfos based on classpath variable paths.
-        Format is:
-        <extension point="org.eclipse.jem..beaninfo.registrations">
-          <variable path="avariablename" (or path="avariablename/something.jar")
-               contributor="classname of an IConfigurationContributor">
-            <beaninfos>
-              <beaninfo kind="plugin" path="/apluginid/something.jar">
-                <searchpath package="com.sun.corba.se.internal.ior"/>
-                <searchpath package="org.eclipse.jem.beaninfo.testing.infos.project"/>
-              </beaninfo>
-              <searchpath package="com.sun.corba.se.internal.ior"/>
-            </beaninfos>
-          </variable>
-        </extension>
-        
-        If it is of type "avariablename", then this info will be used for all variable classpath entries
-        that start with this variable. This allows several bean class jars that are subpaths
-        of a variable to share the same beaninfo information.
-        
-        If it is of type "avariablename/...", then this info will be used only for this particular
-        path.
-        
-        If contributor is set, then using standard IExecutableExtension protocol, the contributor will
-        instantiated and will be able to contribute to the remote vm. It needs to implement
-        org.eclipse.jem.internal.proxy.core.IConfigurationContributor and can implement org.eclipse.core.runtime.IExecutableExtension
-        if it needs parameters or to be called with the standard extension initialize information.
-        
-        There can be more than one for the same path, they will be concatenated together. Probably
-        shouldn't do this in the same plugin, but it allows multiple plugins to contribute beaninfos
-        to the same variable path. Though the final order is indeterminate since it is the order
-        the extension points are processed.
-        
-        The <beaninfo> refer to the classes location that contains the beaninfo classes themselves
-        to use with this variable path. There can be more than one. The <searchpath> within these are
-        the searchpaths to use (in the order given) for that beaninfo class location.
-        
-        The <searchpath> not under a <beaninfo> are for when the beaninfo classes are located in the 
-        jar the variable path points to. The jar in the variable path is in the actual project's
-        classpath and buildpath. So in this the beaninfo classes are there too. This allows the packages
-        to be added to the searchpath. -->
-   <extension-point id="registrations" name="Registration of pre-defined beaninfos"/>
-<!-- This extension point is registering beaninfo override xmi files. This documents will be used
-        to pre-populate the beaninfos. Then they can say that the beaninfos from the remove vm
-        are to merge into these beaninfos, or they can actually turn off introspection on the 
-        remote vm on a per-class basis. The format is:
-        
-        <extension point="org.eclipse.jem.beaninfo.overrides">
-          <override package="java" path="xyz/java"/>
-          <override package="java.awt" path="xyzq/java/awt"/>          
-        </extension>
-        
-        The package is matched on package for a class, and if it matches, it will take the
-        path and append the non-matched portion of the package and class name and attach ".xmi" and see if that file exists. If it does, then that file is
-        loaded with the overrides. It will search through all of the extensions with matching
-        packages and applies them all. The order is indeterminate so the individual ones should
-        not rely on ones from a different extension being applied first.
-        
-        A match is if the package of the class starts with a package from the overrides. For example,
-        "java.awt.Component" will match overrides "java" and "java.awt". It will not match "java.a".
-        It needs to match on a package fragment boundary (i.e. on the parts seperated by a period).
-        
-        So in the above example, if the class is java.awt.Component it will look for a file
-        named "xyz/java/awt/Component.xmi". It will also match the second one, so it will also
-        look for "yyzq/java/awt/Component.xmi".
-        
-        This allows you to have one directory for the lowest common part of your package names,
-        and they would all be found in subdirectories of this.
-        
-        There is a special package mapping, called "..ROOT..". This is used to override java.lang.Object and
-        any interface. It will use the ..ROOT...xmi file in the path, and it will apply the specified overrides
-        to the java.lang.Object or the interface. This is used to apply a common consistent set of features
-        to the root objects (Object and Interfaces are all root objects, i.e. there is no super type of these).
-        In the diff file, to reference the root object in question, use notifier="#..ROOT..". An example extension point would be:
-        
-        <extension point="org.eclipse.jem.beaninfo.overrides">
-          <override package="..ROOT.." path="platform:/plugin/myplugin/overrides"/>
-        </extension>
-        
-        So in this case it will look for the file "platform:/plugin/myplugin/overrides/..ROOT...xmi".
-        
-        Since these can be in plugin directories, the path
-        can use the "platform:/plugin/.../" format or it 
-        can use the EMF URI Mapping extension point to access files within a plugin.
-        -->
-   <extension-point id="overrides" name="Registration of beaninfo override documents"/>
+   <extension-point id="registrations" name="%registrations.extensionpoint.name" schema="schema/registrations.exsd"/>
 
    <extension
          id="BeanInfoNature"
@@ -122,7 +37,7 @@
          point="org.eclipse.core.resources.natures">
       <runtime>
          <run
-               class="org.eclipse.jem.internal.beaninfo.adapters.BeaninfoNature">
+               class="org.eclipse.jem.internal.beaninfo.core.BeaninfoNature">
          </run>
       </runtime>
    </extension>
diff --git a/plugins/org.eclipse.jem.beaninfo/schema/registrations.exsd b/plugins/org.eclipse.jem.beaninfo/schema/registrations.exsd
new file mode 100644
index 0000000..27a7076
--- /dev/null
+++ b/plugins/org.eclipse.jem.beaninfo/schema/registrations.exsd
@@ -0,0 +1,253 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.jem.beaninfo">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.jem.beaninfo" id="registrations" name="BeanInfo Extension Registrations"/>
+      </appInfo>
+      <documentation>
+         This extension point is used to register contributors, beaninfo, and overrides for BeanInfo contributions.
+&lt;p&gt;An important concept is visibility of a container, plugin, or project to the top-level project. The top-level project is the project being introspected. For a container, plugin, or project to be visible to that project, the container, plugin, or project must be in the classpath of the top-level project, or it must be exported from a visible project or plugin. Once a non-visible project/plugin is reached, any projects, containers, or plugins that it may contain are not considered to be visible.
+&lt;p&gt;The registrations are identified with the container id and/or plugin id. If that container or plugin is visible, then that registration will be processed for the top-level project. If the container/plugin is found more than once in the build path of the top-level project, it will only be processed once.
+&lt;p&gt;There are three forms of registrations.
+&lt;ul&gt;
+&lt;li&gt;BeanInfo registrations. These supply standard BeanInfo and overrides.
+&lt;li&gt;&lt;samp&gt;IClasspathContainer&lt;/samp&gt; that implements &lt;samp&gt;IBeanInfoContributor&lt;/samp&gt;.
+&lt;li&gt;An explicit contributor that implements &lt;samp&gt;IBeanInfoContributor&lt;/samp&gt;.
+&lt;/ul&gt;
+&lt;p&gt;It runs through the visible BeanInfo registrations. 
+&lt;p&gt;
+The IClasspathContainer registration isn&apos;t specified as part of this extension point. For all visible containers, if the classpath container (from JDT) also implements IBeanInfoContributor, then it will be called to contribute to the BeanInfo.
+&lt;p&gt;Then it runs through the visible explicit contributors. Note that if the explicit contributor also implements &lt;samp&gt;org.eclipse.jem.internal.proxy.core.IConfigurationContributor&lt;/samp&gt; it will also be called for proxy contributions. This allows for special setup required by any contributed BeanInfo for the launched proxy registry. This shouldn&apos;t normally be necessary because normal classpath updates to include the BeanInfo jar will be done by the IBeanInfoContributor itself through the BeanInfo registration callback.
+&lt;p&gt;The only order guarantee is that contributions from this extension point will be processed in plugin order of where the extension was declared. For example if there was an extension declared in plugin A and in plugin B, and plugin B requires plugin A, then the extensions declarations in plugin A will be processed before the extension declarations in plugin B.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <complexType>
+         <sequence>
+            <element ref="registration" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="contributor" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a fully qualified identifier of the target extension point
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  an optional identifier of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  an optional name of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="registration">
+      <annotation>
+         <documentation>
+            This is a registration for a container or plugin. It supplies the BeanInfo and the overrides.
+         </documentation>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="beaninfo" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="override" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="container" type="string">
+            <annotation>
+               <documentation>
+                  contributor is for a container. The value is the container id (e.g. &quot;JRE_CONTAINER&quot;).
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="plugin" type="string">
+            <annotation>
+               <documentation>
+                  contributor is for a plugin. The value is the plugin id (e.g. &quot;org.eclipse.swt&quot;).
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="contributor">
+      <annotation>
+         <documentation>
+            This is a contributor for the visible container/plugin defined by container and plugin attributes.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="container" type="string">
+            <annotation>
+               <documentation>
+                  contributor is for a container. The value is the container id (e.g. &quot;JRE_CONTAINER&quot;).
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="plugin" type="string">
+            <annotation>
+               <documentation>
+                  contributor is for a plugin. The value is the plugin id (e.g. &quot;org.eclipse.swt&quot;).
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  the class that implements this contributor. The class must implement IBeanInfoContributor.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.jem.internal.beaninfo.core.IBeanInfoContributor"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="beaninfo">
+      <annotation>
+         <documentation>
+            Provide a BeanInfo jar from this or some other plugin, and provide search path packages.
+         </documentation>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="searchpath" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="path" type="string" use="required">
+            <annotation>
+               <documentation>
+                  This is the path to the BeanInfo jar from within this or some other plugin. If it is within this plugin, there should be no leading &apos;/&apos;. There can be subfolders though, e.g. &lt;samp&gt;xyz/qxr.jar&lt;/samp&gt;. If it is within another plugin, then it must be fully-qualified with leading &apos;/&apos; followed by plugin id, followed by a &apos;/&apos; and then the path to the jar relative to that plugin, e.g. &lt;samp&gt;/org.xyz/qxr/ddd.jar&lt;/samp&gt;.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="searchpath">
+      <annotation>
+         <documentation>
+            This is a search path. It gives the package to add to the search path for BeanInfo.
+It refers to packages within the BeanInfo jar contributed by the &lt;samp&gt;beaninfo&lt;/samp&gt; element that it is found within.
+There really should be at least one search path. The only way this jar could contribute BeanInfo and not need something added to the search path is if the BeanInfos are in the same package as the bean itself. This is not a recommended way of supplying BeanInfo.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="package" type="string" use="required">
+            <annotation>
+               <documentation>
+                  This is the java package to search into for BeanInfo. If there are more than one search paths in this &lt;samp&gt;beaninfo&lt;/samp&gt; element, then they will be searched in the order found in the element.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="override">
+      <annotation>
+         <appInfo>
+            <meta.element labelAttribute="package"/>
+         </appInfo>
+         <documentation>
+            This describes an override file for BeanInfo. An override file is an XMI file that is read when a class is first introspected. It happens before the actual introspection. It allows overrides to the Java EMF model class (&lt;samp&gt;JavaClass&lt;/samp&gt;) that can be done through standard BeanInfo. These are annotations that are specific to the Visual Editor implementation in Eclipse. The annotations have no meaning to the standard BeanInfo specification so they are supplied here instead. They provide a much enriched experience in the Visual Editor by providing classes that run in the editor.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="package" type="string" use="required">
+            <annotation>
+               <documentation>
+                  This is the name of a package or a package fragment. When this package or package fragment matches the package or fragment of a class being introspected, the specified override file from the given path will be applied. For example if the package was &lt;samp&gt;javax.swing&lt;/samp&gt; and the path was &quot;xyz&quot;, then for class &quot;javax.swing.Container&quot; it will look for file &quot;xyz/Container.override&quot;, and if found, it will apply it. If it was &lt;samp&gt;javax.swing.text.JTextComponent&lt;/samp&gt; it will look for file &quot;xyz/text/JTextComponent.override&quot;.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="path" type="string" use="required">
+            <annotation>
+               <documentation>
+                  This is the path relative to the plugin where this extension is declared for the folder to search for the override files. See the package attribute description above for how this works.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         1.0.0
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         The following is an example of a registration:
+&lt;p&gt;
+&lt;pre&gt;
+  &lt;extension point=&quot;org.eclipse.jem.beaninfo.registration&quot;&gt;
+    &lt;registration container=&quot;VE_CONTAINER&quot;&gt;
+      &lt;beaninfo path=&quot;xyzbeaninfo.jar&quot;&gt;
+        &lt;searchpath package=&quot;com.xyz.beaninfo&quot;/&gt;
+        &lt;searchpath package=&quot;com.xyz.qxr.beaninfo&quot;/&gt;
+      &lt;/beaninfo&gt;
+      &lt;override package=&quot;com.xyz&quot; path=&quot;overrides/e&quot;/&gt;
+    &lt;/registration&gt;
+    &lt;contributor plugin=&quot;org.eclipse.ve&quot; class=&quot;com.xyz.myContributor&quot;/&gt;
+  &lt;/extension&gt;
+&lt;/pre&gt;
+&lt;/p&gt;
+&lt;p&gt;
+This says that if container &quot;VE_CONTAINER&quot; is visible to the project being introspected, then then BeanInfo jar &quot;xyzbeaninfo.jar&quot; (found in the plugin that declared this extension) will be looked into for BeanInfos. The two packages listed will be added to the search path of packages.
+&lt;p&gt;
+The override says that, again for &quot;VE_CONTAINER&quot; visible, for any classes that start with &quot;com.xyz&quot;, then the override file (classname.override) will be searched for in the directory &quot;overrides/e&quot;. For example, if the class was &lt;samp&gt;com.xyz.ABC&lt;/samp&gt; it will look for override file &quot;overrides/e/ABC.override&quot;. If the class was &lt;samp&gt;com.xyz.qxr.ABC&lt;/samp&gt; it will for file &quot;overrides/e/qxr/ABC.override&quot;.
+&lt;p&gt;
+Finally if plugin &quot;org.eclipse.ve&quot; is visible to the project, then &lt;samp&gt;com.xyz.myContributor&lt;/samp&gt; will be used to contribute to the BeanInfo.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         The &lt;samp&gt;class&lt;/samp&gt; attribute must be a class that implements the &lt;samp&gt;org.eclipse.jem.internal.beaninfo.core.IBeanInfoContributor&lt;/samp&gt; interface.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2004 IBM Corporation and others.&lt;br&gt;
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Common Public License v1.0 which accompanies 
+this distribution, and is available at 
+&lt;a href=&quot;http://www.eclipse.org/legal/cpl-v10.html&quot;&gt;http://www.eclipse.org/legal/cpl-v10.html&lt;/a&gt;
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/plugins/org.eclipse.jem.proxy/plugin.properties b/plugins/org.eclipse.jem.proxy/plugin.properties
index 5411f87..e7b63a5 100644
--- a/plugins/org.eclipse.jem.proxy/plugin.properties
+++ b/plugins/org.eclipse.jem.proxy/plugin.properties
@@ -10,10 +10,11 @@
 ###############################################################################
 #
 # $Source: /cvsroot/webtools/jeetools.move/webtools.javaee.git/plugins/org.eclipse.jem.proxy/plugin.properties,v $
-# $Revision: 1.2 $  $Date: 2004/03/04 16:14:04 $
+# $Revision: 1.3 $  $Date: 2004/03/22 23:49:02 $
 #
 
 
 pluginName=Java EMF Model Proxy Support
 providerName = Eclipse.org
+contributors.extensionpoint.name=Proxy configuration contributors
 Launch.localProxy=Local Proxy Application
diff --git a/plugins/org.eclipse.jem.proxy/plugin.xml b/plugins/org.eclipse.jem.proxy/plugin.xml
index d29a1c2..f7d261f 100644
--- a/plugins/org.eclipse.jem.proxy/plugin.xml
+++ b/plugins/org.eclipse.jem.proxy/plugin.xml
@@ -43,7 +43,7 @@
    </requires>
 
 
-   <extension-point id="contributor" name="Proxy Configuration Contributor" schema="schema/contributor.exsd"/>
+   <extension-point id="contributors" name="%contributors.extensionpoint.name" schema="schema/contributors.exsd"/>
 
    <extension
          point="org.eclipse.debug.core.launchConfigurationTypes">
diff --git a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ConfigurationContributorAdapter.java b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ConfigurationContributorAdapter.java
new file mode 100644
index 0000000..a5571fc
--- /dev/null
+++ b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ConfigurationContributorAdapter.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/*
+ *  $RCSfile: ConfigurationContributorAdapter.java,v $
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:02 $ 
+ */
+package org.eclipse.jem.internal.proxy.core;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+ 
+/**
+ * This is an implementation of IConfigurationContributor that does nothing. It
+ * can be subclassed to provide specific overrides.
+ * @since 1.0.0
+ */
+public class ConfigurationContributorAdapter implements IConfigurationContributor {
+
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributor#initialize(org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo)
+	 */
+	public void initialize(IConfigurationContributionInfo info) {
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributor#contributeClasspaths(org.eclipse.jem.internal.proxy.core.IConfigurationContributionController)
+	 */
+	public void contributeClasspaths(IConfigurationContributionController controller) throws CoreException {
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributor#contributeToConfiguration(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+	 */
+	public void contributeToConfiguration(ILaunchConfigurationWorkingCopy config) throws CoreException {
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributor#contributeToRegistry(org.eclipse.jem.internal.proxy.core.ProxyFactoryRegistry)
+	 */
+	public void contributeToRegistry(ProxyFactoryRegistry registry) {
+	}
+}
diff --git a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributionController.java b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributionController.java
index 2d888d2..7895a89 100644
--- a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributionController.java
+++ b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributionController.java
@@ -11,14 +11,12 @@
  *******************************************************************************/
 /*
  *  $RCSfile: IConfigurationContributionController.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/07 17:21:42 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:49:02 $ 
  */
 
-import java.util.Set;
-
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.IPluginDescriptor;
 import org.eclipse.jdt.core.IJavaProject;
 ;
 /**
@@ -75,36 +73,7 @@
 	 * @since 1.0.0
 	 */
 	public IJavaProject getJavaProject();
-	
-	/**
-	 * Return the set of containers that are found in the classpath. This is useful for determining
-	 * if the container impliments a contributor interface.
-	 * 
-	 * @return set of containers. Elements of type IClasspathContainer. <code>null</code> if launch not in a project.
-	 * 
-	 * @see org.eclipse.jdt.core.IClasspathContainer
-	 * @since 1.0.0
-	 */
-	public Set getContainers();
-	
-	/**
-	 * Return the set of container ids that are found in the classpath.
-	 * 
-	 * @return set of container ids. Elements of type String. <code>null</code> if launch not in a project.
-	 * 
-	 * @since 1.0.0
-	 */
-	public Set getContainerIds();
-	
-	/**
-	 * Return the set of plugin ids that are found in the classpath.
-	 * 
-	 * @return set of plugin ids. Elements of type String. <code>null</code> if launch not in a project.
-	 * 
-	 * @since 1.0.0
-	 */
-	public Set getPluginIds();	
-	
+		
 	/**
 	 * Add a project to the classpath. The type flag tells where to add it.
 	 * 
@@ -157,12 +126,12 @@
 	 * <p>
 	 * This is useful for nls where the nls for the filename will be in one or more of the fragments of the plugin.	 	 
 	 * 
-	 * @param plugin The plugin it can be found in.
+	 * @param pluginDescriptor The plugin descriptor it can be found in.
 	 * @param relativePath Path to file/folder relative to bundle root. If it is <code>APPEND_JAVA_LIBRARY_PATH</code>, it should be folder and nlsLocalize will be ignored.
 	 * @param typeFlag One of <code>APPEND_USER_CLASSPATH</code>, <code>APPEND_BOOT_CLASSPATH</code>, <code>PREPEND_BOOT_CLASSPATH</code>, or <code>APPEND_JAVA_LIBRARY_PATH</code>.
 	 * @param nlsLocalize The usual value should be <code>false</code>. Use <code>true</code> if should look through fragments to gather them all as described in this methods description.
 	 * 
 	 * @since 1.0.0
 	 */
-	public void contributeClasspath(Plugin plugin, String relativePath, int typeFlag, boolean nlsLocalize);	
+	public void contributeClasspath(IPluginDescriptor plugin, String relativePath, int typeFlag, boolean nlsLocalize);	
 }
diff --git a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributionInfo.java b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributionInfo.java
new file mode 100644
index 0000000..d2c9c35
--- /dev/null
+++ b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributionInfo.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/*
+ *  $RCSfile: IConfigurationContributionInfo.java,v $
+ *  $Revision: 1.1 $  $Date: 2004/03/22 23:49:02 $ 
+ */
+package org.eclipse.jem.internal.proxy.core;
+
+import java.util.Map;
+
+import org.eclipse.jdt.core.IJavaProject;
+ 
+/**
+ * This interface will be passed to the IConfigurationContributor initialize method. It has info
+ * that may be needed by the contributor. It may be saved for later use, but if classpaths have changed,
+ * it won't be kept up to date.
+ * <p>
+ * This interface is not intended to be implemented by clients.
+ * </p>
+ * 
+ * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributor#initialize(IConfigurationContributionInfo)
+ * @since 1.0.0
+ */
+public interface IConfigurationContributionInfo {
+	/**
+	 * Get the java project that we are contributing for.
+	 * 
+	 * @return javaproject, may be <code>null</code>
+	 * 
+	 * @since 1.0.0
+	 */
+	public IJavaProject getJavaProject();
+	
+	/**
+	 * Return the map of containers (the key) that are found in the classpath. This is useful for determining
+	 * if the container impliments a contributor interface.
+	 * <p>
+	 * Value will <code>Boolean</code> and will be true if container was visible to top-level project.
+	 * 
+	 * @return Map of containers. Keys of type IClasspathContainer. Empty if launch not in a project.
+	 * 
+	 * @see org.eclipse.jdt.core.IClasspathContainer
+	 * @since 1.0.0
+	 */
+	public Map getContainers();
+	
+	/**
+	 * Return the map of container ids (the key) that are found in the classpath.
+	 * <p>
+	 * Value will <code>Boolean</code> and will be true if container id was visible to top-level project.
+	 * 
+	 * @return map of container ids. Keys of type String. Empty if launch not in a project.
+	 * 
+	 * @since 1.0.0
+	 */
+	public Map getContainerIds();
+	
+	/**
+	 * Return the map of plugin ids (the key) that are found in the classpath.
+	 * <p>
+	 * Value will <code>Boolean</code> and will be true if plugin was visible to top-level project.
+	 * 
+	 * @return map of plugin ids. Key of type String. Empty if launch not in a project.
+	 * 
+	 * @since 1.0.0
+	 */
+	public Map getPluginIds();	
+	
+	/**
+	 * Return the map of project paths (the key) that are found in the classpath. The top-level project
+	 * will NOT be in this list since it is assumed to be visible to itself.
+	 * <p>
+	 * Value will <code>Boolean</code> and will be true if project was visible to top-level project.
+	 * 
+	 * @return map of project paths. Key of type <code>IPath</code>. Empty if launch not in a project.
+	 * 
+	 * @see org.eclipse.core.runtime.IPath
+	 * @since 1.0.0
+	 */
+	public Map getProjectPaths();	
+	
+}
diff --git a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributor.java b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributor.java
index 52cf7c7..e4ff11f 100644
--- a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributor.java
+++ b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/IConfigurationContributor.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: IConfigurationContributor.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/04 16:14:04 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:49:02 $ 
  */
 
 
@@ -26,6 +26,24 @@
  * @since 1.0.0
  */
 public interface IConfigurationContributor {
+	
+	/**
+	 * Called first before any of the other calls. This can be used to do any internal initializations
+	 * required by the other calls. That way the other calls can have the order changed as the implementation
+	 * requires.
+	 * <p>
+	 * NOTE: For those who nest configuration contributors (i.e. within an implementation of a contributor, more
+	 * contributors are discovered) then it is imperitive that when those contributors are discovered that this method
+	 * be called on them too. This is necessary so the contract with contributors can be followed. It is best if the
+	 * discoveries are actually done in the initialize method itself so that it can pass the launch info right there.
+	 * 
+	 * @param info info contains things like containers visible, etc.
+	 * 
+	 * @see IConfigurationContributionInfo
+	 * @since 1.0.0
+	 */
+	public void initialize(IConfigurationContributionInfo info);
+	
 	/**
 	 * Contribute to the classpath. The controller is used to do the actual contribution.
 	 * 
diff --git a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyLaunchSupport.java b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyLaunchSupport.java
index 25bfc19..c561388 100644
--- a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyLaunchSupport.java
+++ b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyLaunchSupport.java
@@ -10,7 +10,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: ProxyLaunchSupport.java,v $
- *  $Revision: 1.4 $  $Date: 2004/03/07 17:21:42 $ 
+ *  $Revision: 1.5 $  $Date: 2004/03/22 23:49:02 $ 
  */
 package org.eclipse.jem.internal.proxy.core;
 
@@ -22,8 +22,6 @@
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.debug.core.*;
 import org.eclipse.jdt.core.*;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
  
 /**
@@ -52,8 +50,15 @@
 	
 	/**
 	 * LaunchInfo for a launch. Stored by key and retrievable by the key.
+	 * This is only passed to launch delegates. It should not be passed on to
+	 * others, thought the IConfigurationContributionInfo may be.
+	 * 
+	 * <p>
+	 * This class is not intended to be subclassed by clients.
+	 * </p>
 	 * 
 	 * @see ProxyLaunchSupport#getInfo(String)
+	 * @see IConfigurationContributionInfo
 	 * @since 1.0.0
 	 */
 	public static class LaunchInfo {
@@ -67,37 +72,126 @@
 		 */
 		public ProxyFactoryRegistry resultRegistry;
 		
+
 		/**
-		 * Set of containers (IClasspathContainer) found in classpath (including required projects).
-		 * This is for each project found. If there was a container in more than one project with the
-		 * id, this set will contain the container from each such project. They are not considered the
-		 * same because they come from a different project.
-		 * <p>
-		 * This is used for determining if a project's container implements the desired contributor.
+		 * Public only for access by other launch delegates to set up if they go outside of ProxyLaunchSupport,
+		 * e.g. IDE proxy. Must not be used for any purpose.
 		 * 
-		 * Will be <code>null</code> if no project sent in to launch configuration.
-		 * 
-		 * @see org.eclipse.jdt.core.IClasspathContainer
+		 * @since 1.0.0
 		 */
-		public Set containers;
+		public static class LaunchSupportIConfigurationContributionInfo implements IConfigurationContributionInfo {
+			/* (non-Javadoc)
+			 * Map of containers (IClasspathContainer) found in classpath (including required projects).
+			 * This is for each project found. If there was a container in more than one project with the
+			 * id, this set will contain the container from each such project. They are not considered the
+			 * same because they come from a different project.
+			 * <p>
+			 * The key will be the containers, and the value will be a <code>Boolean</code>, where true means it
+			 * is visible to the top-level project.
+			 * <p>
+			 * This is used for determining if a project's container implements the desired contributor.
+			 * 
+			 * Will be empty if no project sent in to launch configuration.
+			 * 
+			 * @see org.eclipse.jdt.core.IClasspathContainer
+			 */
+			public Map containers = Collections.EMPTY_MAP;
+			
+			/* (non-Javadoc)
+			 * Map of unique container id strings found in classpath (including required projects).
+			 * If a container with the same id was found in more than one project, only one id will
+			 * be in this set since they are the same.
+			 * <p>
+			 * The key will be the container ids, and the value will be a <code>Boolean</code>, where true means it
+			 * is visible to the top-level project.
+			 * 
+			 * Will be empty if no project sent in to launch configuration.
+			 */
+			public Map containerIds = Collections.EMPTY_MAP;
+			
+			/* (non-Javadoc)
+			 * Set of unique plugin id strings found in classpath (including required projects).
+			 * If a required plugin with the same id was found in more than one project, only one id will
+			 * be in this set since they are the same.
+			 * <p>
+			 * The key will be the plugin ids, and the value will be a <code>Boolean</code>, where true means it
+			 * is visible to the top-level project.
+			 * 
+			 * Will be empty if no project sent in to launch configuration.
+			 */		
+			public Map pluginIds = Collections.EMPTY_MAP;;
+			
+			/* (non-Javadoc)
+			 * Map of unique projects found in classpath (including required projects), but not including top-level project.
+			 * <p>
+			 * The key will be the <code>IPath</code> for the project, and the value will be a <code>Boolean</code>, where true means it
+			 * is visible to the top-level project.
+			 * 
+			 * Will be <code>null</code> if no project sent in to launch configuration.
+			 */		
+			public Map projectPaths;
+			
+			/* (non-Javadoc)
+			 * Java project for this launch. <code>null</code> if not for a project.
+			 */
+			public IJavaProject javaProject;
+			
+			/* (non-Javadoc)
+			 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo#getContainerIds()
+			 */
+			public Map getContainerIds() {
+				return containerIds;
+			}
+			/* (non-Javadoc)
+			 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo#getContainers()
+			 */
+			public Map getContainers() {
+				return containers;
+			}
+			/* (non-Javadoc)
+			 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo#getJavaProject()
+			 */
+			public IJavaProject getJavaProject() {
+				return javaProject;
+			}
+			/* (non-Javadoc)
+			 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo#getPluginIds()
+			 */
+			public Map getPluginIds() {
+				return pluginIds;
+			}
+			/* (non-Javadoc)
+			 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo#getProjectPaths()
+			 */
+			public Map getProjectPaths() {
+				return projectPaths;
+			}
+			
+		};
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributionInfo#getJavaProject()
+		 */
+		public IJavaProject getJavaProject() {
+			return configInfo.getJavaProject();
+		}		
 		
 		/**
-		 * Set of unique container id strings found in classpath (including required projects).
-		 * If a container with the same id was found in more than one project, only one id will
-		 * be in this set since they are the same.
+		 * Return the IConfigurationContributionInfo for this launch.
+		 * @return
 		 * 
-		 * Will be <code>null</code> if no project sent in to launch configuration.
+		 * @since 1.0.0
 		 */
-		public Set containerIds;
+		public IConfigurationContributionInfo getConfigInfo() {
+			return configInfo;
+		}
 		
 		/**
-		 * Set of unique plugin id strings found in classpath (including required projects).
-		 * If a required plugin with the same id was found in more than one project, only one id will
-		 * be in this set since they are the same.
-		 * 
-		 * Will be <code>null</code> if no project sent in to launch configuration.
-		 */		
-		public Set pluginIds;
+		 * Public only so that other launch delegates types can get into it. Not meant for
+		 * general usage.
+		 */
+		public LaunchSupportIConfigurationContributionInfo configInfo = new LaunchSupportIConfigurationContributionInfo();
+		
 	}
 	
 	/**
@@ -218,36 +312,46 @@
 				IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
 				IJavaProject javaProject = JavaCore.create(project);
 				if (javaProject != null && javaProject.exists()) {
-					launchInfo.containerIds = new HashSet(5);
-					launchInfo.containers = new HashSet(5);
-					launchInfo.pluginIds = new HashSet(5);
-					ProxyPlugin.getPlugin().getIDsFound(javaProject, launchInfo.containerIds, launchInfo.containers, launchInfo.pluginIds);					
-					if (!launchInfo.containerIds.isEmpty() || !launchInfo.containers.isEmpty() || !launchInfo.pluginIds.isEmpty()) {
-						List computedContributors = new ArrayList(launchInfo.containerIds.size()+launchInfo.containers.size()+launchInfo.pluginIds.size());
+					launchInfo.configInfo.javaProject = javaProject;
+					launchInfo.configInfo.containerIds = new HashMap(5);
+					launchInfo.configInfo.containers = new HashMap(5);
+					launchInfo.configInfo.pluginIds = new HashMap(5);
+					launchInfo.configInfo.projectPaths = new HashMap(5);
+					ProxyPlugin.getPlugin().getIDsFound(javaProject, launchInfo.configInfo.containerIds, launchInfo.configInfo.containers, launchInfo.configInfo.pluginIds, launchInfo.configInfo.projectPaths);					
+					if (!launchInfo.configInfo.containerIds.isEmpty() || !launchInfo.configInfo.containers.isEmpty() || !launchInfo.configInfo.pluginIds.isEmpty()) {
+						List computedContributors = new ArrayList(launchInfo.configInfo.containerIds.size()+launchInfo.configInfo.containers.size()+launchInfo.configInfo.pluginIds.size());
+						// Note: We don't care about the visibility business here. For contributors to proxy it means
+						// some classes in the projects/plugins/etc. need configuration whether they are visible or not.
+						// This is because even though not visible, some other visible class may instantiate it. So it
+						// needs the configuration.
 						// First handle explicit classpath containers that implement IConfigurationContributor
-						for (Iterator iter = launchInfo.containers.iterator(); iter.hasNext();) {
+						for (Iterator iter = launchInfo.configInfo.containers.keySet().iterator(); iter.hasNext();) {
 							IClasspathContainer container = (IClasspathContainer) iter.next();
 							if (container instanceof IConfigurationContributor)
 								computedContributors.add(container);
 						}
 						
 						// Second add in contributors that exist for a container id.
-						for (Iterator iter = launchInfo.containerIds.iterator(); iter.hasNext();) {
+						for (Iterator iter = launchInfo.configInfo.containerIds.keySet().iterator(); iter.hasNext();) {
 							String containerid = (String) iter.next();
 							IConfigurationElement[] contributors = ProxyPlugin.getPlugin().getContainerConfigurations(containerid);
 							if (contributors != null)
 								for (int i = 0; i < contributors.length; i++) {
-									computedContributors.add(contributors[i].createExecutableExtension(ProxyPlugin.PI_CLASS));
+									Object contributor = contributors[i].createExecutableExtension(ProxyPlugin.PI_CLASS);
+									if (contributor instanceof IConfigurationContributor)
+										computedContributors.add(contributor);
 								}
 						}
 						
 						// Finally add in contributors that exist for a plugin id.
-						for (Iterator iter = launchInfo.pluginIds.iterator(); iter.hasNext();) {
+						for (Iterator iter = launchInfo.configInfo.pluginIds.keySet().iterator(); iter.hasNext();) {
 							String pluginId = (String) iter.next();
 							IConfigurationElement[] contributors = ProxyPlugin.getPlugin().getPluginConfigurations(pluginId);
 							if (contributors != null)
 								for (int i = 0; i < contributors.length; i++) {
-									computedContributors.add(contributors[i].createExecutableExtension(ProxyPlugin.PI_CLASS));
+									Object contributor = contributors[i].createExecutableExtension(ProxyPlugin.PI_CLASS);
+									if (contributor instanceof IConfigurationContributor)
+										computedContributors.add(contributor);
 								}
 						}
 						
@@ -276,7 +380,9 @@
 			
 			// Let contributors modify the configuration.
 			final IConfigurationContributor[] contribs = aContribs;
+			final LaunchInfo linfo = launchInfo;
 			for (int i = 0; i < contribs.length; i++) {
+				// First run the initialize.
 				// Run in safe mode so that anything happens we don't go away.
 				final int ii = i;
 				Platform.run(new ISafeRunnable() {
@@ -285,6 +391,18 @@
 					}
 
 					public void run() throws Exception {
+						contribs[ii].initialize(linfo.getConfigInfo());
+					}
+				});
+
+				// Now run the contribute to configuration.
+				// Run in safe mode so that anything happens we don't go away.
+				Platform.run(new ISafeRunnable() {
+					public void handleException(Throwable exception) {
+						// Don't need to do anything. Platform.run logs it for me.
+					}
+
+					public void run() throws Exception {
 						contribs[ii].contributeToConfiguration(configwc);
 					}
 				});
@@ -379,15 +497,11 @@
 	 * 
 	 * @since 1.0.0
 	 */
-	static class ProxyContributor implements IConfigurationContributor {
+	static class ProxyContributor extends ConfigurationContributorAdapter {
 		public void contributeClasspaths(IConfigurationContributionController controller) {
 			// Add the required jars to the end of the classpath.
-			controller.contributeClasspath(ProxyPlugin.getPlugin(), "proxycommon.jar", IConfigurationContributionController.APPEND_USER_CLASSPATH, false);	//$NON-NLS-1$
-			controller.contributeClasspath(ProxyPlugin.getPlugin(), "initparser.jar", IConfigurationContributionController.APPEND_USER_CLASSPATH, true);	//$NON-NLS-1$			
-		}
-		public void contributeToConfiguration(ILaunchConfigurationWorkingCopy config) {
-		}
-		public void contributeToRegistry(ProxyFactoryRegistry registry) {
+			controller.contributeClasspath(ProxyPlugin.getPlugin().getDescriptor(), "proxycommon.jar", IConfigurationContributionController.APPEND_USER_CLASSPATH, false);	//$NON-NLS-1$
+			controller.contributeClasspath(ProxyPlugin.getPlugin().getDescriptor(), "initparser.jar", IConfigurationContributionController.APPEND_USER_CLASSPATH, true);	//$NON-NLS-1$			
 		}
 	}
 	
diff --git a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyPlugin.java b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyPlugin.java
index be1ddf0..b508a73 100644
--- a/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyPlugin.java
+++ b/plugins/org.eclipse.jem.proxy/proxy/org/eclipse/jem/internal/proxy/core/ProxyPlugin.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: ProxyPlugin.java,v $
- *  $Revision: 1.11 $  $Date: 2004/03/10 23:02:38 $ 
+ *  $Revision: 1.12 $  $Date: 2004/03/22 23:49:02 $ 
  */
 
 
@@ -231,13 +231,36 @@
 	}
 	
 	private static final IPath PROXYJARS_PATH = new Path("proxy.jars");
+	
 	/**
-	 * See localizeFromPluginDescriptor...
+	 * @see ProxyPlugin#localizeFromPluginDescriptor(IPluginDescriptor, String)
+	 * 
 	 * This is just a helper to return a url instead.
-	 */		
-	public URL urlLocalizeFromPluginDescriptor(IPluginDescriptor pluginDescriptor, String filenameWithinPlugin) {					
+	 * 
+	 * @param pluginDescriptor
+	 * @param filenameWithinPlugin
+	 * @return
+	 * 
+	 * @since 1.0.0
+	 */
+	public URL urlLocalizeFromPluginDescriptor(IPluginDescriptor pluginDescriptor, String filenameWithinPlugin) {
+		return urlLocalizeFromPluginDescriptor(pluginDescriptor, new Path(filenameWithinPlugin));
+	}
+	
+	/**
+	 * @see ProxyPlugin#localizeFromPluginDescriptor(IPluginDescriptor, String)
+	 * 
+	 * This is just a helper to return a url instead.
+	 * 
+	 * @param pluginDescriptor
+	 * @param filenameWithinPlugin
+	 * @return
+	 * 
+	 * @since 1.0.0
+	 */
+	public URL urlLocalizeFromPluginDescriptor(IPluginDescriptor pluginDescriptor, IPath filenameWithinPlugin) {					
 		try {
-			URL pvm = pluginDescriptor.find(new Path(filenameWithinPlugin));
+			URL pvm = pluginDescriptor.find(filenameWithinPlugin);
 			if (pvm != null)
 				pvm = Platform.asLocalURL(pvm);
 			if (devMode) {
@@ -272,7 +295,7 @@
 						ios = pvm.openStream();
 						Properties props = new Properties();
 						props.load(ios);
-						String pathString = props.getProperty(filenameWithinPlugin);
+						String pathString = props.getProperty(filenameWithinPlugin.toString());
 						if (pathString != null) {
 							IPath path = new Path(Platform.resolve(pluginDescriptor.getInstallURL()).getFile());
 							path = path.removeLastSegments(1); // Move up one level to workspace root of development workspace.
@@ -301,11 +324,11 @@
 	 * 
 	 * @since 1.0.0
 	 */
-	public static IPluginDescriptor[] orderPlugins(final Set pluginDescriptorsToOrder) {
+	public static IPluginDescriptor[] orderPlugins(final Set pluginDescriptorsToOrder) {	
 		PluginRegistry registry = (PluginRegistry) Platform.getPluginRegistry();
 		int ndx = pluginDescriptorsToOrder.size();
 		IPluginDescriptor[] result = new IPluginDescriptor[ndx];
-		Map dependents = getDependentCounts(false);	// We want the inactive ones too. That way have complete order. They can be ignored later if necessary.
+		Map dependents = getDependentCounts(false, pluginDescriptorsToOrder);	// We want the inactive ones too. That way have complete order. They can be ignored later if necessary.
 		// keep iterating until all have been visited. This will actually find them in reverse order from what we
 		// want, i.e. it will find the leaves first. So we will build result array in reverse order.
 		while (!dependents.isEmpty()) {
@@ -333,43 +356,65 @@
 					}
 				}
 			}
-		}
+		}		
 		return result;
 	}
 	
 	
-	private static Map getDependentCounts(boolean activeOnly) {
+	private static Map getDependentCounts(boolean activeOnly, Set startingSet) {
 		// TODO This needs to move to OSGi format when that API becomes stable. Currently this cannot handle
 		// plugins that are totally OSGi and not legacy.
 		IPluginRegistry registry = Platform.getPluginRegistry();
-		IPluginDescriptor[] descriptors = Platform.getPluginRegistry().getPluginDescriptors();
-		int descSize = (descriptors == null) ? 0 : descriptors.length;
-		Map dependents = new HashMap(descSize);
+		Map dependents = new HashMap(startingSet.size());
 		// build a table of all dependent counts.  The table is keyed by descriptor and
 		// the value the integer number of dependent plugins.
-		for (int i = 0; i < descSize; i++) {
-			if (activeOnly && !descriptors[i].isPluginActivated())
-				continue;
-			if (descriptors[i].getUniqueIdentifier().indexOf("hyades") != -1)
-				continue;	// TODO needs to be removed when 52563 is fixed by eclipse
-			// ensure there is an entry for this descriptor (otherwise it will not be visited)
-			int[] entry = (int[]) dependents.get(descriptors[i]);
-			if (entry == null)
-				dependents.put(descriptors[i], new int[1]);
-			IPluginPrerequisite[] requires = descriptors[i].getPluginPrerequisites();
-			int reqSize = (requires == null ? 0 : requires.length);
-			for (int j = 0; j < reqSize; j++) {
-				String id = requires[j].getUniqueIdentifier();
-				IPluginDescriptor prereq = registry.getPluginDescriptor(id);
-				if (prereq == null || activeOnly && !prereq.isPluginActivated())
+		List processNow = new ArrayList(startingSet);
+		List processNext = new ArrayList(processNow.size());
+		if (!processNow.isEmpty()) {
+			// Go through the first time from the starting set to get an entry into the list.
+			// If there is an entry, then it won't be marked for processNext. Only new entries
+			// are added to processNext in the following loop.
+			int pnSize = processNow.size();
+			for (int i = 0; i < pnSize; i++) {
+				IPluginDescriptor pd = (IPluginDescriptor) processNow.get(i);
+				if (activeOnly && !pd.isPluginActivated())
 					continue;
-				entry = (int[]) dependents.get(prereq);
+				// ensure there is an entry for this descriptor (otherwise it will not be visited)
+				int[] entry = (int[]) dependents.get(pd);
 				if (entry == null)
-					dependents.put(prereq, new int[] {1});
-				else
-					++entry[0];
+					dependents.put(pd, new int[1]);
 			}
 		}
+		
+		// Now process the processNow to find the requireds, increment them, and add to processNext if never found before.
+		while (!processNow.isEmpty()) {
+			processNext.clear();
+			int pnSize = processNow.size();
+			for (int i = 0; i < pnSize; i++) {
+				IPluginDescriptor pd = (IPluginDescriptor) processNow.get(i);
+				if (activeOnly && !pd.isPluginActivated())
+					continue;			
+				IPluginPrerequisite[] requires = pd.getPluginPrerequisites();
+				int reqSize = (requires == null ? 0 : requires.length);
+				for (int j = 0; j < reqSize; j++) {
+					String id = requires[j].getUniqueIdentifier();
+					IPluginDescriptor prereq = registry.getPluginDescriptor(id);
+					if (prereq == null || activeOnly && !prereq.isPluginActivated())
+						continue;
+					int[] entry = (int[]) dependents.get(prereq);
+					if (entry == null) {
+						dependents.put(prereq, new int[] {1});
+						processNext.add(prereq);	// Never processed before, so we add it to the next process loop.
+					} else
+						++entry[0];
+				}
+			}
+			
+			// Now swap the lists so that we processNext will be now and visa-versa.
+			List t = processNext;
+			processNext = processNow;
+			processNow = t;
+		}
 		return dependents;
 	}
 		
@@ -585,7 +630,7 @@
 	 * 
 	 * @since 1.0.0
 	 */
-	public static ContributorExtensionPointInfo processContributionExtensionPoint(String extensionPoint) {
+	public static ContributorExtensionPointInfo processContributionExtensionPoint(String extensionPoint) {	
 		// We are processing this once because it is accessed often (once per vm per project).
 		// This can add up so we get it together once here.
 		IExtensionPoint extp = Platform.getExtensionRegistry().getExtensionPoint(extensionPoint);
@@ -655,32 +700,36 @@
 			Map.Entry entry = (Map.Entry) iter.next();
 			entry.setValue(((List) entry.getValue()).toArray(new IConfigurationElement[((List) entry.getValue()).size()]));
 		}
-		
+
 		return result;
 	}
 	
 	/**
-	 * For the given java project, return the set of container paths and plugins found. The set entries will be of type IClasspathContainer.
+	 * For the given java project, return the maps of container paths and plugins found. The keys will be of type as specified for the parms
+	 * while the value will be Boolean, true if it was visible, and false if it wasn't.
 	 * For example if <code>/SWT_CONTAINER/subpath1</code> is found in the projects path (or from required projects), then
-	 * the container id will be added to the set. They come from the raw classpath entries of the projects.
-	 * <p>
-	 * It also finds all classpath containers that implement <code>org.eclipse.jem.internal.proxy.core.IConfigurationContributor</code> so
-	 * that they can also be called.  
-	 * 
+	 * the container id will be added to the map. They come from the raw classpath entries of the projects.
+	 *
 	 * @param jproject
-	 * @param containerIds This set will be filled in with container ids (type is <code>java.lang.String</code>) that are found in the projects build path.
-	 * @param containers This set will be filled in with classpath containers found in the projects build path.
-	 * @param pluginIds This set will be filled in with plugin ids (type is <code>java.lang.String</code>) that are found in the projects build path.
+	 * @param containerIds This map will be filled in with container ids as keys (type is <code>java.lang.String</code>) that are found in the projects build path. The value will be a Boolean, true if this container id was visible to the project (i.e. was in the project or was exported from a required project).
+	 * @param containers This map will be filled in with classpath containers as keys found in the projects build path. The value will be a Boolean as in container ids map.
+	 * @param pluginIds This map will be filled in with plugin ids as keys (type is <code>java.lang.String</code>) that are found in the projects build path. The value will be a Boolean as in container ids map.
+	 * @param projects This map will be filled in with project paths (except the top project) as keys (type is <code>org.eclipse.core.runtime.IPath</code>) that are found in the projects build path. The value will be a Boolean as in container ids map.
 	 * 
 	 * @since 1.0.0
 	 */
-	public void getIDsFound(IJavaProject jproject, Set containerIds, Set containers, Set pluginIds) throws JavaModelException {
-		expandProject(JavaCore.newProjectEntry(jproject.getProject().getFullPath()), containerIds, containers, pluginIds, new HashSet(1));
+	public void getIDsFound(IJavaProject jproject, Map containerIds, Map containers, Map pluginIds, Map projects) throws JavaModelException {		
+		IPath projectPath = jproject.getProject().getFullPath();
+		projects.put(projectPath, Boolean.TRUE);		
+		expandProject(projectPath, containerIds, containers, pluginIds, projects, true, true);
+		projects.remove(projectPath);	// Don't need to include itself now, was needed for testing so if ciruclar we don't get into a loop.
 	}
 	
-	private void expandProject(IClasspathEntry projectEntry, Set containerIds, Set containers, Set plugindiIds, Set expandedProjects) throws JavaModelException {
-		expandedProjects.add(projectEntry);
-		IPath projectPath = projectEntry.getPath();
+	/*
+	 * The passed in visible flag tells if this project is visible and its contents are visible if they are exported.
+	 * Only exception is if first is true, then all contents are visible to the top level project.
+	 */
+	private void expandProject(IPath projectPath, Map containerIds, Map containers, Map pluginIds, Map projects, boolean visible, boolean first) throws JavaModelException {
 		IResource res = ResourcesPlugin.getWorkspace().getRoot().findMember(projectPath.lastSegment());
 		if (res == null)
 			return;	// Not exist so don't delve into it.
@@ -693,46 +742,52 @@
 			IClasspathEntry entry = entries[i];
 			switch (entry.getEntryKind()) {
 				case IClasspathEntry.CPE_PROJECT:
-					if (!expandedProjects.contains(entry))
-						expandProject(entry, containerIds, containers, plugindiIds, expandedProjects);
+					if (!projects.containsKey(entry.getPath())) {
+						projects.put(entry.getPath(), first || (visible && entry.isExported()) ? Boolean.TRUE : Boolean.FALSE );
+						expandProject(entry.getPath(), containerIds, containers, pluginIds, projects, visible && entry.isExported(), false);
+					}
 					break;
 				case IClasspathEntry.CPE_CONTAINER:
 					IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), project);
-					containers.add(container);
-					containerIds.add(entry.getPath().segment(0));
+					if (!containers.containsKey(container))
+						containers.put(container, first || (visible && entry.isExported()) ? Boolean.TRUE : Boolean.FALSE );
+					if (!containerIds.containsKey(entry.getPath().segment(0)))
+						containerIds.put(entry.getPath().segment(0), first || (visible && entry.isExported()) ? Boolean.TRUE : Boolean.FALSE );					
 					break;
 				default:
 					break;
 			}
 		}		
 		
-		processPlugin(project, plugindiIds);	// expand the plugins for this project, if any.
+		processPlugin(project, pluginIds, visible, first);	// expand the plugins for this project, if any.
 	}
 	
-	private void processPlugin(IJavaProject project, Set pluginIds) {
+	private void processPlugin(IJavaProject project, Map pluginIds, boolean visible, boolean first) {
 		WorkspaceModelManager wm = (WorkspaceModelManager)PDECore.getDefault().getWorkspaceModelManager();
 		IModel m = wm.getWorkspaceModel(project.getProject());
 		if (m instanceof IPluginModel) {
 			// it is a plugin, process it.
-			expandPlugin(((IPluginModel) m).getPlugin(), pluginIds);
+			IPlugin plugin = ((IPluginModel) m).getPlugin();			
+			if (pluginIds.containsKey(plugin.getId()))
+				return;	// already processed it
+			pluginIds.put(plugin.getId(), first || visible ? Boolean.TRUE : Boolean.FALSE);			
+			expandPlugin(plugin, pluginIds, visible, first);
 		}
 		return;
 	}
 	
-	private void expandPlugin(IPlugin plugin, Set pluginIds) {
-		if (pluginIds.contains(plugin.getId()))
-			return;	// already processed it
-		pluginIds.add(plugin.getId());
+	private void expandPlugin(IPlugin plugin, Map pluginIds, boolean visible, boolean first) {
 		IPluginImport[] imports = plugin.getImports();
 		for (int i = 0; i < imports.length; i++) {
 			IPluginImport pi = imports[i];
-			if (pluginIds.contains(pi.getId()))
+			if (pluginIds.containsKey(pi.getId()))
 				continue;	// save time actually going for it. we already processed it.
+			pluginIds.put(plugin.getId(), first || (visible && pi.isReexported()) ? Boolean.TRUE : Boolean.FALSE);			
 			IPlugin pb = PDECore.getDefault().findPlugin(pi.getId(),
 				pi.getVersion(),
 				pi.getMatch());
 			if (pb != null)
-				expandPlugin(pb, pluginIds);
+				expandPlugin(pb, pluginIds, visible && pi.isReexported(), false);
 		}
 	}
-}
\ No newline at end of file
+}
diff --git a/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/LocalFileConfigurationContributorController.java b/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/LocalFileConfigurationContributorController.java
index d70be80..94dce59 100644
--- a/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/LocalFileConfigurationContributorController.java
+++ b/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/LocalFileConfigurationContributorController.java
@@ -10,7 +10,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: LocalFileConfigurationContributorController.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/07 17:21:42 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:49:02 $ 
  */
 package org.eclipse.jem.internal.proxy.remote;
 
@@ -18,7 +18,7 @@
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.IPluginDescriptor;
 import org.eclipse.jdt.core.*;
 import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
 import org.eclipse.jdt.launching.JavaRuntime;
@@ -32,7 +32,6 @@
  */
 public class LocalFileConfigurationContributorController implements IConfigurationContributionController {
 
-	private IJavaProject javaProject;
 	private String[] classpathInfo;
 	private String[][] bootpathInfo;
 	private List classpath;
@@ -41,8 +40,7 @@
 	private List javaLibraryPath;
 	private ProxyLaunchSupport.LaunchInfo launchInfo;
 	
-	public LocalFileConfigurationContributorController(IJavaProject javaProject, String[] classpathInfo, String[][] bootpathInfo, ProxyLaunchSupport.LaunchInfo launchInfo) {
-		this.javaProject = javaProject;
+	public LocalFileConfigurationContributorController(String[] classpathInfo, String[][] bootpathInfo, ProxyLaunchSupport.LaunchInfo launchInfo) {
 		this.classpathInfo = classpathInfo;
 		this.bootpathInfo = bootpathInfo;
 		this.launchInfo = launchInfo;
@@ -138,28 +136,7 @@
 	 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributionController#getJavaProject()
 	 */
 	public IJavaProject getJavaProject() {
-		return javaProject;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributionController#getContainerIds()
-	 */
-	public Set getContainerIds() {
-		return launchInfo.containerIds;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributionController#getContainers()
-	 */
-	public Set getContainers() {
-		return launchInfo.containers;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributionController#getPluginIds()
-	 */
-	public Set getPluginIds() {
-		return launchInfo.pluginIds;
+		return launchInfo.getJavaProject();
 	}
 	
 	/* (non-Javadoc)
@@ -221,12 +198,12 @@
 	/* (non-Javadoc)
 	 * @see org.eclipse.jem.internal.proxy.core.IConfigurationContributionController#contributeClasspath(org.eclipse.core.runtime.Plugin, java.lang.String, int, boolean)
 	 */
-	public void contributeClasspath(Plugin plugin, String relativePath, int typeFlag, boolean nlsLocalize) {
+	public void contributeClasspath(IPluginDescriptor pluginDescriptor, String relativePath, int typeFlag, boolean nlsLocalize) {
 		// If not nls localize, or if it is java library path, then just find the one in the plugin/fragment and add it.
 		if (!nlsLocalize || typeFlag == IConfigurationContributionController.APPEND_JAVA_LIBRARY_PATH)
-			contributeClasspath(ProxyPlugin.getPlugin().localizeFromPlugin(plugin, relativePath), typeFlag);
+			contributeClasspath(ProxyPlugin.getPlugin().localizeFromPluginDescriptor(pluginDescriptor, relativePath), typeFlag);
 		else
-			contributeClasspath(ProxyPlugin.getPlugin().localizeFromPluginDescriptorAndFragments(plugin.getDescriptor(), relativePath), typeFlag);
+			contributeClasspath(ProxyPlugin.getPlugin().localizeFromPluginDescriptorAndFragments(pluginDescriptor, relativePath), typeFlag);
 	}
 
 	/* (non-Javadoc)
diff --git a/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/LocalProxyLaunchDelegate.java b/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/LocalProxyLaunchDelegate.java
index c1c3148..5ee9a84 100644
--- a/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/LocalProxyLaunchDelegate.java
+++ b/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/LocalProxyLaunchDelegate.java
@@ -7,7 +7,7 @@
  * Contributors: IBM Corporation - initial API and implementation
  **************************************************************************************************/
 /*
- * $RCSfile: LocalProxyLaunchDelegate.java,v $ $Revision: 1.2 $ $Date: 2004/03/07 17:21:42 $
+ * $RCSfile: LocalProxyLaunchDelegate.java,v $ $Revision: 1.3 $ $Date: 2004/03/22 23:49:02 $
  */
 package org.eclipse.jem.internal.proxy.remote;
 
@@ -108,8 +108,8 @@
 		ProxyLaunchSupport.LaunchInfo launchInfo = ProxyLaunchSupport.getInfo(launchKey);
 		final IConfigurationContributor[] contributors = launchInfo.contributors;
 		final LocalFileConfigurationContributorController controller =
-			new LocalFileConfigurationContributorController(project, classpath, bootpathInfo, launchInfo);
-		if (contributors != null) {
+			new LocalFileConfigurationContributorController(classpath, bootpathInfo, launchInfo);
+		if (contributors != null) {		
 			for (int i = 0; i < contributors.length; i++) {
 				// Run in safe mode so that anything happens we don't go away.
 				final int ii = i;
diff --git a/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/ProxyRemoteUtil.java b/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/ProxyRemoteUtil.java
index 4786b49..0fd6fbe 100644
--- a/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/ProxyRemoteUtil.java
+++ b/plugins/org.eclipse.jem.proxy/proxyRemote/org/eclipse/jem/internal/proxy/remote/ProxyRemoteUtil.java
@@ -11,10 +11,12 @@
  *******************************************************************************/
 /*
  *  $RCSfile: ProxyRemoteUtil.java,v $
- *  $Revision: 1.3 $  $Date: 2004/03/04 16:14:04 $ 
+ *  $Revision: 1.4 $  $Date: 2004/03/22 23:49:02 $ 
  */
 
 
+import org.eclipse.core.runtime.IPluginDescriptor;
+
 import org.eclipse.jem.internal.proxy.core.IConfigurationContributionController;
 import org.eclipse.jem.internal.proxy.core.ProxyPlugin;
 
@@ -45,13 +47,13 @@
 	 * support.
 	 */
 	public static void updateClassPaths(IConfigurationContributionController controller) {
-		ProxyPlugin proxyPlugin = ProxyPlugin.getPlugin();
+		IPluginDescriptor proxyPluginDescriptor = ProxyPlugin.getPlugin().getDescriptor();
 		// Need to have our jars at the beginning. (Struts causes a problem because 
 		// they have a jar (commons-fileupload.jar) that if when searching for a class and
 		// this jar is reached, it causes the class loader to barf. Our jars used to be at
 		// the end, and so it found the fileupload jar first and no remote vm could be started
 		// because of this.
-		controller.contributeClasspath(proxyPlugin, "remotecommon.jar", IConfigurationContributionController.PREPEND_USER_CLASSPATH, false); //$NON-NLS-1$
-		controller.contributeClasspath(proxyPlugin, "vm/remotevm.jar", IConfigurationContributionController.PREPEND_USER_CLASSPATH, false); //$NON-NLS-1$		
+		controller.contributeClasspath(proxyPluginDescriptor, "remotecommon.jar", IConfigurationContributionController.PREPEND_USER_CLASSPATH, false); //$NON-NLS-1$
+		controller.contributeClasspath(proxyPluginDescriptor, "vm/remotevm.jar", IConfigurationContributionController.PREPEND_USER_CLASSPATH, false); //$NON-NLS-1$		
 	}
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.jem.proxy/proxyide/org/eclipse/jem/internal/proxy/ide/IDERegistration.java b/plugins/org.eclipse.jem.proxy/proxyide/org/eclipse/jem/internal/proxy/ide/IDERegistration.java
index c1b2a89..cee7dfc 100644
--- a/plugins/org.eclipse.jem.proxy/proxyide/org/eclipse/jem/internal/proxy/ide/IDERegistration.java
+++ b/plugins/org.eclipse.jem.proxy/proxyide/org/eclipse/jem/internal/proxy/ide/IDERegistration.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: IDERegistration.java,v $
- *  $Revision: 1.4 $  $Date: 2004/03/07 17:21:42 $ 
+ *  $Revision: 1.5 $  $Date: 2004/03/22 23:49:02 $ 
  */
 
 import java.net.MalformedURLException;
@@ -83,7 +83,11 @@
 		// Add in any classpaths the contributors want to add.
 		if (contributors != null) {
 			ProxyLaunchSupport.LaunchInfo launchInfo = new ProxyLaunchSupport.LaunchInfo();
-			LocalFileConfigurationContributorController controller = new LocalFileConfigurationContributorController(jp, classPaths, new String[3][], launchInfo);
+			launchInfo.configInfo.javaProject = jp;
+			LocalFileConfigurationContributorController controller = new LocalFileConfigurationContributorController(classPaths, new String[3][], launchInfo);
+			for (int i = 0; i < contributors.length; i++) {
+				contributors[i].initialize(launchInfo.getConfigInfo());
+			}			
 			for (int i = 0; i < contributors.length; i++) {
 				contributors[i].contributeClasspaths(controller);
 			}
diff --git a/plugins/org.eclipse.jem.proxy/schema/contributor.exsd b/plugins/org.eclipse.jem.proxy/schema/contributors.exsd
similarity index 89%
rename from plugins/org.eclipse.jem.proxy/schema/contributor.exsd
rename to plugins/org.eclipse.jem.proxy/schema/contributors.exsd
index 89954ee..54bf9c0 100644
--- a/plugins/org.eclipse.jem.proxy/schema/contributor.exsd
+++ b/plugins/org.eclipse.jem.proxy/schema/contributors.exsd
@@ -1,11 +1,11 @@
-<?xml version='1.0' encoding='UTF-8'?>

-<!-- Schema file written by PDE -->

-<schema targetNamespace="org.eclipse.jem.proxy">

-<annotation>

-      <appInfo>

-         <meta.schema plugin="org.eclipse.jem.proxy" id="contributor" name="Proxy Configuration Contributor"/>

-      </appInfo>

-      <documentation>

+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.jem.proxy">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.jem.proxy" id="contributors" name="Proxy Configuration Contributors"/>
+      </appInfo>
+      <documentation>
          This extension point is used to supply configuration contributors for proxy support. You can supply a contributor for a specific classpath container or for a plugin.
 &lt;p&gt;
 The way configuration contributors work is that when a proxy vm is started, it first runs through all of the explicit contributors that were given to it. It then goes through the classpath of the project and finds the containers. If the container implements IConfigurationContributor, it will be called as a contributor. Then all of the extensions of this extension point will be searched for those have the same container id, and if so they will be called as a contributor.
@@ -14,128 +14,134 @@
 &lt;p&gt;
 If a plugin is in the classpath of the project (in other words the project is PDE plugin development project and requires a plugin) then the contributor with the given plugin id will be called.
 &lt;p&gt;
-Both container and plugin can be specified, but at least one of them must be specified. If both are specified, then this entry will be used if either the container or the plugin is found in the classpath.

-      </documentation>

-   </annotation>

-

-   <element name="extension">

-      <complexType>

-         <sequence>

-            <element ref="contributor" minOccurs="0" maxOccurs="unbounded"/>

-         </sequence>

-         <attribute name="point" type="string" use="required">

-            <annotation>

-               <documentation>

-                  a fully qualified identifier of the target extension point

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="id" type="string">

-            <annotation>

-               <documentation>

-                  an optional identifier of the extension instance

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="name" type="string">

-            <annotation>

-               <documentation>

-                  an optional name of the extension instance

-               </documentation>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <element name="contributor">

-      <annotation>

-         <documentation>

-            A contributor. Either the container or the plugin attributes must be set.

-         </documentation>

-      </annotation>

-      <complexType>

-         <attribute name="container" type="string">

-            <annotation>

-               <documentation>

-                  contributor is for a container. The value is the container id (e.g. &quot;JRE_CONTAINER&quot;).

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="plugin" type="string">

-            <annotation>

-               <documentation>

-                  contributor is for a plugin. The value is the plugin id (e.g. &quot;org.eclipse.swt&quot;).

-               </documentation>

-            </annotation>

-         </attribute>

-         <attribute name="class" type="string" use="required">

-            <annotation>

-               <documentation>

-                  the class that implements this contributor. The class must implement IConfigurationContributor.

-               </documentation>

-            </annotation>

-         </attribute>

-      </complexType>

-   </element>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="since"/>

-      </appInfo>

-      <documentation>

-         1.0.0

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="examples"/>

-      </appInfo>

-      <documentation>

+Both container and plugin can be specified, but at least one of them must be specified. If both are specified, then this entry will be used if either the container or the plugin is found in the classpath.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <complexType>
+         <sequence>
+            <element ref="contributor" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a fully qualified identifier of the target extension point
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  an optional identifier of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  an optional name of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="contributor">
+      <annotation>
+         <appInfo>
+            <meta.element labelAttribute="class"/>
+         </appInfo>
+         <documentation>
+            A contributor. Either the container or the plugin attributes must be set.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="container" type="string">
+            <annotation>
+               <documentation>
+                  contributor is for a container. The value is the container id (e.g. &quot;JRE_CONTAINER&quot;).
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="plugin" type="string">
+            <annotation>
+               <documentation>
+                  contributor is for a plugin. The value is the plugin id (e.g. &quot;org.eclipse.swt&quot;).
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  the class that implements this contributor. The class must implement IConfigurationContributor.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.jem.internal.proxy.core.IConfigurationContributor"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         1.0.0
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
          The following is an example of a contributor: 
 
 &lt;p&gt;
 &lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.jem.proxy.contributor&quot;&gt;
+ &lt;extension point=&quot;org.eclipse.jem.proxy.contributors&quot;&gt;
   &lt;contributor
    class=&quot;com.example.ContributorImplementation&quot;
    container=&quot;MY_CONTAINER&quot;&gt;
   &lt;contributor&gt;
  &lt;/extension&gt;
 &lt;/pre&gt;
-&lt;/p&gt;

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="apiInfo"/>

-      </appInfo>

-      <documentation>

-         The &lt;samp&gt;class&lt;/samp&gt; attribute must be a fully-qualified class that implements the &lt;samp&gt;org.eclipse.jem.internal.proxy.core.IConfigurationContributor&lt;/samp&gt; interface.

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="implementation"/>

-      </appInfo>

-      <documentation>

-         There are no implementations of the IConfigurationContributor available for general use.

-      </documentation>

-   </annotation>

-

-   <annotation>

-      <appInfo>

-         <meta.section type="copyright"/>

-      </appInfo>

-      <documentation>

+&lt;/p&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         The &lt;samp&gt;class&lt;/samp&gt; attribute must be a fully-qualified class that implements the &lt;samp&gt;org.eclipse.jem.internal.proxy.core.IConfigurationContributor&lt;/samp&gt; interface.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         There is &lt;samp&gt;org.eclipse.jem.internal.proxy.core.ConfigurationContributorAdapter&lt;/samp&gt; available to subclass to provide specific overrides. The default for the adapter is that it doesn&apos;t do anything.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
          Copyright (c) 2004 IBM Corporation and others.&lt;br&gt;
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Common Public License v1.0 which accompanies 
 this distribution, and is available at 
-&lt;a href=&quot;http://www.eclipse.org/legal/cpl-v10.html&quot;&gt;http://www.eclipse.org/legal/cpl-v10.html&lt;/a&gt;

-      </documentation>

-   </annotation>

-

-</schema>

+&lt;a href=&quot;http://www.eclipse.org/legal/cpl-v10.html&quot;&gt;http://www.eclipse.org/legal/cpl-v10.html&lt;/a&gt;
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BIListElementSorter.java b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BIListElementSorter.java
index fbdbd74..d061a92 100644
--- a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BIListElementSorter.java
+++ b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BIListElementSorter.java
@@ -11,14 +11,14 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BIListElementSorter.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/08 00:48:07 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:48:57 $ 
  */
 
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerSorter;
 
-import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoEntry;
+import org.eclipse.jem.internal.beaninfo.core.BeaninfoEntry;
 
 /**
  * Sorter for sorting BPBeaninfoListElements within the main list.
diff --git a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BPBeaninfoListElement.java b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BPBeaninfoListElement.java
index 1bc339a..0ab343e 100644
--- a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BPBeaninfoListElement.java
+++ b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BPBeaninfoListElement.java
@@ -11,11 +11,11 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BPBeaninfoListElement.java,v $
- *  $Revision: 1.1 $  $Date: 2004/03/04 16:14:29 $ 
+ *  $Revision: 1.2 $  $Date: 2004/03/22 23:48:57 $ 
  */
 
-import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoEntry;
-import org.eclipse.jem.internal.beaninfo.adapters.SearchpathEntry;
+import org.eclipse.jem.internal.beaninfo.core.BeaninfoEntry;
+import org.eclipse.jem.internal.beaninfo.core.SearchpathEntry;
 
 /**
  * @version 	1.0
diff --git a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BPListElement.java b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BPListElement.java
index 8f7ac05..9adf160 100644
--- a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BPListElement.java
+++ b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BPListElement.java
@@ -11,11 +11,11 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BPListElement.java,v $
- *  $Revision: 1.1 $  $Date: 2004/03/04 16:14:29 $ 
+ *  $Revision: 1.2 $  $Date: 2004/03/22 23:48:57 $ 
  */
 
 
-import org.eclipse.jem.internal.beaninfo.adapters.IBeaninfosDocEntry;
+import org.eclipse.jem.internal.beaninfo.core.IBeaninfosDocEntry;
 /**
  * A Base ListElement (i.e. element in a list viewer) for
  * a BeanInfo Search Path Entry.
diff --git a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BPSearchListElement.java b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BPSearchListElement.java
index de96518..2fc8168 100644
--- a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BPSearchListElement.java
+++ b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BPSearchListElement.java
@@ -11,10 +11,10 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BPSearchListElement.java,v $
- *  $Revision: 1.1 $  $Date: 2004/03/04 16:14:29 $ 
+ *  $Revision: 1.2 $  $Date: 2004/03/22 23:48:57 $ 
  */
 
-import org.eclipse.jem.internal.beaninfo.adapters.SearchpathEntry;
+import org.eclipse.jem.internal.beaninfo.core.SearchpathEntry;
 
 /**
  * @version 	1.0
diff --git a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BeaninfoEntrySearchpathDialog.java b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BeaninfoEntrySearchpathDialog.java
index 54244f9..ab63af8 100644
--- a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BeaninfoEntrySearchpathDialog.java
+++ b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BeaninfoEntrySearchpathDialog.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BeaninfoEntrySearchpathDialog.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/08 00:48:07 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:48:57 $ 
  */
 
 import java.text.MessageFormat;
@@ -55,8 +55,8 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
 
-import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoEntry;
-import org.eclipse.jem.internal.beaninfo.adapters.SearchpathEntry;
+import org.eclipse.jem.internal.beaninfo.core.BeaninfoEntry;
+import org.eclipse.jem.internal.beaninfo.core.SearchpathEntry;
 
 /**
  * This dialog is used to display and modify the search path
diff --git a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BeaninfoPathsBlock.java b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BeaninfoPathsBlock.java
index dfb865a..9f0e70b 100644
--- a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BeaninfoPathsBlock.java
+++ b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BeaninfoPathsBlock.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BeaninfoPathsBlock.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/08 00:48:07 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:48:57 $ 
  */
 
 import java.io.File;
@@ -42,7 +42,7 @@
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.*;
 
-import org.eclipse.jem.internal.beaninfo.adapters.*;
+import org.eclipse.jem.internal.beaninfo.core.*;
 import org.eclipse.jem.internal.ui.core.JEMUIPlugin;
 
 public class BeaninfoPathsBlock {
@@ -230,30 +230,35 @@
 					IBeaninfosDocEntry[] sp = doc.getSearchpath();
 					for (int i = 0; i < sp.length; i++) {
 						IBeaninfosDocEntry curr = sp[i];
-						boolean isMissing = true;
+						boolean isMissing = false;
 						BPListElement elem = null;
 						if (curr instanceof BeaninfoEntry) {
 							BeaninfoEntry be = (BeaninfoEntry) curr;
 
 							// get the resource, this tells if the beaninfos exist or not.
-							Object path = be.getClasspath();
-							if (path instanceof IProject)
-								isMissing = !((IProject) path).exists();
-							else {
-								File f = null;
-								if (path instanceof String)
-									f = new File((String) path);
-								else if (path instanceof String[] && ((String[]) path).length > 0)
-									f = new File(((String[]) path)[0]);
-								if (f != null)
-									isMissing = !f.exists();
-							}
+							Object[] paths = be.getClasspath(fCurrJProject);
+							if (paths != null && paths.length > 0) {
+								for (int j = 0; !isMissing && j < paths.length; j++) {
+									Object path = paths[i];
+									if (path instanceof IProject)
+										isMissing = !((IProject) path).exists();
+									else if (path instanceof String) {
+										File f = new File((String) path);
+										isMissing = !f.exists();
+									} else if (path instanceof IPath) {
+										isMissing = true;	// Plugins are invalid in BeaninfoConfig. They only apply within contributions.
+									} else
+										isMissing = true; // Invalid, so isMissing.
+								}								
+							} else
+								isMissing = true;
 
 							elem = new BPBeaninfoListElement(be, getInitialSearchpaths(be), isMissing);
 						} else {
 							// Searchpath entry, see if we can find the raw classpath entry that it is for.
 							boolean isExported = false;
 							boolean isPackageMissing = true;
+							isMissing = true;	// Initially missing until we find it.
 							SearchpathEntry ce = (SearchpathEntry) curr;
 							int kind = ce.getKind();
 							IPath path = ce.getPath();
diff --git a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BeaninfosWorkbookPage.java b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BeaninfosWorkbookPage.java
index 100251d..3cb5323 100644
--- a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BeaninfosWorkbookPage.java
+++ b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/BeaninfosWorkbookPage.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: BeaninfosWorkbookPage.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/08 00:48:07 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:48:57 $ 
  */
 
 import java.util.*;
@@ -19,7 +19,8 @@
 
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.jem.internal.beaninfo.adapters.BeaninfoEntry;
+
+import org.eclipse.jem.internal.beaninfo.core.BeaninfoEntry;
 import org.eclipse.jem.internal.ui.core.JEMUIPlugin;
 
 import org.eclipse.jdt.core.*;
diff --git a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/PackagesWorkbookPage.java b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/PackagesWorkbookPage.java
index f920400..8e36b1b 100644
--- a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/PackagesWorkbookPage.java
+++ b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/PackagesWorkbookPage.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: PackagesWorkbookPage.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/08 00:48:07 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:48:57 $ 
  */
 
 import java.util.*;
@@ -31,7 +31,7 @@
 import org.eclipse.swt.widgets.*;
 import org.eclipse.ui.dialogs.*;
 
-import org.eclipse.jem.internal.beaninfo.adapters.SearchpathEntry;
+import org.eclipse.jem.internal.beaninfo.core.SearchpathEntry;
 import org.eclipse.jem.internal.ui.core.JEMUIPlugin;
 /**
  * Workbook page for selecting the packages from the current
diff --git a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/SPListElementSorter.java b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/SPListElementSorter.java
index bb7bc4d..f25ad21 100644
--- a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/SPListElementSorter.java
+++ b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/SPListElementSorter.java
@@ -11,14 +11,14 @@
  *******************************************************************************/
 /*
  *  $RCSfile: SPListElementSorter.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/08 00:48:07 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:48:57 $ 
  */
 
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerSorter;
 
-import org.eclipse.jem.internal.beaninfo.adapters.SearchpathEntry;
+import org.eclipse.jem.internal.beaninfo.core.SearchpathEntry;
 
 /**
  * Sorter for sorting BPSearchListElements within the main list.
diff --git a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/SearchPathListLabelProvider.java b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/SearchPathListLabelProvider.java
index ad37cc1..05b0ea3 100644
--- a/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/SearchPathListLabelProvider.java
+++ b/plugins/org.eclipse.jem.ui/beaninfoui/org/eclipse/jem/internal/beaninfo/ui/SearchPathListLabelProvider.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: SearchPathListLabelProvider.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/08 00:48:07 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:48:57 $ 
  */
 
 import java.net.MalformedURLException;
@@ -23,8 +23,6 @@
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.jdt.core.*;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
 import org.eclipse.jdt.internal.ui.wizards.buildpaths.ArchiveFileFilter;
@@ -33,13 +31,11 @@
 import org.eclipse.jface.resource.ImageRegistry;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.ide.IDE;
 import org.eclipse.ui.internal.misc.OverlayComposite;
 
-import org.eclipse.jem.internal.beaninfo.adapters.*;
+import org.eclipse.jem.internal.beaninfo.core.*;
 import org.eclipse.jem.internal.ui.core.JEMUIPlugin;
 
 public class SearchPathListLabelProvider extends LabelProvider {
diff --git a/plugins/org.eclipse.jem/javainst/org/eclipse/jem/internal/instantiation/impl/PTInfixExpressionImpl.java b/plugins/org.eclipse.jem/javainst/org/eclipse/jem/internal/instantiation/impl/PTInfixExpressionImpl.java
index d84035c..e95f262 100644
--- a/plugins/org.eclipse.jem/javainst/org/eclipse/jem/internal/instantiation/impl/PTInfixExpressionImpl.java
+++ b/plugins/org.eclipse.jem/javainst/org/eclipse/jem/internal/instantiation/impl/PTInfixExpressionImpl.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: PTInfixExpressionImpl.java,v $
- *  $Revision: 1.2 $  $Date: 2004/03/11 01:48:01 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:49:26 $ 
  */
 import java.util.Collection;
 
@@ -370,24 +370,22 @@
 		// If no left and no right
 		if(getLeftOperand() == null && getRightOperand() != null){
 			// no extends so just use the right operand
-			if(getExtendedOperands().size() == 0){
+			if(getExtendedOperands().isEmpty()){
 				return getRightOperand();
 			} else {
 				// The right becomes the new left
 				setLeftOperand(getRightOperand());
 				// The first operand becomes the right one
-				setRightOperand((PTExpression) getExtendedOperands().get(0));
-				getExtendedOperands().remove(1);
+				setRightOperand((PTExpression) getExtendedOperands().remove(0));
 				return this;
 			}
 		} else if (getRightOperand() == null && getLeftOperand() != null){
 			// no extends so just use the left operand
-			if(getExtendedOperands().size() == 0){
+			if(getExtendedOperands().isEmpty()){
 				return getLeftOperand();
 			} else {
 				// The right becomes the first extended
-				setRightOperand((PTExpression)getExtendedOperands().get(1));
-				getExtendedOperands().remove(1);
+				setRightOperand((PTExpression)getExtendedOperands().remove(0));
 				return this;
 			}			
 		}	
diff --git a/plugins/org.eclipse.jem/mofjava/org/eclipse/jem/internal/java/adapters/JavaXMIFactoryImpl.java b/plugins/org.eclipse.jem/mofjava/org/eclipse/jem/internal/java/adapters/JavaXMIFactoryImpl.java
index d80f40e..f770989 100644
--- a/plugins/org.eclipse.jem/mofjava/org/eclipse/jem/internal/java/adapters/JavaXMIFactoryImpl.java
+++ b/plugins/org.eclipse.jem/mofjava/org/eclipse/jem/internal/java/adapters/JavaXMIFactoryImpl.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: JavaXMIFactoryImpl.java,v $
- *  $Revision: 1.2 $  $Date: 2004/01/13 16:16:21 $ 
+ *  $Revision: 1.3 $  $Date: 2004/03/22 23:49:26 $ 
  */
 import java.io.IOException;
 import java.util.*;
@@ -110,16 +110,12 @@
 			}
 			return result;
 		}
-		
-		protected EObject getEObjectByID(String id) {
-			if (idToEObjectMap != null) {
-				EObject eObject = (EObject) idToEObjectMap.get(id);
-				if (eObject != null) {
-					return eObject;
-				}
-			}
-			return null;
-		}		
+		/* (non-Javadoc)
+		 * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#useIDAttributes()
+		 */
+		protected boolean useIDAttributes() {
+			return false;
+		}
 
 	}
 
diff --git a/plugins/org.eclipse.jem/plugin.xml b/plugins/org.eclipse.jem/plugin.xml
index 282fe52..42903cf 100644
--- a/plugins/org.eclipse.jem/plugin.xml
+++ b/plugins/org.eclipse.jem/plugin.xml
@@ -36,15 +36,17 @@
       </package>
    </extension>
    <extension
-         point="org.eclipse.jem.beaninfo.overrides">
-      <override
+         point="org.eclipse.jem.beaninfo.registrations">
+      <registration container="org.eclipse.jdt.launching.JRE_CONTAINER">
+        <override
             package="java.lang"
-            path="platform:/plugin/org.eclipse.jem/overrides/java/lang">
-      </override>
-      <override
+            path="overrides/java/lang">
+        </override>
+        <override
             package="..ROOT.."
-            path="platform:/plugin/org.eclipse.jem/overrides">
-      </override>
+            path="overrides">
+        </override>
+      </registration>
    </extension>
 
 </plugin>