Additional change re Bug 314610 - Produce warning when two roles capture the same method at the same time
avoid interference with workspace location initialization.
diff --git a/plugins/org.eclipse.objectteams.otdt.jdt.ui/plugin.xml b/plugins/org.eclipse.objectteams.otdt.jdt.ui/plugin.xml
index 0a0d968..499bfd9 100644
--- a/plugins/org.eclipse.objectteams.otdt.jdt.ui/plugin.xml
+++ b/plugins/org.eclipse.objectteams.otdt.jdt.ui/plugin.xml
@@ -181,6 +181,11 @@
               class="org.eclipse.objectteams.otdt.internal.ui.viewsupport.MarkerViewAdaptor"
               icon="platform:/plugin/org.eclipse.objectteams.otdt.ui/icons/ot/team_obj.gif">
         </team>
+        <team
+              activation="NONE"
+              class="org.eclipse.objectteams.otdt.internal.ui.viewsupport.MarkerViewAdaptor.MarkersViewLifeCycle.MarkersView"
+              icon="platform:/plugin/org.eclipse.objectteams.otdt.ui/icons/ot/team_obj.gif">
+        </team>
      </aspectBinding>
    </extension>
    <extension
diff --git a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/viewsupport/MarkerViewAdaptor.java b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/viewsupport/MarkerViewAdaptor.java
index 37c495e..153b5b1 100644
--- a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/viewsupport/MarkerViewAdaptor.java
+++ b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/viewsupport/MarkerViewAdaptor.java
@@ -23,11 +23,17 @@
 import org.eclipse.objectteams.otdt.core.ext.IMarkableJavaElement;
 import org.eclipse.objectteams.otdt.ui.OTDTUIPlugin;
 import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IViewSite;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.PartInitException;
 
 import base org.eclipse.ui.internal.views.markers.ExtendedMarkersView;
 
+/**
+ * Help the "Problems" view to locate markers placed on class files.
+ * @since 2.1.0
+ */
 @SuppressWarnings("restriction")
 public team class MarkerViewAdaptor {
 
@@ -38,29 +44,42 @@
 	static final String ATT_HANDLE_ID =
 		"org.eclipse.jdt.internal.core.JavaModelManager.handleId" ; //$NON-NLS-1$
 
-	protected class MarkersView playedBy ExtendedMarkersView {
+	/** 
+	 * Inner team allows deferred activation in order to avoid early loading of interface IMarker,
+	 * which would trigger activating the resources plugin, which would initialize the instance location
+	 * to its default rather than waiting for the Choose Workspace dialog.
+	 */
+	protected team class MarkersViewLifeCycle playedBy ExtendedMarkersView {
 
-		void openMarkerInEditor(IMarker marker, IWorkbenchPage page) 
-		<- after void openMarkerInEditor(IMarker marker, IWorkbenchPage page)
-				base when (marker.getResource() instanceof WorkspaceRoot);
+		void activate(Thread t) <- before void init(IViewSite site, IMemento memento)
+				with { t <-  ALL_THREADS }
+		void deactivate(Thread t) <- before void dispose()
+				with { t <-  ALL_THREADS }
 
-		private static void openMarkerInEditor(IMarker marker, IWorkbenchPage page) {
-			String handleIdentifier = marker.getAttribute(ATT_HANDLE_ID, null);
-			if (handleIdentifier != null) {
-				IJavaElement target = JavaCore.create(handleIdentifier);
-				try	{
-					IEditorPart part = EditorUtility.openInEditor(target);
-					// do we have a detail identifier to position the editor?
-					String detailIdentifier = marker.getAttribute(IMarkableJavaElement.ATT_DETAIL_ID, null);
-					if (detailIdentifier != null) {
-						IJavaElement detail = JavaCore.create(detailIdentifier);
-						if (detail.exists())
-							EditorUtility.revealInEditor(part, detail);
+		protected class MarkersView playedBy ExtendedMarkersView {
+			
+			void openMarkerInEditor(IMarker marker, IWorkbenchPage page) 
+			<- after void openMarkerInEditor(IMarker marker, IWorkbenchPage page)
+			base when (marker.getResource() instanceof WorkspaceRoot);
+			
+			private static void openMarkerInEditor(IMarker marker, IWorkbenchPage page) {
+				String handleIdentifier = marker.getAttribute(ATT_HANDLE_ID, null);
+				if (handleIdentifier != null) {
+					IJavaElement target = JavaCore.create(handleIdentifier);
+					try	{
+						IEditorPart part = EditorUtility.openInEditor(target);
+						// do we have a detail identifier to position the editor?
+						String detailIdentifier = marker.getAttribute(IMarkableJavaElement.ATT_DETAIL_ID, null);
+						if (detailIdentifier != null) {
+							IJavaElement detail = JavaCore.create(detailIdentifier);
+							if (detail.exists())
+								EditorUtility.revealInEditor(part, detail);
+						}
+					} catch (PartInitException ex) {
+						OTDTUIPlugin.logException("Problems initializing editor", ex); //$NON-NLS-1$
 					}
-				} catch (PartInitException ex) {
-					OTDTUIPlugin.logException("Problems initializing editor", ex); //$NON-NLS-1$
-				}
-			}			
-		}
-	}	
+				}			
+			}
+		}	
+	}
 }