Merge branch 'R4_HEAD'

Preparing 'master' for 4.2 work

Conflicts:
	bundles/org.eclipse.ui/META-INF/MANIFEST.MF
	bundles/org.eclipse.ui/schema/viewActions.exsd
diff --git a/bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ParameterizedCommand.java b/bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ParameterizedCommand.java
index fdcc471..0de8832 100644
--- a/bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ParameterizedCommand.java
+++ b/bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/ParameterizedCommand.java
@@ -545,23 +545,17 @@
 			if (parameterizations != null) {
 				nameBuffer.append(" ("); //$NON-NLS-1$
 				final int parameterizationCount = parameterizations.length;
-				for (int i = 0; i < parameterizationCount; i++) {
-					final Parameterization parameterization = parameterizations[i];
-					nameBuffer
-							.append(parameterization.getParameter().getName());
-					nameBuffer.append(": "); //$NON-NLS-1$
-					try {
-						nameBuffer.append(parameterization.getValueName());
-					} catch (final ParameterValuesException e) {
-						/*
-						 * Just let it go for now. If someone complains we can
-						 * add more info later.
-						 */
-					}
-
-					// If there is another item, append a separator.
-					if (i + 1 < parameterizationCount) {
-						nameBuffer.append(", "); //$NON-NLS-1$
+				if(parameterizationCount == 1) {
+					appendParameter(nameBuffer, parameterizations[0], false);
+				}else {
+					for (int i = 0; i < parameterizationCount; i++) {
+						
+						appendParameter(nameBuffer, parameterizations[i], true);
+	
+						// If there is another item, append a separator.
+						if (i + 1 < parameterizationCount) {
+							nameBuffer.append(", "); //$NON-NLS-1$
+						}
 					}
 				}
 				nameBuffer.append(')');
@@ -571,6 +565,24 @@
 		return name;
 	}
 
+	private void appendParameter(final StringBuffer nameBuffer,
+			final Parameterization parameterization, boolean shouldAppendName) {
+		
+		if(shouldAppendName) {
+			nameBuffer
+					.append(parameterization.getParameter().getName());
+			nameBuffer.append(": "); //$NON-NLS-1$
+		}
+		try {
+			nameBuffer.append(parameterization.getValueName());
+		} catch (final ParameterValuesException e) {
+			/*
+			 * Just let it go for now. If someone complains we can
+			 * add more info later.
+			 */
+		}
+	}
+
 	/**
 	 * Returns the parameter map, as can be used to construct an
 	 * <code>ExecutionEvent</code>.
diff --git a/bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/DefaultOperationHistory.java b/bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/DefaultOperationHistory.java
index 57450ea..4364814 100644
--- a/bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/DefaultOperationHistory.java
+++ b/bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/DefaultOperationHistory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Tasktop Technologies -  Bug 323444 - [Undo] [Commands] java.util.ConcurrentModificationException 
+ *     		when trying to get the undo history from a source viewer
  *******************************************************************************/
 package org.eclipse.core.commands.operations;
 
@@ -551,8 +553,8 @@
 		 */
 
 		List filtered = new ArrayList();
-		Iterator iterator = list.iterator();
 		synchronized (undoRedoHistoryLock) {
+			Iterator iterator = list.iterator();
 			while (iterator.hasNext()) {
 				IUndoableOperation operation = (IUndoableOperation) iterator
 						.next();
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanListPropertyDecorator.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanListPropertyDecorator.java
index 8328dc5..d54bbdc 100644
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanListPropertyDecorator.java
+++ b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanListPropertyDecorator.java
@@ -21,7 +21,6 @@
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
 import org.eclipse.core.databinding.observable.list.ListDiff;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.list.IListProperty;
 import org.eclipse.core.databinding.property.list.ListProperty;
@@ -71,8 +70,8 @@
 	}
 
 	public IBeanListProperty values(IBeanValueProperty property) {
-		return new BeanListPropertyDecorator(super.values(property), property
-				.getPropertyDescriptor());
+		return new BeanListPropertyDecorator(super.values(property),
+				property.getPropertyDescriptor());
 	}
 
 	public PropertyDescriptor getPropertyDescriptor() {
@@ -89,14 +88,6 @@
 				propertyDescriptor);
 	}
 
-	public IObservableFactory listFactory() {
-		return delegate.listFactory();
-	}
-
-	public IObservableFactory listFactory(Realm realm) {
-		return delegate.listFactory(realm);
-	}
-
 	public IObservableList observeDetail(IObservableValue master) {
 		return new BeanObservableListDecorator(delegate.observeDetail(master),
 				propertyDescriptor);
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanMapPropertyDecorator.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanMapPropertyDecorator.java
index b1ba7a0..e7b47c2 100644
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanMapPropertyDecorator.java
+++ b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanMapPropertyDecorator.java
@@ -21,7 +21,6 @@
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.map.IObservableMap;
 import org.eclipse.core.databinding.observable.map.MapDiff;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.map.IMapProperty;
 import org.eclipse.core.databinding.property.map.MapProperty;
@@ -79,8 +78,8 @@
 	}
 
 	public IBeanMapProperty values(IBeanValueProperty property) {
-		return new BeanMapPropertyDecorator(super.values(property), property
-				.getPropertyDescriptor());
+		return new BeanMapPropertyDecorator(super.values(property),
+				property.getPropertyDescriptor());
 	}
 
 	public IObservableMap observe(Object source) {
@@ -93,14 +92,6 @@
 				propertyDescriptor);
 	}
 
-	public IObservableFactory mapFactory() {
-		return delegate.mapFactory();
-	}
-
-	public IObservableFactory mapFactory(Realm realm) {
-		return delegate.mapFactory(realm);
-	}
-
 	public IObservableMap observeDetail(IObservableValue master) {
 		return new BeanObservableMapDecorator(delegate.observeDetail(master),
 				propertyDescriptor);
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanPropertyHelper.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanPropertyHelper.java
index 92e8199..83d1ebf 100644
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanPropertyHelper.java
+++ b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanPropertyHelper.java
@@ -48,6 +48,11 @@
 			PropertyDescriptor propertyDescriptor, Object value) {
 		try {
 			Method writeMethod = propertyDescriptor.getWriteMethod();
+			if (null == writeMethod) {
+				throw new IllegalArgumentException(
+						"Missing public setter method for " //$NON-NLS-1$
+								+ propertyDescriptor.getName() + " property"); //$NON-NLS-1$
+			}
 			if (!writeMethod.isAccessible()) {
 				writeMethod.setAccessible(true);
 			}
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanSetPropertyDecorator.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanSetPropertyDecorator.java
index c384f6a..3b52f7c 100644
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanSetPropertyDecorator.java
+++ b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanSetPropertyDecorator.java
@@ -20,7 +20,6 @@
 import org.eclipse.core.databinding.beans.IBeanSetProperty;
 import org.eclipse.core.databinding.beans.IBeanValueProperty;
 import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.set.IObservableSet;
 import org.eclipse.core.databinding.observable.set.SetDiff;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
@@ -76,8 +75,8 @@
 	}
 
 	public IBeanMapProperty values(IBeanValueProperty property) {
-		return new BeanMapPropertyDecorator(super.values(property), property
-				.getPropertyDescriptor());
+		return new BeanMapPropertyDecorator(super.values(property),
+				property.getPropertyDescriptor());
 	}
 
 	public IObservableSet observe(Object source) {
@@ -90,14 +89,6 @@
 				propertyDescriptor);
 	}
 
-	public IObservableFactory setFactory() {
-		return delegate.setFactory();
-	}
-
-	public IObservableFactory setFactory(Realm realm) {
-		return delegate.setFactory(realm);
-	}
-
 	public IObservableSet observeDetail(IObservableValue master) {
 		return new BeanObservableSetDecorator(delegate.observeDetail(master),
 				propertyDescriptor);
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanValuePropertyDecorator.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanValuePropertyDecorator.java
index 5469453..034afba 100644
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanValuePropertyDecorator.java
+++ b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanValuePropertyDecorator.java
@@ -22,7 +22,6 @@
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
 import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.set.IObservableSet;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.value.IValueProperty;
@@ -73,8 +72,8 @@
 	}
 
 	public IBeanValueProperty value(IBeanValueProperty property) {
-		return new BeanValuePropertyDecorator(super.value(property), property
-				.getPropertyDescriptor());
+		return new BeanValuePropertyDecorator(super.value(property),
+				property.getPropertyDescriptor());
 	}
 
 	public IBeanListProperty list(String propertyName) {
@@ -87,8 +86,8 @@
 	}
 
 	public IBeanListProperty list(IBeanListProperty property) {
-		return new BeanListPropertyDecorator(super.list(property), property
-				.getPropertyDescriptor());
+		return new BeanListPropertyDecorator(super.list(property),
+				property.getPropertyDescriptor());
 	}
 
 	public IBeanSetProperty set(String propertyName) {
@@ -101,8 +100,8 @@
 	}
 
 	public IBeanSetProperty set(IBeanSetProperty property) {
-		return new BeanSetPropertyDecorator(super.set(property), property
-				.getPropertyDescriptor());
+		return new BeanSetPropertyDecorator(super.set(property),
+				property.getPropertyDescriptor());
 	}
 
 	public IBeanMapProperty map(String propertyName) {
@@ -117,8 +116,8 @@
 	}
 
 	public IBeanMapProperty map(IBeanMapProperty property) {
-		return new BeanMapPropertyDecorator(super.map(property), property
-				.getPropertyDescriptor());
+		return new BeanMapPropertyDecorator(super.map(property),
+				property.getPropertyDescriptor());
 	}
 
 	public IObservableValue observe(Object source) {
@@ -131,14 +130,6 @@
 				delegate.observe(realm, source), propertyDescriptor);
 	}
 
-	public IObservableFactory valueFactory() {
-		return delegate.valueFactory();
-	}
-
-	public IObservableFactory valueFactory(Realm realm) {
-		return delegate.valueFactory(realm);
-	}
-
 	public IObservableValue observeDetail(IObservableValue master) {
 		return new BeanObservableValueDecorator(delegate.observeDetail(master),
 				propertyDescriptor);
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoListPropertyDecorator.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoListPropertyDecorator.java
index ae3e33c..a77ced2 100644
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoListPropertyDecorator.java
+++ b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoListPropertyDecorator.java
@@ -21,7 +21,6 @@
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
 import org.eclipse.core.databinding.observable.list.ListDiff;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.list.IListProperty;
 import org.eclipse.core.databinding.property.list.ListProperty;
@@ -71,8 +70,8 @@
 	}
 
 	public IBeanListProperty values(IBeanValueProperty property) {
-		return new PojoListPropertyDecorator(super.values(property), property
-				.getPropertyDescriptor());
+		return new PojoListPropertyDecorator(super.values(property),
+				property.getPropertyDescriptor());
 	}
 
 	public PropertyDescriptor getPropertyDescriptor() {
@@ -89,14 +88,6 @@
 				propertyDescriptor);
 	}
 
-	public IObservableFactory listFactory() {
-		return delegate.listFactory();
-	}
-
-	public IObservableFactory listFactory(Realm realm) {
-		return delegate.listFactory(realm);
-	}
-
 	public IObservableList observeDetail(IObservableValue master) {
 		return new BeanObservableListDecorator(delegate.observeDetail(master),
 				propertyDescriptor);
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoMapPropertyDecorator.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoMapPropertyDecorator.java
index 8efcd2f..fa318a9 100644
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoMapPropertyDecorator.java
+++ b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoMapPropertyDecorator.java
@@ -21,7 +21,6 @@
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.map.IObservableMap;
 import org.eclipse.core.databinding.observable.map.MapDiff;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.map.IMapProperty;
 import org.eclipse.core.databinding.property.map.MapProperty;
@@ -79,8 +78,8 @@
 	}
 
 	public IBeanMapProperty values(IBeanValueProperty property) {
-		return new PojoMapPropertyDecorator(super.values(property), property
-				.getPropertyDescriptor());
+		return new PojoMapPropertyDecorator(super.values(property),
+				property.getPropertyDescriptor());
 	}
 
 	public IObservableMap observe(Object source) {
@@ -93,14 +92,6 @@
 				propertyDescriptor);
 	}
 
-	public IObservableFactory mapFactory() {
-		return delegate.mapFactory();
-	}
-
-	public IObservableFactory mapFactory(Realm realm) {
-		return delegate.mapFactory(realm);
-	}
-
 	public IObservableMap observeDetail(IObservableValue master) {
 		return new BeanObservableMapDecorator(delegate.observeDetail(master),
 				propertyDescriptor);
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoSetPropertyDecorator.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoSetPropertyDecorator.java
index c0e6b3c..ebe54a9 100644
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoSetPropertyDecorator.java
+++ b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoSetPropertyDecorator.java
@@ -20,7 +20,6 @@
 import org.eclipse.core.databinding.beans.IBeanValueProperty;
 import org.eclipse.core.databinding.beans.PojoProperties;
 import org.eclipse.core.databinding.observable.Realm;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.set.IObservableSet;
 import org.eclipse.core.databinding.observable.set.SetDiff;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
@@ -76,8 +75,8 @@
 	}
 
 	public IBeanMapProperty values(IBeanValueProperty property) {
-		return new BeanMapPropertyDecorator(super.values(property), property
-				.getPropertyDescriptor());
+		return new BeanMapPropertyDecorator(super.values(property),
+				property.getPropertyDescriptor());
 	}
 
 	public IObservableSet observe(Object source) {
@@ -90,14 +89,6 @@
 				propertyDescriptor);
 	}
 
-	public IObservableFactory setFactory() {
-		return delegate.setFactory();
-	}
-
-	public IObservableFactory setFactory(Realm realm) {
-		return delegate.setFactory(realm);
-	}
-
 	public IObservableSet observeDetail(IObservableValue master) {
 		return new BeanObservableSetDecorator(delegate.observeDetail(master),
 				propertyDescriptor);
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoValuePropertyDecorator.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoValuePropertyDecorator.java
index d7acb6f..af410e7 100644
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoValuePropertyDecorator.java
+++ b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoValuePropertyDecorator.java
@@ -22,7 +22,6 @@
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
 import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.set.IObservableSet;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.value.IValueProperty;
@@ -73,8 +72,8 @@
 	}
 
 	public IBeanValueProperty value(IBeanValueProperty property) {
-		return new PojoValuePropertyDecorator(super.value(property), property
-				.getPropertyDescriptor());
+		return new PojoValuePropertyDecorator(super.value(property),
+				property.getPropertyDescriptor());
 	}
 
 	public IBeanListProperty list(String propertyName) {
@@ -87,8 +86,8 @@
 	}
 
 	public IBeanListProperty list(IBeanListProperty property) {
-		return new BeanListPropertyDecorator(super.list(property), property
-				.getPropertyDescriptor());
+		return new BeanListPropertyDecorator(super.list(property),
+				property.getPropertyDescriptor());
 	}
 
 	public IBeanSetProperty set(String propertyName) {
@@ -101,8 +100,8 @@
 	}
 
 	public IBeanSetProperty set(IBeanSetProperty property) {
-		return new BeanSetPropertyDecorator(super.set(property), property
-				.getPropertyDescriptor());
+		return new BeanSetPropertyDecorator(super.set(property),
+				property.getPropertyDescriptor());
 	}
 
 	public IBeanMapProperty map(String propertyName) {
@@ -117,8 +116,8 @@
 	}
 
 	public IBeanMapProperty map(IBeanMapProperty property) {
-		return new BeanMapPropertyDecorator(super.map(property), property
-				.getPropertyDescriptor());
+		return new BeanMapPropertyDecorator(super.map(property),
+				property.getPropertyDescriptor());
 	}
 
 	public IObservableValue observe(Object source) {
@@ -131,14 +130,6 @@
 				delegate.observe(realm, source), propertyDescriptor);
 	}
 
-	public IObservableFactory valueFactory() {
-		return delegate.valueFactory();
-	}
-
-	public IObservableFactory valueFactory(Realm realm) {
-		return delegate.valueFactory(realm);
-	}
-
 	public IObservableValue observeDetail(IObservableValue master) {
 		return new BeanObservableValueDecorator(delegate.observeDetail(master),
 				propertyDescriptor);
diff --git a/bundles/org.eclipse.core.databinding.observable/META-INF/MANIFEST.MF b/bundles/org.eclipse.core.databinding.observable/META-INF/MANIFEST.MF
index a99b010..1bdf4a1 100644
--- a/bundles/org.eclipse.core.databinding.observable/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.core.databinding.observable/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.databinding.observable
-Bundle-Version: 1.3.0.qualifier
+Bundle-Version: 1.4.0.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/DecoratingObservableCollection.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/DecoratingObservableCollection.java
index 2129e08..de13bd0 100644
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/DecoratingObservableCollection.java
+++ b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/DecoratingObservableCollection.java
@@ -117,9 +117,12 @@
 		return decorated.getElementType();
 	}
 
-	public boolean equals(Object o) {
+	public boolean equals(Object obj) {
 		getterCalled();
-		return decorated.equals(o);
+		if (this == obj) {
+			return true;
+		}
+		return decorated.equals(obj);
 	}
 
 	public int hashCode() {
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java
index 8302f6e..7d447a5 100644
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java
+++ b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java
@@ -12,6 +12,7 @@
  *     Brad Reynolds - bug 147515
  *     Sebastian Fuchs <spacehorst@gmail.com> - bug 243848
  *     Matthew Hall - bugs 208858, 213145, 243848
+ *     Ovidio Mallo - bug 332367
  *******************************************************************************/
 package org.eclipse.core.databinding.observable.list;
 
@@ -19,6 +20,7 @@
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
+import java.util.ListIterator;
 
 import org.eclipse.core.databinding.observable.Diffs;
 import org.eclipse.core.databinding.observable.Realm;
@@ -125,9 +127,9 @@
 	public Object set(int index, Object element) {
 		checkRealm();
 		Object oldElement = wrappedList.set(index, element);
-		fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(index,
-				false, oldElement), Diffs.createListDiffEntry(index, true,
-				element)));
+		fireListChange(Diffs.createListDiff(
+				Diffs.createListDiffEntry(index, false, oldElement),
+				Diffs.createListDiffEntry(index, true, element)));
 		return oldElement;
 	}
 
@@ -147,9 +149,9 @@
 			return wrappedList.get(oldIndex);
 		Object element = wrappedList.remove(oldIndex);
 		wrappedList.add(newIndex, element);
-		fireListChange(Diffs.createListDiff(Diffs.createListDiffEntry(oldIndex,
-				false, element), Diffs.createListDiffEntry(newIndex, true,
-				element)));
+		fireListChange(Diffs.createListDiff(
+				Diffs.createListDiffEntry(oldIndex, false, element),
+				Diffs.createListDiffEntry(newIndex, true, element)));
 		return element;
 	}
 
@@ -259,15 +261,19 @@
 
 	public void clear() {
 		checkRealm();
-		List entries = new ArrayList();
-		for (Iterator it = wrappedList.iterator(); it.hasNext();) {
-			Object element = it.next();
-			// always report 0 as the remove index
-			entries.add(Diffs.createListDiffEntry(0, false, element));
-			it.remove();
+		// We remove the elements from back to front which is typically much
+		// faster on common list implementations like ArrayList.
+		ListDiffEntry[] entries = new ListDiffEntry[wrappedList.size()];
+		int entryIndex = 0;
+		for (ListIterator it = wrappedList.listIterator(wrappedList.size()); it
+				.hasPrevious();) {
+			int elementIndex = it.previousIndex();
+			Object element = it.previous();
+			entries[entryIndex++] = Diffs.createListDiffEntry(elementIndex,
+					false, element);
 		}
-		fireListChange(Diffs.createListDiff((ListDiffEntry[]) entries
-				.toArray(new ListDiffEntry[entries.size()])));
+		wrappedList.clear();
+		fireListChange(Diffs.createListDiff(entries));
 	}
 
 	/**
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/DecoratingObservableMap.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/DecoratingObservableMap.java
index 2624c00..c0a1bb7 100644
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/DecoratingObservableMap.java
+++ b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/DecoratingObservableMap.java
@@ -286,9 +286,12 @@
 		return values;
 	}
 
-	public boolean equals(Object o) {
+	public boolean equals(Object obj) {
 		getterCalled();
-		return decorated.equals(o);
+		if (this == obj) {
+			return true;
+		}
+		return decorated.equals(obj);
 	}
 
 	public int hashCode() {
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java
index e75dc53..203a1cf 100644
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java
+++ b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java
@@ -9,6 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     Brad Reynolds - bug 147515
  *     Matthew Hall - bug 221704, 226289
+ *     Ovidio Mallo - bugs 305367
  *******************************************************************************/
 
 package org.eclipse.core.databinding.observable.masterdetail;
@@ -21,6 +22,9 @@
 import org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableMap;
 import org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableSet;
 import org.eclipse.core.internal.databinding.observable.masterdetail.DetailObservableValue;
+import org.eclipse.core.internal.databinding.observable.masterdetail.ListDetailValueObservableList;
+import org.eclipse.core.internal.databinding.observable.masterdetail.MapDetailValueObservableMap;
+import org.eclipse.core.internal.databinding.observable.masterdetail.SetDetailValueObservableMap;
 
 /**
  * Allows for the observation of an attribute, the detail, of an observable
@@ -29,7 +33,7 @@
  * @since 1.0
  */
 public class MasterDetailObservables {
-	
+
 	/**
 	 * Creates a detail observable value from a master observable value and a
 	 * factory. This can be used to create observable values that represent a
@@ -145,4 +149,119 @@
 		return new DetailObservableMap(detailFactory, master, detailKeyType,
 				detailValueType);
 	}
+
+	/**
+	 * Returns a detail observable list where each element is the detail value
+	 * of the element in the master observable list. The provided factory is
+	 * used to create the detail observable values for every master element
+	 * which then define the elements of the detail list. The detail list
+	 * resides in the same realm as the given master list.
+	 * 
+	 * <p>
+	 * Note that since the values of the returned list are detail values of the
+	 * elements of the master list, the only modifications supported are through
+	 * the {@link IObservableList#set(int, Object)} method. Modifications made
+	 * through the returned list are made through the detail observables created
+	 * by the specified observable factory.
+	 * </p>
+	 * 
+	 * @param masterList
+	 *            The master observable list.
+	 * @param detailFactory
+	 *            The factory for creating {@link IObservableValue} instances
+	 *            for the elements of the master list which then define the
+	 *            elements of the new detail list.
+	 * @param detailType
+	 *            The value type of the detail values, typically of type
+	 *            <code>java.lang.Class</code>. May be <code>null</code>.
+	 * @return A detail observable list with elements which correspond to the
+	 *         detail values of the elements of the master list.
+	 * 
+	 * @since 1.4
+	 */
+	public static IObservableList detailValues(IObservableList masterList,
+			IObservableFactory detailFactory, Object detailType) {
+		return new ListDetailValueObservableList(masterList, detailFactory,
+				detailType);
+	}
+
+	/**
+	 * Returns a detail observable map where the map's key set is the same as
+	 * the given observable set, and where each value is the detail value of the
+	 * element in the master observable set. The provided factory is used to
+	 * create the detail observable values for every master key which then
+	 * define the values of the detail map. The detail map resides in the same
+	 * realm as the given master set.
+	 * 
+	 * <p>
+	 * Note that since the values of the returned map are detail values of the
+	 * elements of the master set, the only modifications supported are through
+	 * the {@link IObservableMap#put(Object, Object)} and
+	 * {@link IObservableMap#putAll(java.util.Map)} methods. Therefore, the
+	 * returned map does not add entries for elements not already contained in
+	 * the master set. Modifications made through the returned detail map are
+	 * made through the detail observables created by the specified observable
+	 * factory.
+	 * </p>
+	 * 
+	 * @param masterSet
+	 *            The master observable set.
+	 * @param detailFactory
+	 *            The factory for creating {@link IObservableValue} instances
+	 *            for the elements of the master set which then define the
+	 *            values of the new detail map.
+	 * @param detailType
+	 *            The value type of the detail values, typically of type
+	 *            <code>java.lang.Class</code>. May be <code>null</code>.
+	 * @return A detail observable map with the given master set as key set and
+	 *         with values which correspond to the detail values of the elements
+	 *         of the master set.
+	 * 
+	 * @since 1.4
+	 */
+	public static IObservableMap detailValues(IObservableSet masterSet,
+			IObservableFactory detailFactory, Object detailType) {
+		return new SetDetailValueObservableMap(masterSet, detailFactory,
+				detailType);
+	}
+
+	/**
+	 * Returns a detail observable map where the map's key set is the same as
+	 * the one of the given master observable map, and where each value is the
+	 * detail value of the corresponding value in the master observable map. The
+	 * provided factory is used to create the detail observable values for every
+	 * master value which then define the values of the detail map. The detail
+	 * map resides in the same realm as the given master map.
+	 * 
+	 * <p>
+	 * Note that since the values of the returned map are detail values of the
+	 * values of the master map, the only modifications supported are through
+	 * the {@link IObservableMap#put(Object, Object)} and
+	 * {@link IObservableMap#putAll(java.util.Map)} methods. Therefore, the
+	 * returned map does not add entries for keys not already contained in the
+	 * master map's key set. Modifications made through the returned detail map
+	 * are made through the detail observables created by the specified
+	 * observable factory.
+	 * </p>
+	 * 
+	 * @param masterMap
+	 *            The master observable map.
+	 * @param detailFactory
+	 *            The factory for creating {@link IObservableValue} instances
+	 *            for the values of the master map which then define the values
+	 *            of the new detail map.
+	 * @param detailType
+	 *            The value type of the detail values, typically of type
+	 *            <code>java.lang.Class</code>. May be <code>null</code>.
+	 * @return A detail observable map with the same key set as the given master
+	 *         observable map and with values which correspond to the detail
+	 *         values of the values of the master map.
+	 * 
+	 * @since 1.4
+	 */
+	public static IObservableMap detailValues(IObservableMap masterMap,
+			IObservableFactory detailFactory, Object detailType) {
+		return new MapDetailValueObservableMap(masterMap, detailFactory,
+				detailType);
+	}
 }
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/ListDetailValueObservableList.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/ListDetailValueObservableList.java
new file mode 100644
index 0000000..df985d8
--- /dev/null
+++ b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/ListDetailValueObservableList.java
@@ -0,0 +1,351 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Ovidio Mallo and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ovidio Mallo - initial API and implementation (bug 305367)
+ ******************************************************************************/
+
+package org.eclipse.core.internal.databinding.observable.masterdetail;
+
+import java.util.ArrayList;
+import java.util.BitSet;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.RandomAccess;
+
+import org.eclipse.core.databinding.observable.Diffs;
+import org.eclipse.core.databinding.observable.DisposeEvent;
+import org.eclipse.core.databinding.observable.IDisposeListener;
+import org.eclipse.core.databinding.observable.IObserving;
+import org.eclipse.core.databinding.observable.IStaleListener;
+import org.eclipse.core.databinding.observable.ObservableTracker;
+import org.eclipse.core.databinding.observable.StaleEvent;
+import org.eclipse.core.databinding.observable.list.AbstractObservableList;
+import org.eclipse.core.databinding.observable.list.IListChangeListener;
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListChangeEvent;
+import org.eclipse.core.databinding.observable.list.ListDiff;
+import org.eclipse.core.databinding.observable.list.ListDiffEntry;
+import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.observable.value.IValueChangeListener;
+import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
+import org.eclipse.core.internal.databinding.identity.IdentityMap;
+import org.eclipse.core.internal.databinding.identity.IdentitySet;
+
+/**
+ * @since 1.4
+ */
+public class ListDetailValueObservableList extends AbstractObservableList
+		implements IObserving, RandomAccess {
+
+	private IObservableList masterList;
+
+	private IObservableFactory detailFactory;
+
+	private Object detailType;
+
+	// The list of detail observables.
+	private ArrayList detailList;
+
+	// Maps every master to a DetailEntry containing the detail observable. This
+	// map is used to avoid that multiple detail observables are created for the
+	// same master.
+	private IdentityMap masterDetailMap = new IdentityMap();
+
+	private IdentitySet staleDetailObservables = new IdentitySet();
+
+	private IListChangeListener masterListListener = new IListChangeListener() {
+		public void handleListChange(ListChangeEvent event) {
+			handleMasterListChange(event.diff);
+		}
+	};
+
+	private IValueChangeListener detailValueListener = new IValueChangeListener() {
+		public void handleValueChange(ValueChangeEvent event) {
+			if (!event.getObservable().isStale()) {
+				staleDetailObservables.remove(event.getObservable());
+			}
+			handleDetailValueChange(event);
+		}
+	};
+
+	private IStaleListener masterStaleListener = new IStaleListener() {
+		public void handleStale(StaleEvent staleEvent) {
+			fireStale();
+		}
+	};
+
+	private IStaleListener detailStaleListener = new IStaleListener() {
+		public void handleStale(StaleEvent staleEvent) {
+			boolean wasStale = isStale();
+			staleDetailObservables.add((staleEvent.getObservable()));
+			if (!wasStale) {
+				fireStale();
+			}
+		}
+	};
+
+	/**
+	 * 
+	 * @param masterList
+	 * @param detailFactory
+	 * @param detailType
+	 */
+	public ListDetailValueObservableList(IObservableList masterList,
+			IObservableFactory detailFactory, Object detailType) {
+		super(masterList.getRealm());
+		this.masterList = masterList;
+		this.detailFactory = detailFactory;
+		this.detailType = detailType;
+		this.detailList = new ArrayList();
+
+		// Add change/stale/dispose listeners on the master list.
+		masterList.addListChangeListener(masterListListener);
+		masterList.addStaleListener(masterStaleListener);
+		masterList.addDisposeListener(new IDisposeListener() {
+			public void handleDispose(DisposeEvent event) {
+				ListDetailValueObservableList.this.dispose();
+			}
+		});
+
+		ListDiff initMasterDiff = Diffs.computeListDiff(Collections.EMPTY_LIST,
+				masterList);
+		handleMasterListChange(initMasterDiff);
+	}
+
+	protected synchronized void firstListenerAdded() {
+		for (int i = 0; i < detailList.size(); i++) {
+			IObservableValue detail = (IObservableValue) detailList.get(i);
+			detail.addValueChangeListener(detailValueListener);
+			detail.addStaleListener(detailStaleListener);
+			if (detail.isStale()) {
+				staleDetailObservables.add(detail);
+			}
+		}
+	}
+
+	protected synchronized void lastListenerRemoved() {
+		if (isDisposed()) {
+			return;
+		}
+
+		for (int i = 0; i < detailList.size(); i++) {
+			IObservableValue detail = (IObservableValue) detailList.get(i);
+			detail.removeValueChangeListener(detailValueListener);
+			detail.removeStaleListener(detailStaleListener);
+		}
+		staleDetailObservables.clear();
+	}
+
+	private void handleMasterListChange(ListDiff masterListDiff) {
+		boolean wasStale = isStale();
+
+		boolean hasListeners = hasListeners();
+		ListDiffEntry[] masterEntries = masterListDiff.getDifferences();
+		ListDiffEntry[] detailEntries = new ListDiffEntry[masterEntries.length];
+		for (int i = 0; i < masterEntries.length; i++) {
+			ListDiffEntry masterEntry = masterEntries[i];
+			int index = masterEntry.getPosition();
+
+			Object masterElement = masterEntry.getElement();
+			Object detailValue;
+			if (masterEntry.isAddition()) {
+				detailValue = addDetailObservable(masterElement, index);
+			} else {
+				detailValue = removeDetailObservable(masterElement, index);
+			}
+
+			if (hasListeners) {
+				// Create the corresponding diff for the detail list.
+				detailEntries[i] = Diffs.createListDiffEntry(index,
+						masterEntry.isAddition(), detailValue);
+			}
+		}
+
+		if (hasListeners) {
+			if (!wasStale && isStale()) {
+				fireStale();
+			}
+
+			// Fire a list change event with the adapted diff.
+			fireListChange(Diffs.createListDiff(detailEntries));
+		}
+	}
+
+	private Object addDetailObservable(Object masterElement, int index) {
+		DetailEntry detailEntry = (DetailEntry) masterDetailMap
+				.get(masterElement);
+		if (detailEntry != null) {
+			// If we already have a detail observable for the given
+			// masterElement, we increment the reference count.
+			detailEntry.masterReferenceCount++;
+			detailList.add(index, detailEntry.detailObservable);
+			return detailEntry.detailObservable.getValue();
+		}
+
+		IObservableValue detail = createDetailObservable(masterElement);
+		masterDetailMap.put(masterElement, new DetailEntry(detail));
+
+		detailList.add(index, detail);
+
+		if (hasListeners()) {
+			detail.addValueChangeListener(detailValueListener);
+			detail.addStaleListener(detailStaleListener);
+			if (detail.isStale()) {
+				staleDetailObservables.add(detail);
+			}
+		}
+
+		return detail.getValue();
+	}
+
+	private Object removeDetailObservable(Object masterElement, int index) {
+		IObservableValue detail = (IObservableValue) detailList.remove(index);
+		Object detailValue = detail.getValue();
+
+		DetailEntry detailEntry = (DetailEntry) masterDetailMap
+				.get(masterElement);
+
+		// We may only dispose the detail observable ASA there are no more
+		// masters referencing it.
+		detailEntry.masterReferenceCount--;
+		if (detailEntry.masterReferenceCount == 0) {
+			masterDetailMap.remove(masterElement);
+			staleDetailObservables.remove(detail);
+			detail.dispose();
+		}
+
+		return detailValue;
+	}
+
+	private void handleDetailValueChange(ValueChangeEvent event) {
+		IObservableValue detail = event.getObservableValue();
+
+		// When we get a change event on a detail observable, we must find its
+		// position while there may also be duplicate entries.
+		BitSet detailIndexes = new BitSet();
+		for (int i = 0; i < detailList.size(); i++) {
+			if (detailList.get(i) == detail) {
+				detailIndexes.set(i);
+			}
+		}
+
+		// Create the diff for every found position.
+		Object oldValue = event.diff.getOldValue();
+		Object newValue = event.diff.getNewValue();
+		ListDiffEntry[] diffEntries = new ListDiffEntry[2 * detailIndexes
+				.cardinality()];
+		int diffIndex = 0;
+		for (int b = detailIndexes.nextSetBit(0); b != -1; b = detailIndexes
+				.nextSetBit(b + 1)) {
+			diffEntries[diffIndex++] = Diffs.createListDiffEntry(b, false,
+					oldValue);
+			diffEntries[diffIndex++] = Diffs.createListDiffEntry(b, true,
+					newValue);
+		}
+		fireListChange(Diffs.createListDiff(diffEntries));
+	}
+
+	private IObservableValue createDetailObservable(Object masterElement) {
+		ObservableTracker.setIgnore(true);
+		try {
+			return (IObservableValue) detailFactory
+					.createObservable(masterElement);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
+	}
+
+	protected int doGetSize() {
+		return detailList.size();
+	}
+
+	public Object get(int index) {
+		ObservableTracker.getterCalled(this);
+		return ((IObservableValue) detailList.get(index)).getValue();
+	}
+
+	public Object set(int index, Object element) {
+		IObservableValue detail = (IObservableValue) detailList.get(index);
+		Object oldElement = detail.getValue();
+		detail.setValue(element);
+		return oldElement;
+	}
+
+	public Object move(int oldIndex, int newIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean remove(Object o) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean removeAll(Collection c) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean retainAll(Collection c) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void clear() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Object getElementType() {
+		return detailType;
+	}
+
+	public boolean isStale() {
+		return super.isStale()
+				|| (masterList != null && masterList.isStale())
+				|| (staleDetailObservables != null && !staleDetailObservables
+						.isEmpty());
+	}
+
+	public Object getObserved() {
+		return masterList;
+	}
+
+	public synchronized void dispose() {
+		if (masterList != null) {
+			masterList.removeListChangeListener(masterListListener);
+			masterList.removeStaleListener(masterStaleListener);
+		}
+
+		if (detailList != null) {
+			for (Iterator iter = detailList.iterator(); iter.hasNext();) {
+				IObservableValue detailValue = (IObservableValue) iter.next();
+				detailValue.dispose();
+			}
+			detailList.clear();
+		}
+
+		masterList = null;
+		detailFactory = null;
+		detailType = null;
+		masterListListener = null;
+		detailValueListener = null;
+		masterDetailMap = null;
+		staleDetailObservables = null;
+
+		super.dispose();
+	}
+
+	private static final class DetailEntry {
+
+		private final IObservableValue detailObservable;
+
+		private int masterReferenceCount = 1;
+
+		public DetailEntry(IObservableValue detailObservable) {
+			this.detailObservable = detailObservable;
+		}
+	}
+}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/MapDetailValueObservableMap.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/MapDetailValueObservableMap.java
new file mode 100644
index 0000000..fc3cec1
--- /dev/null
+++ b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/MapDetailValueObservableMap.java
@@ -0,0 +1,405 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Ovidio Mallo and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ovidio Mallo - initial API and implementation (bug 305367)
+ ******************************************************************************/
+
+package org.eclipse.core.internal.databinding.observable.masterdetail;
+
+import java.util.AbstractSet;
+import java.util.Collections;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.databinding.observable.Diffs;
+import org.eclipse.core.databinding.observable.DisposeEvent;
+import org.eclipse.core.databinding.observable.IDisposeListener;
+import org.eclipse.core.databinding.observable.IObserving;
+import org.eclipse.core.databinding.observable.IStaleListener;
+import org.eclipse.core.databinding.observable.ObservableTracker;
+import org.eclipse.core.databinding.observable.StaleEvent;
+import org.eclipse.core.databinding.observable.map.AbstractObservableMap;
+import org.eclipse.core.databinding.observable.map.IMapChangeListener;
+import org.eclipse.core.databinding.observable.map.IObservableMap;
+import org.eclipse.core.databinding.observable.map.MapChangeEvent;
+import org.eclipse.core.databinding.observable.map.MapDiff;
+import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.observable.value.IValueChangeListener;
+import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
+import org.eclipse.core.internal.databinding.identity.IdentityMap;
+import org.eclipse.core.internal.databinding.identity.IdentitySet;
+import org.eclipse.core.internal.databinding.observable.Util;
+
+/**
+ * @since 1.4
+ */
+public class MapDetailValueObservableMap extends AbstractObservableMap
+		implements IObserving {
+
+	private IObservableMap masterMap;
+
+	private IObservableFactory observableValueFactory;
+
+	private Object detailValueType;
+
+	private Set entrySet;
+
+	private IdentityHashMap keyDetailMap = new IdentityHashMap();
+
+	private IdentitySet staleDetailObservables = new IdentitySet();
+
+	private IMapChangeListener masterMapListener = new IMapChangeListener() {
+		public void handleMapChange(MapChangeEvent event) {
+			handleMasterMapChange(event.diff);
+		}
+	};
+
+	private IStaleListener masterStaleListener = new IStaleListener() {
+		public void handleStale(StaleEvent staleEvent) {
+			fireStale();
+		}
+	};
+
+	private IStaleListener detailStaleListener = new IStaleListener() {
+		public void handleStale(StaleEvent staleEvent) {
+			addStaleDetailObservable((IObservableValue) staleEvent
+					.getObservable());
+		}
+	};
+
+	/**
+	 * @param masterMap
+	 * @param observableValueFactory
+	 * @param detailValueType
+	 */
+	public MapDetailValueObservableMap(IObservableMap masterMap,
+			IObservableFactory observableValueFactory, Object detailValueType) {
+		super(masterMap.getRealm());
+		this.masterMap = masterMap;
+		this.observableValueFactory = observableValueFactory;
+		this.detailValueType = detailValueType;
+
+		// Add change/stale/dispose listeners on the master map.
+		masterMap.addMapChangeListener(masterMapListener);
+		masterMap.addStaleListener(masterStaleListener);
+		masterMap.addDisposeListener(new IDisposeListener() {
+			public void handleDispose(DisposeEvent event) {
+				MapDetailValueObservableMap.this.dispose();
+			}
+		});
+
+		// Initialize the map with the current state of the master map.
+		MapDiff initMasterDiff = Diffs.computeMapDiff(Collections.EMPTY_MAP,
+				masterMap);
+		handleMasterMapChange(initMasterDiff);
+	}
+
+	private void handleMasterMapChange(MapDiff diff) {
+		// Collect the detail values for the master values in the input diff.
+		IdentityMap oldValues = new IdentityMap();
+		IdentityMap newValues = new IdentityMap();
+
+		// Handle added master values.
+		Set addedKeys = diff.getAddedKeys();
+		for (Iterator iter = addedKeys.iterator(); iter.hasNext();) {
+			Object addedKey = iter.next();
+
+			// For added master values, we set up a new detail observable.
+			addDetailObservable(addedKey);
+
+			// Get the value of the created detail observable for the new diff.
+			IObservableValue detailValue = getDetailObservableValue(addedKey);
+			newValues.put(addedKey, detailValue.getValue());
+		}
+
+		// Handle removed master values.
+		Set removedKeys = diff.getRemovedKeys();
+		for (Iterator iter = removedKeys.iterator(); iter.hasNext();) {
+			Object removedKey = iter.next();
+
+			// First of all, get the current detail value and add it to the set
+			// of old values of the new diff.
+			IObservableValue detailValue = getDetailObservableValue(removedKey);
+			oldValues.put(removedKey, detailValue.getValue());
+
+			// For removed master values, we dispose the detail observable.
+			removeDetailObservable(removedKey);
+		}
+
+		// Handle changed master values.
+		Set changedKeys = diff.getChangedKeys();
+		for (Iterator iter = changedKeys.iterator(); iter.hasNext();) {
+			Object changedKey = iter.next();
+
+			// Get the detail value prior to the change and add it to the set of
+			// old values of the new diff.
+			IObservableValue oldDetailValue = getDetailObservableValue(changedKey);
+			oldValues.put(changedKey, oldDetailValue.getValue());
+
+			// Remove the old detail value for the old master value and add it
+			// again for the new master value.
+			removeDetailObservable(changedKey);
+			addDetailObservable(changedKey);
+
+			// Get the new detail value and add it to the set of new values.
+			IObservableValue newDetailValue = getDetailObservableValue(changedKey);
+			newValues.put(changedKey, newDetailValue.getValue());
+		}
+
+		// The different key sets are the same, only the values change.
+		fireMapChange(Diffs.createMapDiff(addedKeys, removedKeys, changedKeys,
+				oldValues, newValues));
+	}
+
+	private void addDetailObservable(final Object addedKey) {
+		Object masterElement = masterMap.get(addedKey);
+
+		IObservableValue detailValue = (IObservableValue) keyDetailMap
+				.get(addedKey);
+
+		if (detailValue == null) {
+			detailValue = createDetailObservable(masterElement);
+
+			keyDetailMap.put(addedKey, detailValue);
+
+			detailValue.addValueChangeListener(new IValueChangeListener() {
+				public void handleValueChange(ValueChangeEvent event) {
+					if (!event.getObservableValue().isStale()) {
+						staleDetailObservables.remove(event.getSource());
+					}
+
+					fireMapChange(Diffs.createMapDiffSingleChange(addedKey,
+							event.diff.getOldValue(), event.diff.getNewValue()));
+				}
+			});
+
+			if (detailValue.isStale()) {
+				addStaleDetailObservable(detailValue);
+			}
+		}
+
+		detailValue.addStaleListener(detailStaleListener);
+	}
+
+	private IObservableValue createDetailObservable(Object masterElement) {
+		ObservableTracker.setIgnore(true);
+		try {
+			return (IObservableValue) observableValueFactory
+					.createObservable(masterElement);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
+	}
+
+	private void removeDetailObservable(Object removedKey) {
+		if (isDisposed()) {
+			return;
+		}
+
+		IObservableValue detailValue = (IObservableValue) keyDetailMap
+				.remove(removedKey);
+		staleDetailObservables.remove(detailValue);
+		detailValue.dispose();
+	}
+
+	private IObservableValue getDetailObservableValue(Object masterKey) {
+		return (IObservableValue) keyDetailMap.get(masterKey);
+	}
+
+	private void addStaleDetailObservable(IObservableValue detailObservable) {
+		boolean wasStale = isStale();
+		staleDetailObservables.add(detailObservable);
+		if (!wasStale) {
+			fireStale();
+		}
+	}
+
+	public Set keySet() {
+		getterCalled();
+
+		return masterMap.keySet();
+	}
+
+	public Object get(Object key) {
+		getterCalled();
+
+		if (!containsKey(key)) {
+			return null;
+		}
+
+		IObservableValue detailValue = getDetailObservableValue(key);
+		return detailValue.getValue();
+	}
+
+	public Object put(Object key, Object value) {
+		if (!containsKey(key)) {
+			return null;
+		}
+
+		IObservableValue detailValue = getDetailObservableValue(key);
+		Object oldValue = detailValue.getValue();
+		detailValue.setValue(value);
+		return oldValue;
+	}
+
+	public boolean containsKey(Object key) {
+		getterCalled();
+
+		return masterMap.containsKey(key);
+	}
+
+	public Object remove(Object key) {
+		checkRealm();
+
+		if (!containsKey(key)) {
+			return null;
+		}
+
+		IObservableValue detailValue = getDetailObservableValue(key);
+		Object oldValue = detailValue.getValue();
+
+		masterMap.remove(key);
+
+		return oldValue;
+	}
+
+	public int size() {
+		getterCalled();
+
+		return masterMap.size();
+	}
+
+	public boolean isStale() {
+		return super.isStale()
+				|| (masterMap != null && masterMap.isStale())
+				|| (staleDetailObservables != null && !staleDetailObservables
+						.isEmpty());
+	}
+
+	public Object getKeyType() {
+		return masterMap.getKeyType();
+	}
+
+	public Object getValueType() {
+		return detailValueType;
+	}
+
+	public Object getObserved() {
+		return masterMap;
+	}
+
+	public synchronized void dispose() {
+		if (masterMap != null) {
+			masterMap.removeMapChangeListener(masterMapListener);
+			masterMap.removeStaleListener(masterStaleListener);
+		}
+
+		if (keyDetailMap != null) {
+			for (Iterator iter = keyDetailMap.values().iterator(); iter
+					.hasNext();) {
+				IObservableValue detailValue = (IObservableValue) iter.next();
+				detailValue.dispose();
+			}
+			keyDetailMap.clear();
+		}
+
+		masterMap = null;
+		observableValueFactory = null;
+		detailValueType = null;
+		keyDetailMap = null;
+		masterStaleListener = null;
+		detailStaleListener = null;
+		staleDetailObservables = null;
+
+		super.dispose();
+	}
+
+	public Set entrySet() {
+		getterCalled();
+
+		if (entrySet == null) {
+			entrySet = new EntrySet();
+		}
+		return entrySet;
+	}
+
+	private void getterCalled() {
+		ObservableTracker.getterCalled(this);
+	}
+
+	private class EntrySet extends AbstractSet {
+
+		public Iterator iterator() {
+			final Iterator keyIterator = keySet().iterator();
+			return new Iterator() {
+
+				public boolean hasNext() {
+					return keyIterator.hasNext();
+				}
+
+				public Object next() {
+					Object key = keyIterator.next();
+					return new MapEntry(key);
+				}
+
+				public void remove() {
+					keyIterator.remove();
+				}
+			};
+		}
+
+		public int size() {
+			return MapDetailValueObservableMap.this.size();
+		}
+	}
+
+	private final class MapEntry implements Map.Entry {
+
+		private final Object key;
+
+		private MapEntry(Object key) {
+			this.key = key;
+		}
+
+		public Object getKey() {
+			MapDetailValueObservableMap.this.getterCalled();
+			return key;
+		}
+
+		public Object getValue() {
+			return MapDetailValueObservableMap.this.get(getKey());
+		}
+
+		public Object setValue(Object value) {
+			return MapDetailValueObservableMap.this.put(getKey(), value);
+		}
+
+		public boolean equals(Object o) {
+			MapDetailValueObservableMap.this.getterCalled();
+			if (o == this)
+				return true;
+			if (o == null)
+				return false;
+			if (!(o instanceof Map.Entry))
+				return false;
+			Map.Entry that = (Map.Entry) o;
+			return Util.equals(this.getKey(), that.getKey())
+					&& Util.equals(this.getValue(), that.getValue());
+		}
+
+		public int hashCode() {
+			MapDetailValueObservableMap.this.getterCalled();
+			Object value = getValue();
+			return (getKey() == null ? 0 : getKey().hashCode())
+					^ (value == null ? 0 : value.hashCode());
+		}
+	}
+}
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/SetDetailValueObservableMap.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/SetDetailValueObservableMap.java
new file mode 100644
index 0000000..f66a1c9
--- /dev/null
+++ b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/SetDetailValueObservableMap.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Ovidio Mallo and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ovidio Mallo - initial API and implementation (bug 305367)
+ ******************************************************************************/
+
+package org.eclipse.core.internal.databinding.observable.masterdetail;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.databinding.observable.IObserving;
+import org.eclipse.core.databinding.observable.IStaleListener;
+import org.eclipse.core.databinding.observable.ObservableTracker;
+import org.eclipse.core.databinding.observable.StaleEvent;
+import org.eclipse.core.databinding.observable.map.ComputedObservableMap;
+import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
+import org.eclipse.core.databinding.observable.set.IObservableSet;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.observable.value.IValueChangeListener;
+import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
+import org.eclipse.core.internal.databinding.identity.IdentitySet;
+
+/**
+ * @since 1.4
+ */
+public class SetDetailValueObservableMap extends ComputedObservableMap
+		implements IObserving {
+
+	private IObservableFactory observableValueFactory;
+
+	private Map detailObservableValueMap = new HashMap();
+
+	private IdentitySet staleDetailObservables = new IdentitySet();
+
+	private IStaleListener detailStaleListener = new IStaleListener() {
+		public void handleStale(StaleEvent staleEvent) {
+			addStaleDetailObservable((IObservableValue) staleEvent
+					.getObservable());
+		}
+	};
+
+	/**
+	 * @param masterKeySet
+	 * @param observableValueFactory
+	 * @param detailValueType
+	 */
+	public SetDetailValueObservableMap(IObservableSet masterKeySet,
+			IObservableFactory observableValueFactory, Object detailValueType) {
+		super(masterKeySet, detailValueType);
+		this.observableValueFactory = observableValueFactory;
+	}
+
+	protected void hookListener(final Object addedKey) {
+		final IObservableValue detailValue = getDetailObservableValue(addedKey);
+
+		detailValue.addValueChangeListener(new IValueChangeListener() {
+			public void handleValueChange(ValueChangeEvent event) {
+				if (!event.getObservableValue().isStale()) {
+					staleDetailObservables.remove(detailValue);
+				}
+
+				fireSingleChange(addedKey, event.diff.getOldValue(),
+						event.diff.getNewValue());
+			}
+		});
+
+		detailValue.addStaleListener(detailStaleListener);
+	}
+
+	protected void unhookListener(Object removedKey) {
+		if (isDisposed()) {
+			return;
+		}
+
+		IObservableValue detailValue = (IObservableValue) detailObservableValueMap
+				.remove(removedKey);
+		staleDetailObservables.remove(detailValue);
+		detailValue.dispose();
+	}
+
+	private IObservableValue getDetailObservableValue(Object masterKey) {
+		IObservableValue detailValue = (IObservableValue) detailObservableValueMap
+				.get(masterKey);
+
+		if (detailValue == null) {
+			ObservableTracker.setIgnore(true);
+			try {
+				detailValue = (IObservableValue) observableValueFactory
+						.createObservable(masterKey);
+			} finally {
+				ObservableTracker.setIgnore(false);
+			}
+
+			detailObservableValueMap.put(masterKey, detailValue);
+
+			if (detailValue.isStale()) {
+				addStaleDetailObservable(detailValue);
+			}
+		}
+
+		return detailValue;
+	}
+
+	private void addStaleDetailObservable(IObservableValue detailObservable) {
+		boolean wasStale = isStale();
+		staleDetailObservables.add(detailObservable);
+		if (!wasStale) {
+			fireStale();
+		}
+	}
+
+	protected Object doGet(Object key) {
+		IObservableValue detailValue = getDetailObservableValue(key);
+		return detailValue.getValue();
+	}
+
+	protected Object doPut(Object key, Object value) {
+		IObservableValue detailValue = getDetailObservableValue(key);
+		Object oldValue = detailValue.getValue();
+		detailValue.setValue(value);
+		return oldValue;
+	}
+
+	public boolean containsKey(Object key) {
+		getterCalled();
+
+		return keySet().contains(key);
+	}
+
+	public Object remove(Object key) {
+		checkRealm();
+
+		if (!containsKey(key)) {
+			return null;
+		}
+
+		IObservableValue detailValue = getDetailObservableValue(key);
+		Object oldValue = detailValue.getValue();
+
+		keySet().remove(key);
+
+		return oldValue;
+	}
+
+	public int size() {
+		getterCalled();
+
+		return keySet().size();
+	}
+
+	public boolean isStale() {
+		return super.isStale() || staleDetailObservables != null
+				&& !staleDetailObservables.isEmpty();
+	}
+
+	public Object getObserved() {
+		return keySet();
+	}
+
+	public synchronized void dispose() {
+		super.dispose();
+
+		observableValueFactory = null;
+		detailObservableValueMap = null;
+		detailStaleListener = null;
+		staleDetailObservables = null;
+	}
+
+	private void getterCalled() {
+		ObservableTracker.getterCalled(this);
+	}
+}
diff --git a/bundles/org.eclipse.core.databinding.property/META-INF/MANIFEST.MF b/bundles/org.eclipse.core.databinding.property/META-INF/MANIFEST.MF
index c2b26cc..11b5608 100644
--- a/bundles/org.eclipse.core.databinding.property/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.core.databinding.property/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.databinding.property
-Bundle-Version: 1.3.0.qualifier
+Bundle-Version: 1.4.0.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/ListProperty.java b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/ListProperty.java
index 139a093..cf9590b 100644
--- a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/ListProperty.java
+++ b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/ListProperty.java
@@ -8,6 +8,7 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
  *     Matthew Hall - bug 195222
+ *     Ovidio Mallo - bug 331348
  ******************************************************************************/
 
 package org.eclipse.core.databinding.property.list;
@@ -33,10 +34,22 @@
  * @since 1.2
  */
 public abstract class ListProperty implements IListProperty {
+
 	/**
+	 * By default, this method returns <code>Collections.EMPTY_LIST</code> in
+	 * case the source object is <code>null</code>. Otherwise, this method
+	 * delegates to {@link #doGetList(Object)}.
+	 * 
+	 * <p>
+	 * Clients may override this method if they e.g. want to return a specific
+	 * default list in case the source object is <code>null</code>.
+	 * </p>
+	 * 
+	 * @see #doGetList(Object)
+	 * 
 	 * @since 1.3
 	 */
-	public final List getList(Object source) {
+	public List getList(Object source) {
 		if (source == null) {
 			return Collections.EMPTY_LIST;
 		}
@@ -132,8 +145,8 @@
 	}
 
 	public IObservableList observeDetail(IObservableValue master) {
-		return MasterDetailObservables.detailList(master, listFactory(master
-				.getRealm()), getElementType());
+		return MasterDetailObservables.detailList(master,
+				listFactory(master.getRealm()), getElementType());
 	}
 
 	public final IListProperty values(IValueProperty detailValue) {
diff --git a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/MapProperty.java b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/MapProperty.java
index 70fcd95..2b1d5d6 100644
--- a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/MapProperty.java
+++ b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/MapProperty.java
@@ -8,6 +8,7 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
  *     Matthew Hall - bug 195222
+ *     Ovidio Mallo - bug 331348
  ******************************************************************************/
 
 package org.eclipse.core.databinding.property.map;
@@ -33,10 +34,22 @@
  * @since 1.2
  */
 public abstract class MapProperty implements IMapProperty {
+
 	/**
+	 * By default, this method returns <code>Collections.EMPTY_MAP</code> in
+	 * case the source object is <code>null</code>. Otherwise, this method
+	 * delegates to {@link #doGetMap(Object)}.
+	 * 
+	 * <p>
+	 * Clients may override this method if they e.g. want to return a specific
+	 * default map in case the source object is <code>null</code>.
+	 * </p>
+	 * 
+	 * @see #doGetMap(Object)
+	 * 
 	 * @since 1.3
 	 */
-	public final Map getMap(Object source) {
+	public Map getMap(Object source) {
 		if (source == null) {
 			return Collections.EMPTY_MAP;
 		}
@@ -134,8 +147,8 @@
 	}
 
 	public IObservableMap observeDetail(IObservableValue master) {
-		return MasterDetailObservables.detailMap(master, mapFactory(master
-				.getRealm()), getKeyType(), getValueType());
+		return MasterDetailObservables.detailMap(master,
+				mapFactory(master.getRealm()), getKeyType(), getValueType());
 	}
 
 	public final IMapProperty values(IValueProperty detailValues) {
diff --git a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SetProperty.java b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SetProperty.java
index 8b213ec..52c68c8 100644
--- a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SetProperty.java
+++ b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SetProperty.java
@@ -8,6 +8,7 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
  *     Matthew Hall - bug 195222
+ *     Ovidio Mallo - bug 331348
  ******************************************************************************/
 
 package org.eclipse.core.databinding.property.set;
@@ -34,10 +35,22 @@
  * @since 1.2
  */
 public abstract class SetProperty implements ISetProperty {
+
 	/**
+	 * By default, this method returns <code>Collections.EMPTY_SET</code> in
+	 * case the source object is <code>null</code>. Otherwise, this method
+	 * delegates to {@link #doGetSet(Object)}.
+	 * 
+	 * <p>
+	 * Clients may override this method if they e.g. want to return a specific
+	 * default set in case the source object is <code>null</code>.
+	 * </p>
+	 * 
+	 * @see #doGetSet(Object)
+	 * 
 	 * @since 1.3
 	 */
-	public final Set getSet(Object source) {
+	public Set getSet(Object source) {
 		if (source == null) {
 			return Collections.EMPTY_SET;
 		}
@@ -134,8 +147,8 @@
 	}
 
 	public IObservableSet observeDetail(IObservableValue master) {
-		return MasterDetailObservables.detailSet(master, setFactory(master
-				.getRealm()), getElementType());
+		return MasterDetailObservables.detailSet(master,
+				setFactory(master.getRealm()), getElementType());
 	}
 
 	public final IMapProperty values(IValueProperty detailValues) {
diff --git a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/ValueProperty.java b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/ValueProperty.java
index d726668..5024b3b 100644
--- a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/ValueProperty.java
+++ b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/ValueProperty.java
@@ -8,14 +8,18 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
  *     Matthew Hall - bug 195222
+ *     Ovidio Mallo - bugs 331348, 305367
  ******************************************************************************/
 
 package org.eclipse.core.databinding.property.value;
 
 import org.eclipse.core.databinding.observable.IObservable;
 import org.eclipse.core.databinding.observable.Realm;
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.map.IObservableMap;
 import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.masterdetail.MasterDetailObservables;
+import org.eclipse.core.databinding.observable.set.IObservableSet;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.list.IListProperty;
 import org.eclipse.core.databinding.property.map.IMapProperty;
@@ -31,10 +35,22 @@
  * @since 1.2
  */
 public abstract class ValueProperty implements IValueProperty {
+
 	/**
+	 * By default, this method returns <code>null</code> in case the source
+	 * object is itself <code>null</code>. Otherwise, this method delegates to
+	 * {@link #doGetValue(Object)}.
+	 * 
+	 * <p>
+	 * Clients may override this method if they e.g. want to return a specific
+	 * default value in case the source object is <code>null</code>.
+	 * </p>
+	 * 
+	 * @see #doGetValue(Object)
+	 * 
 	 * @since 1.3
 	 */
-	public final Object getValue(Object source) {
+	public Object getValue(Object source) {
 		if (source == null) {
 			return null;
 		}
@@ -108,8 +124,32 @@
 	}
 
 	public IObservableValue observeDetail(IObservableValue master) {
-		return MasterDetailObservables.detailValue(master, valueFactory(master
-				.getRealm()), getValueType());
+		return MasterDetailObservables.detailValue(master,
+				valueFactory(master.getRealm()), getValueType());
+	}
+
+	/**
+	 * @since 1.4
+	 */
+	public IObservableList observeDetail(IObservableList master) {
+		return MasterDetailObservables.detailValues(master,
+				valueFactory(master.getRealm()), getValueType());
+	}
+
+	/**
+	 * @since 1.4
+	 */
+	public IObservableMap observeDetail(IObservableSet master) {
+		return MasterDetailObservables.detailValues(master,
+				valueFactory(master.getRealm()), getValueType());
+	}
+
+	/**
+	 * @since 1.4
+	 */
+	public IObservableMap observeDetail(IObservableMap master) {
+		return MasterDetailObservables.detailValues(master,
+				valueFactory(master.getRealm()), getValueType());
 	}
 
 	public final IValueProperty value(IValueProperty detailValue) {
diff --git a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/map/SimplePropertyObservableMap.java b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/map/SimplePropertyObservableMap.java
index ee1e56e..df7fd0d 100644
--- a/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/map/SimplePropertyObservableMap.java
+++ b/bundles/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/map/SimplePropertyObservableMap.java
@@ -8,6 +8,7 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
  *     Matthew Hall - bugs 265561, 262287, 268203, 268688, 301774, 303847
+ *     Ovidio Mallo - bug 332367
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding.property.map;
@@ -184,8 +185,8 @@
 			getterCalled();
 			checkForComodification();
 
-			MapDiff diff = Diffs.createMapDiffSingleRemove(last.getKey(), last
-					.getValue());
+			MapDiff diff = Diffs.createMapDiffSingleRemove(last.getKey(),
+					last.getValue());
 			updateMap(map, diff);
 
 			iterator.remove(); // stay in sync
@@ -281,6 +282,17 @@
 		return oldValue;
 	}
 
+	public void clear() {
+		getterCalled();
+
+		Map map = getMap();
+		if (map.isEmpty())
+			return;
+
+		MapDiff diff = Diffs.createMapDiffRemoveAll(new HashMap(map));
+		updateMap(map, diff);
+	}
+
 	public Collection values() {
 		getterCalled();
 		// AbstractMap depends on entrySet() to fulfil values() API, so all
diff --git a/bundles/org.eclipse.core.databinding/META-INF/MANIFEST.MF b/bundles/org.eclipse.core.databinding/META-INF/MANIFEST.MF
index 703e8b7..7eb6a40 100644
--- a/bundles/org.eclipse.core.databinding/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.core.databinding/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.databinding
-Bundle-Version: 1.3.100.qualifier
+Bundle-Version: 1.4.0.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingProperties.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingProperties.java
index aae4869..0977bf9 100644
--- a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingProperties.java
+++ b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingProperties.java
@@ -8,16 +8,19 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 263709)
  *     Matthew Hall - bug 264954
+ *     Ovidio Mallo - bug 306611
  ******************************************************************************/
 
 package org.eclipse.core.databinding;
 
+import org.eclipse.core.databinding.conversion.IConverter;
 import org.eclipse.core.databinding.observable.IObservable;
 import org.eclipse.core.databinding.property.Properties;
 import org.eclipse.core.databinding.property.list.IListProperty;
 import org.eclipse.core.databinding.property.value.IValueProperty;
 import org.eclipse.core.internal.databinding.BindingModelProperty;
 import org.eclipse.core.internal.databinding.BindingTargetProperty;
+import org.eclipse.core.internal.databinding.ConverterValueProperty;
 import org.eclipse.core.internal.databinding.DataBindingContextBindingsProperty;
 import org.eclipse.core.internal.databinding.DataBindingContextValidationStatusProvidersProperty;
 import org.eclipse.core.internal.databinding.ValidationStatusProviderModelsProperty;
@@ -111,4 +114,24 @@
 	public static IListProperty validationStatusProviders() {
 		return new DataBindingContextValidationStatusProvidersProperty();
 	}
+
+	/**
+	 * Returns an {@link IValueProperty} whose value results from applying the
+	 * given {@link IConverter} on the source object of the value property.
+	 * Consequently, the {@link IValueProperty#getValueType() value type} of the
+	 * returned property is the same as the {@link IConverter#getToType() target
+	 * type} of the converter. Setting a value on the property is not supported.
+	 * 
+	 * @param converter
+	 *            The converter to apply to the source object of the value
+	 *            property.
+	 * @return A new instance of a value property whose value is the result of
+	 *         applying the given converter to the source object passed to the
+	 *         value property.
+	 * 
+	 * @since 1.4
+	 */
+	public static IValueProperty convertedValue(IConverter converter) {
+		return new ConverterValueProperty(converter);
+	}
 }
diff --git a/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ConverterValueProperty.java b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ConverterValueProperty.java
new file mode 100644
index 0000000..32ca3a7
--- /dev/null
+++ b/bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ConverterValueProperty.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Ovidio Mallo and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ovidio Mallo - initial API and implementation (bug 306611)
+ ******************************************************************************/
+
+package org.eclipse.core.internal.databinding;
+
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.core.databinding.property.INativePropertyListener;
+import org.eclipse.core.databinding.property.ISimplePropertyListener;
+import org.eclipse.core.databinding.property.value.SimpleValueProperty;
+
+/**
+ * Simple value property which applies a given converter on a source object in
+ * order to produce the property's value.
+ */
+public class ConverterValueProperty extends SimpleValueProperty {
+
+	private final IConverter converter;
+
+	/**
+	 * Creates a new value property which applies the given converter on the
+	 * source object in order to produce the property's value.
+	 * 
+	 * @param converter
+	 *            The converter to apply to the source object.
+	 */
+	public ConverterValueProperty(IConverter converter) {
+		this.converter = converter;
+	}
+
+	public Object getValueType() {
+		// the property type is the converter's target type
+		return converter.getToType();
+	}
+
+	public Object getValue(Object source) {
+		// We do also pass null values to the converter.
+		return doGetValue(source);
+	}
+
+	protected Object doGetValue(Object source) {
+		// delegate to the IConverter
+		return converter.convert(source);
+	}
+
+	protected void doSetValue(Object source, Object value) {
+		// setting a value is not supported
+		throw new UnsupportedOperationException(toString()
+				+ ": Setter not supported on a converted value!"); //$NON-NLS-1$
+	}
+
+	public INativePropertyListener adaptListener(
+			ISimplePropertyListener listener) {
+		// no listener API
+		return null;
+	}
+
+	public String toString() {
+		return "IConverter#convert(source) <IConverter#getToType()>"; //$NON-NLS-1$
+	}
+}
diff --git a/bundles/org.eclipse.jface.databinding/META-INF/MANIFEST.MF b/bundles/org.eclipse.jface.databinding/META-INF/MANIFEST.MF
index f9e1507..274f3aa 100644
--- a/bundles/org.eclipse.jface.databinding/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jface.databinding/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jface.databinding
-Bundle-Version: 1.4.0.qualifier
+Bundle-Version: 1.5.0.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/SWTObservables.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/SWTObservables.java
index 3261536..1aeefc7 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/SWTObservables.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/SWTObservables.java
@@ -94,8 +94,29 @@
 	 */
 	public static ISWTObservableValue observeDelayedValue(int delay,
 			ISWTObservableValue observable) {
-		return new SWTDelayedObservableValueDecorator(Observables
-				.observeDelayedValue(delay, observable), observable.getWidget());
+		return new SWTDelayedObservableValueDecorator(
+				Observables.observeDelayedValue(delay, observable),
+				observable.getWidget());
+	}
+
+	/**
+	 * Returns an observable value tracking the enabled state of the given
+	 * widget. The supported types are:
+	 * <ul>
+	 * <li>org.eclipse.swt.widgets.Control</li>
+	 * <li>org.eclipse.swt.widgets.Menu</li>
+	 * <li>org.eclipse.swt.widgets.MenuItem</li>
+	 * <li>org.eclipse.swt.widgets.ScrollBar</li>
+	 * <li>org.eclipse.swt.widgets.ToolItem</li>
+	 * </ul>
+	 * 
+	 * @param widget
+	 * @return an observable value tracking the enabled state of the given
+	 *         widget.
+	 * @since 1.5
+	 */
+	public static ISWTObservableValue observeEnabled(Widget widget) {
+		return WidgetProperties.enabled().observe(widget);
 	}
 
 	/**
@@ -108,7 +129,7 @@
 	 *         control
 	 */
 	public static ISWTObservableValue observeEnabled(Control control) {
-		return WidgetProperties.enabled().observe(control);
+		return observeEnabled((Widget) control);
 	}
 
 	/**
@@ -168,16 +189,40 @@
 	 * <li>org.eclipse.swt.widgets.Combo</li>
 	 * <li>org.eclipse.swt.custom.CCombo</li>
 	 * <li>org.eclipse.swt.widgets.List</li>
+	 * <li>org.eclipse.swt.widgets.MenuItem (since 1.5)</li>
 	 * <li>org.eclipse.swt.widgets.Scale</li>
 	 * </ul>
 	 * 
+	 * @param widget
+	 * @return observable value
+	 * @throws IllegalArgumentException
+	 *             if <code>control</code> type is unsupported
+	 * @since 1.5
+	 */
+	public static ISWTObservableValue observeSelection(Widget widget) {
+		return WidgetProperties.selection().observe(widget);
+	}
+
+	/**
+	 * Returns an observable observing the selection attribute of the provided
+	 * <code>control</code>. The supported types are:
+	 * <ul>
+	 * <li>org.eclipse.swt.widgets.Button</li>
+	 * <li>org.eclipse.swt.widgets.Combo</li>
+	 * <li>org.eclipse.swt.custom.CCombo</li>
+	 * <li>org.eclipse.swt.widgets.List</li>
+	 * <li>org.eclipse.swt.widgets.Scale</li>
+	 * <li>org.eclipse.swt.widgets.Slider (since 1.5)</li>
+	 * <li>org.eclipse.swt.widgets.Spinner</li>
+	 * </ul>
+	 * 
 	 * @param control
 	 * @return observable value
 	 * @throws IllegalArgumentException
 	 *             if <code>control</code> type is unsupported
 	 */
 	public static ISWTObservableValue observeSelection(Control control) {
-		return WidgetProperties.selection().observe(control);
+		return observeSelection((Widget) control);
 	}
 
 	/**
@@ -185,6 +230,7 @@
 	 * <code>control</code>. The supported types are:
 	 * <ul>
 	 * <li>org.eclipse.swt.widgets.Spinner</li>
+	 * <li>org.eclipse.swt.widgets.Slider (since 1.5)</li>
 	 * <li>org.eclipse.swt.widgets.Scale</li>
 	 * </ul>
 	 * 
@@ -202,6 +248,7 @@
 	 * <code>control</code>. The supported types are:
 	 * <ul>
 	 * <li>org.eclipse.swt.widgets.Spinner</li>
+	 * <li>org.eclipse.swt.widgets.Slider (since 1.5)</li>
 	 * <li>org.eclipse.swt.widgets.Scale</li>
 	 * </ul>
 	 * 
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/WidgetProperties.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/WidgetProperties.java
index 67f60cd..e9b9dc5 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/WidgetProperties.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/WidgetProperties.java
@@ -15,7 +15,6 @@
 
 import org.eclipse.jface.internal.databinding.swt.ControlBackgroundProperty;
 import org.eclipse.jface.internal.databinding.swt.ControlBoundsProperty;
-import org.eclipse.jface.internal.databinding.swt.ControlEnabledProperty;
 import org.eclipse.jface.internal.databinding.swt.ControlFocusedProperty;
 import org.eclipse.jface.internal.databinding.swt.ControlFontProperty;
 import org.eclipse.jface.internal.databinding.swt.ControlForegroundProperty;
@@ -23,6 +22,7 @@
 import org.eclipse.jface.internal.databinding.swt.ControlSizeProperty;
 import org.eclipse.jface.internal.databinding.swt.ControlVisibleProperty;
 import org.eclipse.jface.internal.databinding.swt.WidgetEditableProperty;
+import org.eclipse.jface.internal.databinding.swt.WidgetEnabledProperty;
 import org.eclipse.jface.internal.databinding.swt.WidgetImageProperty;
 import org.eclipse.jface.internal.databinding.swt.WidgetItemsProperty;
 import org.eclipse.jface.internal.databinding.swt.WidgetMaximumProperty;
@@ -46,8 +46,12 @@
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Link;
 import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.swt.widgets.Scale;
+import org.eclipse.swt.widgets.ScrollBar;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Slider;
 import org.eclipse.swt.widgets.Spinner;
 import org.eclipse.swt.widgets.TabItem;
 import org.eclipse.swt.widgets.Table;
@@ -98,13 +102,15 @@
 
 	/**
 	 * Returns a value property for observing the enablement state of a
-	 * {@link Control}.
+	 * {@link Control}, {@link Menu} (since 1.5), {@link MenuItem} (since 1.5),
+	 * {@link ScrollBar} (since 1.5) or {@link ToolItem} (since 1.5).
 	 * 
 	 * @return a value property for observing the enablement state of a
-	 *         {@link Control}.
+	 *         {@link Control}, {@link Menu}, {@link MenuItem},
+	 *         {@link ScrollBar} or {@link ToolItem}.
 	 */
 	public static IWidgetValueProperty enabled() {
-		return new ControlEnabledProperty();
+		return new WidgetEnabledProperty();
 	}
 
 	/**
@@ -171,10 +177,10 @@
 
 	/**
 	 * Returns a value property for observing the maximum value of a
-	 * {@link Scale} or {@link Spinner}.
+	 * {@link Scale}, {@link Slider} (since 1.5) or {@link Spinner}.
 	 * 
 	 * @return a value property for observing the maximum value of a
-	 *         {@link Scale} or {@link Spinner}.
+	 *         {@link Scale}, {@link Slider} (since 1.5) or {@link Spinner}.
 	 */
 	public static IWidgetValueProperty maximum() {
 		return new WidgetMaximumProperty();
@@ -193,10 +199,10 @@
 
 	/**
 	 * Returns a value property for observing the minimum value of a
-	 * {@link Scale} or {@link Spinner}.
+	 * {@link Scale}, {@link Slider} (since 1.5) or {@link Spinner}.
 	 * 
 	 * @return a value property for observing the minimum value of a
-	 *         {@link Scale} or {@link Spinner}.
+	 *         {@link Scale}, {@link Slider} (since 1.5) or {@link Spinner}.
 	 */
 	public static IWidgetValueProperty minimum() {
 		return new WidgetMinimumProperty();
@@ -205,11 +211,13 @@
 	/**
 	 * Returns a value property for observing the selection state of a
 	 * {@link Button}, {@link CCombo}, {@link Combo}, {@link DateTime},
-	 * {@link List}, {@link Scale} or {@link Spinner}.
+	 * {@link List}, {@link MenuItem} (since 1.5), {@link Scale}, {@link Slider}
+	 * (since 1.5) or {@link Spinner}.
 	 * 
 	 * @return a value property for observing the selection state of a
 	 *         {@link Button}, {@link CCombo}, {@link Combo}, {@link DateTime},
-	 *         {@link List}, {@link Scale} or {@link Spinner}.
+	 *         {@link List}, {@link MenuItem}, {@link Scale}, {@link Slider} or
+	 *         {@link Spinner}.
 	 */
 	public static IWidgetValueProperty selection() {
 		return new WidgetSelectionProperty();
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableListContentProvider.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableListContentProvider.java
index 188dd07..2345369 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableListContentProvider.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableListContentProvider.java
@@ -58,9 +58,8 @@
 		}
 
 		protected void checkInput(Object input) {
-			Assert
-					.isTrue(input instanceof IObservableList,
-							"This content provider only works with input of type IObservableList"); //$NON-NLS-1$
+			Assert.isTrue(input instanceof IObservableList,
+					"This content provider only works with input of type IObservableList"); //$NON-NLS-1$
 		}
 
 		protected void addCollectionChangeListener(
@@ -175,6 +174,18 @@
 		return impl.getElements(inputElement);
 	}
 
+	/**
+	 * Disposes of this content provider. This is called by the viewer when a
+	 * content provider is replaced, or when the viewer itself is disposed.
+	 * <p>
+	 * The viewer should not be updated during this call, as it is in the
+	 * process of being disposed.
+	 * </p>
+	 * <p>
+	 * <em>Note:</em> Data binding content providers become unusable on
+	 * disposal.
+	 * </p>
+	 */
 	public void dispose() {
 		impl.dispose();
 	}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableListTreeContentProvider.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableListTreeContentProvider.java
index b79296a..fc94004 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableListTreeContentProvider.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableListTreeContentProvider.java
@@ -219,6 +219,18 @@
 		return impl.getParent(element);
 	}
 
+	/**
+	 * Disposes of this content provider. This is called by the viewer when a
+	 * content provider is replaced, or when the viewer itself is disposed.
+	 * <p>
+	 * The viewer should not be updated during this call, as it is in the
+	 * process of being disposed.
+	 * </p>
+	 * <p>
+	 * <em>Note:</em> Data binding content providers become unusable on
+	 * disposal.
+	 * </p>
+	 */
 	public void dispose() {
 		impl.dispose();
 	}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetContentProvider.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetContentProvider.java
index 4f67c85..3240eb2 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetContentProvider.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetContentProvider.java
@@ -45,9 +45,8 @@
 		}
 
 		protected void checkInput(Object input) {
-			Assert
-					.isTrue(input instanceof IObservableSet,
-							"This content provider only works with input of type IObservableSet"); //$NON-NLS-1$
+			Assert.isTrue(input instanceof IObservableSet,
+					"This content provider only works with input of type IObservableSet"); //$NON-NLS-1$
 		}
 
 		protected void addCollectionChangeListener(
@@ -109,6 +108,18 @@
 		return impl.getElements(inputElement);
 	}
 
+	/**
+	 * Disposes of this content provider. This is called by the viewer when a
+	 * content provider is replaced, or when the viewer itself is disposed.
+	 * <p>
+	 * The viewer should not be updated during this call, as it is in the
+	 * process of being disposed.
+	 * </p>
+	 * <p>
+	 * <em>Note:</em> Data binding content providers become unusable on
+	 * disposal.
+	 * </p>
+	 */
 	public void dispose() {
 		impl.dispose();
 	}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetTreeContentProvider.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetTreeContentProvider.java
index 593aa2c..2ca876c 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetTreeContentProvider.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableSetTreeContentProvider.java
@@ -159,6 +159,18 @@
 		return impl.getParent(element);
 	}
 
+	/**
+	 * Disposes of this content provider. This is called by the viewer when a
+	 * content provider is replaced, or when the viewer itself is disposed.
+	 * <p>
+	 * The viewer should not be updated during this call, as it is in the
+	 * process of being disposed.
+	 * </p>
+	 * <p>
+	 * <em>Note:</em> Data binding content providers become unusable on
+	 * disposal.
+	 * </p>
+	 */
 	public void dispose() {
 		impl.dispose();
 	}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/CTabItemTooltipTextProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/CTabItemTooltipTextProperty.java
index f5be5d8..790fda2 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/CTabItemTooltipTextProperty.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/CTabItemTooltipTextProperty.java
@@ -24,7 +24,7 @@
 	}
 
 	void doSetStringValue(Object source, String value) {
-		((CTabItem) source).setToolTipText(value == null ? "" : (String) value); //$NON-NLS-1$
+		((CTabItem) source).setToolTipText(value);
 	}
 
 	public String toString() {
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/MenuEnabledProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/MenuEnabledProperty.java
new file mode 100644
index 0000000..05e3c25
--- /dev/null
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/MenuEnabledProperty.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Matthew Hall and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Hall - initial API and implementation (bug 280157)
+ ******************************************************************************/
+
+package org.eclipse.jface.internal.databinding.swt;
+
+import org.eclipse.swt.widgets.Menu;
+
+/**
+ * 
+ */
+public class MenuEnabledProperty extends WidgetBooleanValueProperty {
+	public boolean doGetBooleanValue(Object source) {
+		return ((Menu) source).getEnabled();
+	}
+
+	void doSetBooleanValue(Object source, boolean value) {
+		((Menu) source).setEnabled(value);
+	}
+
+	public String toString() {
+		return "Menu.enabled <boolean>"; //$NON-NLS-1$
+	}
+}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/MenuItemEnabledProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/MenuItemEnabledProperty.java
new file mode 100644
index 0000000..9340e00
--- /dev/null
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/MenuItemEnabledProperty.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Matthew Hall and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Hall - initial API and implementation (bug 280157)
+ ******************************************************************************/
+
+package org.eclipse.jface.internal.databinding.swt;
+
+import org.eclipse.swt.widgets.MenuItem;
+
+/**
+ * 
+ */
+public class MenuItemEnabledProperty extends WidgetBooleanValueProperty {
+	public boolean doGetBooleanValue(Object source) {
+		return ((MenuItem) source).getEnabled();
+	}
+
+	void doSetBooleanValue(Object source, boolean value) {
+		((MenuItem) source).setEnabled(value);
+	}
+
+	public String toString() {
+		return "MenuItem.enabled <boolean>"; //$NON-NLS-1$
+	}
+}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/MenuItemSelectionProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/MenuItemSelectionProperty.java
new file mode 100644
index 0000000..ae3182d
--- /dev/null
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/MenuItemSelectionProperty.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Hall - initial API and implementation (bug 194734)
+ ******************************************************************************/
+
+package org.eclipse.jface.internal.databinding.swt;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MenuItem;
+
+/**
+ * 
+ */
+public class MenuItemSelectionProperty extends WidgetBooleanValueProperty {
+	/**
+	 * 
+	 */
+	public MenuItemSelectionProperty() {
+		super(SWT.Selection);
+	}
+
+	boolean doGetBooleanValue(Object source) {
+		return ((MenuItem) source).getSelection();
+	}
+
+	void doSetBooleanValue(Object source, boolean value) {
+		((MenuItem) source).setSelection(value);
+	}
+
+	public String toString() {
+		return "MenuItem.selection <Boolean>"; //$NON-NLS-1$
+	}
+}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ScrollBarEnabledProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ScrollBarEnabledProperty.java
new file mode 100644
index 0000000..241c5c9
--- /dev/null
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ScrollBarEnabledProperty.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Matthew Hall and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Hall - initial API and implementation (bug 280157)
+ ******************************************************************************/
+
+package org.eclipse.jface.internal.databinding.swt;
+
+import org.eclipse.swt.widgets.ScrollBar;
+
+/**
+ * 
+ */
+public class ScrollBarEnabledProperty extends WidgetBooleanValueProperty {
+	public boolean doGetBooleanValue(Object source) {
+		return ((ScrollBar) source).getEnabled();
+	}
+
+	void doSetBooleanValue(Object source, boolean value) {
+		((ScrollBar) source).setEnabled(value);
+	}
+
+	public String toString() {
+		return "ScrollBar.enabled <boolean>"; //$NON-NLS-1$
+	}
+}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SliderMaximumProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SliderMaximumProperty.java
new file mode 100644
index 0000000..fa5ce5a
--- /dev/null
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SliderMaximumProperty.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Matthew Hall and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Hall - initial API and implementation (bug 299123)
+ ******************************************************************************/
+
+package org.eclipse.jface.internal.databinding.swt;
+
+import org.eclipse.swt.widgets.Slider;
+
+/**
+ * 
+ */
+public class SliderMaximumProperty extends WidgetIntValueProperty {
+	int doGetIntValue(Object source) {
+		return ((Slider) source).getMaximum();
+	}
+
+	void doSetIntValue(Object source, int value) {
+		((Slider) source).setMaximum(value);
+	}
+
+	public String toString() {
+		return "Slider.maximum <int>"; //$NON-NLS-1$
+	}
+}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SliderMinimumProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SliderMinimumProperty.java
new file mode 100644
index 0000000..6f36a36
--- /dev/null
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SliderMinimumProperty.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Matthew Hall and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Hall - initial API and implementation (bug 299123)
+ ******************************************************************************/
+
+package org.eclipse.jface.internal.databinding.swt;
+
+import org.eclipse.swt.widgets.Slider;
+
+/**
+ * 
+ */
+public class SliderMinimumProperty extends WidgetIntValueProperty {
+	int doGetIntValue(Object source) {
+		return ((Slider) source).getMinimum();
+	}
+
+	void doSetIntValue(Object source, int value) {
+		((Slider) source).setMinimum(value);
+	}
+
+	public String toString() {
+		return "Slider.minimum <int>"; //$NON-NLS-1$
+	}
+}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SliderSelectionProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SliderSelectionProperty.java
new file mode 100644
index 0000000..99757ce
--- /dev/null
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SliderSelectionProperty.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Matthew Hall and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Hall - initial API and implementation (bug 299123)
+ ******************************************************************************/
+
+package org.eclipse.jface.internal.databinding.swt;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Slider;
+
+/**
+ * 
+ */
+public class SliderSelectionProperty extends WidgetIntValueProperty {
+	/**
+	 * 
+	 */
+	public SliderSelectionProperty() {
+		super(SWT.Selection);
+	}
+
+	int doGetIntValue(Object source) {
+		return ((Slider) source).getSelection();
+	}
+
+	void doSetIntValue(Object source, int value) {
+		((Slider) source).setSelection(value);
+	}
+
+	public String toString() {
+		return "Slider.selection <int>"; //$NON-NLS-1$
+	}
+}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TabItemTooltipTextProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TabItemTooltipTextProperty.java
index 90fe5cd..d773fd9 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TabItemTooltipTextProperty.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TabItemTooltipTextProperty.java
@@ -24,7 +24,7 @@
 	}
 
 	void doSetStringValue(Object source, String value) {
-		((TabItem) source).setToolTipText(value == null ? "" : value); //$NON-NLS-1$
+		((TabItem) source).setToolTipText(value);
 	}
 
 	public String toString() {
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TableColumnTooltipTextProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TableColumnTooltipTextProperty.java
index f828380..bf88296 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TableColumnTooltipTextProperty.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TableColumnTooltipTextProperty.java
@@ -24,7 +24,7 @@
 	}
 
 	void doSetStringValue(Object source, String value) {
-		((TableColumn) source).setToolTipText(value == null ? "" : value); //$NON-NLS-1$
+		((TableColumn) source).setToolTipText(value);
 	}
 
 	public String toString() {
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ToolItemEnabledProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ToolItemEnabledProperty.java
new file mode 100644
index 0000000..9a38502
--- /dev/null
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ToolItemEnabledProperty.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Matthew Hall and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Hall - initial API and implementation (bug 280157)
+ ******************************************************************************/
+
+package org.eclipse.jface.internal.databinding.swt;
+
+import org.eclipse.swt.widgets.ToolItem;
+
+/**
+ * 
+ */
+public class ToolItemEnabledProperty extends WidgetBooleanValueProperty {
+	public boolean doGetBooleanValue(Object source) {
+		return ((ToolItem) source).getEnabled();
+	}
+
+	void doSetBooleanValue(Object source, boolean value) {
+		((ToolItem) source).setEnabled(value);
+	}
+
+	public String toString() {
+		return "ToolItem.enabled <boolean>"; //$NON-NLS-1$
+	}
+}
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ToolItemTooltipTextProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ToolItemTooltipTextProperty.java
index ead5d17..7b19632 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ToolItemTooltipTextProperty.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ToolItemTooltipTextProperty.java
@@ -24,7 +24,7 @@
 	}
 
 	void doSetStringValue(Object source, String value) {
-		((ToolItem) source).setToolTipText(value == null ? "" : value); //$NON-NLS-1$
+		((ToolItem) source).setToolTipText(value);
 	}
 
 	public String toString() {
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TrayItemTooltipTextProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TrayItemTooltipTextProperty.java
index be1a8ff..25c3f89 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TrayItemTooltipTextProperty.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TrayItemTooltipTextProperty.java
@@ -24,7 +24,7 @@
 	}
 
 	void doSetStringValue(Object source, String value) {
-		((TrayItem) source).setToolTipText(value == null ? "" : value); //$NON-NLS-1$
+		((TrayItem) source).setToolTipText(value);
 	}
 
 	public String toString() {
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TreeColumnTooltipTextProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TreeColumnTooltipTextProperty.java
index b2e5e2c..18ab0d1 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TreeColumnTooltipTextProperty.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TreeColumnTooltipTextProperty.java
@@ -24,7 +24,7 @@
 	}
 
 	void doSetStringValue(Object source, String value) {
-		((TreeColumn) source).setToolTipText(value == null ? "" : value); //$NON-NLS-1$
+		((TreeColumn) source).setToolTipText(value);
 	}
 
 	public String toString() {
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetEnabledProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetEnabledProperty.java
new file mode 100644
index 0000000..d49112f
--- /dev/null
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetEnabledProperty.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Matthew Hall and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Hall - initial API and implementation (bug 264286)
+ *******************************************************************************/
+
+package org.eclipse.jface.internal.databinding.swt;
+
+import org.eclipse.core.databinding.property.value.IValueProperty;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.ScrollBar;
+import org.eclipse.swt.widgets.ToolItem;
+
+/**
+ * 
+ */
+public class WidgetEnabledProperty extends WidgetDelegatingValueProperty {
+	IValueProperty control;
+	IValueProperty menu;
+	IValueProperty menuItem;
+	IValueProperty scrollBar;
+	IValueProperty toolItem;
+
+	/**
+	 * 
+	 */
+	public WidgetEnabledProperty() {
+		super(Boolean.TYPE);
+	}
+
+	protected IValueProperty doGetDelegate(Object source) {
+		if (source instanceof Control) {
+			if (control == null)
+				control = new ControlEnabledProperty();
+			return control;
+		}
+		if (source instanceof Menu) {
+			if (menu == null)
+				menu = new MenuEnabledProperty();
+			return menu;
+		}
+		if (source instanceof MenuItem) {
+			if (menuItem == null)
+				menuItem = new MenuItemEnabledProperty();
+			return menuItem;
+		}
+		if (source instanceof ScrollBar) {
+			if (scrollBar == null)
+				scrollBar = new ScrollBarEnabledProperty();
+			return scrollBar;
+		}
+		if (source instanceof ToolItem) {
+			if (toolItem == null)
+				toolItem = new ToolItemEnabledProperty();
+			return toolItem;
+		}
+		throw notSupported(source);
+	}
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetMaximumProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetMaximumProperty.java
index 27b0b67..ee1d67e 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetMaximumProperty.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetMaximumProperty.java
@@ -13,6 +13,7 @@
 
 import org.eclipse.core.databinding.property.value.IValueProperty;
 import org.eclipse.swt.widgets.Scale;
+import org.eclipse.swt.widgets.Slider;
 import org.eclipse.swt.widgets.Spinner;
 
 /**
@@ -21,6 +22,7 @@
  */
 public class WidgetMaximumProperty extends WidgetDelegatingValueProperty {
 	private IValueProperty scale;
+	private IValueProperty slider;
 	private IValueProperty spinner;
 
 	/**
@@ -36,6 +38,12 @@
 				scale = new ScaleMaximumProperty();
 			return scale;
 		}
+		if (source instanceof Slider) {
+			if (slider == null) {
+				slider = new SliderMaximumProperty();
+			}
+			return slider;
+		}
 		if (source instanceof Spinner) {
 			if (spinner == null)
 				spinner = new SpinnerMaximumProperty();
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetMinimumProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetMinimumProperty.java
index f1b3715..efa8539 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetMinimumProperty.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetMinimumProperty.java
@@ -13,6 +13,7 @@
 
 import org.eclipse.core.databinding.property.value.IValueProperty;
 import org.eclipse.swt.widgets.Scale;
+import org.eclipse.swt.widgets.Slider;
 import org.eclipse.swt.widgets.Spinner;
 
 /**
@@ -21,6 +22,7 @@
  */
 public class WidgetMinimumProperty extends WidgetDelegatingValueProperty {
 	private IValueProperty scale;
+	private IValueProperty slider;
 	private IValueProperty spinner;
 
 	/**
@@ -36,6 +38,12 @@
 				scale = new ScaleMinimumProperty();
 			return scale;
 		}
+		if (source instanceof Slider) {
+			if (slider == null) {
+				slider = new SliderMinimumProperty();
+			}
+			return slider;
+		}
 		if (source instanceof Spinner) {
 			if (spinner == null)
 				spinner = new SpinnerMinimumProperty();
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetSelectionProperty.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetSelectionProperty.java
index 094aa4f..7a5ca0d 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetSelectionProperty.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetSelectionProperty.java
@@ -18,7 +18,9 @@
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.DateTime;
 import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.swt.widgets.Scale;
+import org.eclipse.swt.widgets.Slider;
 import org.eclipse.swt.widgets.Spinner;
 
 /**
@@ -32,7 +34,9 @@
 	private IValueProperty combo;
 	private IValueProperty dateTime;
 	private IValueProperty list;
+	private IValueProperty menuItem;
 	private IValueProperty scale;
+	private IValueProperty slider;
 	private IValueProperty spinner;
 
 	protected IValueProperty doGetDelegate(Object source) {
@@ -61,11 +65,21 @@
 				list = new ListSelectionProperty();
 			return list;
 		}
+		if (source instanceof MenuItem) {
+			if (menuItem == null)
+				menuItem = new MenuItemSelectionProperty();
+			return menuItem;
+		}
 		if (source instanceof Scale) {
 			if (scale == null)
 				scale = new ScaleSelectionProperty();
 			return scale;
 		}
+		if (source instanceof Slider) {
+			if (slider == null)
+				slider = new SliderSelectionProperty();
+			return slider;
+		}
 		if (source instanceof Spinner) {
 			if (spinner == null)
 				spinner = new SpinnerSelectionProperty();
diff --git a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/TreeViewerUpdater.java b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/TreeViewerUpdater.java
index 73fcece..5052d94 100644
--- a/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/TreeViewerUpdater.java
+++ b/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/TreeViewerUpdater.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 207858)
- *     Matthew Hall - bugs 226765, 230296, 226292
+ *     Matthew Hall - bugs 226765, 230296, 226292, 312926
  ******************************************************************************/
 
 package org.eclipse.jface.internal.databinding.viewers;
@@ -74,6 +74,7 @@
 			int position) {
 		if (treeViewer != null && isElementOrderPreserved()) {
 			treeViewer.replace(parent, position, newElement);
+			treeViewer.refresh(newElement);
 		} else {
 			remove(parent, oldElement, position);
 			insert(parent, newElement, position);
diff --git a/bundles/org.eclipse.jface/.options b/bundles/org.eclipse.jface/.options
index f62a68c..a96d276 100644
--- a/bundles/org.eclipse.jface/.options
+++ b/bundles/org.eclipse.jface/.options
@@ -1,7 +1,7 @@
 # Debugging options for the org.eclipse.jface plugin.
 
-# Turn on debugging for the org.eclipse.ui plugin.
-org.eclipse.jface/debug=false
+# Turn on debugging for the org.eclipse.jface plugin.
+org.eclipse.jface/debug=true
 
 # Log a message if a dialog is opened without a parent
 org.eclipse.jface/debug/dialog/noparent=false
@@ -9,6 +9,9 @@
 # Always log reentrant calls to viewers (if set to false, it just logs the first reentrant call)
 org.eclipse.jface/debug/viewers/reentrantViewerCalls=false
 
+# Log illegal equal elements in a viewer
+org.eclipse.jface/debug/viewers/equalElements=false
+
 # Show the jface new look for the preferences dialog
 org.eclipse.jface/newlook/preferences/showNewLook=false
 
diff --git a/bundles/org.eclipse.jface/.settings/.api_filters b/bundles/org.eclipse.jface/.settings/.api_filters
index 60cdd5d..a203a09 100644
--- a/bundles/org.eclipse.jface/.settings/.api_filters
+++ b/bundles/org.eclipse.jface/.settings/.api_filters
@@ -1,42 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.jface" version="2">
-    <resource path="src/org/eclipse/jface/bindings/keys/IKeyLookup.java" type="org.eclipse.jface.bindings.keys.IKeyLookup">
-        <filter id="403767336">
+<?xml version="1.0" encoding="UTF-8"?><component id="org.eclipse.jface" version="2">
+    <resource path="META-INF/MANIFEST.MF" type="org.eclipse.swt.browser.WebKit">
+        <filter id="305426566">
             <message_arguments>
-                <message_argument value="org.eclipse.jface.bindings.keys.IKeyLookup"/>
-                <message_argument value="F17_NAME"/>
-            </message_arguments>
-        </filter>
-        <filter id="403767336">
-            <message_arguments>
-                <message_argument value="org.eclipse.jface.bindings.keys.IKeyLookup"/>
-                <message_argument value="F20_NAME"/>
-            </message_arguments>
-        </filter>
-        <filter id="403767336">
-            <message_arguments>
-                <message_argument value="org.eclipse.jface.bindings.keys.IKeyLookup"/>
-                <message_argument value="F19_NAME"/>
-            </message_arguments>
-        </filter>
-        <filter id="403767336">
-            <message_arguments>
-                <message_argument value="org.eclipse.jface.bindings.keys.IKeyLookup"/>
-                <message_argument value="F18_NAME"/>
-            </message_arguments>
-        </filter>
-        <filter id="403767336">
-            <message_arguments>
-                <message_argument value="org.eclipse.jface.bindings.keys.IKeyLookup"/>
-                <message_argument value="F16_NAME"/>
+                <message_argument value="org.eclipse.swt.browser.WebKit"/>
+                <message_argument value="org.eclipse.jface_3.6.0"/>
             </message_arguments>
         </filter>
     </resource>
-    <resource path="src/org/eclipse/jface/fieldassist/ControlDecoration.java" type="org.eclipse.jface.fieldassist.ControlDecoration">
-        <filter id="336744520">
-            <message_arguments>
-                <message_argument value="org.eclipse.jface.fieldassist.ControlDecoration"/>
-            </message_arguments>
-        </filter>
-    </resource>
-</component>
+</component>
\ No newline at end of file
diff --git a/bundles/org.eclipse.jface/META-INF/MANIFEST.MF b/bundles/org.eclipse.jface/META-INF/MANIFEST.MF
index c272466..ef02130 100644
--- a/bundles/org.eclipse.jface/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jface/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jface
-Bundle-Version: 3.6.0.qualifier
+Bundle-Version: 3.8.0.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/action/MenuManager.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/action/MenuManager.java
index 93463d7..e4a4eda 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/action/MenuManager.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/action/MenuManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,6 +40,7 @@
  * </p>
  */
 public class MenuManager extends ContributionManager implements IMenuManager {
+	private static final String MANAGER_KEY = "org.eclipse.jface.action.MenuManager.managerKey"; //$NON-NLS-1$
 
     /**
      * The menu id.
@@ -174,6 +175,7 @@
     public Menu createContextMenu(Control parent) {
         if (!menuExist()) {
             menu = new Menu(parent);
+            menu.setData(MANAGER_KEY, this);
             initializeMenu();
         }
         return menu;
@@ -191,6 +193,7 @@
     public Menu createMenuBar(Decorations parent) {
         if (!menuExist()) {
             menu = new Menu(parent, SWT.BAR);
+            menu.setData(MANAGER_KEY, this);
             update(false);
         }
         return menu;
@@ -275,6 +278,7 @@
 
             if (!menuExist()) {
 				menu = new Menu(parent);
+				menu.setData(MANAGER_KEY, this);
 			}
 
             menuItem.setMenu(menu);
@@ -895,7 +899,7 @@
                             char character = Character.toUpperCase(text
                                     .charAt(index + 1));
 
-                            if (callback.isAcceleratorInUse(SWT.ALT | character)) {
+                            if (callback.isAcceleratorInUse(SWT.ALT | character) && isTopLevelMenu()) {
                                 if (index == 0) {
     								text = text.substring(1);
     							} else {
@@ -918,6 +922,16 @@
         }
     }
 
+	private boolean isTopLevelMenu() {
+		if (menu != null && !menu.isDisposed() && menuItem != null
+				&& !menuItem.isDisposed()) {
+			Menu parentMenu = menuItem.getParent();
+			return parentMenu != null
+					&& ((parentMenu.getStyle() & SWT.BAR) == SWT.BAR);
+		}
+		return false;
+	}
+
 	/**
 	 * Dispose any images allocated for this menu
 	 */
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/action/StatusLine.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/action/StatusLine.java
index ca738d7..315e8dc 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/action/StatusLine.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/action/StatusLine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,9 +12,19 @@
 package org.eclipse.jface.action;
 
 import org.eclipse.core.runtime.IProgressMonitor;
-
+import org.eclipse.jface.dialogs.ProgressIndicator;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceColors;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.Util;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.ACC;
+import org.eclipse.swt.accessibility.AccessibleControlAdapter;
+import org.eclipse.swt.accessibility.AccessibleControlEvent;
 import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -30,15 +40,11 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Layout;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.swt.widgets.ToolBar;
 import org.eclipse.swt.widgets.ToolItem;
 
-import org.eclipse.jface.dialogs.ProgressIndicator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceColors;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.util.Util;
-
 /**
  * A StatusLine control is a SWT Composite with a horizontal layout which hosts
  * a number of status indication controls. Typically it is situated below the
@@ -110,6 +116,8 @@
 	/** stop image descriptor */
 	protected static ImageDescriptor fgStopImage = ImageDescriptor
 			.createFromFile(StatusLine.class, "images/stop.gif");//$NON-NLS-1$
+
+	private MenuItem copyMenuItem;
 	static {
 		JFaceResources.getImageRegistry().put(
 				"org.eclipse.jface.parts.StatusLine.stopImage", fgStopImage);//$NON-NLS-1$
@@ -258,6 +266,12 @@
 	 */
 	public StatusLine(Composite parent, int style) {
 		super(parent, style);
+		
+		getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {
+			public void getRole(AccessibleControlEvent e) {
+				e.detail = ACC.ROLE_STATUSBAR;
+			}
+		});
 
 		addDisposeListener(new DisposeListener() {
 			public void widgetDisposed(DisposeEvent e) {
@@ -273,13 +287,26 @@
 		setLayout(new StatusLineLayout());
 
 		fMessageLabel = new CLabel(this, SWT.NONE);// SWT.SHADOW_IN);
-		// Color[] colors = new Color[2];
-		// colors[0] =
-		// parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW);
-		// colors[1] = fMessageLabel.getBackground();
-		// int[] gradient = new int[] {JFaceColors.STATUS_PERCENT};
-		// fMessageLabel.setBackground(colors, gradient);
-
+		
+		// this would need extra work to make this accessible
+		// from the workbench command framework.
+		Menu menu = new Menu(fMessageLabel);
+		fMessageLabel.setMenu(menu);
+		copyMenuItem = new MenuItem(menu, SWT.PUSH);
+		copyMenuItem.setText(JFaceResources.getString("copy")); //$NON-NLS-1$
+		copyMenuItem.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				String text = fMessageLabel.getText();
+				if (text != null && text.length() > 0) {
+					text = LegacyActionTools.removeMnemonics(text);
+					Clipboard cp = new Clipboard(e.display);
+					cp.setContents(new Object[] { text },
+							new Transfer[] { TextTransfer.getInstance() });
+					cp.dispose();
+				}
+			}
+		});
+		
 		fProgressIsVisible = false;
 		fCancelEnabled = false;
 
@@ -669,6 +696,10 @@
 				fMessageLabel.setText(fMessageText == null ? "" : fMessageText); //$NON-NLS-1$
 				fMessageLabel.setImage(fMessageImage);
 			}
+			if (copyMenuItem != null && !copyMenuItem.isDisposed()) {
+				String text = fMessageLabel.getText();
+				copyMenuItem.setEnabled(text != null && text.length() > 0);
+			}
 		}
 	}
 
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.java
index 14fcc18..e1d88ef 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.java
@@ -2263,19 +2263,31 @@
 	 *            The new array of bindings; may be <code>null</code>. This
 	 *            set is copied into a local data structure.
 	 */
-	public final void setBindings(final Binding[] bindings) {
+	public final void setBindings(Binding[] bindings) {
+		if (bindings != null) {
+			// discard bindings not applicable for this platform
+			List newList = new ArrayList();
+			for (int i = 0; i < bindings.length; i++) {
+				Binding binding = bindings[i];
+				String p = binding.getPlatform();
+				if (p == null) {
+					newList.add(binding);
+				} else if (p.equals(platform)) {
+					newList.add(binding);
+				}
+			}
+			bindings = (Binding[]) newList.toArray(new Binding[newList.size()]);
+		}
+		//Check for equality after the munge
 		if (Arrays.equals(this.bindings, bindings)) {
 			return; // nothing has changed
 		}
-
 		if ((bindings == null) || (bindings.length == 0)) {
 			this.bindings = null;
 			bindingCount = 0;
 		} else {
-			final int bindingsLength = bindings.length;
-			this.bindings = new Binding[bindingsLength];
-			System.arraycopy(bindings, 0, this.bindings, 0, bindingsLength);
-			bindingCount = bindingsLength;
+			this.bindings = bindings;
+			bindingCount = bindings.length;
 		}
 		clearCache();
 	}
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
index 328d78e..37fac45 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -210,6 +210,27 @@
     public String getName() {
         return name;
     }
+    
+	/**
+	 * Returns a section with the given name in the given dialog settings. If
+	 * the section doesn't exist yet, then it is first created.
+	 * 
+	 * @param settings
+	 *            the parent settings
+	 * @param sectionName
+	 *            the name of the section
+	 * @return the section
+	 * 
+	 * @since 3.7
+	 */
+	public static IDialogSettings getOrCreateSection(IDialogSettings settings,
+			String sectionName) {
+		IDialogSettings section = settings.getSection(sectionName);
+		if (section == null) {
+			section = settings.addNewSection(sectionName);
+		}
+		return section;
+	}
 
     /* (non-Javadoc)
      * Method declared on IDialogSettings.
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorDialog.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorDialog.java
index 25159bb..e42eef7 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorDialog.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorDialog.java
@@ -195,6 +195,10 @@
 
 		if (provider == null)
 			return;
+		
+		if(!provider.validFor(status)){
+			return;
+		}
 
 		Composite supportArea = new Composite(parent, SWT.NONE);
 		provider.createSupportArea(supportArea, status);
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorSupportProvider.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorSupportProvider.java
index 9293ac9..9bb4f4c 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorSupportProvider.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorSupportProvider.java
@@ -30,4 +30,19 @@
 		 * @return Control
 		 */
 		public abstract Control createSupportArea(Composite parent, IStatus status);
+		
+		/**
+		 * This method is called before
+		 * {@link #createSupportArea(Composite, IStatus)} to check if the
+		 * {@link ErrorSupportProvider} will display any significant
+		 * informations. If not, then it will not be presented at all.
+		 * 
+		 * @param status
+		 *            - {@link IStatus} for which status are will be requested.
+		 * @return true if provider is able to process particular {@link IStatus}
+		 * @since 3.7
+		 */
+		public boolean validFor(IStatus status){
+			return true;
+		}
 }
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IDialogConstants.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IDialogConstants.java
index 883a4c2..fbc7ee3 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IDialogConstants.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IDialogConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,10 +36,8 @@
 import org.eclipse.jface.resource.JFaceResources;
 
 /**
- * IDialogConstants is the interface for common dialog strings and ids
- * used throughout JFace.
- * It is recommended that you use these labels and ids whereever 
- * for consistency with the JFace dialogs.
+ * IDialogConstants is the interface for common dialog strings and ids used throughout JFace. It is
+ * recommended that you use these labels and ids wherever for consistency with the JFace dialogs.
  */
 public interface IDialogConstants {
     // button ids
@@ -171,103 +169,202 @@
     // button labels
     /**
      * The label for OK buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.OK_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String OK_LABEL = JFaceResources.getString("ok"); //$NON-NLS-1$
+    public String OK_LABEL = JFaceResources.getString(IDialogLabelKeys.OK_LABEL_KEY); 
 
     /**
      * The label for cancel buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.CANCEL_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String CANCEL_LABEL = JFaceResources.getString("cancel"); //$NON-NLS-1$
+    public String CANCEL_LABEL = JFaceResources.getString(IDialogLabelKeys.CANCEL_LABEL_KEY);
 
     /**
      * The label for yes buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.YES_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String YES_LABEL = JFaceResources.getString("yes"); //$NON-NLS-1$
-
+    public String YES_LABEL = JFaceResources.getString(IDialogLabelKeys.YES_LABEL_KEY);
     /**
      * The label for no buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.NO_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String NO_LABEL = JFaceResources.getString("no"); //$NON-NLS-1$
+    public String NO_LABEL = JFaceResources.getString(IDialogLabelKeys.NO_LABEL_KEY);
 
     /**
      * The label for not to all buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.NO_TO_ALL_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String NO_TO_ALL_LABEL = JFaceResources.getString("notoall"); //$NON-NLS-1$
+    public String NO_TO_ALL_LABEL = JFaceResources.getString(IDialogLabelKeys.NO_TO_ALL_LABEL_KEY);
 
     /**
      * The label for yes to all buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.YES_TO_ALL_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String YES_TO_ALL_LABEL = JFaceResources.getString("yestoall"); //$NON-NLS-1$
+    public String YES_TO_ALL_LABEL = JFaceResources.getString(IDialogLabelKeys.YES_TO_ALL_LABEL_KEY);
 
     /**
      * The label for skip buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.SKIP_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String SKIP_LABEL = JFaceResources.getString("skip"); //$NON-NLS-1$
+    public String SKIP_LABEL = JFaceResources.getString(IDialogLabelKeys.SKIP_LABEL_KEY);
 
     /**
      * The label for stop buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.STOP_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String STOP_LABEL = JFaceResources.getString("stop"); //$NON-NLS-1$
+    public String STOP_LABEL = JFaceResources.getString(IDialogLabelKeys.STOP_LABEL_KEY);
 
     /**
      * The label for abort buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.ABORT_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String ABORT_LABEL = JFaceResources.getString("abort"); //$NON-NLS-1$
+    public String ABORT_LABEL = JFaceResources.getString(IDialogLabelKeys.ABORT_LABEL_KEY);
 
     /**
      * The label for retry buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.RETRY_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String RETRY_LABEL = JFaceResources.getString("retry"); //$NON-NLS-1$
+    public String RETRY_LABEL = JFaceResources.getString(IDialogLabelKeys.RETRY_LABEL_KEY);
 
     /**
      * The label for ignore buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.IGNORE_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String IGNORE_LABEL = JFaceResources.getString("ignore"); //$NON-NLS-1$
+    public String IGNORE_LABEL = JFaceResources.getString(IDialogLabelKeys.IGNORE_LABEL_KEY);
 
     /**
      * The label for proceed buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.PROCEED_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String PROCEED_LABEL = JFaceResources.getString("proceed"); //$NON-NLS-1$
+    public String PROCEED_LABEL = JFaceResources.getString(IDialogLabelKeys.PROCEED_LABEL_KEY);
 
     /**
      * The label for open buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.OPEN_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String OPEN_LABEL = JFaceResources.getString("open"); //$NON-NLS-1$
+    public String OPEN_LABEL = JFaceResources.getString(IDialogLabelKeys.OPEN_LABEL_KEY);
 
     /**
      * The label for close buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.CLOSE_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String CLOSE_LABEL = JFaceResources.getString("close"); //$NON-NLS-1$
+    public String CLOSE_LABEL = JFaceResources.getString(IDialogLabelKeys.CLOSE_LABEL_KEY);
 
     /**
      * The label for show details buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.SHOW_DETAILS_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String SHOW_DETAILS_LABEL = JFaceResources.getString("showDetails"); //$NON-NLS-1$
+    public String SHOW_DETAILS_LABEL = JFaceResources.getString(IDialogLabelKeys.SHOW_DETAILS_LABEL_KEY);
 
     /**
      * The label for hide details buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.HIDE_DETAILS_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String HIDE_DETAILS_LABEL = JFaceResources.getString("hideDetails"); //$NON-NLS-1$
+    public String HIDE_DETAILS_LABEL = JFaceResources.getString(IDialogLabelKeys.HIDE_DETAILS_LABEL_KEY);
 
     /**
      * The label for back buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.BACK_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String BACK_LABEL = JFaceResources.getString("backButton"); //$NON-NLS-1$
+    public String BACK_LABEL = JFaceResources.getString(IDialogLabelKeys.BACK_LABEL_KEY);
 
     /**
      * The label for next buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.NEXT_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String NEXT_LABEL = JFaceResources.getString("nextButton"); //$NON-NLS-1$
+    public String NEXT_LABEL = JFaceResources.getString(IDialogLabelKeys.NEXT_LABEL_KEY);
 
     /**
      * The label for finish buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.FINISH_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String FINISH_LABEL = JFaceResources.getString("finish"); //$NON-NLS-1$
+    public String FINISH_LABEL = JFaceResources.getString(IDialogLabelKeys.FINISH_LABEL_KEY);
 
     /**
      * The label for help buttons.
+     * Using this static label string provides optimum performance by looking
+     * up the label only once when JFace is initialized.  However, clients that 
+     * wish to support multiple locales in one system should instead use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.HELP_LABEL_KEY)</code>
+     * so that a locale other than the default may be consulted.
      */
-    public String HELP_LABEL = JFaceResources.getString("help"); //$NON-NLS-1$
+    public String HELP_LABEL = JFaceResources.getString(IDialogLabelKeys.HELP_LABEL_KEY);
 
     // Margins, spacings, and sizes
     /**
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IDialogLabelKeys.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IDialogLabelKeys.java
new file mode 100644
index 0000000..0f4465a
--- /dev/null
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IDialogLabelKeys.java
@@ -0,0 +1,209 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jface.dialogs;
+
+/**
+ * IDialogLabelKeys contains publicly accessible keys to the common dialog 
+ * labels used throughout JFace.  <code>IDialogConstants</code> provides
+ * access to these labels using static constants.  This is the preferred
+ * method when the client is optimizing for performance and is known to be 
+ * used in a single-locale system.  Using the keys and accessing the
+ * common dialog labels dynamically is the preferred method when the client
+ * may be running in a multi-locale system.
+ * 
+ * @see IDialogConstants
+ * @since 3.7
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+
+ */
+public interface IDialogLabelKeys {
+
+    /**
+     * The key used to retrieve the label for OK buttons. Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.OK_LABEL_KEY)</code> to retrieve the label
+     * dynamically when using multiple locales.
+     * 
+     * @since 3.7
+     */
+    public String OK_LABEL_KEY = "ok"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for cancel buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.CANCEL_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String CANCEL_LABEL_KEY = "cancel"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for yes buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.YES_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String YES_LABEL_KEY = "yes"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for no buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.NO_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String NO_LABEL_KEY = "no"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for no to all buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.NO_TO_ALL_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String NO_TO_ALL_LABEL_KEY = "notoall"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for yes to all buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.YES_TO_ALL_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String YES_TO_ALL_LABEL_KEY = "yestoall"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for skip buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.SKIP_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String SKIP_LABEL_KEY = "skip"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for stop buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.STOP_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String STOP_LABEL_KEY = "stop"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for abort buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.ABORT_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String ABORT_LABEL_KEY = "abort"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for retry buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.RETRY_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String RETRY_LABEL_KEY = "retry"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for ignore buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.IGNORE_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String IGNORE_LABEL_KEY = "ignore"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for proceed buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.PROCEED_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String PROCEED_LABEL_KEY = "proceed"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for open buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.OPEN_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String OPEN_LABEL_KEY = "open"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for close buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.CLOSE_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String CLOSE_LABEL_KEY = "close"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for show details buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.SHOW_DETAILS_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String SHOW_DETAILS_LABEL_KEY = "showDetails"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for hide details buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.HIDE_DETAILS_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String HIDE_DETAILS_LABEL_KEY = "hideDetails"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for back buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.BACK_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String BACK_LABEL_KEY = "backButton"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for next buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.NEXT_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String NEXT_LABEL_KEY = "nextButton"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for finish buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.FINISH_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String FINISH_LABEL_KEY = "finish"; //$NON-NLS-1$
+
+    /**
+     * The key used to retrieve the label for help buttons.
+     * Clients should use the pattern
+     * <code>JFaceResources.getString(IDialogLabelKeys.HELP_LABEL_KEY)</code>
+     * to retrieve the label dynamically when using multiple locales.
+     * @since 3.7
+     */
+    public String HELP_LABEL_KEY = "help"; //$NON-NLS-1$
+}
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IDialogSettings.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IDialogSettings.java
index 70933ea..dbdeb9e 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IDialogSettings.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IDialogSettings.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,8 @@
  * The store manages a collection of key/value pairs. The keys must be strings
  * and the values can be either, strings or array of strings. Convenience API to
  * convert primitive types to strings is provided.
+ * 
+ * @see DialogSettings
  */
 public interface IDialogSettings {
     /**
@@ -27,6 +29,8 @@
      * @param name
      *            the name of the new section
      * @return the new section
+     * 
+     * @see DialogSettings#getOrCreateSection(IDialogSettings, String)
      */
     public IDialogSettings addNewSection(String name);
 
@@ -140,6 +144,8 @@
      * @param sectionName
      *            the key
      * @return IDialogSettings (the section), or <code>null</code> if none
+     * 
+     * @see DialogSettings#getOrCreateSection(IDialogSettings, String)
      */
     public IDialogSettings getSection(String sectionName);
 
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
index c775d7d..87c0f6c 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
@@ -76,9 +76,15 @@
 	/**
 	 * 
 	 */
-	private static final GridDataFactory LAYOUTDATA_GRAB_BOTH = GridDataFactory
-			.fillDefaults().grab(true, true);
+	private static GridDataFactory grabBothGridDataFactory;
 
+	private static GridDataFactory getGrabBothGridData() {
+		if (grabBothGridDataFactory == null) {
+			grabBothGridDataFactory = GridDataFactory.fillDefaults().grab(true, true);
+		}
+		return grabBothGridDataFactory;
+	}
+	
 	/**
 	 * The dialog settings key name for stored dialog x location.
 	 */
@@ -293,9 +299,15 @@
 	/**
 	 * 
 	 */
-	private static final GridLayoutFactory POPUP_LAYOUT_FACTORY = GridLayoutFactory
-			.fillDefaults().margins(POPUP_MARGINWIDTH, POPUP_MARGINHEIGHT)
-			.spacing(POPUP_HORIZONTALSPACING, POPUP_VERTICALSPACING);
+	private static GridLayoutFactory popupLayoutFactory;
+	private static GridLayoutFactory getPopupLayout() {
+		if (popupLayoutFactory == null) {
+			popupLayoutFactory = GridLayoutFactory.fillDefaults()
+					.margins(POPUP_MARGINWIDTH, POPUP_MARGINHEIGHT)
+					.spacing(POPUP_HORIZONTALSPACING, POPUP_VERTICALSPACING);
+		}
+		return popupLayoutFactory;
+	}
 
 	/**
 	 * The dialog's toolbar for the move and resize capabilities.
@@ -676,8 +688,8 @@
 	 */
 	protected Control createContents(Composite parent) {
 		Composite composite = new Composite(parent, SWT.NONE);
-		POPUP_LAYOUT_FACTORY.applyTo(composite);
-		LAYOUTDATA_GRAB_BOTH.applyTo(composite);
+		getPopupLayout().applyTo(composite);
+		getGrabBothGridData().applyTo(composite);
 
 		// Title area
 		if (hasTitleArea()) {
@@ -689,7 +701,7 @@
 		// Create a grid data layout data if one was not provided.
 		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=118025
 		if (dialogArea.getLayoutData() == null) {
-			LAYOUTDATA_GRAB_BOTH.applyTo(dialogArea);
+			getGrabBothGridData().applyTo(dialogArea);
 		}
 
 		// Info field
@@ -730,8 +742,8 @@
 	 */
 	protected Control createDialogArea(Composite parent) {
 		Composite composite = new Composite(parent, SWT.NONE);
-		POPUP_LAYOUT_FACTORY.applyTo(composite);
-		LAYOUTDATA_GRAB_BOTH.applyTo(composite);
+		getPopupLayout().applyTo(composite);
+		getGrabBothGridData().applyTo(composite);
 		return composite;
 	}
 
@@ -802,7 +814,7 @@
 	protected Control createTitleMenuArea(Composite parent) {
 
 		Composite titleAreaComposite = new Composite(parent, SWT.NONE);
-		POPUP_LAYOUT_FACTORY.copy().numColumns(2).applyTo(titleAreaComposite);
+		getPopupLayout().copy().numColumns(2).applyTo(titleAreaComposite);
 		GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true,
 				false).applyTo(titleAreaComposite);
 
@@ -990,10 +1002,11 @@
 		boolean oldListenToDeactivate = listenToDeactivate;
 		listenToDeactivate = false;
 		if (tracker.open()) {
-			if (shell != null && !shell.isDisposed()) {
+			if (!shell.isDisposed()) {
 				shell.setBounds(tracker.getRectangles()[0]);
 			}
 		}
+		tracker.dispose();
 		listenToDeactivate = oldListenToDeactivate;
 	}
 
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/TrayDialog.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/TrayDialog.java
index da2103a..d5d8308 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/TrayDialog.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/TrayDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -86,16 +86,21 @@
 
 	private static boolean dialogHelpAvailable;
 
-	/*
+	/**
 	 * The dialog's tray (null if none).
 	 */
 	private DialogTray tray;
 
-	/*
-	 * The tray's control.
+	/**
+	 * The tray's control (null if none).
 	 */
 	private Control trayControl;
 	
+	/**
+	 * The control that had focus before the tray was opened (null if none).
+	 */
+	private Control nonTrayFocusControl;
+	
 	/*
 	 * The separator to the left of the sash.
 	 */
@@ -121,6 +126,11 @@
 	private ControlAdapter resizeListener;
 
 	/**
+	 * The help button (null if none).
+	 */
+	private ToolItem fHelpButton;
+
+	/**
 	 * Creates a tray dialog instance. Note that the window will have no visual
 	 * representation (no widgets) until it is told to open.
 	 * 
@@ -149,6 +159,15 @@
 			throw new IllegalStateException("Tray was not open"); //$NON-NLS-1$
 		}
 		Shell shell = getShell();
+		Control focusControl = shell.getDisplay().getFocusControl();
+		if (focusControl!= null && isContained(trayControl, focusControl)) {
+			if (nonTrayFocusControl!= null && !nonTrayFocusControl.isDisposed()) {
+				nonTrayFocusControl.setFocus();
+			} else {
+				shell.setFocus();
+			}
+		}
+		nonTrayFocusControl= null;
 		shell.removeControlListener (resizeListener);
 		resizeListener = null;
 		int trayWidth = trayControl.getSize().x + leftSeparator.getSize().x + sash.getSize().x + rightSeparator.getSize().x;
@@ -163,8 +182,31 @@
 		sash = null;
 		Rectangle bounds = shell.getBounds();
 		shell.setBounds(bounds.x + ((getDefaultOrientation() == SWT.RIGHT_TO_LEFT) ? trayWidth : 0), bounds.y, bounds.width - trayWidth, bounds.height);
+		if (fHelpButton != null) {
+			fHelpButton.setSelection(false);
+		}
 	}
 	
+	/**
+	 * Returns true if the given Control is a direct or indirect child of
+	 * container.
+	 * 
+	 * @param container
+	 *            the potential parent
+	 * @param control
+	 * @return boolean <code>true</code> if control is a child of container
+	 */
+	private boolean isContained(Control container, Control control) {
+		Composite parent;
+		while ((parent = control.getParent()) != null) {
+			if (parent == container) {
+				return true;
+			}
+			control = parent;
+		}
+		return false;
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.jface.dialogs.Dialog#close()
 	 */
@@ -238,10 +280,10 @@
 				cursor.dispose();
 			}
 		});		
-        ToolItem item = new ToolItem(toolBar, SWT.NONE);
-		item.setImage(image);
-		item.setToolTipText(JFaceResources.getString("helpToolTip")); //$NON-NLS-1$
-		item.addSelectionListener(new SelectionAdapter() {
+        fHelpButton = new ToolItem(toolBar, SWT.CHECK);
+		fHelpButton.setImage(image);
+		fHelpButton.setToolTipText(JFaceResources.getString("helpToolTip")); //$NON-NLS-1$
+		fHelpButton.addSelectionListener(new SelectionAdapter() {
             public void widgetSelected(SelectionEvent e) {
 				helpPressed();
             }
@@ -326,23 +368,34 @@
 	 * context help behavior (e.g. F1 on Windows). It traverses the widget
 	 * tree upward until it finds a widget that has a help listener on it,
 	 * then invokes a help event on that widget.
+	 * If the help tray is already open, it closes it and doesn't invoke
+	 * any help listener.
 	 */
 	private void helpPressed() {
-    	if (getShell() != null) {
-	    	Control c = getShell().getDisplay().getFocusControl();
-	    	while (c != null) {
-	    		if (c.isListening(SWT.Help)) {
-	    			c.notifyListeners(SWT.Help, new Event());
-	    			break;
-	    		}
-	    		c = c.getParent();
-	    	}
-    	}
+		if (getTray() == null ||
+				fHelpButton != null && fHelpButton.getSelection()) { // help button was not selected before
+			if (getShell() != null) {
+				Control c = getShell().getDisplay().getFocusControl();
+				while (c != null) {
+					if (c.isListening(SWT.Help)) {
+						c.notifyListeners(SWT.Help, new Event());
+						break;
+					}
+					c = c.getParent();
+				}
+				if (fHelpButton != null && getTray() != null) {
+					fHelpButton.setSelection(true);
+				}
+			}
+
+		} else {
+			closeTray();
+		}
 	}
 	
 	/**
 	 * Constructs the tray's widgets and displays the tray in this dialog. The
-	 * dialog's size will be adjusted to accomodate the tray.
+	 * dialog's size will be adjusted to accommodate the tray.
 	 * 
 	 * @param tray the tray to show in this dialog
 	 * @throws IllegalStateException if the dialog already has a tray open
@@ -360,6 +413,10 @@
 			throw new UnsupportedOperationException("Trays not supported with custom layouts"); //$NON-NLS-1$
 		}
 		final Shell shell = getShell();
+		Control focusControl = shell.getDisplay().getFocusControl();
+		if (focusControl != null && isContained(shell, focusControl)) {
+			nonTrayFocusControl = focusControl;
+		}
 		leftSeparator = new Label(shell, SWT.SEPARATOR | SWT.VERTICAL);
 		leftSeparator.setLayoutData(new GridData(GridData.FILL_VERTICAL));
 		sash = new Sash(shell, SWT.VERTICAL);
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java
index 062499b..a46f926 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,6 +40,7 @@
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Widget;
 
+
 /**
  * ControlDecoration renders an image decoration near a control. It allows
  * clients to specify an image and a position for the image relative to the
@@ -897,9 +898,9 @@
 	}
 
 	/**
-	 * Set the image shown in this control decoration. Update the rendered
-	 * decoration.
-	 * 
+	 * Set the description text that may be shown in a hover for this
+	 * decoration. Update the rendered decoration.
+	 *
 	 * @param text
 	 *            the text to be shown as a description for the decoration, or
 	 *            <code>null</code> if none has been set.
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/internal/InternalPolicy.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/internal/InternalPolicy.java
index 94d354d..d7135e3 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/internal/InternalPolicy.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/internal/InternalPolicy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,13 @@
 	 * @since 3.3
 	 */
 	public static boolean DEBUG_LOG_REENTRANT_VIEWER_CALLS = false;
+	
+	/**
+	 * (NON-API) A flag to indicate whether illegal equal elements in a viewer should be logged.
+	 * 
+	 * @since 3.7
+	 */
+	public static boolean DEBUG_LOG_EQUAL_VIEWER_ELEMENTS= false;
 
 	/**
 	 * (NON-API) A flag to indicate whether label provider changed notifications
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/ColorSelector.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/ColorSelector.java
index 45daaec..530eb62 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/ColorSelector.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/ColorSelector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,10 +10,6 @@
  *******************************************************************************/
 package org.eclipse.jface.preference;
 
-import org.eclipse.core.commands.common.EventManager;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.accessibility.AccessibleAdapter;
 import org.eclipse.swt.accessibility.AccessibleEvent;
@@ -33,6 +29,12 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 
+import org.eclipse.core.commands.common.EventManager;
+
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+
 /**
  * The <code>ColorSelector</code> is a wrapper for a button that displays a
  * selected <code>Color</code> and allows the user to change the selection.
@@ -153,7 +155,7 @@
 
     /**
      * Removes the given listener from this <code>ColorSelector</code>. Has
-     * no affect if the listener is not registered.
+     * no effect if the listener is not registered.
      * 
      * @param listener
      *            a property change listener
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/IPreferenceStore.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/IPreferenceStore.java
index b15af78..b3331b4 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/IPreferenceStore.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/IPreferenceStore.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,7 @@
 
 /**
  * The <code>IPreferenceStore</code> interface represents a table mapping
- * named preferences to values. If there is no value for a given name, 
+ * named preferences to values. If there is no value for a given name,
  * then that preferences's default value is returned; and if there is no
  * default value for that preference, then a default-default value is returned.
  * The default-default values for the primitive types are as follows:
@@ -30,7 +30,7 @@
  * Thus a preference store maintains two values for each of a set of
  * names: a current value and a default value.
  * The typical usage is to establish the defaults for all known preferences
- * and then restore previously stored values for preferences whose values 
+ * and then restore previously stored values for preferences whose values
  * were different from their defaults. After the current values of
  * the preferences have been modified, it is a simple matter to write
  * out only those preferences whose values are different from their defaults.
@@ -47,7 +47,7 @@
  * does not cause such events to be reported.
  * </p>
  * <p>
- * Clients who need a preference store may implement this interface or 
+ * Clients who need a preference store may implement this interface or
  * instantiate the standard implementation <code>PreferenceStore</code>.
  * </p>
  *
@@ -103,7 +103,7 @@
      * <b>Note</b> The types of the oldValue and newValue of the
      * generated PropertyChangeEvent are determined by whether
      * or not the typed API in IPreferenceStore was called.
-     * If values are changed via setValue(name,type) the 
+     * If values are changed via setValue(name,type) the
      * values in the PropertyChangedEvent will be of that type.
      * If they are set using a non typed API (i.e. #setToDefault
      * or using the OSGI Preferences) the values will be unconverted
@@ -111,15 +111,15 @@
      * </p>
      * <p>
      * A listener will be called in the same Thread
-     * that it is invoked in. Any Thread dependant listeners (such as 
+     * that it is invoked in. Any Thread dependant listeners (such as
      * those who update an SWT widget) will need to update in the
      * correct Thread. In the case of an SWT update you can update
      * using Display#syncExec(Runnable) or Display#asyncExec(Runnable).
      * </p>
-     * <p>  
-     * Likewise any application that updates an IPreferenceStore 
+     * <p>
+     * Likewise any application that updates an IPreferenceStore
      * from a Thread other than the UI Thread should be aware of
-     * any listeners that require an update in the UI Thread. 
+     * any listeners that require an update in the UI Thread.
      * </p>
      *
      * @param listener a property change listener
@@ -148,7 +148,7 @@
      * Fires a property change event corresponding to a change to the
      * current value of the preference with the given name.
      * <p>
-     * This method is provided on this interface to simplify the implementation 
+     * This method is provided on this interface to simplify the implementation
      * of decorators. There is normally no need to call this method since
      * <code>setValue</code> and <code>setToDefault</code> report such
      * events in due course. Implementations should funnel all preference
@@ -167,7 +167,7 @@
      * Returns the current value of the boolean-valued preference with the
      * given name.
      * Returns the default-default value (<code>false</code>) if there
-     * is no preference with the given name, or if the current value 
+     * is no preference with the given name, or if the current value
      * cannot be treated as a boolean.
      *
      * @param name the name of the preference
@@ -179,7 +179,7 @@
      * Returns the default value for the boolean-valued preference
      * with the given name.
      * Returns the default-default value (<code>false</code>) if there
-     * is no default preference with the given name, or if the default 
+     * is no default preference with the given name, or if the default
      * value cannot be treated as a boolean.
      *
      * @param name the name of the preference
@@ -191,7 +191,7 @@
      * Returns the default value for the double-valued preference
      * with the given name.
      * Returns the default-default value (<code>0.0</code>) if there
-     * is no default preference with the given name, or if the default 
+     * is no default preference with the given name, or if the default
      * value cannot be treated as a double.
      *
      * @param name the name of the preference
@@ -203,7 +203,7 @@
      * Returns the default value for the float-valued preference
      * with the given name.
      * Returns the default-default value (<code>0.0f</code>) if there
-     * is no default preference with the given name, or if the default 
+     * is no default preference with the given name, or if the default
      * value cannot be treated as a float.
      *
      * @param name the name of the preference
@@ -215,7 +215,7 @@
      * Returns the default value for the integer-valued preference
      * with the given name.
      * Returns the default-default value (<code>0</code>) if there
-     * is no default preference with the given name, or if the default 
+     * is no default preference with the given name, or if the default
      * value cannot be treated as an integer.
      *
      * @param name the name of the preference
@@ -227,7 +227,7 @@
      * Returns the default value for the long-valued preference
      * with the given name.
      * Returns the default-default value (<code>0L</code>) if there
-     * is no default preference with the given name, or if the default 
+     * is no default preference with the given name, or if the default
      * value cannot be treated as a long.
      *
      * @param name the name of the preference
@@ -238,8 +238,8 @@
     /**
      * Returns the default value for the string-valued preference
      * with the given name.
-     * Returns the default-default value (the empty string <code>""</code>) 
-     * is no default preference with the given name, or if the default 
+     * Returns the default-default value (the empty string <code>""</code>)
+     * is no default preference with the given name, or if the default
      * value cannot be treated as a string.
      *
      * @param name the name of the preference
@@ -251,7 +251,7 @@
      * Returns the current value of the double-valued preference with the
      * given name.
      * Returns the default-default value (<code>0.0</code>) if there
-     * is no preference with the given name, or if the current value 
+     * is no preference with the given name, or if the current value
      * cannot be treated as a double.
      *
      * @param name the name of the preference
@@ -263,7 +263,7 @@
      * Returns the current value of the float-valued preference with the
      * given name.
      * Returns the default-default value (<code>0.0f</code>) if there
-     * is no preference with the given name, or if the current value 
+     * is no preference with the given name, or if the current value
      * cannot be treated as a float.
      *
      * @param name the name of the preference
@@ -275,7 +275,7 @@
      * Returns the current value of the integer-valued preference with the
      * given name.
      * Returns the default-default value (<code>0</code>) if there
-     * is no preference with the given name, or if the current value 
+     * is no preference with the given name, or if the current value
      * cannot be treated as an integter.
      *
      * @param name the name of the preference
@@ -287,7 +287,7 @@
      * Returns the current value of the long-valued preference with the
      * given name.
      * Returns the default-default value (<code>0L</code>) if there
-     * is no preference with the given name, or if the current value 
+     * is no preference with the given name, or if the current value
      * cannot be treated as a long.
      *
      * @param name the name of the preference
@@ -299,7 +299,7 @@
      * Returns the current value of the string-valued preference with the
      * given name.
      * Returns the default-default value (the empty string <code>""</code>)
-     * if there is no preference with the given name, or if the current value 
+     * if there is no preference with the given name, or if the current value
      * cannot be treated as a string.
      *
      * @param name the name of the preference
@@ -322,8 +322,8 @@
      * Returns whether the current values in this property store
      * require saving.
      *
-     * @return <code>true</code> if at least one of values of 
-     *  the preferences known to this store has changed and 
+     * @return <code>true</code> if at least one of values of
+     *  the preferences known to this store has changed and
      *  requires saving, and <code>false</code> otherwise.
      */
     public boolean needsSaving();
@@ -332,8 +332,8 @@
      * Sets the current value of the preference with the given name to
      * the given string value without sending a property change.
      * <p>
-     * This method does not fire a property change event and 
-     * should only be used for setting internal preferences 
+     * This method does not fire a property change event and
+     * should only be used for setting internal preferences
      * that are not meant to be processed by listeners.
      * Normal clients should instead call #setValue.
      * </p>
@@ -343,17 +343,17 @@
      */
     public void putValue(String name, String value);
 
-    /**
-     * Removes the given listener from this preference store.
-     * Has no affect if the listener is not registered.
-     *
-     * @param listener a property change listener
-     */
+	/**
+	 * Removes the given listener from this preference store. Has no effect if the listener is not
+	 * registered.
+	 * 
+	 * @param listener a property change listener, must not be <code>null</code>
+	 */
     public void removePropertyChangeListener(IPropertyChangeListener listener);
 
     /**
      * Sets the default value for the double-valued preference with the
-     * given name. 
+     * given name.
      * <p>
      * Note that the current value of the preference is affected if
      * the preference's current value was its old default value, in which
@@ -370,7 +370,7 @@
 
     /**
      * Sets the default value for the float-valued preference with the
-     * given name. 
+     * given name.
      * <p>
      * Note that the current value of the preference is affected if
      * the preference's current value was its old default value, in which
@@ -387,7 +387,7 @@
 
     /**
      * Sets the default value for the integer-valued preference with the
-     * given name. 
+     * given name.
      * <p>
      * Note that the current value of the preference is affected if
      * the preference's current value was its old default value, in which
@@ -404,7 +404,7 @@
 
     /**
      * Sets the default value for the long-valued preference with the
-     * given name. 
+     * given name.
      * <p>
      * Note that the current value of the preference is affected if
      * the preference's current value was its old default value, in which
@@ -421,7 +421,7 @@
 
     /**
      * Sets the default value for the string-valued preference with the
-     * given name. 
+     * given name.
      * <p>
      * Note that the current value of the preference is affected if
      * the preference's current value was its old default value, in which
@@ -438,7 +438,7 @@
 
     /**
      * Sets the default value for the boolean-valued preference with the
-     * given name. 
+     * given name.
      * <p>
      * Note that the current value of the preference is affected if
      * the preference's current value was its old default value, in which
@@ -459,7 +459,7 @@
      * <p>
      * Note that the preferred way of re-initializing a preference to the
      * appropriate default value is to call <code>setToDefault</code>.
-     * This is implemented by removing the named value from the store, 
+     * This is implemented by removing the named value from the store,
      * thereby exposing the default value.
      * </p>
      *
@@ -471,7 +471,7 @@
      * Sets the current value of the double-valued preference with the
      * given name.
      * <p>
-     * A property change event is reported if the current value of the 
+     * A property change event is reported if the current value of the
      * preference actually changes from its previous value. In the event
      * object, the property name is the name of the preference, and the
      * old and new values are wrapped as objects.
@@ -490,7 +490,7 @@
      * Sets the current value of the float-valued preference with the
      * given name.
      * <p>
-     * A property change event is reported if the current value of the 
+     * A property change event is reported if the current value of the
      * preference actually changes from its previous value. In the event
      * object, the property name is the name of the preference, and the
      * old and new values are wrapped as objects.
@@ -509,7 +509,7 @@
      * Sets the current value of the integer-valued preference with the
      * given name.
      * <p>
-     * A property change event is reported if the current value of the 
+     * A property change event is reported if the current value of the
      * preference actually changes from its previous value. In the event
      * object, the property name is the name of the preference, and the
      * old and new values are wrapped as objects.
@@ -528,7 +528,7 @@
      * Sets the current value of the long-valued preference with the
      * given name.
      * <p>
-     * A property change event is reported if the current value of the 
+     * A property change event is reported if the current value of the
      * preference actually changes from its previous value. In the event
      * object, the property name is the name of the preference, and the
      * old and new values are wrapped as objects.
@@ -547,7 +547,7 @@
      * Sets the current value of the string-valued preference with the
      * given name.
      * <p>
-     * A property change event is reported if the current value of the 
+     * A property change event is reported if the current value of the
      * preference actually changes from its previous value. In the event
      * object, the property name is the name of the preference, and the
      * old and new values are wrapped as objects.
@@ -566,7 +566,7 @@
      * Sets the current value of the boolean-valued preference with the
      * given name.
      * <p>
-     * A property change event is reported if the current value of the 
+     * A property change event is reported if the current value of the
      * preference actually changes from its previous value. In the event
      * object, the property name is the name of the preference, and the
      * old and new values are wrapped as objects.
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferencePage.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferencePage.java
index 3777493..f68510c 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferencePage.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -614,8 +614,19 @@
     }
 
 	/**
-	 * Apply the data to the receiver. By default do nothing.
-	 * @param data
+	 * Applies the given data to this page.
+	 * <p>
+	 * It is up to the subclasses to specify the contract and the data format. The contract is not
+	 * guaranteed if the subclass is in an internal package.
+	 * </p>
+	 * <p>
+	 * <strong>Note:</strong> The implementation must silently ignore all unknown data.
+	 * </p>
+	 * <p>
+	 * The default implementation does nothing.
+	 * </p>
+	 * 
+	 * @param data the data as specified by the subclass
 	 * @since 3.1
 	 */
 	public void applyData(Object data) {
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/CompositeImageDescriptor.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/CompositeImageDescriptor.java
index 9db0480..e92a608 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/CompositeImageDescriptor.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/CompositeImageDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Wahlbrink - fix for bug 341702 - incorrect mixing of images with alpha channel
  *******************************************************************************/
 package org.eclipse.jface.resource;
 
@@ -130,10 +131,24 @@
 					dstRed = (dstPixel & 0xFF) >>> 0;
 					dstGreen = (dstPixel & 0xFF00) >>> 8;
 					dstBlue = (dstPixel & 0xFF0000) >>> 16;
-					dstRed += (srcRed - dstRed) * srcAlpha / 255;
-					dstGreen += (srcGreen - dstGreen) * srcAlpha / 255;
-					dstBlue += (srcBlue - dstBlue) * srcAlpha / 255;
-					dstAlpha += (srcAlpha - dstAlpha) * srcAlpha / 255;
+					if (dstAlpha == 255) { // simplified calculations for performance
+						dstRed += (srcRed - dstRed) * srcAlpha / 255;
+						dstGreen += (srcGreen - dstGreen) * srcAlpha / 255;
+						dstBlue += (srcBlue - dstBlue) * srcAlpha / 255;
+					} else {
+						// See Porter T., Duff T. 1984. "Compositing Digital Images". 
+						// Computer Graphics 18 (3): 253–259.
+						dstRed = srcRed * srcAlpha * 255 + dstRed * dstAlpha * (255 - srcAlpha);
+						dstGreen = srcGreen * srcAlpha * 255 + dstGreen * dstAlpha * (255 - srcAlpha);
+						dstBlue = srcBlue * srcAlpha * 255 + dstBlue * dstAlpha * (255 - srcAlpha);
+						dstAlpha = srcAlpha * 255 + dstAlpha * (255 - srcAlpha); 
+						if (dstAlpha != 0) { // if both original alphas == 0, then all colors are 0
+							dstRed /= dstAlpha;
+							dstGreen /= dstAlpha;
+							dstBlue /= dstAlpha;
+							dstAlpha /= 255;
+						}
+					}
 				}
 				dst.setPixel(dstX, dstY, ((dstRed & 0xFF) << 0) | ((dstGreen & 0xFF) << 8) | ((dstBlue & 0xFF) << 16));
 				dst.setAlpha(dstX, dstY, dstAlpha);
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ResourceRegistry.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ResourceRegistry.java
index 82184b8..d03439f 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ResourceRegistry.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ResourceRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@
 import java.util.Set;
 
 import org.eclipse.core.commands.common.EventManager;
+
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 
@@ -37,8 +38,8 @@
      */
     protected abstract void clearCaches();
 
-    /** 
-     * @return the set of keys this manager knows about.  This collection 
+    /**
+     * @return the set of keys this manager knows about.  This collection
      * should be immutable.
      */
     public abstract Set getKeySet();
@@ -76,7 +77,7 @@
     }
 
     /**
-     * Removes the given listener from this registry. Has no affect if the
+     * Removes the given listener from this registry. Has no effect if the
      * listener is not registered.
      * 
      * @param listener a property change listener
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windows7.properties b/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windows7.properties
new file mode 100644
index 0000000..1d3a5c1
--- /dev/null
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windows7.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# Font file for JFace when running under Windows7
+#############################################################
+# START NON-TRANSLATABLE
+org.eclipse.jface.bannerfont.0=Segoe UI-bold-10
+org.eclipse.jface.bannerfont.1=Tahoma-bold-10
+
+org.eclipse.jface.headerfont.0=Segoe UI-bold-12
+org.eclipse.jface.headerfont.1=Tahoma-bold-12
+
+org.eclipse.jface.textfont.0=Consolas-regular-10
+org.eclipse.jface.textfont.1=Courier New-regular-10
+# END NON-TRANSLATABLE
\ No newline at end of file
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windowsvista.properties b/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windowsvista.properties
new file mode 100644
index 0000000..40267d8
--- /dev/null
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windowsvista.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2011 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# Font file for JFace when running under Windows Vista
+#############################################################
+# START NON-TRANSLATABLE
+org.eclipse.jface.bannerfont.0=Segoe UI-bold-10
+org.eclipse.jface.bannerfont.1=Tahoma-bold-10
+
+org.eclipse.jface.headerfont.0=Segoe UI-bold-12
+org.eclipse.jface.headerfont.1=Tahoma-bold-12
+
+org.eclipse.jface.textfont.0=Consolas-regular-10
+org.eclipse.jface.textfont.1=Courier New-regular-10
+# END NON-TRANSLATABLE
\ No newline at end of file
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/util/OpenStrategy.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/util/OpenStrategy.java
index 83f095c..692f25e 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/util/OpenStrategy.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/util/OpenStrategy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,6 @@
  *******************************************************************************/
 package org.eclipse.jface.util;
 
-import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.TableTree;
 import org.eclipse.swt.custom.TableTreeItem;
@@ -27,6 +26,8 @@
 import org.eclipse.swt.widgets.TreeItem;
 import org.eclipse.swt.widgets.Widget;
 
+import org.eclipse.core.runtime.ListenerList;
+
 /**
  * Implementation of single-click and double-click strategies.
  * <p>
@@ -88,6 +89,16 @@
     // Not declared final, see bug 246209
     private static int TIME = 500;
 
+	/**
+	 * Returns the delay for post selection events.
+	 * 
+	 * @return the delay for post selection events in milliseconds
+	 * @since 3.7
+	 */
+	public static final int getPostSelectionDelay() {
+		return TIME;
+	}
+
     /* SINGLE_CLICK or DOUBLE_CLICK;
      * In case of SINGLE_CLICK, the bits SELECT_ON_HOVER and ARROW_KEYS_OPEN
      * my be set as well. */
@@ -367,6 +378,7 @@
                         mouseUpEvent = e;
                         collapseOccurred = false;
                         expandOccurred = false;
+                        selectionPendent= null;
                     }
                     break;
                 case SWT.KeyDown:
@@ -383,6 +395,8 @@
                             enterKeyDown = true;
                         }
                     }
+                    collapseOccurred= false;
+                    expandOccurred= false;
                     break;
                 case SWT.Selection:
                     SelectionEvent event = new SelectionEvent(e);
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
index 2f29802..96d0594 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@
  *     Michael Schneider, bug 210747
  *     Bruce Sutton, bug 221768
  *     Matthew Hall, bug 221988
+ *     Julien Desgats, bug 203950
  *******************************************************************************/
 
 package org.eclipse.jface.viewers;
@@ -24,7 +25,11 @@
 import java.util.List;
 
 import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.internal.InternalPolicy;
+import org.eclipse.jface.util.Policy;
 import org.eclipse.jface.util.SafeRunnable;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.BusyIndicator;
@@ -84,6 +89,12 @@
 	 * @see #setAutoExpandLevel
 	 */
 	private int expandToLevel = 0;
+	
+	/**
+	 * Indicates if filters should be checked to determine expandability of
+	 * a tree node. 
+	 */
+	private boolean isExpandableCheckFilters = false;
 
 	/**
 	 * Safe runnable used to update an item.
@@ -1347,12 +1358,14 @@
 					}
 					Object[] result = tpcp.getChildren(path);
 					if (result != null) {
+						assertElementsNotNull(parent, result);
 						return result;
 					}
 				} else if (cp instanceof ITreeContentProvider) {
 					ITreeContentProvider tcp = (ITreeContentProvider) cp;
 					Object[] result = tcp.getChildren(parent);
 					if (result != null) {
+						assertElementsNotNull(parent, result);
 						return result;
 					}
 				}
@@ -1364,6 +1377,41 @@
 	}
 
 	/**
+	 * Asserts that the given array of elements is itself non- <code>null</code>
+	 * and contains no <code>null</code> elements.
+	 * 
+	 * @param parent
+	 *            the parent element
+	 * @param elements
+	 *            the array to check
+	 * 
+	 * @see #assertElementsNotNull(Object[])
+	 */
+	private void assertElementsNotNull(Object parent, Object[] elements) {
+		Assert.isNotNull(elements);
+		for (int i = 0, n = elements.length; i < n; ++i) {
+			Assert.isNotNull(elements[i]);
+		}
+		
+		if (InternalPolicy.DEBUG_LOG_EQUAL_VIEWER_ELEMENTS
+				&& elements.length > 1) {
+			CustomHashtable elementSet = newHashtable(elements.length * 2);
+			for (int i = 0; i < elements.length; i++) {
+				Object element = elements[i];
+				Object old = elementSet.put(element, element);
+				if (old != null) {
+					String message = "Sibling elements in viewer must not be equal:\n  " //$NON-NLS-1$
+							+ old + ",\n  " + element + ",\n  parent: " + parent; //$NON-NLS-1$ //$NON-NLS-2$
+					Policy.getLog().log(
+							new Status(IStatus.WARNING, Policy.JFACE, message,
+									new RuntimeException()));
+					return;
+				}
+			}
+		}
+	}
+	
+	/**
 	 * Returns all selected items for the given SWT control.
 	 *
 	 * @param control
@@ -2049,7 +2097,7 @@
 	 * <code>hasChildren</code> on this viewer's content provider. It may be
 	 * overridden if necessary.
 	 * </p>
-	 *
+	 * @see #setExpandPreCheckFilters(boolean)
 	 * @param elementOrTreePath
 	 *            the element or path
 	 * @return <code>true</code> if the tree node representing the given
@@ -2079,11 +2127,19 @@
 					path = new TreePath(new Object[] { element });
 				}
 			}
-			return tpcp.hasChildren(path);
+			boolean hasChildren = tpcp.hasChildren(path);
+			if (hasChildren && isExpandableCheckFilters && hasFilters()) {
+				return getFilteredChildren(path).length > 0;
+			}
+			return hasChildren;
 		}
 		if (cp instanceof ITreeContentProvider) {
 			ITreeContentProvider tcp = (ITreeContentProvider) cp;
-			return tcp.hasChildren(element);
+			boolean hasChildren = tcp.hasChildren(element);
+			if (hasChildren && isExpandableCheckFilters && hasFilters()) {
+				return getFilteredChildren(element).length > 0;
+			}
+			return hasChildren;
 		}
 		return false;
 	}
@@ -2222,7 +2278,7 @@
 
 	/**
 	 * Removes a listener for expand and collapse events in this viewer. Has no
-	 * affect if an identical listener is not registered.
+	 * effect if an identical listener is not registered.
 	 *
 	 * @param listener
 	 *            a tree viewer listener
@@ -2621,7 +2677,7 @@
 			int i = 0;
 			while (numItemsToDispose > 0 && i < items.length) {
 				Object data = items[i].getData();
-				if (data == null || items.length - i <= numItemsToDispose || !children.containsKey(data)) {
+				if (data == null || !children.containsKey(data)) {
 					if (data != null) {
 						disassociate(items[i]);
 					}
@@ -2706,7 +2762,7 @@
 		// add any remaining elements
 		if (min < elementChildren.length) {
 			for (int i = min; i < elementChildren.length; ++i) {
-				createTreeItem(widget, elementChildren[i], i);
+				createTreeItem(widget, elementChildren[i], -1);
 			}
 
 			// Need to restore expanded state in a separate pass
@@ -3104,4 +3160,26 @@
 	protected ViewerRow getViewerRowFromItem(Widget item) {
 		return null;
 	}
+
+	/**
+	 * Instructs {@link #isExpandable(Object)} to consult filters to more accurately
+	 * determine if an item can be expanded.
+	 * <p>
+	 * Setting this value to <code>true</code> will affect performance of the tree
+	 * viewer.
+	 * </p><p>
+	 * To improve performance, by default the tree viewer does not consult filters when 
+	 * determining if a tree node could be expanded.
+	 * </p>
+	 * @param checkFilters <code>true</code> to instruct tree viewer to consult filters 
+	 * @see #isExpandable(Object)
+	 * @since 3.8
+	 */
+	public void setExpandPreCheckFilters(boolean checkFilters) {
+		if (checkFilters != isExpandableCheckFilters) {
+			this.isExpandableCheckFilters = checkFilters;
+			refresh();
+		}
+	}
+
 }
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CellEditor.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CellEditor.java
index 39514f4..42abff8 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CellEditor.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CellEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,17 +12,19 @@
 
 package org.eclipse.jface.viewers;
 
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.util.SafeRunnable;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.KeyEvent;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.ListenerList;
+
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.util.SafeRunnable;
+
 /**
  * Abstract base class for cell editors. Implements property change listener
  * handling, and SWT window management.
@@ -791,7 +793,7 @@
 	}
 
 	/**
-	 * Removes the given listener from this cell editor. Has no affect if an
+	 * Removes the given listener from this cell editor. Has no effect if an
 	 * identical listener is not registered.
 	 *
 	 * @param listener
@@ -803,7 +805,7 @@
 
 	/**
 	 * Removes the given property change listener from this cell editor. Has no
-	 * affect if an identical property change listener is not registered.
+	 * effect if an identical property change listener is not registered.
 	 *
 	 * @param listener
 	 *            a property change listener
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CheckboxTableViewer.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CheckboxTableViewer.java
index 579d2bf..e1ed43d 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CheckboxTableViewer.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CheckboxTableViewer.java
@@ -237,17 +237,20 @@
      * @return the array of checked elements
      * @see #setCheckedElements
      */
-    public Object[] getCheckedElements() {
-        TableItem[] children = getTable().getItems();
-        ArrayList v = new ArrayList(children.length);
-        for (int i = 0; i < children.length; i++) {
-            TableItem item = children[i];
-            if (item.getChecked()) {
-				v.add(item.getData());
+	public Object[] getCheckedElements() {
+		TableItem[] children = getTable().getItems();
+		ArrayList v = new ArrayList(children.length);
+		for (int i = 0; i < children.length; i++) {
+			TableItem item = children[i];
+			Object data = item.getData();
+			if (data != null) {
+				if (item.getChecked()) {
+					v.add(data);
+				}
 			}
-        }
-        return v.toArray();
-    }
+		}
+		return v.toArray();
+	}
 
     /**
      * Returns the grayed state of the given element.
@@ -275,17 +278,20 @@
      * @return the array of grayed elements
      * @see #setGrayedElements
      */
-    public Object[] getGrayedElements() {
-        TableItem[] children = getTable().getItems();
-        List v = new ArrayList(children.length);
-        for (int i = 0; i < children.length; i++) {
-            TableItem item = children[i];
-            if (item.getGrayed()) {
-				v.add(item.getData());
+	public Object[] getGrayedElements() {
+		TableItem[] children = getTable().getItems();
+		List v = new ArrayList(children.length);
+		for (int i = 0; i < children.length; i++) {
+			TableItem item = children[i];
+			Object data = item.getData();
+			if (data != null) {
+				if (item.getGrayed()) {
+					v.add(data);
+				}
 			}
-        }
-        return v.toArray();
-    }
+		}
+		return v.toArray();
+	}
 
     /* (non-Javadoc)
      * Method declared on StructuredViewer.
@@ -366,13 +372,16 @@
      * @param state <code>true</code> if the element should be checked,
      *  and <code>false</code> if it should be unchecked
      */
-    public void setAllChecked(boolean state) {
-        TableItem[] children = getTable().getItems();
-        for (int i = 0; i < children.length; i++) {
-            TableItem item = children[i];
-            item.setChecked(state);
-        }
-    }
+	public void setAllChecked(boolean state) {
+		TableItem[] children = getTable().getItems();
+		for (int i = 0; i < children.length; i++) {
+			TableItem item = children[i];
+			if (item.getData() != null) {
+				if (item.getChecked() != state)
+					item.setChecked(state);
+			}
+		}
+	}
 
     /**
      * Sets to the given value the grayed state for all elements in this viewer.
@@ -384,7 +393,10 @@
         TableItem[] children = getTable().getItems();
         for (int i = 0; i < children.length; i++) {
             TableItem item = children[i];
-            item.setGrayed(state);
+			if (item.getData() != null) {
+				if (item.getGrayed() != state)
+					item.setGrayed(state);
+			}
         }
     }
 
@@ -394,10 +406,12 @@
     public boolean setChecked(Object element, boolean state) {
         Assert.isNotNull(element);
         Widget widget = findItem(element);
-        if (widget instanceof TableItem) {
-            ((TableItem) widget).setChecked(state);
-            return true;
-        }
+		if (widget instanceof TableItem) {
+			TableItem item = (TableItem) widget;
+			if (item.getChecked() != state)
+				item.setChecked(state);
+			return true;
+		}
         return false;
     }
 
@@ -446,10 +460,12 @@
     public boolean setGrayed(Object element, boolean state) {
         Assert.isNotNull(element);
         Widget widget = findItem(element);
-        if (widget instanceof TableItem) {
-            ((TableItem) widget).setGrayed(state);
-            return true;
-        }
+		if (widget instanceof TableItem) {
+			TableItem item = (TableItem) widget;
+			if (item.getGrayed() != state)
+				item.setGrayed(state);
+			return true;
+		}
         return false;
     }
 
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ColumnViewerEditor.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ColumnViewerEditor.java
index 609fcd0..6228d32 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ColumnViewerEditor.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ColumnViewerEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     Tom Schindl <tom.schindl@bestsolution.at> - refactoring (bug 153993)
  *     											   fix in bug: 151295,178946,166500,195908,201906,207676,180504,216706,218336
+ *     Tony Juckel -  Bug 130854 - JFace TableViewer ignoring ICellEditor validator state
  *******************************************************************************/
 
 package org.eclipse.jface.viewers;
@@ -307,7 +308,7 @@
 					Item t = (Item) this.cell.getItem();
 
 					// don't null out table item -- same item is still selected
-					if (t != null && !t.isDisposed()) {
+					if (t != null && !t.isDisposed() && c.isValueValid()) {
 						saveEditorValue(c);
 					}
 					if (!viewer.getControl().isDisposed()) {
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ComboBoxViewerCellEditor.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ComboBoxViewerCellEditor.java
index f47de75..4d39ace 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ComboBoxViewerCellEditor.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ComboBoxViewerCellEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 Tom Schindl and others.
+ * Copyright (c) 2006, 2010 Tom Schindl and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -193,6 +193,18 @@
 	 * @param provider
 	 *            the content provider used
 	 * @see StructuredViewer#setContentProvider(IContentProvider)
+	 * @since 3.7
+	 */
+	public void setContentProvider(IStructuredContentProvider provider) {
+		viewer.setContentProvider(provider);
+	}
+
+	/**
+	 * @param provider
+	 *            the content provider used
+	 * @see StructuredViewer#setContentProvider(IContentProvider)
+	 * @deprecated As of 3.7, replaced by
+	 *             {@link #setContentProvider(IStructuredContentProvider)}
 	 */
 	public void setContenProvider(IStructuredContentProvider provider) {
 		viewer.setContentProvider(provider);
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ContentViewer.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ContentViewer.java
index 38acd10..4acab9f 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ContentViewer.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ContentViewer.java
@@ -262,6 +262,12 @@
      * if required.
      */
     public void setInput(Object input) {
+    	Control control = getControl();
+		if (control == null || control.isDisposed()) {
+			throw new IllegalStateException(
+					"Need an underlying widget to be able to set the input." + //$NON-NLS-1$
+							"(Has the widget been disposed?)"); //$NON-NLS-1$
+		}
         Assert
                 .isTrue(getContentProvider() != null,
                         "ContentViewer must have a content provider when input is set."); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/IBaseLabelProvider.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/IBaseLabelProvider.java
index a6af26a6..28319b6 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/IBaseLabelProvider.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/IBaseLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,18 +14,18 @@
  * A label provider maps an element of the viewer's model to
  * an optional image and optional text string used to display
  * the element in the viewer's control.  Certain label providers
- * may allow multiple labels per element.  
- * This is an "abstract interface", defining methods common 
- * to all label providers, but does not actually define the methods 
+ * may allow multiple labels per element.
+ * This is an "abstract interface", defining methods common
+ * to all label providers, but does not actually define the methods
  * to get the label(s) for an element.  This interface should never
  * be directly implemented.
  * Most viewers will take either an <code>ILabelProvider</code> or
  * an <code>ITableLabelProvider</code>.
  * <p>
- * A label provider must not be shared between viewers 
+ * A label provider must not be shared between viewers
  * since a label provider generally manages SWT resources (images),
  * which must be disposed when the viewer is disposed.
- * To simplify life cycle management, the current label provider 
+ * To simplify life cycle management, the current label provider
  * of a viewer is disposed when the viewer is disposed.
  * </p>
  * <p>
@@ -40,10 +40,10 @@
  */
 public interface IBaseLabelProvider {
     /**
-     * Adds a listener to this label provider. 
+     * Adds a listener to this label provider.
      * Has no effect if an identical listener is already registered.
      * <p>
-     * Label provider listeners are informed about state changes 
+     * Label provider listeners are informed about state changes
      * that affect the rendering of the viewer that uses this label provider.
      * </p>
      *
@@ -62,7 +62,7 @@
     public void dispose();
 
     /**
-     * Returns whether the label would be affected 
+     * Returns whether the label would be affected
      * by a change to the given property of the given element.
      * This can be used to optimize a non-structural viewer update.
      * If the property mentioned in the update does not affect the label,
@@ -77,7 +77,7 @@
 
     /**
      * Removes a listener to this label provider.
-     * Has no affect if an identical listener is not registered.
+     * Has no effect if an identical listener is not registered.
      *
      * @param listener a label provider listener
      */
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/IPostSelectionProvider.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/IPostSelectionProvider.java
index a62792d..37d9405 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/IPostSelectionProvider.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/IPostSelectionProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,7 @@
  * Selection provider extension interface to allow providers
  * to notify about post selection changed events.
  * A post selection changed event is equivalent to selection changed event
- * if the selection change was triggered by the mouse, but it has a delay 
+ * if the selection change was triggered by the mouse, but it has a delay
  * if the selection change is triggered by keyboard navigation.
  *
  * @see ISelectionProvider
@@ -33,9 +33,9 @@
             ISelectionChangedListener listener);
 
     /**
-     * Removes the given listener for post selection changes from this selection 
+     * Removes the given listener for post selection changes from this selection
      * provider.
-     * Has no affect if an identical listener is not registered.
+     * Has no effect if an identical listener is not registered.
      *
      * @param listener a selection changed listener
      */
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ISelectionProvider.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ISelectionProvider.java
index 4a4e963..d01492f 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ISelectionProvider.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ISelectionProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,7 +35,7 @@
 
     /**
      * Removes the given selection change listener from this selection provider.
-     * Has no affect if an identical listener is not registered.
+     * Has no effect if an identical listener is not registered.
      *
      * @param listener a selection changed listener
      */
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/SWTFocusCellManager.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/SWTFocusCellManager.java
index 0a3c18b..82b9fde 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/SWTFocusCellManager.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/SWTFocusCellManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@
 
 package org.eclipse.jface.viewers;
 
-import org.eclipse.core.runtime.Assert;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.accessibility.ACC;
 import org.eclipse.swt.accessibility.AccessibleAdapter;
@@ -24,6 +23,8 @@
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
 
+import org.eclipse.core.runtime.Assert;
+
 /**
  * This class is responsible to provide cell management base features for the
  * SWT-Controls {@link org.eclipse.swt.widgets.Table} and
@@ -180,20 +181,19 @@
 						if (row == null)
 							return;
 						
-						Object element = row.getItem().getData();
 						ViewerColumn viewPart = viewer.getViewerColumn(cell
 								.getColumnIndex());
 						
 						if (viewPart == null)
 							return;
 						
-						ColumnLabelProvider labelProvider = (ColumnLabelProvider) viewPart
+						CellLabelProvider labelProvider = viewPart
 								.getLabelProvider();
 						
 						if (labelProvider == null)
 							return;
-						
-						event.result = labelProvider.getText(element);
+						labelProvider.update(cell);
+						event.result = cell.getText();
 					}
 				});
 
@@ -225,7 +225,7 @@
 		}
 
 		if( focusCell != null ) {
-			focusCell.scrollIntoView();	
+			focusCell.scrollIntoView();
 		}
 		
 		this.cellHighlighter.focusCellChanged(focusCell,oldCell);
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
index 4dbd861..4710519 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,9 +17,13 @@
 import java.util.List;
 
 import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.internal.InternalPolicy;
 import org.eclipse.jface.util.IOpenEventListener;
 import org.eclipse.jface.util.OpenStrategy;
+import org.eclipse.jface.util.Policy;
 import org.eclipse.jface.util.SafeRunnable;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.TableTreeItem;
@@ -594,6 +598,23 @@
 		for (int i = 0, n = elements.length; i < n; ++i) {
 			Assert.isNotNull(elements[i]);
 		}
+		
+		if (InternalPolicy.DEBUG_LOG_EQUAL_VIEWER_ELEMENTS
+				&& elements.length > 1) {
+			CustomHashtable elementSet = newHashtable(elements.length * 2);
+			for (int i = 0; i < elements.length; i++) {
+				Object element = elements[i];
+				Object old = elementSet.put(element, element);
+				if (old != null) {
+					String message = "Sibling elements in viewer must not be equal:\n  " //$NON-NLS-1$
+							+ old + ",\n  " + element; //$NON-NLS-1$
+					Policy.getLog().log(
+							new Status(IStatus.WARNING, Policy.JFACE, message,
+									new RuntimeException()));
+					return;
+				}
+			}
+		}
 	}
 
 	/**
@@ -1534,7 +1555,7 @@
 	}
 
 	/**
-	 * Removes the given open listener from this viewer. Has no affect if an
+	 * Removes the given open listener from this viewer. Has no effect if an
 	 * identical listener is not registered.
 	 * 
 	 * @param listener
@@ -1552,7 +1573,7 @@
 	}
 
 	/**
-	 * Removes the given double-click listener from this viewer. Has no affect
+	 * Removes the given double-click listener from this viewer. Has no effect
 	 * if an identical listener is not registered.
 	 * 
 	 * @param listener
@@ -1655,7 +1676,12 @@
 	 * @see org.eclipse.jface.viewers.Viewer#setInput(java.lang.Object)
 	 */
 	public final void setInput(Object input) {
-
+		Control control = getControl();
+		if (control == null || control.isDisposed()) {
+			throw new IllegalStateException(
+					"Need an underlying widget to be able to set the input." + //$NON-NLS-1$
+							"(Has the widget been disposed?)"); //$NON-NLS-1$
+		}
 		try {
 			//		fInChange= true;
 
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StyledCellLabelProvider.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StyledCellLabelProvider.java
index 5547da5..c0bae3a 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StyledCellLabelProvider.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StyledCellLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,8 @@
  *******************************************************************************/
 package org.eclipse.jface.viewers;
 
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.StyledString.Styler;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.StyleRange;
 import org.eclipse.swt.graphics.Color;
@@ -20,11 +22,6 @@
 import org.eclipse.swt.graphics.TextLayout;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Widget;
-
-import org.eclipse.core.runtime.Assert;
-
-import org.eclipse.jface.viewers.StyledString.Styler;
 
 /**
  * A {@link StyledCellLabelProvider} supports styled labels by using owner
@@ -74,8 +71,6 @@
 	private ColumnViewer viewer;
 	private ViewerColumn column;
 	
-	private Widget itemOfLastMeasure;
-	private Object elementOfLastMeasure;
 	private int deltaOfLastMeasure;
 
 	/**
@@ -183,8 +178,6 @@
 	
 		this.viewer= null;
 		this.column= null;
-		this.itemOfLastMeasure = null;
-		this.elementOfLastMeasure = null;
 		
 		super.dispose();
 	}
@@ -278,15 +271,11 @@
 			return;
 		
 		ViewerCell cell= getViewerCell(event, element);
-		boolean applyColors = useColors(event); // returns false because of bug 228376
+		boolean applyColors = useColors(event);
 		
 		TextLayout layout = getSharedTextLayout(event.display);
 		
 		int textWidthDelta = deltaOfLastMeasure = updateTextLayout(layout, cell, applyColors);
-		/* remove-begin if bug 228695 fixed */
-		itemOfLastMeasure = event.item;
-		elementOfLastMeasure = event.item.getData();
-		/* remove-end if bug 228695 fixed */
 
 		event.width += textWidthDelta;
 	}
@@ -299,8 +288,8 @@
 	 */
 	private int updateTextLayout(TextLayout layout, ViewerCell cell,
 			boolean applyColors) {
-		layout.setText(""); //$NON-NLS-1$  //make sure all previous ranges are cleared (see bug 226090)
-		
+		layout.setStyle(null, 0, Integer.MAX_VALUE); // clear old styles
+
 		layout.setText(cell.getText());
 		layout.setFont(cell.getFont()); // set also if null to clear previous usages
 		
@@ -372,28 +361,7 @@
 		Rectangle textBounds = cell.getTextBounds();
 		if (textBounds != null) {
 			TextLayout textLayout= getSharedTextLayout(event.display);
-
-			/* remove-begin if bug 228695 fixed */
-			if (event.item != itemOfLastMeasure || event.item.getData() != elementOfLastMeasure) {
-				// fLayout has not been configured in 'measure()'
-				deltaOfLastMeasure = updateTextLayout(textLayout, cell, applyColors);
-				itemOfLastMeasure = event.item;
-				elementOfLastMeasure = event.item.getData();
-			}
-			/* remove-end if bug 228695 fixed */
-			
-			/* remove-begin if bug 228376 fixed */
-			if (!applyColors) {
-				// need to remove colors for selected elements: measure doesn't provide that information, see bug 228376
-				StyleRange[] styleRanges= cell.getStyleRanges();
-				if (styleRanges != null) {
-					for (int i= 0; i < styleRanges.length; i++) {
-						StyleRange curr = prepareStyleRange(styleRanges[i], applyColors);
-						textLayout.setStyle(curr, curr.start, curr.start + curr.length - 1);
-					}
-				}
-			}
-			/* remove-end if bug 228376 fixed */
+			// text layout already configured in measure(Event, Object)
 			
 			Rectangle layoutBounds = textLayout.getBounds();
 	
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/Viewer.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/Viewer.java
index bca6433..ee9ffb3 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/Viewer.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/Viewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,18 +10,20 @@
  *******************************************************************************/
 package org.eclipse.jface.viewers;
 
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.util.SafeRunnable;
 import org.eclipse.swt.events.HelpEvent;
 import org.eclipse.swt.events.HelpListener;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Item;
 
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.ListenerList;
+
+import org.eclipse.jface.util.SafeRunnable;
+
 /**
  * A viewer is a model-based adapter on a widget.
  * <p>
- * A viewer can be created as an adapter on a pre-existing control (e.g., 
+ * A viewer can be created as an adapter on a pre-existing control (e.g.,
  * creating a <code>ListViewer</code> on an existing <code>List</code> control).
  * All viewers also provide a convenience constructor for creating the control.
  * </p>
@@ -228,7 +230,7 @@
      * Internal hook method called when the input to this viewer is
      * initially set or subsequently changed.
      * <p>
-     * The default implementation does nothing. Subclassers may override 
+     * The default implementation does nothing. Subclassers may override
      * this method to do something when a viewer's input is set.
      * A typical use is populate the viewer.
      * </p>
@@ -248,7 +250,7 @@
 
     /**
      * Removes the given help listener from this viewer.
-     * Has no affect if an identical listener is not registered.
+     * Has no effect if an identical listener is not registered.
      *
      * @param listener a help listener
      */
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerDropAdapter.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerDropAdapter.java
index e9817a5..35bc938 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerDropAdapter.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerDropAdapter.java
@@ -369,12 +369,12 @@
         return feedbackEnabled;
     }
 
-    /**
-     * Returns the object currently selected by the viewer.
-     *
-     * @return the selected object, or <code>null</code> if either no object or 
-     *   multiple objects are selected
-     */
+	/**
+	 * Returns the object currently selected by the viewer.
+	 * 
+	 * @return the selected object or the first element in current selection,
+	 *         and null if no objects are selected
+	 */
     protected Object getSelectedObject() {
         ISelection selection = viewer.getSelection();
         if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/deferred/ChangeQueue.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/deferred/ChangeQueue.java
index 575bde3..e630b28 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/deferred/ChangeQueue.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/deferred/ChangeQueue.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -82,7 +82,6 @@
 	}
 	
 	private LinkedList queue = new LinkedList();
-	private int workload = 0;
 	
 	/**
 	 * Create a change of the given type and elements and enqueue it.
@@ -102,7 +101,6 @@
 		// A SET event makes all previous adds, removes, and sets redundant... so remove
 		// them from the queue
 		if (toQueue.type == SET) {
-			workload = 0;
 			LinkedList newQueue = new LinkedList();
 			for (Iterator iter = queue.iterator(); iter.hasNext();) {
 				Change next = (Change) iter.next();
@@ -112,13 +110,11 @@
 				}
 				
 				newQueue.add(next);
-				workload += next.elements.length;
 			}
 			queue = newQueue;
 		}
 		
 		queue.add(toQueue);
-		workload += toQueue.elements.length;
 	}
 	
 	/**
@@ -127,8 +123,6 @@
 	 */
 	public synchronized Change dequeue() {
 		Change result = (Change)queue.removeFirst();
-		
-		workload -= result.elements.length;
 		return result;
 	}
 	
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/IWizard.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/IWizard.java
index 22602ac..4f9e0d5 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/IWizard.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/IWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.jface.wizard;
 
 import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.TrayDialog;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.widgets.Composite;
@@ -163,15 +164,24 @@
     public String getWindowTitle();
 
     /**
-     * Returns whether help is available for this wizard.
-     * <p>
-     * The result of this method is typically used by the container to
-     * show or hide the Help button.
-     * </p>
-     *
-     * @return <code>true</code> if help is available,
-     *   and <code>false</code> if this wizard is helpless
-     */
+	 * Returns whether help is available for this wizard.
+	 * <p>
+	 * The result of this method is typically used by the container to show or hide a button labeled
+	 * "Help".
+	 * </p>
+	 * <p>
+	 * <strong>Note:</strong> This wizard's container might be a {@link TrayDialog} which provides
+	 * its own help support that is independent of this property.
+	 * </p>
+	 * <p>
+	 * <strong>Note 2:</strong> In the default {@link WizardDialog} implementation, the "Help"
+	 * button only works when {@link org.eclipse.jface.dialogs.IDialogPage#performHelp()} is implemented.
+	 * </p>
+	 * 
+	 * @return <code>true</code> if help is available, <code>false</code> otherwise
+	 * @see TrayDialog#isHelpAvailable()
+	 * @see TrayDialog#setHelpAvailable(boolean)
+	 */
     public boolean isHelpAvailable();
 
     /**
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/ProgressMonitorPart.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/ProgressMonitorPart.java
index db6b7de..c647e23 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/ProgressMonitorPart.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/ProgressMonitorPart.java
@@ -284,6 +284,7 @@
         			arrowCursor.dispose();
         		}
         	});
+        	fStopButton.setEnabled(false);
 			fStopButton.setToolTipText(JFaceResources.getString("ProgressMonitorPart.cancelToolTip")); //$NON-NLS-1$
         }
     }
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/Wizard.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/Wizard.java
index 3484781..da8a8fe 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/Wizard.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/Wizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,9 +14,13 @@
 import java.util.List;
 
 import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.TrayDialog;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.Policy;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.widgets.Composite;
@@ -185,7 +189,12 @@
     public void dispose() {
         // notify pages
         for (int i = 0; i < pages.size(); i++) {
-            ((IWizardPage) pages.get(i)).dispose();
+			try {
+	            ((IWizardPage) pages.get(i)).dispose();
+			} catch (Exception e) {
+				Status status = new Status(IStatus.ERROR, Policy.JFACE, IStatus.ERROR, e.getMessage(), e);
+				Policy.getLog().log(status);
+			}
         }
         // dispose of image
         if (defaultImage != null) {
@@ -402,17 +411,25 @@
     }
 
     /**
-     * Sets whether help is available for this wizard.
-     * <p>
-     * The result of this method is typically used by the container to show or
-     * hide the Help button.
-     * </p>
-     * 
-     * @param b
-     *            <code>true</code> if help is available, and
-     *            <code>false</code> if this wizard is helpless
-     * @see #isHelpAvailable()
-     */
+	 * Sets whether help is available for this wizard.
+	 * <p>
+	 * The result of this method is typically used by the container to show or hide the button
+	 * labeled "Help".
+	 * </p>
+	 * <p>
+	 * <strong>Note:</strong> This wizard's container might be a {@link TrayDialog} which provides
+	 * its own help support that is independent of this property.
+	 * </p>
+	 * <p>
+	 * <strong>Note 2:</strong> In the default {@link WizardDialog} implementation, the "Help"
+	 * button only works when {@link org.eclipse.jface.dialogs.IDialogPage#performHelp()} is implemented.
+	 * </p>
+	 * 
+	 * @param b <code>true</code> if help is available, <code>false</code> otherwise
+	 * @see #isHelpAvailable()
+	 * @see TrayDialog#isHelpAvailable()
+	 * @see TrayDialog#setHelpAvailable(boolean)
+	 */
     public void setHelpAvailable(boolean b) {
         isHelpAvailable = b;
     }
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
index a1de24f..7ee8d81 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,7 +18,29 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ControlEnableState;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.dialogs.IPageChangeProvider;
+import org.eclipse.jface.dialogs.IPageChangedListener;
+import org.eclipse.jface.dialogs.IPageChangingListener;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.PageChangedEvent;
+import org.eclipse.jface.dialogs.PageChangingEvent;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.operation.ModalContext;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.Policy;
+import org.eclipse.jface.util.SafeRunnable;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.events.HelpEvent;
 import org.eclipse.swt.events.HelpListener;
@@ -39,26 +61,6 @@
 import org.eclipse.swt.widgets.Layout;
 import org.eclipse.swt.widgets.Shell;
 
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
-
-import org.eclipse.jface.dialogs.ControlEnableState;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.dialogs.IPageChangeProvider;
-import org.eclipse.jface.dialogs.IPageChangedListener;
-import org.eclipse.jface.dialogs.IPageChangingListener;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.PageChangedEvent;
-import org.eclipse.jface.dialogs.PageChangingEvent;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.operation.ModalContext;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.util.SafeRunnable;
-
 /**
  * A dialog to show a wizard to the end user.
  * <p>
@@ -774,6 +776,20 @@
 				IDialogConstants.BACK_LABEL, false);
 		nextButton = createButton(composite, IDialogConstants.NEXT_ID,
 				IDialogConstants.NEXT_LABEL, false);
+		
+		// make sure screen readers skip visual '<', '>' chars on buttons:
+		final String backReaderText = IDialogConstants.BACK_LABEL.replace('<', ' ');
+		backButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+			public void getName(AccessibleEvent e) {
+				e.result = backReaderText;
+			}
+		});
+		final String nextReaderText = IDialogConstants.NEXT_LABEL.replace('>', ' ');
+		nextButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+			public void getName(AccessibleEvent e) {
+				e.result = nextReaderText;
+			}
+		});
 		return composite;
 	}
 
@@ -856,7 +872,12 @@
 		// inform wizards
 		for (int i = 0; i < createdWizards.size(); i++) {
 			IWizard createdWizard = (IWizard) createdWizards.get(i);
-			createdWizard.dispose();
+			try {
+				createdWizard.dispose();
+			} catch (Exception e) {
+				Status status = new Status(IStatus.ERROR, Policy.JFACE, IStatus.ERROR, e.getMessage(), e);
+				Policy.getLog().log(status);
+			}
 			// Remove this dialog as a parent from the managed wizard.
 			// Note that we do this after calling dispose as the wizard or
 			// its pages may need access to the container during
diff --git a/bundles/org.eclipse.ui.browser/.classpath b/bundles/org.eclipse.ui.browser/.classpath
index ce73933..304e861 100644
--- a/bundles/org.eclipse.ui.browser/.classpath
+++ b/bundles/org.eclipse.ui.browser/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/bundles/org.eclipse.ui.browser/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.ui.browser/.settings/org.eclipse.jdt.core.prefs
index 786358a..5170256 100644
--- a/bundles/org.eclipse.ui.browser/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.ui.browser/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Tue May 09 14:44:18 EDT 2006
+#Fri Jun 24 22:27:16 CEST 2011
 eclipse.preferences.version=1
 org.eclipse.jdt.core.codeComplete.argumentPrefixes=
 org.eclipse.jdt.core.codeComplete.argumentSuffixes=
@@ -8,11 +8,11 @@
 org.eclipse.jdt.core.codeComplete.localSuffixes=
 org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
 org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
@@ -21,4 +21,4 @@
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
 org.eclipse.jdt.core.compiler.problem.unusedLocal=error
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/bundles/org.eclipse.ui.browser/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.browser/META-INF/MANIFEST.MF
index 90cce12..15bd1f5 100644
--- a/bundles/org.eclipse.ui.browser/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.browser/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.browser; singleton:=true
-Bundle-Version: 3.3.0.qualifier
+Bundle-Version: 3.4.0.qualifier
 Bundle-Activator: org.eclipse.ui.internal.browser.WebBrowserUIPlugin
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
@@ -14,5 +14,5 @@
  org.eclipse.ui;bundle-version="[3.6.0,4.0.0)"
 Eclipse-LazyStart: true
 Import-Package: com.ibm.icu.text
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.ui.browser/plugin.properties b/bundles/org.eclipse.ui.browser/plugin.properties
index c3bc328..dd6e395 100644
--- a/bundles/org.eclipse.ui.browser/plugin.properties
+++ b/bundles/org.eclipse.ui.browser/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2009 IBM Corporation and others.
+# Copyright (c) 2005, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@
 viewWebBrowserTitle=Internal Web Browser
 viewWebBrowserSupportTitle= Web Browser
 preferenceWebBrowserTitle=Web Browser
-preferenceKeywords=HTML Firefox Mozilla Netscape Internet Opera Safari
+preferenceKeywords=HTML Firefox Mozilla Internet Opera Safari Chrome
 
 
 command.openBrowser.name=Open Browser
@@ -27,11 +27,8 @@
 commandParameter.openBrowser.tooltip.name=Browser Tooltip
 
 browserInternetExplorer=Internet Explorer
-browserNetscape4=Netscape Communicator v4.x
-browserNetscape7=Netscape v7.x
-browserNetscape=Netscape
-browserMozilla=Mozilla
 browserOpera=Opera
+browserChrome=Chrome
 browserKonqueror=Konqueror
 browserGaleon=Galeon
 browserFirefox=Firefox
diff --git a/bundles/org.eclipse.ui.browser/plugin.xml b/bundles/org.eclipse.ui.browser/plugin.xml
index cb73929..ddb5200 100644
--- a/bundles/org.eclipse.ui.browser/plugin.xml
+++ b/bundles/org.eclipse.ui.browser/plugin.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.0"?>
 <!--
-    Copyright (c) 2005, 2010 IBM Corporation and others.
+    Copyright (c) 2005, 2011 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
     which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
     Contributors:
          IBM Corporation - initial API and implementation
           Martin Oberhuber (Wind River) - [292882] Default Browser on Solaris
+          Martin Oberhuber (Wind River) - [293175] Default external web browser not found when running 32-bit Eclipse on 64-bit Ubuntu 9.04
  -->
 
 <plugin>
@@ -84,31 +85,14 @@
    <extension point="org.eclipse.ui.browser.browsers">
       <!-- Linux -->
       <browser
-         id="org.eclipse.ui.browser.mozilla"
-         name="%browserMozilla"
-         os="linux,aix,hpux,solaris"
-         executable="mozilla"
-         factoryclass="org.eclipse.ui.internal.browser.browsers.MozillaFactory">
-         <location>usr/bin/mozilla</location>
-         <location>usr/X11/bin/mozilla</location>
-         <location>usr/sfw/lib/mozilla/mozilla</location>
-      </browser>
-      <browser
-         id="org.eclipse.ui.browser.netscape"
-         name="%browserNetscape"
-         os="linux,aix,hpux,solaris"
-         executable="netscape"
-         factoryclass="org.eclipse.ui.internal.browser.browsers.MozillaFactory">
-         <location>usr/bin/netscape</location>
-         <location>usr/X11R6/bin/netscape</location>
-         <location>usr/dt/bin/netscape</location>
-      </browser>
-      <browser
          id="org.eclipse.ui.browser.firefox"
          name="%browserFirefox"
          os="linux,aix,hpux,solaris"
          executable="firefox"
          factoryclass="org.eclipse.ui.internal.browser.browsers.MozillaFactory">
+         <location>
+            usr/bin/firefox
+         </location>
       </browser>
       <browser
          id="org.eclipse.ui.browser.konqueror"
@@ -127,54 +111,43 @@
       
       <!-- Windows -->
       <browser
-         id="org.eclipse.ui.browser.mozilla"
-         name="%browserMozilla"
-         os="Win32"
-         executable="mozilla.exe"
-         factoryclass="org.eclipse.ui.internal.browser.browsers.MozillaFactory">
-         <location>Program Files\mozilla.org\Mozilla\mozilla.exe</location>
-      </browser>
-      <browser
-         id="org.eclipse.ui.browser.netscape7"
-         name="%browserNetscape7"
-         os="Win32"
-         executable="netsc.exe"
-         factoryclass="org.eclipse.ui.internal.browser.browsers.MozillaFactory">
-         <location>Program Files\Netscape\Netscape\netscp.exe</location>
-      </browser>
-      <browser
-         id="org.eclipse.ui.browser.netscape4"
-         name="%browserNetscape4"
-         os="Win32"
-         executable="netscape.exe"
-         factoryclass="org.eclipse.ui.internal.browser.browsers.MozillaFactory">
-         <location>Program Files\Netscape\Communicator\Program\netscape.exe</location>
-      </browser>
-      <browser
          id="org.eclipse.ui.browser.firefox"
          name="%browserFirefox"
          os="Win32"
          executable="firefox.exe"
          factoryclass="org.eclipse.ui.internal.browser.browsers.MozillaFactory">
-         <location>Program Files\mozilla.org\Firefox\firefox.exe</location>
-         <location>Program Files\Mozilla Firefox\firefox.exe</location>
+         <location>%%ProgramFiles%\mozilla.org\Firefox\firefox.exe</location>
+         <location>%%ProgramFiles(x86)%\mozilla.org\Firefox\firefox.exe</location>
+         <location>%%ProgramW6432%\mozilla.org\Firefox\firefox.exe</location>
+         
+         <location>%%ProgramFiles%\Mozilla Firefox\firefox.exe</location>
+         <location>%%ProgramFiles(x86)%\Mozilla Firefox\firefox.exe</location>
+         <location>%%ProgramW6432%\Mozilla Firefox\firefox.exe</location>
       </browser>
       <browser
          id="org.eclipse.ui.browser.ie"
          name="%browserInternetExplorer"
          os="Win32"
          executable="iexplore.exe">
-         <location>Program Files\Internet Explorer\iexplore.exe</location>
+         <location>%%ProgramFiles%\Internet Explorer\iexplore.exe</location>
+         <location>%%ProgramFiles(x86)%\Internet Explorer\iexplore.exe</location>
+         <location>%%ProgramW6432%\Internet Explorer\iexplore.exe</location>
+      </browser>
+      <browser
+         id="org.eclipse.ui.browser.chrome"
+         name="%browserChrome"
+         os="Win32"
+         executable="chrome.exe">
+         <location>%%LOCALAPPDATA%\Google\Chrome\Application\chrome.exe</location>
       </browser>
       <browser
          id="org.eclipse.ui.browser.opera"
          name="%browserOpera"
          os="Win32"
          executable="opera.exe">
-         <location>Program Files\Opera7\opera.exe</location>
-         <location>
-            Program Files\Opera\opera.exe
-         </location>
+         <location>%%ProgramFiles%\Opera\opera.exe</location>
+         <location>%%ProgramFiles(x86)%\Opera\opera.exe</location>
+         <location>%%ProgramW6432%\Opera\opera.exe</location>
       </browser>
       
       <!-- Mac -->
@@ -202,14 +175,6 @@
          <location>Applications/Safari.app/Contents/MacOS/Safari</location>
       </browser> -->
       <browser
-         id="org.eclipse.ui.browser.mozilla"
-         name="%browserMozilla"
-         os="MacOSX"
-         executable="mozilla-bin"
-         factoryclass="org.eclipse.ui.internal.browser.browsers.MozillaFactory">
-         <location>Applications/Mozilla.app/Contents/MacOS/mozilla-bin</location>
-      </browser>
-      <browser
          id="org.eclipse.ui.browser.ie"
          name="%browserInternetExplorer"
          os="MacOSX"
@@ -256,4 +221,4 @@
             id="org.eclipse.ui.browser.elementFactory">
       </factory>
    </extension>
-</plugin>
\ No newline at end of file
+</plugin>
diff --git a/bundles/org.eclipse.ui.browser/schema/browsers.exsd b/bundles/org.eclipse.ui.browser/schema/browsers.exsd
index 0c67e2d..3bee277 100644
--- a/bundles/org.eclipse.ui.browser/schema/browsers.exsd
+++ b/bundles/org.eclipse.ui.browser/schema/browsers.exsd
@@ -2,9 +2,9 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.ui.browser" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.ui.browser" id="browsers" name="Browsers"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          For providing web browsers capable of displaying html documents at a given URL.
       </documentation>
@@ -12,9 +12,9 @@
 
    <element name="extension">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element />
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <sequence minOccurs="0" maxOccurs="unbounded">
@@ -39,9 +39,9 @@
                <documentation>
                   
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -69,9 +69,9 @@
                <documentation>
                   the implementation class for the browser factory. This class must implement the &lt;samp&gt;org.eclipse.ui.browser.BrowserFactory&lt;/samp&gt; interface.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.help.browser.IBrowserFactory"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="name" type="string" use="required">
@@ -79,9 +79,9 @@
                <documentation>
                   the name of the browser (translatable).
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="os" type="string">
@@ -104,24 +104,26 @@
    <element name="location" type="string">
       <annotation>
          <documentation>
-            Default install locations. these locations should not contain the initial path, as it will be substituted with all known drives. (e.g. on Windows, a location of &quot;test.exe&quot; would look for &quot;c:\test.exe&quot;, &quot;d:\test.exe&quot;, etc. for all known drives.
+            Default install locations. These locations should not contain the initial path, as it will be substituted with all known drives. E.g. on Windows, a location of &quot;test.exe&quot; would look for &quot;c:\test.exe&quot;, &quot;d:\test.exe&quot;, etc. for all known drives.
+&lt;p&gt;
+On Windows, the path can also start with an environment variable, e.g. &quot;%%ProgramFiles%\folder\test.exe&quot;. Note the double % at the beginning to prevent localization.&lt;/p&gt;
          </documentation>
       </annotation>
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="since"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          3.0 (originally added in release 2.0 as org.eclipse.help.ui.browser)
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The following is a sample usage of the browsers extension point:
 
@@ -130,13 +132,13 @@
  &lt;extension point=&quot;org.eclipse.ui.browser.browsers&quot;&gt;
   &lt;browser
      id=&quot;org.eclipse.ui.browser.firefox&quot;
-     name=Firefox
+     name=&quot;Firefox&quot;
      os=&quot;Win32&quot;
      executable=&quot;firefox.exe&quot;
      factoryclass=&quot;org.eclipse.ui.internal.browser.browsers.MozillaFactory&quot;&gt;
-     &lt;location&gt;Program Files\mozilla.org\Firefox\firefox.exe&lt;/location&gt;
-     &lt;location&gt;Program Files\Mozilla Firefox\firefox.exe&lt;/location&gt;
-   &lt;/browser&gt;
+       &lt;location&gt;%%ProgramFiles%\Mozilla Firefox\firefox.exe&lt;/location&gt;
+       &lt;location&gt;%%ProgramFiles(x86)%\Mozilla Firefox\firefox.exe&lt;/location&gt;
+  &lt;/browser&gt;
  &lt;/extension&gt;
 &lt;/pre&gt;
 &lt;/p&gt;
@@ -144,9 +146,9 @@
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiInfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The supplied factory class must implement the &lt;samp&gt;org.eclipse.help.browser.IBrowserFactory&lt;/samp&gt; interface.
 Methods in that interface determine whether the factory is available on the given system, i.e. is capable
@@ -155,9 +157,9 @@
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The &lt;samp&gt;org.eclipse.help.base&lt;/samp&gt; and &lt;samp&gt;org.eclipse.help.ui&lt;/samp&gt; plug-ins contain implementation of browsers on common platforms.
 Other plug-ins can provide different implementations.  In the preferences, the user can select the default
@@ -166,9 +168,9 @@
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="copyright"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          Copyright (c) 2000, 2005 IBM Corporation and others.&lt;br&gt;
 All rights reserved. This program and the accompanying materials are made 
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorWorkingCopy.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorWorkingCopy.java
index a6f4234..cd3193d 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorWorkingCopy.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorWorkingCopy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -63,7 +63,6 @@
 	public IBrowserDescriptor save() {
 		if (browser != null) {
 			browser.setInternal(this);
-			BrowserManager.getInstance().saveBrowsers();
 		} else {
 			browser = new BrowserDescriptor();
 			browser.setInternal(this);
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserExt.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserExt.java
index 322932e..12627e9 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserExt.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserExt.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -66,7 +66,7 @@
 	}
 
 	public String[] getDefaultLocations() {
-		List list = new ArrayList();
+		List<String> list = new ArrayList<String>();
 		IConfigurationElement[] children = element.getChildren("location"); //$NON-NLS-1$
 		if (children != null) {
 			int size = children.length;
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserLauncher.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserLauncher.java
index bf39238..a450dc3 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserLauncher.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserLauncher.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,10 +30,10 @@
 		try {
 			if (WebBrowserPreference.getBrowserChoice()== WebBrowserPreference.INTERNAL)
 				support.createBrowser(IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR,
-						file.toPortableString(), null, null).openURL(file.toFile().toURL());
+						file.toPortableString(), null, null).openURL(file.toFile().toURI().toURL());
 			else
 				support.createBrowser(IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR,
-						DefaultBrowserSupport.SHARED_ID, null, null).openURL(file.toFile().toURL());
+						DefaultBrowserSupport.SHARED_ID, null, null).openURL(file.toFile().toURI().toURL());
 		}
 		catch (MalformedURLException e) {
 			// ignore
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserManager.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserManager.java
index 1e54882..10113aa 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserManager.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@
 
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
@@ -30,7 +31,7 @@
  * 
  */
 public class BrowserManager extends Observable {
-	protected List browsers;
+	protected List<IBrowserDescriptor> browsers;
 	protected IBrowserDescriptor currentBrowser;
 	
 	private IPreferenceChangeListener pcl;
@@ -60,7 +61,7 @@
 		};
 		
 
-	    InstanceScope instanceScope = new InstanceScope();
+	    IScopeContext instanceScope = InstanceScope.INSTANCE;
 	    IEclipsePreferences prefs = instanceScope.getNode(WebBrowserUIPlugin.PLUGIN_ID);
 	    prefs.addPreferenceChangeListener(pcl);
 	}
@@ -72,7 +73,7 @@
 	}
 
 	protected void dispose() {
-	    InstanceScope instanceScope = new InstanceScope();
+	    IScopeContext instanceScope = InstanceScope.INSTANCE;
 		IEclipsePreferences prefs = instanceScope.getNode(WebBrowserUIPlugin.PLUGIN_ID);
 		prefs.removePreferenceChangeListener(pcl);
 	}
@@ -81,19 +82,19 @@
 		return new BrowserDescriptorWorkingCopy();
 	}	
 
-	public List getWebBrowsers() {
+	public List<IBrowserDescriptor> getWebBrowsers() {
 		if (browsers == null)
 			loadBrowsers();
-		return new ArrayList(browsers);
+		return new ArrayList<IBrowserDescriptor>(browsers);
 	}
 
-	protected void loadBrowsers() {
+	public void loadBrowsers() {
 		Trace.trace(Trace.FINEST, "Loading web browsers"); //$NON-NLS-1$
 		
 		String xmlString = Platform.getPreferencesService().getString
 		    (WebBrowserUIPlugin.PLUGIN_ID,  "browsers", null, null); //$NON-NLS-1$
 		if (xmlString != null && xmlString.length() > 0) {
-			browsers = new ArrayList();
+			browsers = new ArrayList<IBrowserDescriptor>();
 			
 			try {
 				ByteArrayInputStream in = new ByteArrayInputStream(xmlString.getBytes("utf-8")); //$NON-NLS-1$
@@ -114,7 +115,7 @@
 				
 				Integer current = memento.getInteger("current"); //$NON-NLS-1$
 				if (current != null) {
-					currentBrowser = (IBrowserDescriptor) browsers.get(current.intValue()); 
+					currentBrowser = browsers.get(current.intValue()); 
 				}
 			} catch (Exception e) {
 				Trace.trace(Trace.WARNING, "Could not load browsers: " + e.getMessage()); //$NON-NLS-1$
@@ -132,7 +133,7 @@
 		}
 		
 		if (currentBrowser == null && browsers.size() > 0)
-			currentBrowser = (IBrowserDescriptor) browsers.get(0);
+			currentBrowser = browsers.get(0);
 		setChanged();
 		notifyObservers();
 	}
@@ -142,7 +143,7 @@
 			ignorePreferenceChanges = true;
 			XMLMemento memento = XMLMemento.createWriteRoot("web-browsers"); //$NON-NLS-1$
 
-			Iterator iterator = browsers.iterator();
+			Iterator<IBrowserDescriptor> iterator = browsers.iterator();
 			while (iterator.hasNext()) {
 				Object obj = iterator.next();
 				if (obj instanceof BrowserDescriptor) {
@@ -159,7 +160,7 @@
 			StringWriter writer = new StringWriter();
 			memento.save(writer);
 			String xmlString = writer.getBuffer().toString();
-			InstanceScope instanceScope = new InstanceScope();
+			IScopeContext instanceScope = InstanceScope.INSTANCE;
 		    IEclipsePreferences prefs = instanceScope.getNode(WebBrowserUIPlugin.PLUGIN_ID);
 			prefs.put("browsers", xmlString); //$NON-NLS-1$
 			prefs.flush();
@@ -170,7 +171,7 @@
 	}
 
 	protected void setupDefaultBrowsers() {
-		browsers = new ArrayList();
+		browsers = new ArrayList<IBrowserDescriptor>();
 
 		// add system browser
 		if (WebBrowserUtil.canUseSystemBrowser()) {
@@ -183,7 +184,7 @@
 		
 		// by default, if internal is there, that is current, else set the first external one
 		if (!browsers.isEmpty() && currentBrowser == null)
-			currentBrowser = (IBrowserDescriptor) browsers.get(0);
+			currentBrowser = browsers.get(0);
 	}
 
 	protected void addBrowser(IBrowserDescriptor browser) {
@@ -193,8 +194,6 @@
 			browsers.add(browser);
 		if (browsers.size() == 1)
 			setCurrentWebBrowser(browser);
-		
-		saveBrowsers();
 	}
 
 	protected void removeWebBrowser(IBrowserDescriptor browser) {
@@ -205,7 +204,7 @@
 		if (currentBrowser == null || currentBrowser.equals(browser)) {
 			currentBrowser = null;
 			if (browsers.size() > 0)
-				currentBrowser = (IBrowserDescriptor) browsers.get(0);
+				currentBrowser = browsers.get(0);
 		}
 	}
 
@@ -214,7 +213,7 @@
 			loadBrowsers();
 
 		if (currentBrowser == null && browsers.size() > 0)
-			return (IBrowserDescriptor) browsers.get(0);
+			return browsers.get(0);
 		
 		return currentBrowser; 
 	}
@@ -229,4 +228,5 @@
 			throw new IllegalArgumentException();
 		saveBrowsers();
 	}
+	
 }
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserViewer.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserViewer.java
index d42d041..29d178e 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserViewer.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -110,7 +110,7 @@
 
     protected boolean loading;
 
-    protected static java.util.List history;
+    protected static java.util.List<String> history;
 
     protected Browser browser;
     
@@ -124,7 +124,7 @@
 
     protected int progressWorked = 0;
 	 
-	 protected List propertyListeners;
+	 protected List<PropertyChangeListener> propertyListeners;
 
     /**
      * Under development - do not use
@@ -467,7 +467,7 @@
 		 */
 		public void addPropertyChangeListener(PropertyChangeListener listener) {
 			if (propertyListeners == null)
-				propertyListeners = new ArrayList();
+				propertyListeners = new ArrayList<PropertyChangeListener>();
 			propertyListeners.add(listener);
 		}
 
@@ -670,7 +670,7 @@
         int found = -1;
         int size = history.size();
         for (int i = 0; i < size; i++) {
-            String s = (String) history.get(i);
+            String s = history.get(i);
             if (s.equals(url)) {
                 found = i;
                 break;
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/DefaultBrowserSupport.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/DefaultBrowserSupport.java
index 5334e25..ed86417 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/DefaultBrowserSupport.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/DefaultBrowserSupport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,7 +29,7 @@
 	static final String DEFAULT_ID_BASE = "org.eclipse.ui.defaultBrowser"; //$NON-NLS-1$
 	private static final String HELP_BROWSER_ID = "org.eclipse.help.ui"; //$NON-NLS-1$
 
-	protected HashMap browserIdMap = new HashMap();
+	protected HashMap<String, Object> browserIdMap = new HashMap<String, Object>();
 
 	protected static DefaultBrowserSupport instance;
 
@@ -58,6 +58,7 @@
 			if (obj instanceof IWebBrowser)
 				browser = (IWebBrowser) obj;
 			else if (obj instanceof HashMap) {
+				@SuppressWarnings("rawtypes")
 				HashMap wmap = (HashMap) obj;
 				IWorkbenchWindow window = PlatformUI.getWorkbench()
 						.getActiveWorkbenchWindow();
@@ -139,9 +140,10 @@
 			IWorkbenchWindow window = PlatformUI.getWorkbench()
 					.getActiveWorkbenchWindow();
 			Integer key = getWindowKey(window);
-			HashMap wmap = (HashMap) browserIdMap.get(browserId);
+			@SuppressWarnings("unchecked")
+			HashMap<Integer, IWebBrowser> wmap = (HashMap<Integer, IWebBrowser>) browserIdMap.get(browserId);
 			if (wmap == null) {
-				wmap = new HashMap();
+				wmap = new HashMap<Integer, IWebBrowser>();
 				browserIdMap.put(browserId, wmap);
 			}
 			wmap.put(key, webBrowser);
@@ -179,6 +181,7 @@
 			Integer key = ((InternalBrowserInstance) browser).getWindowKey();
 			Object entry = browserIdMap.get(baseId);
 			if (entry != null && entry instanceof HashMap) {
+				@SuppressWarnings("rawtypes")
 				HashMap wmap = (HashMap) entry;
 				wmap.remove(key);
 				if (wmap.isEmpty())
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ExternalBrowserInstance.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ExternalBrowserInstance.java
index f035d28..bcf0c4e 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ExternalBrowserInstance.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ExternalBrowserInstance.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,20 +31,7 @@
 	}
 
 	public void openURL(URL url) throws PartInitException {
-		String urlText = null;
-
-		if (url != null)
-			urlText = url.toExternalForm();
-
-		// change spaces to "%20"
-		if (urlText != null) { 
-			int index = urlText.indexOf(" "); //$NON-NLS-1$
-			while (index >= 0) {
-				urlText = urlText.substring(0, index)
-						+ "%20" + urlText.substring(index + 1); //$NON-NLS-1$
-				index = urlText.indexOf(" "); //$NON-NLS-1$
-			}
-		}
+		String urlText = url.toExternalForm();
 
 		String location = browser.getLocation();
 		String parameters = browser.getParameters();
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserExt.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserExt.java
index 67d1bc3..6cc12d6 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserExt.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserExt.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ImageResource.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ImageResource.java
index 2346e00..ab2fe2f 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ImageResource.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ImageResource.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@
 
 	// map of image descriptors since these
 	// will be lost by the image registry
-	private static Map imageDescriptors;
+	private static Map<String, ImageDescriptor> imageDescriptors;
 
 	private static Image[] busyImages;
 
@@ -105,7 +105,7 @@
 	public static ImageDescriptor getImageDescriptor(String key) {
 		if (imageRegistry == null)
 			initializeImageRegistry();
-		return (ImageDescriptor) imageDescriptors.get(key);
+		return imageDescriptors.get(key);
 	}
 
 	/**
@@ -113,7 +113,7 @@
 	 */
 	protected static void initializeImageRegistry() {
 		imageRegistry = new ImageRegistry();
-		imageDescriptors = new HashMap();
+		imageDescriptors = new HashMap<String, ImageDescriptor>();
 	
 		// load Web browser images
 		registerImage(IMG_ELCL_NAV_BACKWARD, URL_ELCL + "nav_backward.gif"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/InternalBrowserViewInstance.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/InternalBrowserViewInstance.java
index 2bd9f8e..4af1afd 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/InternalBrowserViewInstance.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/InternalBrowserViewInstance.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,7 +30,14 @@
 		if (view == null) {
             try {
 				view = (WebBrowserView)page.showView(WebBrowserView.WEB_BROWSER_VIEW_ID, getId(), IWorkbenchPage.VIEW_CREATE);
-                hookPart(page, view);
+				if (tooltip != null && tooltip.length() > 0) {
+				    view.setBrowserViewTooltip(tooltip);
+				}
+				if (name != null && name.length() > 0) {
+				    view.setBrowserViewName(name);
+				}
+				hookPart(page, view);
+                
 			} catch (Exception e) {
 				Trace.trace(Trace.SEVERE, "Error opening Web browser", e); //$NON-NLS-1$
 			}
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/SystemBrowserInstance.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/SystemBrowserInstance.java
index 4cacdd6..8f401f3 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/SystemBrowserInstance.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/SystemBrowserInstance.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,20 +26,7 @@
 	}
 
 	public void openURL(URL url) throws PartInitException {
-		String urlText = null;
-
-		if (url != null)
-			urlText = url.toExternalForm();
-
-		// change spaces to "%20"
-		if (urlText != null && !WebBrowserUtil.isWindows()) {
-			int index = urlText.indexOf(" "); //$NON-NLS-1$
-			while (index >= 0) {
-				urlText = urlText.substring(0, index) + "%20" //$NON-NLS-1$
-						+ urlText.substring(index + 1);
-				index = urlText.indexOf(" "); //$NON-NLS-1$
-			}
-		}
+		String urlText = url.toExternalForm();
 		Trace.trace(Trace.FINEST, "Launching system Web browser: " + urlText); //$NON-NLS-1$
 		Program program = Program.findProgram("html"); //$NON-NLS-1$
 		if (program != null) {
@@ -47,6 +34,6 @@
 				return;
 		}
 		if (!Program.launch(urlText))
-			throw new PartInitException(NLS.bind(Messages.errorCouldNotLaunchWebBrowser, url.toExternalForm()));
+			throw new PartInitException(NLS.bind(Messages.errorCouldNotLaunchWebBrowser, urlText));
 	}
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditor.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditor.java
index dc26129..f1c0a0e 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditor.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -177,7 +177,7 @@
 			URL url = null;
 			try {
 				if (path != null)
-					url = path.toFile().toURL();
+					url = path.toFile().toURI().toURL();
 				initialURL = url.toExternalForm();
 			} catch (Exception e) {
 				Trace.trace(Trace.SEVERE, "Error getting URL to file"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditorInput.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditorInput.java
index eb2e3e9..6e6637f 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditorInput.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditorInput.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -219,6 +219,7 @@
 	 * @return a object castable to the given class, or <code>null</code> if
 	 *         this object does not have an adapter for the given class
 	 */
+	@SuppressWarnings("rawtypes")
 	public Object getAdapter(Class adapter) {
 		return null;
 	}
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreference.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreference.java
index e2f575c..7229540 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreference.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@
 import java.util.StringTokenizer;
 
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.ui.IEditorDescriptor;
@@ -62,11 +63,11 @@
 	 * 
 	 * @return java.util.List
 	 */
-	public static List getInternalWebBrowserHistory() {
+	public static List<String> getInternalWebBrowserHistory() {
 		String temp = getPreferenceStore().getString(
 				PREF_INTERNAL_WEB_BROWSER_HISTORY);
 		StringTokenizer st = new StringTokenizer(temp, "|*|"); //$NON-NLS-1$
-		List l = new ArrayList();
+		List<String> l = new ArrayList<String>();
 		while (st.hasMoreTokens()) {
 			String s = st.nextToken();
 			l.add(s);
@@ -80,17 +81,17 @@
 	 * @param list
 	 *            the history
 	 */
-	public static void setInternalWebBrowserHistory(List list) {
+	public static void setInternalWebBrowserHistory(List<String> list) {
 		StringBuffer sb = new StringBuffer();
 		if (list != null) {
-			Iterator iterator = list.iterator();
+			Iterator<String> iterator = list.iterator();
 			while (iterator.hasNext()) {
-				String s = (String) iterator.next();
+				String s = iterator.next();
 				sb.append(s);
 				sb.append("|*|"); //$NON-NLS-1$
 			}
 		}
-		InstanceScope instanceScope = new InstanceScope();
+		IScopeContext instanceScope = InstanceScope.INSTANCE;
 		IEclipsePreferences prefs = instanceScope.getNode(WebBrowserUIPlugin.PLUGIN_ID);
 		prefs.put(PREF_INTERNAL_WEB_BROWSER_HISTORY,
 				sb.toString());
@@ -140,7 +141,7 @@
 	 *            </code>INTERNAL</code>, <code>SYSTEM</code> and <code>EXTERNAL</code>
 	 */
 	public static void setBrowserChoice(int choice) {
-		InstanceScope instanceScope = new InstanceScope();
+		IScopeContext instanceScope = InstanceScope.INSTANCE;
 		IEclipsePreferences prefs = instanceScope.getNode(WebBrowserUIPlugin.PLUGIN_ID);
 		prefs.putInt(PREF_BROWSER_CHOICE, choice);
 		try {
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreferencePage.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreferencePage.java
index 6f07fea..0857fa7 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreferencePage.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,17 +7,20 @@
  *
  * Contributors:
  *     IBM Corporation - Initial API and implementation
+ * Martin Oberhuber (Wind River) - [293159] cyclic link when searching browser
  *******************************************************************************/
 package org.eclipse.ui.internal.browser;
 
 import java.io.File;
+import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 
 import org.eclipse.core.runtime.IProgressMonitor;
-
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.ProgressMonitorDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -86,11 +89,11 @@
 
 	class BrowserContentProvider implements IStructuredContentProvider {
 		public Object[] getElements(Object inputElement) {
-			List list = new ArrayList();
-			Iterator iterator = BrowserManager.getInstance().getWebBrowsers()
+			List<IBrowserDescriptor> list = new ArrayList<IBrowserDescriptor>();
+			Iterator<IBrowserDescriptor> iterator = BrowserManager.getInstance().getWebBrowsers()
 					.iterator();
 			while (iterator.hasNext()) {
-				IBrowserDescriptor browser = (IBrowserDescriptor) iterator
+				IBrowserDescriptor browser = iterator
 						.next();
 				list.add(browser);
 			}
@@ -302,7 +305,7 @@
 							BrowserManager manager = BrowserManager.getInstance();
 							if (browser2 == checkedBrowser) {
 								if (manager.browsers.size() > 0) {
-									checkedBrowser = (IBrowserDescriptor) manager.browsers.get(0);
+									checkedBrowser = manager.browsers.get(0);
 									tableViewer.setChecked(checkedBrowser, true);
 								}
 							}
@@ -383,7 +386,7 @@
 					BrowserManager manager = BrowserManager.getInstance();
 					if (browser2 == checkedBrowser) {
 						if (manager.browsers.size() > 0) {
-							checkedBrowser = (IBrowserDescriptor) manager.browsers.get(0);
+							checkedBrowser = manager.browsers.get(0);
 							tableViewer.setChecked(checkedBrowser, true);
 						}
 					}
@@ -398,8 +401,8 @@
 		data.verticalIndent = 9;
 		search.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				final List foundBrowsers = new ArrayList();
-				final List existingPaths = WebBrowserUtil
+				final List<IBrowserDescriptorWorkingCopy> foundBrowsers = new ArrayList<IBrowserDescriptorWorkingCopy>();
+				final List<String> existingPaths = WebBrowserUtil
 						.getExternalBrowserPaths();
 
 				// select a target directory for the search
@@ -418,7 +421,7 @@
 					public void run(IProgressMonitor monitor) {
 						monitor.beginTask(Messages.searchingTaskName,
 								IProgressMonitor.UNKNOWN);
-						search(rootDir, existingPaths, foundBrowsers, monitor);
+						search(rootDir, existingPaths, foundBrowsers, new HashSet<String>(), monitor);
 						monitor.done();
 					}
 				};
@@ -439,16 +442,16 @@
 				if (pm.getProgressMonitor().isCanceled())
 					return;
 
-				List browsersToCreate = foundBrowsers;
+				List<IBrowserDescriptorWorkingCopy> browsersToCreate = foundBrowsers;
 
 				if (browsersToCreate.isEmpty()) { // no browsers found
 					WebBrowserUtil.openMessage(Messages.searchingNoneFound);
 					return;
 				}
 
-				Iterator iterator = browsersToCreate.iterator();
+				Iterator<IBrowserDescriptorWorkingCopy> iterator = browsersToCreate.iterator();
 				while (iterator.hasNext()) {
-					IBrowserDescriptorWorkingCopy browser2 = (IBrowserDescriptorWorkingCopy) iterator
+					IBrowserDescriptorWorkingCopy browser2 = iterator
 							.next();
 					browser2.save();
 				}
@@ -529,16 +532,26 @@
 		}
 	}
 
-	protected static void search(File directory, List existingPaths,
-			List foundBrowsers, IProgressMonitor monitor) {
+	protected static void search(File directory, List<String> existingPaths,
+			List<IBrowserDescriptorWorkingCopy> foundBrowsers, Set<String> directoriesVisited, IProgressMonitor monitor) {
 		if (monitor.isCanceled())
 			return;
+		try {
+			//bug 293159: protect against recursion due to cyclic symbolic link
+			String canonicalPath = directory.getCanonicalPath();
+			if (!directoriesVisited.add(canonicalPath)) {
+				//already been here
+				return;
+			}
+		} catch(IOException ioe) {
+			/*ignore*/
+		}
 
 		monitor.subTask(NLS.bind(Messages.searching,
 				new String[] { Integer.toString(foundBrowsers.size()), directory.getAbsolutePath()}));
 		
 		String[] names = directory.list();
-		List subDirs = new ArrayList();
+		List<File> subDirs = new ArrayList<File>();
 
 		for (int i = 0; i < names.length; i++) {
 			if (monitor.isCanceled())
@@ -561,8 +574,8 @@
 			}
 		}
 		while (!subDirs.isEmpty()) {
-			File subDir = (File) subDirs.remove(0);
-			search(subDir, existingPaths, foundBrowsers, monitor);
+			File subDir = subDirs.remove(0);
+			search(subDir, existingPaths, foundBrowsers, directoriesVisited, monitor);
 			if (monitor.isCanceled()) {
 				return;
 			}
@@ -600,9 +613,17 @@
 		else
 			choice = WebBrowserPreference.EXTERNAL;
 		WebBrowserPreference.setBrowserChoice(choice);
-		if (checkedBrowser != null)
+		if (checkedBrowser != null) {
 			BrowserManager.getInstance().setCurrentWebBrowser(checkedBrowser);
+		} else {
+			BrowserManager.getInstance().saveBrowsers();
+		}
 
 		return true;
 	}
+	
+	public boolean performCancel() {
+		BrowserManager.getInstance().loadBrowsers();
+		return super.performCancel();
+	}
 }
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUIPlugin.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUIPlugin.java
index 79a969b..4631747 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUIPlugin.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUIPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@
 	private static WebBrowserUIPlugin singleton;
 	
 	// cached copy of all browsers
-	private static List browsers;
+	private static List<BrowserExt> browsers;
 
 	/**
 	 * Create the WebBrowserUIPlugin
@@ -112,7 +112,7 @@
 		IConfigurationElement[] cf = registry.getConfigurationElementsFor(PLUGIN_ID, "browsers"); //$NON-NLS-1$
 
 		int size = cf.length;
-		browsers = new ArrayList(size);
+		browsers = new ArrayList<BrowserExt>(size);
 		for (int i = 0; i < size; i++) {
 			try {
 				browsers.add(new BrowserExt(cf[i]));
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUtil.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUtil.java
index a245af4..cbf57b1 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUtil.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,6 +20,7 @@
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.util.Util;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.browser.Browser;
 import org.eclipse.swt.program.Program;
@@ -174,12 +175,12 @@
 		return Program.findProgram("html") != null; //$NON-NLS-1$
 	}
 
-	public static List getExternalBrowserPaths() {
-		List paths = new ArrayList();
-		Iterator iterator = BrowserManager.getInstance().getWebBrowsers()
-				.iterator();
+	public static List<String> getExternalBrowserPaths() {
+		List<String> paths = new ArrayList<String>();
+		Iterator<IBrowserDescriptor> iterator = BrowserManager.getInstance()
+				.getWebBrowsers().iterator();
 		while (iterator.hasNext()) {
-			IBrowserDescriptor wb = (IBrowserDescriptor) iterator.next();
+			IBrowserDescriptor wb = iterator.next();
 			if (wb != null && wb.getLocation() != null)
 				paths.add(wb.getLocation().toLowerCase());
 		}
@@ -190,51 +191,90 @@
 	 * Add any supported EXTERNAL web browsers found after an arbitrary check in
 	 * specific paths
 	 */
-	public static void addFoundBrowsers(List list) {
-		List paths = getExternalBrowserPaths();
+	public static void addFoundBrowsers(List<IBrowserDescriptor> browsers2) {
+		List<String> paths = getExternalBrowserPaths();
 
 		String os = Platform.getOS();
 		File[] roots = getUsableDrives(File.listRoots());
-		int rootSize = roots.length;
-
-		// Math.min(roots.length, 2); // just check the first two drives
 
 		IBrowserExt[] browsers = WebBrowserUIPlugin.getBrowsers();
 		int size = browsers.length;
 		for (int i = 0; i < size; i++) {
-			if (browsers[i].getDefaultLocations() != null
-					&& browsers[i].getOS().toLowerCase().indexOf(os) >= 0) {
-				for (int k = 0; k < rootSize; k++) {
-					int size2 = browsers[i].getDefaultLocations().length;
-					for (int j = 0; j < size2; j++) {
-						String location = browsers[i].getDefaultLocations()[j];
-						try {
-							File f = new File(roots[k], location);
-							if (!paths.contains(f.getAbsolutePath()
-									.toLowerCase())) {
-								if (f.exists()) {
-									BrowserDescriptor browser = new BrowserDescriptor();
-									browser.name = browsers[i].getName();
-									browser.location = f.getAbsolutePath();
-									browser.parameters = browsers[i]
-											.getParameters();
-									list.add(browser);
-									j += size2;
-								}
-							}
-						} catch (Exception e) {
-							// ignore
-						}
+			IBrowserExt browserExt = browsers[i];
+			String[] locations = browserExt.getDefaultLocations();
+			if (locations != null
+					&& browserExt.getOS().toLowerCase().indexOf(os) >= 0) {
+				int size2 = locations.length;
+				for (int j = 0; j < size2; j++) {
+					String location = locations[j];
+
+					String foundBrowserPath = locateBrowser(paths, location, roots);
+
+					if (foundBrowserPath != null) {
+						BrowserDescriptor descriptor = new BrowserDescriptor();
+						descriptor.name = browserExt.getName();
+						descriptor.location = foundBrowserPath;
+						descriptor.parameters = browserExt
+								.getParameters();
+						browsers2.add(descriptor);
+						j += size2;
 					}
+
 				}
 			}
 		}
 	}
 
+	/*
+	 * Look for the file on each of the search roots.
+	 * If the location starts with a Windows environment variable, expand it.
+	 */
+	private static String locateBrowser(List<String> alreadyFoundPaths,
+			String location, File[] searchRoots) {
+		int rootSize = searchRoots.length;
+
+		if (Util.isWindows() && location.startsWith("%")) { //$NON-NLS-1$
+			int envVarEnd = location.indexOf('%', 1);
+			if (envVarEnd != -1) {
+				try {
+					String expanded = System.getenv(location.substring(1, envVarEnd));
+					if (expanded != null) {
+						File f = new File(expanded + location.substring(envVarEnd + 1));
+						String absolutePath = f.getAbsolutePath();
+						if (!alreadyFoundPaths.contains(absolutePath.toLowerCase())) {
+							if (f.exists()) {
+								return absolutePath;
+							}
+						}
+						return null;
+					}
+				} catch (Exception e) {
+					// ignore
+				}
+			}
+		}
+
+		for (int k = 0; k < rootSize; k++) {
+			try {
+				File f = new File(searchRoots[k], location);
+				String absolutePath = f.getAbsolutePath();
+				if (!alreadyFoundPaths.contains(absolutePath
+						.toLowerCase())) {
+					if (f.exists()) {
+						return absolutePath;
+					}
+				}
+			} catch (Exception e) {
+				// ignore
+			}
+		}
+		return null;
+	}
+
 	private static File[] getUsableDrives(File[] roots) {
 		if (!Platform.getOS().equals(Platform.OS_WIN32))
 			return roots;
-		ArrayList list = new ArrayList();
+		ArrayList<File> list = new ArrayList<File>();
 		for (int i = 0; i < roots.length; i++) {
 			String path = roots[i].getAbsolutePath();
 			if (path != null
@@ -242,7 +282,7 @@
 				continue;
 			list.add(roots[i]);
 		}
-		return (File[]) list.toArray(new File[list.size()]);
+		return list.toArray(new File[list.size()]);
 	}
 
 	/**
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserView.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserView.java
index 39617fc..1bfb8f7 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserView.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -135,7 +135,7 @@
 			File file = path.toFile();
 			if (file.exists() && isWebFile(file.getName()))
 				try {
-					return file.toURL();
+					return file.toURI().toURL();
 				} catch (MalformedURLException e) {
 					return null;
 				}
@@ -180,4 +180,12 @@
 	public void selectReveal(ISelection selection) {
 		onSelectionChange(selection);
 	}
+
+	public void setBrowserViewName(String name) {
+		setPartName(name);
+	}
+	
+	public void setBrowserViewTooltip(String tip) {
+		setTitleToolTip(tip);
+	}
 }
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserViewDropAdapter.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserViewDropAdapter.java
index 8a535a3..4acedb0 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserViewDropAdapter.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserViewDropAdapter.java
@@ -128,7 +128,7 @@
 				return true;
 			File f = new File(s[0]);
 			try {
-				view.setURL(f.toURL().toExternalForm());
+				view.setURL(f.toURI().toURL().toExternalForm());
 			} catch (Exception e) {
 				// TODO
 			}
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/DefaultBrowser.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/DefaultBrowser.java
index 6b220ef..a624374 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/DefaultBrowser.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/DefaultBrowser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -73,7 +73,7 @@
 	 * @return String[]
 	 */
 	protected String[] prepareCommand(String path, String url) {
-		ArrayList tokenList = new ArrayList();
+		ArrayList<String> tokenList = new ArrayList<String>();
 		//Divide along quotation marks
 		StringTokenizer qTokenizer = new StringTokenizer(path.trim(),
 			"\"", true); //$NON-NLS-1$
@@ -109,7 +109,7 @@
 		// substitute %1 by url
 		boolean substituted = false;
 		for (int i = 0; i < tokenList.size(); i++) {
-			String token = (String) tokenList.get(i);
+			String token = tokenList.get(i);
 			String newToken = doSubstitutions(token, url);
 			if (newToken != null) {
 				tokenList.set(i, newToken);
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/MozillaBrowser.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/MozillaBrowser.java
index b6738cd..426a2b1 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/MozillaBrowser.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/browsers/MozillaBrowser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,7 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.browser.browsers;
 
-import java.io.*;
+import java.io.IOException;
 import java.net.URL;
 
 import org.eclipse.core.runtime.Platform;
@@ -64,15 +64,6 @@
 		String url = null;
 		if (url2 != null) {
 			url = url2.toExternalForm();
-			// change spaces to "%20"
-			if (url != null & WebBrowserUtil.isWindows()) {
-				int index = url.indexOf(" "); //$NON-NLS-1$
-				while (index >= 0) {
-					url = url.substring(0, index) + "%20" //$NON-NLS-1$
-							+ url.substring(index + 1);
-					index = url.indexOf(" "); //$NON-NLS-1$
-				}
-			}
 		}
 		else {
 			url = ""; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/macosx/SafariBrowser.java b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/macosx/SafariBrowser.java
index 6d8b876..be8f16a 100644
--- a/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/macosx/SafariBrowser.java
+++ b/bundles/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/macosx/SafariBrowser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,7 +35,7 @@
 			url = url.substring(5);
 		}
 		
-		ArrayList tokenList = new ArrayList();
+		ArrayList<String> tokenList = new ArrayList<String>();
 		//Divide along quotation marks
 		StringTokenizer qTokenizer = new StringTokenizer(path.trim(),
 			"\"", true); //$NON-NLS-1$
@@ -66,7 +66,7 @@
 		// substitute %1 by url
 		boolean substituted = false;
 		for (int i = 0; i < tokenList.size(); i++) {
-			String token = (String) tokenList.get(i);
+			String token = tokenList.get(i);
 			String newToken = doSubstitutions(token, url);
 			if (newToken != null) {
 				tokenList.set(i, newToken);
diff --git a/bundles/org.eclipse.ui.carbon/fragment.xml b/bundles/org.eclipse.ui.carbon/fragment.xml
index cb209e5..45f3f2f 100644
--- a/bundles/org.eclipse.ui.carbon/fragment.xml
+++ b/bundles/org.eclipse.ui.carbon/fragment.xml
@@ -12,7 +12,7 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.eclipse.ui.category.dialogs"
+            categoryId="org.eclipse.ui.category.window"
             description="%command.closeDialog.desc"
             id="org.eclipse.ui.carbon.closeDialog"
             name="%command.closeDialog.name">
diff --git a/bundles/org.eclipse.ui.carbon/src/org/eclipse/ui/internal/carbon/CloseDialogHandler.java b/bundles/org.eclipse.ui.carbon/src/org/eclipse/ui/internal/carbon/CloseDialogHandler.java
index 46096a9..6adf911 100644
--- a/bundles/org.eclipse.ui.carbon/src/org/eclipse/ui/internal/carbon/CloseDialogHandler.java
+++ b/bundles/org.eclipse.ui.carbon/src/org/eclipse/ui/internal/carbon/CloseDialogHandler.java
@@ -19,20 +19,18 @@
 
 /**
  * 
- * @author Prakash G.R. (grprakash@gmail.com)
  * @since 3.6 
  *
  */
 public class CloseDialogHandler extends AbstractHandler implements IHandler {
 
 	public Object execute(ExecutionEvent event) {
-		
+
 		Shell activeShell = Display.getDefault().getActiveShell();
-		// perform only if close is enabled
-		if((activeShell.getStyle() & SWT.CLOSE) != 0) {
+		// perform only if shell is available & close is enabled
+		if (activeShell != null && (activeShell.getStyle() & SWT.CLOSE) != 0) {
 			activeShell.close();
 		}
-		
 		return null;
 	}
 
diff --git a/bundles/org.eclipse.ui.cocoa/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.ui.cocoa/.settings/org.eclipse.jdt.core.prefs
index baba5a5..f2f5c3b 100644
--- a/bundles/org.eclipse.ui.cocoa/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.ui.cocoa/.settings/org.eclipse.jdt.core.prefs
@@ -1,7 +1,275 @@
-#Wed Apr 01 16:17:02 EDT 2009
+#Thu Oct 07 14:08:53 IST 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
 org.eclipse.jdt.core.compiler.compliance=1.4
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/bundles/org.eclipse.ui.cocoa/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.ui.cocoa/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..cf3f31f
--- /dev/null
+++ b/bundles/org.eclipse.ui.cocoa/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,57 @@
+#Thu Oct 07 14:09:13 IST 2010
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Platform UI
+formatter_settings_version=11
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=true
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.ui.cocoa/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.cocoa/META-INF/MANIFEST.MF
index 1b13459..8485605 100644
--- a/bundles/org.eclipse.ui.cocoa/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.cocoa/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.ui.cocoa;singleton:=true
-Bundle-Version: 1.0.2.qualifier
+Bundle-Version: 1.1.0.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.ui;bundle-version="[3.5.0,4.0.0)"
 Bundle-Localization: fragment-cocoa
diff --git a/bundles/org.eclipse.ui.cocoa/fragment-cocoa.properties b/bundles/org.eclipse.ui.cocoa/fragment-cocoa.properties
index 3349f7c..7bb5021 100644
--- a/bundles/org.eclipse.ui.cocoa/fragment-cocoa.properties
+++ b/bundles/org.eclipse.ui.cocoa/fragment-cocoa.properties
@@ -14,4 +14,13 @@
 fragmentName=Eclipse UI MacOS X Enhancements
 
 command.closeDialog.name=Close Dialog
-command.closeDialog.desc=Closes the active Dialog
\ No newline at end of file
+command.closeDialog.desc=Closes the active Dialog
+
+command.minimize.name=Minimize
+command.minimize.desc=Minimizes the current window to the Dock
+
+command.zoom.name=Zoom
+command.zoom.desc=Toggles the window between standard state and user state 
+
+command.arrangeWindows.name=Bring All to Front
+command.arrangeWindows.desc=Arranges the application windows in front of all windows 
\ No newline at end of file
diff --git a/bundles/org.eclipse.ui.cocoa/fragment.xml b/bundles/org.eclipse.ui.cocoa/fragment.xml
index ac27c5b..de5ac8e 100644
--- a/bundles/org.eclipse.ui.cocoa/fragment.xml
+++ b/bundles/org.eclipse.ui.cocoa/fragment.xml
@@ -11,18 +11,33 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            categoryId="org.eclipse.ui.category.dialogs"
+            categoryId="org.eclipse.ui.category.window"
+            defaultHandler="org.eclipse.ui.internal.cocoa.CloseDialogHandler"
             description="%command.closeDialog.desc"
             id="org.eclipse.ui.cocoa.closeDialog"
             name="%command.closeDialog.name">
       </command>
-   </extension>
-   <extension
-         point="org.eclipse.ui.handlers">
-      <handler
-            class="org.eclipse.ui.internal.cocoa.CloseDialogHandler"
-            commandId="org.eclipse.ui.cocoa.closeDialog">
-      </handler>
+      <command
+            categoryId="org.eclipse.ui.category.window"
+            defaultHandler="org.eclipse.ui.internal.cocoa.MinimizeWindowHandler"
+            description="%command.minimize.desc"
+            id="org.eclipse.ui.cocoa.minimizeWindow"
+            name="%command.minimize.name">
+      </command>
+      <command
+            categoryId="org.eclipse.ui.category.window"
+            defaultHandler="org.eclipse.ui.internal.cocoa.ZoomWindowHandler"
+            description="%command.zoom.desc"
+            id="org.eclipse.ui.cocoa.zoomWindow"
+            name="%command.zoom.name">
+      </command>
+      <command
+            categoryId="org.eclipse.ui.category.window"
+            defaultHandler="org.eclipse.ui.internal.cocoa.ArrangeWindowsHandler"
+            description="%command.arrangeWindows.desc"
+            id="org.eclipse.ui.cocoa.arrangeWindowsInFront"
+            name="%command.arrangeWindows.name">
+      </command>
    </extension>
    <extension
          point="org.eclipse.ui.bindings">
@@ -33,6 +48,22 @@
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
             sequence="M1+W">
       </key>
+      <key
+            commandId="org.eclipse.ui.cocoa.minimizeWindow"
+            contextId="org.eclipse.ui.contexts.window"
+            platform="cocoa"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+M">
+      </key>
+   </extension>
+   <extension
+         point="org.eclipse.ui.internalTweaklets">
+      <tweaklet
+            definition="org.eclipse.ui.internal.tweaklets.TitlePathUpdater"
+            id="org.eclipse.ui.cocoa.titlePathUpdaterTweaklet"
+            implementation="org.eclipse.ui.internal.cocoa.CocoaTitlePathUpdater"
+            name="Cocoa Title Path Updater">
+      </tweaklet>
    </extension>
    
 </fragment>
diff --git a/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/AbstractWindowHandler.java b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/AbstractWindowHandler.java
new file mode 100644
index 0000000..eed3d10
--- /dev/null
+++ b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/AbstractWindowHandler.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.cocoa;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.swt.internal.cocoa.NSWindow;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * 
+ * @since 3.7 
+ *
+ */
+
+public abstract class AbstractWindowHandler extends AbstractHandler {
+
+	public boolean isEnabled() {
+		boolean enabled = false;
+		Shell activeShell = Display.getDefault().getActiveShell();
+		if(activeShell !=null) {
+			NSWindow window = activeShell.view.window();
+			if(window!=null)
+				enabled = !window.isMiniaturized();
+		}
+		return enabled;
+	}
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/ArrangeWindowsHandler.java b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/ArrangeWindowsHandler.java
new file mode 100644
index 0000000..cc4ee55
--- /dev/null
+++ b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/ArrangeWindowsHandler.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.cocoa;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.swt.internal.cocoa.NSApplication;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * 
+ * @since 3.7
+ * 
+ */
+
+public class ArrangeWindowsHandler extends AbstractHandler {
+
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		NSApplication app = NSApplication.sharedApplication();
+		app.arrangeInFront(app);
+		return null;
+	}
+
+	public boolean isEnabled() {
+		boolean isEnabled = false;
+		Shell[] shells = Display.getDefault().getShells();
+
+		// not all windows should be in minimized state
+		for (int i = 0; i < shells.length; i++) {
+			if (shells[i].view.window().isKeyWindow()) {
+				isEnabled = true;
+				break;
+			}
+		}
+		return isEnabled;
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CloseDialogHandler.java b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CloseDialogHandler.java
index 754c420..d32f152 100644
--- a/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CloseDialogHandler.java
+++ b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CloseDialogHandler.java
@@ -12,7 +12,6 @@
 
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.IHandler;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Display;
@@ -20,21 +19,18 @@
 
 /**
  * 
- * @author Prakash G.R. (grprakash@gmail.com)
- * @since 3.6 
- *
+ * @since 3.6
+ * 
  */
 public class CloseDialogHandler extends AbstractHandler implements IHandler {
 
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		
+	public Object execute(ExecutionEvent event) {
+
 		Shell activeShell = Display.getDefault().getActiveShell();
-		// perform only if close is enabled
-		if((activeShell.getStyle() & SWT.CLOSE) != 0) {
+		// perform only if shell is available & close is enabled
+		if (activeShell != null && (activeShell.getStyle() & SWT.CLOSE) != 0) {
 			activeShell.close();
 		}
-		
-		activeShell.close();
 		return null;
 	}
 
diff --git a/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CocoaTitlePathUpdater.java b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CocoaTitlePathUpdater.java
new file mode 100644
index 0000000..115cf23
--- /dev/null
+++ b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CocoaTitlePathUpdater.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.cocoa;
+
+import org.eclipse.swt.internal.cocoa.NSString;
+import org.eclipse.swt.internal.cocoa.NSWindow;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.internal.tweaklets.TitlePathUpdater;
+
+/**
+ * 
+ * @since 3.7
+ * 
+ */
+public class CocoaTitlePathUpdater extends TitlePathUpdater {
+
+	public void updateTitlePath(Shell window, String path) {
+
+		if (path == null)
+			path = "";
+		NSWindow nsWindow = window.getShell().view.window();
+		NSString filePathString = NSString.stringWith(path);
+		nsWindow.setRepresentedFilename(filePathString);
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CocoaUIEnhancer.java b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CocoaUIEnhancer.java
index b46e67a..f7b819e 100644
--- a/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CocoaUIEnhancer.java
+++ b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CocoaUIEnhancer.java
@@ -11,7 +11,6 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.cocoa;
 
-import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -23,12 +22,9 @@
 import org.eclipse.core.commands.NotEnabledException;
 import org.eclipse.core.commands.NotHandledException;
 import org.eclipse.core.commands.common.NotDefinedException;
-import org.eclipse.core.runtime.IProduct;
 import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.internal.C;
 import org.eclipse.swt.internal.Callback;
@@ -49,6 +45,7 @@
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
 import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.internal.WorkbenchWindow;
 import org.eclipse.ui.internal.misc.StatusUtil;
@@ -56,119 +53,126 @@
 
 /**
  * The CocoaUIEnhancer provides the standard "About" and "Preference" menu items
- * and links them to the corresponding workbench commands. 
- * This must be done in a MacOS X fragment because SWT doesn't provide an abstraction
- * for the (MacOS X only) application menu and we have to use MacOS specific natives.
- * The fragment is for the org.eclipse.ui plug-in because we need access to the
+ * and links them to the corresponding workbench commands. This must be done in
+ * a MacOS X fragment because SWT doesn't provide an abstraction for the (MacOS
+ * X only) application menu and we have to use MacOS specific natives. The
+ * fragment is for the org.eclipse.ui plug-in because we need access to the
  * Workbench "About" and "Preference" actions.
  * 
  * @noreference this class is not intended to be referenced by any client.
  * @since 1.0
  */
-public class CocoaUIEnhancer implements IStartup {
+public class CocoaUIEnhancer extends CocoaUtil implements IStartup {
 
 	private static final int kAboutMenuItem = 0;
 	private static final int kPreferencesMenuItem = 2;
-	private static final int kServicesMenuItem = 4;
 	private static final int kHideApplicationMenuItem = 6;
 	private static final int kQuitMenuItem = 10;
-	
+
 	static long sel_toolbarButtonClicked_;
 	static long sel_preferencesMenuItemSelected_;
 	static long sel_aboutMenuItemSelected_;
 
 	private static final long NSWindowToolbarButton = 3;
-	
+
 	/* This callback is not freed */
 	static Callback proc3Args;
-	static final byte[] SWT_OBJECT = {'S', 'W', 'T', '_', 'O', 'B', 'J', 'E', 'C', 'T', '\0'};
+	static final byte[] SWT_OBJECT = { 'S', 'W', 'T', '_', 'O', 'B', 'J', 'E', 'C', 'T', '\0' };
 
-	private void init() throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, NoSuchFieldException {
-		// TODO: These should either move out of Display or be accessible to this class.
-		byte[] types = {'*','\0'};
-		int size = C.PTR_SIZEOF, align = C.PTR_SIZEOF == 4 ? 2 : 3;
+	private void init() throws SecurityException, NoSuchMethodException, IllegalArgumentException,
+			IllegalAccessException, InvocationTargetException, NoSuchFieldException {
+		// TODO: These should either move out of Display or be accessible to
+		// this class.
+		byte[] types = { '*', '\0' };
+		int size = C.PTR_SIZEOF;
+		int align = C.PTR_SIZEOF == 4 ? 2 : 3;
 
 		Class clazz = CocoaUIEnhancer.class;
 
 		proc3Args = new Callback(clazz, "actionProc", 3); //$NON-NLS-1$
-		//call getAddress
+		// call getAddress
 		Method getAddress = Callback.class.getMethod("getAddress", new Class[0]);
 		Object object = getAddress.invoke(proc3Args, null);
 		long proc3 = convertToLong(object);
-		if (proc3 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+		if (proc3 == 0)
+			SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
 
-		//call objc_allocateClassPair
+		// call objc_allocateClassPair
 		Field field = OS.class.getField("class_NSObject");
 		Object fieldObj = field.get(OS.class);
-		object = invokeMethod(OS.class, "objc_allocateClassPair", new Object[] { fieldObj, "SWTCocoaEnhancerDelegate", wrapPointer(0) });
+
+		Object[] args = makeArgs(fieldObj, "SWTCocoaEnhancerDelegate", wrapPointer(0));
+		object = invokeMethod(OS.class, "objc_allocateClassPair", args);
+
 		long cls = convertToLong(object);
-		
-		invokeMethod(OS.class, "class_addIvar", new Object[] {
-				wrapPointer(cls), SWT_OBJECT, wrapPointer(size),
-				new Byte((byte) align), types });
+
+		args = makeArgs(wrapPointer(cls), SWT_OBJECT, wrapPointer(size), new Byte((byte) align),
+				types);
+		invokeMethod(OS.class, "class_addIvar", args);
 
 		// Add the action callback
-		invokeMethod(
-				OS.class,
-				"class_addMethod", new Object[] { wrapPointer(cls), wrapPointer(sel_toolbarButtonClicked_), wrapPointer(proc3), "@:@" }); //$NON-NLS-1$
-		invokeMethod(OS.class, "class_addMethod", new Object[] {
-				wrapPointer(cls),
-				wrapPointer(sel_preferencesMenuItemSelected_),
-				wrapPointer(proc3), "@:@" }); //$NON-NLS-1$
-		invokeMethod(
-				OS.class,
-				"class_addMethod", new Object[] { wrapPointer(cls), wrapPointer(sel_aboutMenuItemSelected_), wrapPointer(proc3), "@:@" }); //$NON-NLS-1$
+		args = makeArgs(wrapPointer(cls), wrapPointer(sel_toolbarButtonClicked_),
+				wrapPointer(proc3), "@:@");
+		invokeMethod(OS.class, "class_addMethod", args); //$NON-NLS-1$
 
-		invokeMethod(OS.class, "objc_registerClassPair",
-				new Object[] { wrapPointer(cls) });			
-	}	
+		args = makeArgs(wrapPointer(cls), wrapPointer(sel_preferencesMenuItemSelected_),
+				wrapPointer(proc3), "@:@");
+
+		invokeMethod(OS.class, "class_addMethod", args); //$NON-NLS-1$
+
+		args = makeArgs(wrapPointer(cls), wrapPointer(sel_aboutMenuItemSelected_),
+				wrapPointer(proc3), "@:@");
+
+		invokeMethod(OS.class, "class_addMethod", args); //$NON-NLS-1$
+
+		invokeMethod(OS.class, "objc_registerClassPair", makeArgs(cls));
+	}
 
 	SWTCocoaEnhancerDelegate delegate;
 	private long delegateJniRef;
 
 	/**
-	 * Class that is able to intercept and handle OS events from the toolbar and menu.
+	 * Class that is able to intercept and handle OS events from the toolbar and
+	 * menu.
 	 * 
 	 * @since 3.1
 	 */
 
-    private static final String RESOURCE_BUNDLE = CocoaUIEnhancer.class.getPackage().getName() + ".Messages"; //$NON-NLS-1$
-	
-    private String fAboutActionName;
-    private String fQuitActionName;
-    private String fHideActionName;
+	private static final String RESOURCE_BUNDLE = CocoaUIEnhancer.class.getPackage().getName()
+			+ ".Messages"; //$NON-NLS-1$
 
-    /**
-     * Default constructor
-     */
-    public CocoaUIEnhancer() {
-        IProduct product = Platform.getProduct();
-        String productName = null;
-        if (product != null)
-            productName = product.getName();
-        
+	private String fAboutActionName;
+	private String fQuitActionName;
+	private String fHideActionName;
+
+	/**
+	 * Default constructor
+	 */
+	public CocoaUIEnhancer() {
+
+		String productName = getProductName();
+
 		ResourceBundle resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
 		try {
 			if (productName != null) {
 				String format = resourceBundle.getString("AboutAction.format"); //$NON-NLS-1$
 				if (format != null)
-					fAboutActionName= MessageFormat.format(format, new Object[] { productName } );
+					fAboutActionName = MessageFormat.format(format, new Object[] { productName });
 			}
 			if (fAboutActionName == null)
 				fAboutActionName = resourceBundle.getString("AboutAction.name"); //$NON-NLS-1$
 		} catch (MissingResourceException e) {
 		}
-		
+
 		if (fAboutActionName == null)
 			fAboutActionName = "About"; //$NON-NLS-1$
-		
-		if (productName != null) {	
+
+		if (productName != null) {
 			try {
 				// prime the format Hide <app name>
 				String format = resourceBundle.getString("HideAction.format"); //$NON-NLS-1$
 				if (format != null)
-					fHideActionName = MessageFormat.format(format,
-							new Object[] { productName });
+					fHideActionName = MessageFormat.format(format, new Object[] { productName });
 
 			} catch (MissingResourceException e) {
 			}
@@ -177,13 +181,12 @@
 				// prime the format Quit <app name>
 				String format = resourceBundle.getString("QuitAction.format"); //$NON-NLS-1$
 				if (format != null)
-					fQuitActionName = MessageFormat.format(format,
-							new Object[] { productName });
+					fQuitActionName = MessageFormat.format(format, new Object[] { productName });
 
 			} catch (MissingResourceException e) {
 			}
 		}
-		
+
 		try {
 			if (sel_toolbarButtonClicked_ == 0) {
 				sel_toolbarButtonClicked_ = registerName("toolbarButtonClicked:"); //$NON-NLS-1$
@@ -192,85 +195,41 @@
 				init();
 			}
 		} catch (Exception e) {
-			// theoretically, one of SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
+			// theoretically, one of
+			// SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
 			// not expected to happen at all.
 			log(e);
 		}
-    }
+	}
 
-    
-    private long registerName(String name) throws IllegalArgumentException, SecurityException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
-    	Class clazz = OS.class;
-    	Object object = invokeMethod(clazz, "sel_registerName", new Object[] {name});
-    	return convertToLong(object);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IStartup#earlyStartup()
-     */
-    public void earlyStartup() {
-        final Display display = Display.getDefault();
-        display.syncExec(new Runnable() {
-            public void run() {
-            	try {
-            		delegate = new SWTCocoaEnhancerDelegate();
-            		delegate.alloc().init();
-            		//call OS.NewGlobalRef
-					Method method = OS.class.getMethod("NewGlobalRef", new Class[] { Object.class });
-					Object object = method.invoke(OS.class, new Object[] {CocoaUIEnhancer.this});
-					delegateJniRef = convertToLong(object);
-            	} catch (Exception e) {
-					// theoretically, one of SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
-					// not expected to happen at all.
-					log(e);
-				}
-        		if (delegateJniRef == 0) SWT.error(SWT.ERROR_NO_HANDLES);
-				try {
-					Field idField = SWTCocoaEnhancerDelegate.class.getField("id");
-					Object idValue = idField.get(delegate);
-					invokeMethod(OS.class, "object_setInstanceVariable",
-							new Object[] { idValue,
-									SWT_OBJECT, wrapPointer(delegateJniRef) });
+	private String getProductName() {
 
-					hookApplicationMenu();
-					hookWorkbenchListener();
+		if (Platform.getProduct() != null)
+			return Platform.getProduct().getName();
+		return null;
+	}
 
-					// schedule disposal of callback object
-					display.disposeExec(new Runnable() {
-						public void run() {
-							if (delegateJniRef != 0) {
-								try {
-									invokeMethod(OS.class, "DeleteGlobalRef", new Object[] {wrapPointer(delegateJniRef)});
-								} catch (Exception e) {
-									// theoretically, one of SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
-									// not expected to happen at all.
-									log(e);
-								}
-							}
-							delegateJniRef = 0;
+	private long registerName(String name) throws IllegalArgumentException, SecurityException,
+			IllegalAccessException, InvocationTargetException, NoSuchMethodException {
+		Class clazz = OS.class;
+		Object object = invokeMethod(clazz, "sel_registerName", new Object[] { name });
+		return convertToLong(object);
+	}
 
-							if (delegate != null)
-								delegate.release();
-							delegate = null;
-
-						}
-					});
-
-					// modify all shells opened on startup
-					IWorkbenchWindow[] windows = PlatformUI.getWorkbench()
-							.getWorkbenchWindows();
-					for (int i = 0; i < windows.length; i++) {
-						modifyWindowShell(windows[i]);
-					}
-				} catch (Exception e) {
-					// theoretically, one of SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
-					// not expected to happen at all.
-					log(e);
-				}
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IStartup#earlyStartup()
+	 */
+	public void earlyStartup() {
+		Display display = Display.getDefault();
+		display.syncExec(new Runnable() {
+			public void run() {
+				startupInUI();
 			}
 
-        });
-    }
+		});
+	}
 
 	void log(Exception e) {
 		StatusUtil.handleStatus(e, StatusManager.LOG);
@@ -282,7 +241,7 @@
 	 * 
 	 * @since 3.2
 	 */
-    protected void hookWorkbenchListener() {
+	protected void hookWorkbenchListener() {
 		PlatformUI.getWorkbench().addWindowListener(new IWindowListener() {
 
 			public void windowActivated(IWorkbenchWindow window) {
@@ -299,10 +258,11 @@
 
 			public void windowOpened(IWorkbenchWindow window) {
 				modifyWindowShell(window);
-			}});
+			}
+		});
 	}
 
-    /**
+	/**
 	 * Modify the given workbench window shell bits to show the tool bar toggle
 	 * button.
 	 * 
@@ -310,327 +270,276 @@
 	 *            the window to modify
 	 * @since 3.2
 	 */
-	protected void modifyWindowShell(IWorkbenchWindow window) {
+	protected void modifyWindowShell(final IWorkbenchWindow window) {
 		// only add the button when either the cool bar or perspective bar
-		// is initially visible. This is so that RCP applications can choose to use
+		// is initially visible. This is so that RCP applications can choose to
+		// use
 		// this fragment without fear that their explicitly invisible bars
 		// can't be shown.
-		boolean coolBarInitiallyVsible = ((WorkbenchWindow) window)
-				.getCoolBarVisible();
+		boolean coolBarInitiallyVsible = ((WorkbenchWindow) window).getCoolBarVisible();
 		boolean perspectiveBarInitiallyVsible = ((WorkbenchWindow) window)
 				.getPerspectiveBarVisible();
 
 		if (coolBarInitiallyVsible || perspectiveBarInitiallyVsible) {
-			// Add an empty, hidden tool bar to the window.  Without this the
-			// tool bar button at the top right of the window will not appear
-			// even when setShowsToolbarButton(true) is called.
-			NSToolbar dummyBar = new NSToolbar();
-			dummyBar.alloc();
-			dummyBar.initWithIdentifier(NSString.stringWith("SWTToolbar")); //$NON-NLS-1$
-			dummyBar.setVisible(false);
-			
-			Shell shell = window.getShell();
-			NSWindow nsWindow = shell.view.window();
-			nsWindow.setToolbar(dummyBar);
-			dummyBar.release();
-			nsWindow.setShowsToolbarButton(true);
-			
-			// Override the target and action of the toolbar button so we can control it.
-			try {
-				Object fieldValue = wrapPointer(NSWindowToolbarButton);
-				NSButton toolbarButton = (NSButton) invokeMethod(NSWindow.class, nsWindow, "standardWindowButton", new Object[] {fieldValue});
-				if (toolbarButton != null) {
-					toolbarButton.setTarget(delegate);
-					invokeMethod(NSControl.class, toolbarButton, "setAction",
-							new Object[] { wrapPointer(sel_toolbarButtonClicked_) });
+			createDummyToolbar(window);
+		} else {
+			// add the dummby toolbar when its shown for the first time
+			if (!(window instanceof WorkbenchWindow))
+				return;
+			final WorkbenchWindow workbenchWindow = (WorkbenchWindow) window;
+			workbenchWindow.addPropertyChangeListener(new IPropertyChangeListener() {
+
+				public void propertyChange(PropertyChangeEvent event) {
+					if (WorkbenchWindow.PROP_COOLBAR_VISIBLE.equals(event.getProperty())) {
+						createDummyToolbar(window);
+						workbenchWindow.removePropertyChangeListener(this);
+					}
 				}
-			} catch (Exception e) {
-				// theoretically, one of SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
-				// not expected to happen at all.
-				log(e);
-			}
+			});
 		}
 	}
-	
-    private void hookApplicationMenu() {
-    	try {
-    		// create About Eclipse menu command
-    		NSMenu mainMenu = NSApplication.sharedApplication().mainMenu();
-    		NSMenuItem mainMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, mainMenu, "itemAtIndex", new Object[] {wrapPointer(0)});
-    		NSMenu appMenu = mainMenuItem.submenu();
 
-    		// add the about action
-    		NSMenuItem aboutMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, appMenu, "itemAtIndex", new Object[] {wrapPointer(kAboutMenuItem)});
-    		aboutMenuItem.setTitle(NSString.stringWith(fAboutActionName));
+	/**
+	 * Add an empty, hidden tool bar to the window. Without this the tool bar
+	 * button at the top right of the window will not appear even when
+	 * setShowsToolbarButton(true) is called.
+	 * 
+	 * @param window
+	 */
+	private void createDummyToolbar(IWorkbenchWindow window) {
+		NSToolbar dummyBar = new NSToolbar();
+		dummyBar.alloc();
+		dummyBar.initWithIdentifier(NSString.stringWith("SWTToolbar")); //$NON-NLS-1$
+		dummyBar.setVisible(false);
 
-    		// rename the hide action if we have an override string
-    		if (fHideActionName != null) {
-    			NSMenuItem hideMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, appMenu, "itemAtIndex", new Object[] {wrapPointer(kHideApplicationMenuItem)});
-    			hideMenuItem.setTitle(NSString.stringWith(fHideActionName));
-    		}
+		Shell shell = window.getShell();
+		NSWindow nsWindow = shell.view.window();
+		nsWindow.setToolbar(dummyBar);
+		dummyBar.release();
+		nsWindow.setShowsToolbarButton(true);
 
-    		// rename the quit action if we have an override string
-    		if (fQuitActionName != null) {
-    			NSMenuItem quitMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, appMenu, "itemAtIndex", new Object[] {wrapPointer(kQuitMenuItem)});
-    			quitMenuItem.setTitle(NSString.stringWith(fQuitActionName));
-    		}
-
-    		// enable pref menu
-    		NSMenuItem prefMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, appMenu, "itemAtIndex", new Object[] {wrapPointer(kPreferencesMenuItem)});
-    		prefMenuItem.setEnabled(true);
-
-    		// disable services menu
-    		NSMenuItem servicesMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, appMenu, "itemAtIndex", new Object[] {wrapPointer(kServicesMenuItem)});
-    		servicesMenuItem.setEnabled(false);
-
-    		// Register as a target on the prefs and quit items.
-    		prefMenuItem.setTarget(delegate);
-    		invokeMethod(NSMenuItem.class, prefMenuItem, "setAction", new Object[] {wrapPointer(sel_preferencesMenuItemSelected_)});
-    		aboutMenuItem.setTarget(delegate);
-    		invokeMethod(NSMenuItem.class, aboutMenuItem, "setAction", new Object[] {wrapPointer(sel_aboutMenuItemSelected_)});
-    	} catch (Exception e) {
-			// theoretically, one of SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
+		// Override the target and action of the toolbar button so we can
+		// control it.
+		try {
+			Object fieldValue = wrapPointer(NSWindowToolbarButton);
+			NSButton toolbarButton = (NSButton) invokeMethod(NSWindow.class, nsWindow,
+					"standardWindowButton", new Object[] { fieldValue });
+			if (toolbarButton != null) {
+				toolbarButton.setTarget(delegate);
+				invokeMethod(NSControl.class, toolbarButton, "setAction",
+						new Object[] { wrapPointer(sel_toolbarButtonClicked_) });
+			}
+		} catch (Exception e) {
+			// theoretically, one of
+			// SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
 			// not expected to happen at all.
 			log(e);
 		}
-    }
+	}
 
-	/**
-     * Locate an action with the given id in the current menu bar and run it.
-     */
-    private void runAction(String actionId) {
-        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-        if (window != null) {
-        	IMenuManager manager = ((WorkbenchWindow)window).getActionBars().getMenuManager();
-        	IAction action = findAction(actionId, manager);
-        	if (action != null && action.isEnabled()) {
-        		try {
-        			NSMenu mainMenu = NSApplication.sharedApplication().mainMenu();
-        			NSMenuItem mainMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, mainMenu, "itemAtIndex", new Object[] {wrapPointer(0)});
-        			NSMenu appMenu = mainMenuItem.submenu();
-        			NSMenuItem aboutMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, appMenu, "itemAtIndex", new Object[] {wrapPointer(kAboutMenuItem)});
-        			NSMenuItem prefMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, appMenu, "itemAtIndex", new Object[] {wrapPointer(kPreferencesMenuItem)});
-        			try {
-        				prefMenuItem.setEnabled(false);
-        				aboutMenuItem.setEnabled(false);
-        				action.run();
-        			}
-        			finally {
-        				prefMenuItem.setEnabled(true);
-        				aboutMenuItem.setEnabled(true);
-        			}
-        		} catch (Exception e) {
-					// theoretically, one of SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
-					// not expected to happen at all.
-					log(e);
-				}
-        	}
-        }
-       
-    }
-    
-    private void runCommand(String commandId) {
-		IWorkbench workbench = PlatformUI.getWorkbench();
-		if (workbench == null)
-			return;
-		
-		IWorkbenchWindow activeWorkbenchWindow = workbench
-				.getActiveWorkbenchWindow();
-		if (activeWorkbenchWindow == null)
-			return;
-		
-		IHandlerService commandService = (IHandlerService) activeWorkbenchWindow
-				.getService(IHandlerService.class);
+	private void hookApplicationMenu() {
+		try {
+			// create About Eclipse menu command
+			NSMenu mainMenu = NSApplication.sharedApplication().mainMenu();
+			NSMenuItem mainMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, mainMenu,
+					"itemAtIndex", new Object[] { wrapPointer(0) });
+			NSMenu appMenu = mainMenuItem.submenu();
 
-		if (commandService != null) {
-			try {
-				commandService.executeCommand(commandId, null);
-			} catch (ExecutionException e) {
-			} catch (NotDefinedException e) {
-			} catch (NotEnabledException e) {
-			} catch (NotHandledException e) {
+			// add the about action
+			NSMenuItem aboutMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, appMenu,
+					"itemAtIndex", new Object[] { wrapPointer(kAboutMenuItem) });
+			aboutMenuItem.setTitle(NSString.stringWith(fAboutActionName));
+
+			// rename the hide action if we have an override string
+			if (fHideActionName != null) {
+				NSMenuItem hideMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, appMenu,
+						"itemAtIndex", new Object[] { wrapPointer(kHideApplicationMenuItem) });
+				hideMenuItem.setTitle(NSString.stringWith(fHideActionName));
 			}
+
+			// rename the quit action if we have an override string
+			if (fQuitActionName != null) {
+				NSMenuItem quitMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, appMenu,
+						"itemAtIndex", new Object[] { wrapPointer(kQuitMenuItem) });
+				quitMenuItem.setTitle(NSString.stringWith(fQuitActionName));
+			}
+
+			// enable pref menu
+			NSMenuItem prefMenuItem = (NSMenuItem) invokeMethod(NSMenu.class, appMenu,
+					"itemAtIndex", new Object[] { wrapPointer(kPreferencesMenuItem) });
+			prefMenuItem.setEnabled(true);
+
+			// Register as a target on the prefs and quit items.
+			prefMenuItem.setTarget(delegate);
+			invokeMethod(NSMenuItem.class, prefMenuItem, "setAction",
+					new Object[] { wrapPointer(sel_preferencesMenuItemSelected_) });
+			aboutMenuItem.setTarget(delegate);
+			invokeMethod(NSMenuItem.class, aboutMenuItem, "setAction",
+					new Object[] { wrapPointer(sel_aboutMenuItemSelected_) });
+		} catch (Exception e) {
+			// theoretically, one of
+			// SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
+			// not expected to happen at all.
+			log(e);
 		}
 	}
 
-    /**
-	 * Find the action with the given ID by recursively crawling the provided
-	 * menu manager. If the action cannot be found <code>null</code> is
-	 * returned.
-	 * 
-	 * @param actionId
-	 *            the id to search for
-	 * @param manager
-	 *            the manager to search
-	 * @return the action or <code>null</code>
-	 */
-	private IAction findAction(String actionId, IMenuManager manager) {
-		IContributionItem[] items = manager.getItems();
-		for (int i = 0; i < items.length; i++) {
-			IContributionItem item = items[i];
-			if (item instanceof ActionContributionItem) {
-				ActionContributionItem aci = (ActionContributionItem) item;
-				String id = aci.getId();
-				if (id != null && id.equals(actionId))
-					return aci.getAction();
-			} else if (item instanceof IMenuManager) {
-				IAction found = findAction(actionId, (IMenuManager) item);
-				if (found != null)
-					return found;
-			}
+	private void runCommand(String commandId) {
+
+		IWorkbench workbench = PlatformUI.getWorkbench();
+		IHandlerService service = (IHandlerService) workbench.getService(IHandlerService.class);
+
+		try {
+			service.executeCommand(commandId, null);
+		} catch (ExecutionException e) {
+			log(e);
+		} catch (NotDefinedException e) {
+			log(e);
+		} catch (NotEnabledException e) {
+			log(e);
+		} catch (NotHandledException e) {
+			log(e);
 		}
-		return null;
 	}
 
 	/*
-	 * Action implementations for the toolbar button and preferences and about menu items
+	 * Action implementations for the toolbar button and preferences and about
+	 * menu items
 	 */
-	void toolbarButtonClicked (NSControl source) {
+	void toolbarButtonClicked(NSControl source) {
 		try {
 			NSWindow window = source.window();
 			Field idField = NSWindow.class.getField("id");
 			Object idValue = idField.get(window);
-			
+
 			Display display = Display.getCurrent();
-			Widget widget = (Widget) invokeMethod(Display.class, display, "findWidget", new Object[] { idValue });
+			Widget widget = (Widget) invokeMethod(Display.class, display, "findWidget",
+					new Object[] { idValue });
 
 			if (!(widget instanceof Shell)) {
 				return;
 			}
 			Shell shell = (Shell) widget;
-			IWorkbenchWindow[] windows = PlatformUI.getWorkbench()
-			.getWorkbenchWindows();
+			IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
 			for (int i = 0; i < windows.length; i++) {
 				if (windows[i].getShell() == shell) {
 					runCommand("org.eclipse.ui.ToggleCoolbarAction"); //$NON-NLS-1$
 				}
 			}
 		} catch (Exception e) {
-			// theoretically, one of SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
+			// theoretically, one of
+			// SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
 			// not expected to happen at all.
 			log(e);
 		}
 	}
-	
-	void preferencesMenuItemSelected() {
-		runAction("preferences"); //$NON-NLS-1$
+
+	private void createDelegate() throws SecurityException, NoSuchMethodException,
+			IllegalArgumentException, IllegalAccessException, InvocationTargetException {
+		delegate = new SWTCocoaEnhancerDelegate();
+		delegate.alloc().init();
+		// call OS.NewGlobalRef
+		Method method = OS.class.getMethod("NewGlobalRef", new Class[] { Object.class });
+		Object object = method.invoke(OS.class, new Object[] { CocoaUIEnhancer.this });
+		delegateJniRef = convertToLong(object);
 	}
 
-	void aboutMenuItemSelected() {
-		runAction("about"); //$NON-NLS-1$
+	private Runnable createDisposer() {
+		return new Runnable() {
+			public void run() {
+				if (delegateJniRef != 0) {
+					try {
+						invokeMethod(OS.class, "DeleteGlobalRef",
+								new Object[] { CocoaUtil.wrapPointer(delegateJniRef) });
+					} catch (Exception e) {
+						// theoretically, one of
+						// SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
+						// not expected to happen at all.
+						log(e);
+					}
+				}
+				delegateJniRef = 0;
+
+				if (delegate != null)
+					delegate.release();
+				delegate = null;
+
+			}
+		};
+	}
+
+	/**
+	 * 
+	 */
+	private void modifyShells() {
+		// modify all shells opened on startup
+		IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
+		for (int i = 0; i < windows.length; i++) {
+			modifyWindowShell(windows[i]);
+		}
+	}
+
+	private void startupInUI() {
+
+
+		try {
+			createDelegate();
+
+			if (delegateJniRef == 0)
+				SWT.error(SWT.ERROR_NO_HANDLES);
+
+			setDelegate();
+
+			hookApplicationMenu();
+			hookWorkbenchListener();
+
+			// schedule disposal of callback object
+			Runnable disposer = createDisposer();
+			Display.getDefault().disposeExec(disposer);
+
+			modifyShells();
+
+		} catch (Exception e) {
+			// theoretically, one of
+			// SecurityException,Illegal*Exception,InvocationTargetException,NoSuch*Exception
+			// not expected to happen at all.
+			log(e);
+		}
+	}
+
+	private void setDelegate() throws NoSuchFieldException, IllegalAccessException,
+			InvocationTargetException, NoSuchMethodException {
+		Field idField = SWTCocoaEnhancerDelegate.class.getField("id");
+		Object idValue = idField.get(delegate);
+
+		Object[] args = makeArgs(idValue, SWT_OBJECT, wrapPointer(delegateJniRef));
+		invokeMethod(OS.class, "object_setInstanceVariable", args);
 	}
 
 	static int actionProc(int id, int sel, int arg0) throws Exception {
-		return (int) actionProc((long)id, (long)sel, (long)arg0);
+		return (int) actionProc((long) id, (long) sel, (long) arg0);
 	}
 
 	static long actionProc(long id, long sel, long arg0) throws Exception {
-		long [] jniRef = OS_object_getInstanceVariable(id, SWT_OBJECT);
-		if (jniRef[0] == 0) return 0;
-		
-		CocoaUIEnhancer delegate = (CocoaUIEnhancer) invokeMethod(OS.class,
-				"JNIGetObject", new Object[] { wrapPointer(jniRef[0]) });
-		
+		long[] jniRef = OS_object_getInstanceVariable(id, SWT_OBJECT);
+		if (jniRef[0] == 0)
+			return 0;
+
+		CocoaUIEnhancer delegate = (CocoaUIEnhancer) invokeMethod(OS.class, "JNIGetObject",
+				new Object[] { wrapPointer(jniRef[0]) });
+
 		if (sel == sel_toolbarButtonClicked_) {
 			NSControl source = new_NSControl(arg0);
 			delegate.toolbarButtonClicked(source);
 		} else if (sel == sel_preferencesMenuItemSelected_) {
-			delegate.preferencesMenuItemSelected();
+			delegate.runCommand(ActionFactory.PREFERENCES.getCommandId());
 		} else if (sel == sel_aboutMenuItemSelected_) {
-			delegate.aboutMenuItemSelected();
+			delegate.runCommand(ActionFactory.ABOUT.getCommandId());
 		}
-		
+
 		return 0;
 	}
-	
-	
 
-	// The following methods reflectively call corresponding methods in the OS
-	// class, using ints or longs as required based on platform.
 
-	private static NSControl new_NSControl(long arg0)
-			throws NoSuchMethodException, InstantiationException,
-			IllegalArgumentException, IllegalAccessException,
-			InvocationTargetException {
-		Class clazz = NSControl.class;
-		Class PTR_CLASS =  C.PTR_SIZEOF == 8 ? long.class : int.class;
-		Constructor constructor = clazz
-				.getConstructor(new Class[] { PTR_CLASS });
-		return (NSControl) constructor.newInstance(new Object[] { wrapPointer(arg0) });
-	}
-	
-	/**
-	 * Specialized method.  It's behavior is isolated and different enough from the usual invocation that custom code is warranted.
-	 */
-	private static long[] OS_object_getInstanceVariable(long delegateId,
-			byte[] name) throws IllegalArgumentException,
-			IllegalAccessException, InvocationTargetException,
-			SecurityException, NoSuchMethodException {
-		Class clazz = OS.class;
-		Method method = null;
-		Class PTR_CLASS =  C.PTR_SIZEOF == 8 ? long.class : int.class;
-		if (PTR_CLASS == long.class) {
-			method = clazz.getMethod("object_getInstanceVariable", new Class[] {
-					long.class, byte[].class, long[].class });
-			long[] resultPtr = new long[1];
-			method.invoke(null, new Object[] { new Long(delegateId), name,
-					resultPtr });
-			return resultPtr;
-		} 
-		else {
-			method = clazz.getMethod("object_getInstanceVariable", new Class[] {
-					int.class, byte[].class, int[].class });
-			int[] resultPtr = new int[1];
-			method.invoke(null, new Object[] { new Integer((int) delegateId),
-					name, resultPtr });
-			return new long[] { resultPtr[0] };
-		}
-	}
-	
-	private long convertToLong(Object object) {
-		if (object instanceof Integer) {
-			Integer i = (Integer) object;
-			return i.longValue();
-		}
-		if (object instanceof Long) {
-			Long l = (Long) object;
-			return l.longValue();
-		}
-		return 0;
-	}
-	
-	private static Object invokeMethod(Class clazz, String methodName,
-			Object[] args) throws IllegalArgumentException,
-			IllegalAccessException, InvocationTargetException,
-			SecurityException, NoSuchMethodException {
-		return invokeMethod(clazz, null, methodName, args);
-	}
 
-	private static Object invokeMethod(Class clazz, Object target,
-			String methodName, Object[] args) throws IllegalArgumentException,
-			IllegalAccessException, InvocationTargetException,
-			SecurityException, NoSuchMethodException {
-		Class[] signature = new Class[args.length];
-		for (int i = 0; i < args.length; i++) {
-			Class thisClass = args[i].getClass();
-			if (thisClass == Integer.class)
-				signature[i] = int.class;
-			else if (thisClass == Long.class)
-				signature[i] = long.class;
-			else if (thisClass == Byte.class)
-				signature[i] = byte.class;
-			else
-				signature[i] = thisClass;
-		}
-		Method method = clazz.getMethod(methodName, signature);
-		return method.invoke(target, args);
-	}
-	
-	private static Object wrapPointer(long value) {
-		Class PTR_CLASS =  C.PTR_SIZEOF == 8 ? long.class : int.class;
-		if (PTR_CLASS == long.class)
-			return new Long(value);
-		else 
-			return new Integer((int)value);
-	}
 }
diff --git a/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CocoaUtil.java b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CocoaUtil.java
new file mode 100644
index 0000000..1cd1b18
--- /dev/null
+++ b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CocoaUtil.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.cocoa;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.eclipse.swt.internal.C;
+import org.eclipse.swt.internal.cocoa.NSControl;
+import org.eclipse.swt.internal.cocoa.NSMenu;
+import org.eclipse.swt.internal.cocoa.NSMenuItem;
+import org.eclipse.swt.internal.cocoa.OS;
+
+/**
+ * @since 3.7
+ * 
+ */
+
+public class CocoaUtil {
+
+	static Class PTR_CLASS = C.PTR_SIZEOF == 8 ? long.class : int.class;
+
+	public static long convertToLong(Object object) {
+		if (object instanceof Integer) {
+			Integer i = (Integer) object;
+			return i.longValue();
+		}
+		if (object instanceof Long) {
+			Long l = (Long) object;
+			return l.longValue();
+		}
+		return 0;
+	}
+
+	public static NSMenuItem getItemAtIndex(NSMenu menu, int index)
+			throws IllegalArgumentException, SecurityException, IllegalAccessException,
+			InvocationTargetException, NoSuchMethodException {
+		return (NSMenuItem) invokeMethod(NSMenu.class, menu, "itemAtIndex", makeArgs(index));
+	}
+
+	public static Object[] makeArgs(long pointer) {
+		return new Object[] { CocoaUtil.wrapPointer(pointer) };
+	}
+
+	public static Object[] makeArgs(Object obj) {
+		return new Object[] { obj };
+	}
+
+	public static Object[] makeArgs(Object obj1, Object obj2) {
+		return new Object[] { obj1, obj2 };
+	}
+
+	public static Object[] makeArgs(Object obj1, Object obj2, Object obj3) {
+		return new Object[] { obj1, obj2, obj3 };
+	}
+
+	public static Object[] makeArgs(Object obj1, Object obj2, Object obj3, Object obj4) {
+		return new Object[] { obj1, obj2, obj3, obj4 };
+	}
+
+	public static Object[] makeArgs(Object obj1, Object obj2, Object obj3, Object obj4, Object obj5) {
+		return new Object[] { obj1, obj2, obj3, obj4, obj5 };
+	}
+
+	public static Object invokeMethod(Class clazz, String methodName, Object[] args)
+			throws IllegalArgumentException, IllegalAccessException, InvocationTargetException,
+			SecurityException, NoSuchMethodException {
+		return invokeMethod(clazz, null, methodName, args);
+	}
+
+	public static Object invokeMethod(Class clazz, Object target, String methodName, Object[] args)
+			throws IllegalArgumentException, IllegalAccessException, InvocationTargetException,
+			SecurityException, NoSuchMethodException {
+		Class[] signature = new Class[args.length];
+		for (int i = 0; i < args.length; i++) {
+			Class thisClass = args[i].getClass();
+			if (thisClass == Integer.class)
+				signature[i] = int.class;
+			else if (thisClass == Long.class)
+				signature[i] = long.class;
+			else if (thisClass == Byte.class)
+				signature[i] = byte.class;
+			else
+				signature[i] = thisClass;
+		}
+		Method method = clazz.getMethod(methodName, signature);
+		return method.invoke(target, args);
+	}
+
+	public static Object wrapPointer(long value) {
+		if (PTR_CLASS == long.class)
+			return new Long(value);
+		else
+			return new Integer((int) value);
+	}
+
+	// The following methods reflectively call corresponding methods in the OS
+	// class, using ints or longs as required based on platform.
+
+	public static NSControl new_NSControl(long arg0) throws NoSuchMethodException,
+			InstantiationException, IllegalArgumentException, IllegalAccessException,
+			InvocationTargetException {
+		Class clazz = NSControl.class;
+		Class PTR_CLASS = C.PTR_SIZEOF == 8 ? long.class : int.class;
+		Constructor constructor = clazz.getConstructor(new Class[] { PTR_CLASS });
+		return (NSControl) constructor.newInstance(new Object[] { wrapPointer(arg0) });
+	}
+
+	/**
+	 * Specialized method. It's behavior is isolated and different enough from
+	 * the usual invocation that custom code is warranted.
+	 */
+	public static long[] OS_object_getInstanceVariable(long delegateId, byte[] name)
+			throws IllegalArgumentException, IllegalAccessException, InvocationTargetException,
+			SecurityException, NoSuchMethodException {
+		Class clazz = OS.class;
+		Method method = null;
+		Class PTR_CLASS = C.PTR_SIZEOF == 8 ? long.class : int.class;
+		if (PTR_CLASS == long.class) {
+			method = clazz.getMethod("object_getInstanceVariable", new Class[] { long.class,
+					byte[].class, long[].class });
+			long[] resultPtr = new long[1];
+			method.invoke(null, new Object[] { new Long(delegateId), name, resultPtr });
+			return resultPtr;
+		} else {
+			method = clazz.getMethod("object_getInstanceVariable", new Class[] { int.class,
+					byte[].class, int[].class });
+			int[] resultPtr = new int[1];
+			method.invoke(null, new Object[] { new Integer((int) delegateId), name, resultPtr });
+			return new long[] { resultPtr[0] };
+		}
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/MinimizeWindowHandler.java b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/MinimizeWindowHandler.java
new file mode 100644
index 0000000..1a6d869
--- /dev/null
+++ b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/MinimizeWindowHandler.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.cocoa;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.swt.internal.cocoa.NSWindow;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * 
+ * @since 3.7
+ * 
+ */
+public class MinimizeWindowHandler extends AbstractWindowHandler {
+
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		Shell activeShell = HandlerUtil.getActiveShell(event);
+		NSWindow window = activeShell.view.window();
+		if (window != null)
+			window.miniaturize(window);
+		return null;
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/ZoomWindowHandler.java b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/ZoomWindowHandler.java
new file mode 100644
index 0000000..673c14e
--- /dev/null
+++ b/bundles/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/ZoomWindowHandler.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.cocoa;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.swt.internal.cocoa.NSWindow;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * 
+ * @since 3.7 
+ *
+ */
+public class ZoomWindowHandler extends AbstractWindowHandler {
+
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		Shell activeShell = HandlerUtil.getActiveShell(event);
+		NSWindow window = activeShell.view.window();
+		if(window!=null)
+			window.zoom(window);
+		return null;
+	}
+	
+}
diff --git a/bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF
index c5000e5..823bf3e 100644
--- a/bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.ui.forms
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.5.100.qualifier
 Bundle-Vendor: %provider-name
 Bundle-Localization: plugin
 Export-Package: org.eclipse.ui.forms,
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ColumnLayout.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ColumnLayout.java
index 21450d6..72e5937 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ColumnLayout.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ColumnLayout.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Layout;
+import org.eclipse.ui.internal.forms.widgets.ColumnLayoutUtils;
 /**
  * This layout manager arranges children of the composite parent in vertical
  * columns. All the columns are identical size and children are stretched
@@ -112,9 +113,7 @@
 			ncolumns = Math.max(ncolumns, minNumColumns);
 			ncolumns = Math.min(ncolumns, maxNumColumns);
 		}
-		int perColHeight = cheight / ncolumns;
-		if (cheight % ncolumns != 0)
-			perColHeight++;
+		int perColHeight = ColumnLayoutUtils.computeColumnHeight(ncolumns, sizes, cheight, verticalSpacing);
 		int colHeight = 0;
 		int[] heights = new int[ncolumns];
 		int ncol = 0;
@@ -196,11 +195,9 @@
 //			childrenPerColumn++;
 //		int colWidth = 0;
 
-		int fillWidth = Math.max(cwidth, realWidth);
-		
-		int perColHeight = cheight / ncolumns;
-		if (cheight % ncolumns != 0)
-			perColHeight++;
+		int fillWidth = Math.max(cwidth, realWidth);	
+		int perColHeight = ColumnLayoutUtils.computeColumnHeight(ncolumns, sizes, cheight, verticalSpacing);
+
 		
 		int colHeight = 0;
 		int[] heights = new int[ncolumns];
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java
index f7cfd6d..c96d79a 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,11 +9,13 @@
  *     IBM Corporation - initial API and implementation
  *     Kai Nacke - Fix for Bug 202382
  *     Bryan Hunt - Fix for Bug 245457
+ *     Didier Villevalois - Fix for Bug 178534 
  *******************************************************************************/
 package org.eclipse.ui.forms.widgets;
 
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.osgi.service.environment.Constants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.FocusEvent;
 import org.eclipse.swt.events.FocusListener;
@@ -327,6 +329,10 @@
 						ty = tcsize.y / 2 - size.y / 2 + marginHeight
 								+ tvmargin;
 				}
+				String os = System.getProperty("os.name"); //$NON-NLS-1$
+				if (Constants.OS_LINUX.equalsIgnoreCase(os)) {
+					size.x += 1; // See Bug 342610
+				}
 				textLabelCache.setBounds(x, ty, size.x, size.y);
 			}
 			if (textClient != null) {
@@ -356,13 +362,12 @@
 					y += VSPACE;
 			}
 			if (expanded) {
-				int areaWidth = clientArea.width - marginWidth - marginWidth
-						- thmargin - thmargin;
+				int areaWidth = clientArea.width - marginWidth - thmargin;
 				int cx = marginWidth + thmargin;
 				if ((expansionStyle & CLIENT_INDENT) != 0) {
 					cx = x;
-					areaWidth -= x;
 				}
+				areaWidth -= cx;
 				if (client != null) {
 					Point dsize = null;
 					Control desc = getDescriptionControl();
@@ -594,11 +599,15 @@
 				toggle.paintFocus=false;
 				toggle.addFocusListener(new FocusListener() {
 					public void focusGained(FocusEvent e) {
-						textLabel.redraw();
+						if (textLabel != null) {
+						    textLabel.redraw();
+						} 
 					}
 
 					public void focusLost(FocusEvent e) {
-						textLabel.redraw();
+						if (textLabel != null) {
+						    textLabel.redraw();
+						} 
 					}
 				});
 			}
@@ -809,10 +818,14 @@
 	 * @see #getText()
 	 */
 	public void setText(String title) {
-		if (textLabel instanceof Label)
+		if (textLabel instanceof Label) {
 			((Label) textLabel).setText(title);
-		else if (textLabel instanceof Hyperlink)
+		} else if (textLabel instanceof Hyperlink) {
 			((Hyperlink) textLabel).setText(title);
+		} else {
+			return;
+		}
+		layout();
 	}
 
 	/**
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.java
index 9e648fe..e396e25 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.java
@@ -1612,22 +1612,21 @@
 
 	private void paintFocusTransfer(IHyperlinkSegment oldLink,
 			IHyperlinkSegment newLink) {
-		GC gc = new GC(this);
-		Color bg = getBackground();
-		Color fg = getForeground();
-		gc.setFont(getFont());
 		if (oldLink != null) {
-			gc.setBackground(bg);
-			gc.setForeground(fg);
-			oldLink.paintFocus(gc, bg, fg, false, null);
+			Rectangle r = oldLink.getBounds();
+			redraw(r.x, r.y, r.width, r.height, true);
+			update();
 		}
 		if (newLink != null) {
-			// ensureVisible(newLink);
+			GC gc = new GC(this);
+			Color bg = getBackground();
+			Color fg = getForeground();
+			gc.setFont(getFont());
 			gc.setBackground(bg);
 			gc.setForeground(fg);
 			newLink.paintFocus(gc, bg, fg, true, null);
+			gc.dispose();
 		}
-		gc.dispose();
 	}
 
 	private void ensureVisible(IFocusSelectable segment) {
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormToolkit.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormToolkit.java
index 44a9a37..ddcbeca 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormToolkit.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormToolkit.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,10 @@
  *******************************************************************************/
 package org.eclipse.ui.forms.widgets;
 
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.window.Window;
 import org.eclipse.swt.SWT;
@@ -165,10 +169,23 @@
 	}
 
 	private static class VisibilityHandler extends FocusAdapter {
+		private boolean handleNextFocusGained = true;
+		
 		public void focusGained(FocusEvent e) {
+			if (!handleNextFocusGained) {
+				handleNextFocusGained = true;
+			} else {
+				Widget w = e.widget;
+				if (w instanceof Control) {
+					FormUtil.ensureVisible((Control) w);
+				}
+			}
+		}
+		
+		public void focusLost(FocusEvent e) {
 			Widget w = e.widget;
 			if (w instanceof Control) {
-				FormUtil.ensureVisible((Control) w);
+				handleNextFocusGained = w.getDisplay().getActiveShell() == ((Control) w).getShell(); 
 			}
 		}
 	}
@@ -184,33 +201,42 @@
 	}
 
 	private class BoldFontHolder {
-		private Font normalFont;
-
-		private Font boldFont;
+		private Map fontMap;
 
 		public BoldFontHolder() {
 		}
 
 		public Font getBoldFont(Font font) {
-			createBoldFont(font);
-			return boldFont;
-		}
+			if (font == null ) {
+				return null;
+			}
+			
+			if (fontMap == null) {
+				fontMap = new HashMap();
+			}
+			
+			if (fontMap.containsKey(font)) {
+				return (Font) fontMap.get(font);
+			}
 
-		private void createBoldFont(Font font) {
-			if (normalFont == null || !normalFont.equals(font)) {
-				normalFont = font;
-				dispose();
-			}
-			if (boldFont == null) {
-				boldFont = FormFonts.getInstance().getBoldFont(colors.getDisplay(),
-						normalFont);
-			}
+			Font boldFont = FormFonts.getInstance().getBoldFont(colors.getDisplay(),
+						font);
+			fontMap.put(font, boldFont);
+			return boldFont;
+
 		}
 
 		public void dispose() {
-			if (boldFont != null && colors.getDisplay() != null) {
-				FormFonts.getInstance().markFinished(boldFont, colors.getDisplay());
-				boldFont = null;
+			if (fontMap == null) {
+				return;
+			}
+			for (Iterator iter = fontMap.values().iterator(); iter.hasNext();) {
+				Font boldFont = (Font) iter.next();
+				if (boldFont != null && colors.getDisplay() != null) {
+					FormFonts.getInstance().markFinished(boldFont,
+							colors.getDisplay());
+					boldFont = null;
+				}
 			}
 		}
 	}
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ImageHyperlink.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ImageHyperlink.java
index e526db8..5a4e57b 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ImageHyperlink.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ImageHyperlink.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -257,7 +257,7 @@
 		this.image = image;
 		if (disabledImage != null)
 			disabledImage.dispose();
-		if (!isEnabled() && image != null && !image.isDisposed())
+		if (image != null && !image.isDisposed())
 			disabledImage = new Image(image.getDevice(), image, SWT.IMAGE_DISABLE);
 	}
 
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/Section.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/Section.java
index d3dcb78..80b500b 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/Section.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/Section.java
@@ -364,13 +364,8 @@
 			Point tcsize = null;
 			if (toggle != null)
 				tsize = toggle.getSize();
-			int twidth = bounds.width - marginWidth - marginWidth;
-			if (tsize != null)
-				twidth -= tsize.x + IGAP;
 			if (getTextClient() != null)
 				tcsize = getTextClient().getSize();
-			if (tcsize != null)
-				twidth -= tcsize.x + IGAP;
 			Point size = textLabel == null ? new Point(0,0) : textLabel.getSize();
 			if (tsize != null)
 				theight += Math.max(theight, tsize.y);
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/SharedScrolledComposite.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/SharedScrolledComposite.java
index ca7b205..6ae9b9b 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/SharedScrolledComposite.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/SharedScrolledComposite.java
@@ -7,7 +7,7 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
- *     Wojciech Galanciak - fix for Bug 294868 – [Forms] Problem with text 
+ *     Wojciech Galanciak - fix for Bug 294868 [Forms] Problem with text 
  *     wrapping in SharedScrolledComposite:
  *******************************************************************************/
 package org.eclipse.ui.forms.widgets;
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/SizeCache.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/SizeCache.java
index a22b207..4249e9b 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/SizeCache.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/SizeCache.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,6 @@
  *******************************************************************************/
 package org.eclipse.ui.forms.widgets;
 
-import java.util.List;
-
 import org.eclipse.jface.util.Geometry;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Point;
@@ -22,6 +20,7 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Layout;
+import org.eclipse.swt.widgets.List;
 import org.eclipse.swt.widgets.ProgressBar;
 import org.eclipse.swt.widgets.Sash;
 import org.eclipse.swt.widgets.Scale;
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/TableWrapData.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/TableWrapData.java
index eb8121e..2d23e95 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/TableWrapData.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/TableWrapData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -173,14 +173,14 @@
 	public TableWrapData(int align, int valign, int rowspan, int colspan) {
 		if (align != LEFT && align != CENTER && align != RIGHT && align != FILL
 				&& align != FILL_GRAB)
-			SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, "align"); //$NON-NLS-1$
+			SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, " \"align\""); //$NON-NLS-1$
 		if (valign != TOP && valign != MIDDLE && valign != BOTTOM
 				&& valign != FILL && valign != FILL_GRAB)
-			SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, "valign"); //$NON-NLS-1$
+			SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, " \"valign\""); //$NON-NLS-1$
 		if (rowspan < 1)
-			SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, "rowspan"); //$NON-NLS-1$
+			SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, " \"rowspan\""); //$NON-NLS-1$
 		if (colspan < 1)
-			SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, "colspan"); //$NON-NLS-1$
+			SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, " \"colspan\""); //$NON-NLS-1$
 		if (align == FILL_GRAB) {
 			this.align = FILL;
 			grabHorizontal = true;
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/TableWrapLayout.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/TableWrapLayout.java
index 4ffaab1..a51922a 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/TableWrapLayout.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/TableWrapLayout.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2011 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -20,7 +20,7 @@
 
 /**
  * This implementation of the layout algorithm attempts to position controls in
- * the composite using a two-pass autolayout HTML table altorithm recommeded by
+ * the composite using a two-pass autolayout HTML table algorithm recommended by
  * HTML 4.01 W3C specification (see
  * http://www.w3.org/TR/html4/appendix/notes.html#h-B.5.2.2). The main
  * differences with GridLayout is that it has two passes and that width and
@@ -251,9 +251,7 @@
 				columnWidths = maxColumnWidths;
 			} else {
 				columnWidths = new int[numColumns];
-				int colSpace = tableWidth - leftMargin - rightMargin;
-				colSpace -= (numColumns - 1) * horizontalSpacing;
-				int extra = parentWidth - maxWidth;
+			    int extra = parentWidth - maxWidth;
 				int colExtra = extra / growingColumns.length;
 				for (int i = 0; i < numColumns; i++) {
 					columnWidths[i] = maxColumnWidths[i];
@@ -371,7 +369,7 @@
 		int fixedPart = leftMargin + rightMargin + (numColumns - 1)
 				* horizontalSpacing;
 		int D = maxWidth - minWidth;
-		int W = tableWidth - fixedPart - minWidth;
+		int W = tableWidth - minWidth;
 		int widths[] = new int[numColumns];
 		int rem = 0;
 		for (int i = 0; i < numColumns; i++) {
@@ -708,7 +706,7 @@
 	int internalGetMinimumWidth(Composite parent, boolean changed) {
 		if (changed)
 			//calculateMinimumColumnWidths(parent, true);
-			calculateColumnWidths(parent, minColumnWidths, false, true);
+			calculateColumnWidths(parent, minColumnWidths, false, true, makeColumnsEqualWidth);
 		int minimumWidth = 0;
 		widestColumnWidth = 0;
 		if (makeColumnsEqualWidth) {
@@ -733,7 +731,7 @@
 	int internalGetMaximumWidth(Composite parent, boolean changed) {
 		if (changed)
 			//calculateMaximumColumnWidths(parent, true);
-			calculateColumnWidths(parent, maxColumnWidths, true, true);
+			calculateColumnWidths(parent, maxColumnWidths, true, true, makeColumnsEqualWidth);
 		int maximumWidth = 0;
 		for (int i = 0; i < numColumns; i++) {
 			if (i > 0)
@@ -758,8 +756,9 @@
 		}
 	}
 	
-	void calculateColumnWidths(Composite parent, int [] columnWidths, boolean max, boolean changed) {
+	void calculateColumnWidths(Composite parent, int [] columnWidths, boolean max, boolean changed, boolean makeColumnsEqualWidth2) {
 		boolean secondPassNeeded=false;
+		int widestColumnWidth = 0;
 		for (int i = 0; i < grid.size(); i++) {
 			TableWrapData[] row = (TableWrapData[]) grid.elementAt(i);
 			for (int j = 0; j < numColumns; j++) {
@@ -783,6 +782,12 @@
 
 				width += td.indent;
 				columnWidths[j] = Math.max(columnWidths[j], width);
+				widestColumnWidth = Math.max(widestColumnWidth, columnWidths[j]);
+			}
+		}
+		if (makeColumnsEqualWidth) {
+			for (int i = 0; i < numColumns; i++) {
+				columnWidths[i] = widestColumnWidth;
 			}
 		}
 		if (!secondPassNeeded) return;
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/AggregateHyperlinkSegment.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/AggregateHyperlinkSegment.java
index 839e9a7..e55db95 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/AggregateHyperlinkSegment.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/AggregateHyperlinkSegment.java
@@ -117,16 +117,15 @@
 	 * @see org.eclipse.ui.internal.forms.widgets.IHyperlinkSegment#getBounds()
 	 */
 	public Rectangle getBounds() {
-		Rectangle bounds = new Rectangle(Integer.MAX_VALUE, Integer.MAX_VALUE,
-				0, 0);
-		// TODO this is wrong
-		for (int i = 0; i < segments.size(); i++) {
+		if (segments.size() == 0)
+			return new Rectangle(Integer.MAX_VALUE, Integer.MAX_VALUE, 0, 0);
+			
+		IHyperlinkSegment segment0 = (IHyperlinkSegment) segments.get(0);
+		Rectangle bounds = segment0.getBounds();
+		for (int i = 1; i < segments.size(); i++) {
 			IHyperlinkSegment segment = (IHyperlinkSegment) segments.get(i);
 			Rectangle sbounds = segment.getBounds();
-			bounds.x = Math.min(bounds.x, sbounds.x);
-			bounds.y = Math.min(bounds.y, sbounds.y);
-			bounds.width = Math.max(bounds.width, sbounds.width);
-			bounds.height = Math.max(bounds.height, sbounds.height);
+			bounds.add(sbounds);
 		}
 		return bounds;
 	}
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/ColumnLayoutUtils.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/ColumnLayoutUtils.java
new file mode 100644
index 0000000..90a8116
--- /dev/null
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/ColumnLayoutUtils.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ui.internal.forms.widgets;
+
+import org.eclipse.swt.graphics.Point;
+
+public class ColumnLayoutUtils {
+	
+	/*
+	 * Compute the minimum required height by iteration. The first guess is to
+	 * 
+	 * This method is public to allow for JUnit testing
+	 */
+	public static int computeColumnHeight(int ncolumns, Point[] sizes, int totalHeight, int verticalMargin) {
+		int averageHeight = ( totalHeight + sizes.length * verticalMargin ) / ncolumns;
+		int requiredHeight = computeActualHeight(ncolumns, sizes, averageHeight, verticalMargin);
+		if (averageHeight == requiredHeight) {
+			return requiredHeight;
+		}
+		// Try making the columns shorter, repeat up to 10 times, usually one or two iterations will be sufficient
+		for ( int i = 0; i < 10; i++ ) {
+			int candidateHeight = computeActualHeight(ncolumns, sizes, requiredHeight - 1, verticalMargin);
+			if ( candidateHeight >= requiredHeight ) {
+				return requiredHeight;
+			}
+			requiredHeight = candidateHeight;
+		}
+		return requiredHeight;
+	}
+	
+	private static int computeActualHeight(int ncolumns, Point[] sizes, int candidateHeight, int verticalMargin ) {
+		int colHeight = 0;
+		int maxHeight = 0;
+		int column = 1;
+		for (int i = 0; i < sizes.length; i++) {
+			int childHeight = sizes[i].y;
+			if (i > 0 && column < ncolumns && colHeight + childHeight + verticalMargin > candidateHeight) {
+				maxHeight = Math.max(colHeight, maxHeight);
+				column++;
+				colHeight = 0; 
+			}
+			if (colHeight > 0)
+				colHeight += verticalMargin;
+			colHeight += childHeight;
+		}
+		maxHeight = Math.max(colHeight, maxHeight);
+		return maxHeight;
+	}
+}
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/Paragraph.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/Paragraph.java
index 213abf6..2f9fac8 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/Paragraph.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/Paragraph.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -137,6 +137,10 @@
 			ParagraphSegment segment = segments[j];
 			segment.advanceLocator(gc, width, hloc, resourceTable, true);
 		}
+		if (hloc.rowHeight == 0) {
+			FontMetrics fm = gc.getFontMetrics();
+			hloc.rowHeight = fm.getHeight();
+		}
 		hloc.collectHeights();
 		loc.heights = heights;
 		loc.rowCounter = 0;
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextSegment.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextSegment.java
index 9a7105a..837ff4a 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextSegment.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextSegment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Konstantin Komissarchik - Fix for  Bug 316997 
  *******************************************************************************/
 package org.eclipse.ui.internal.forms.widgets;
 
@@ -14,6 +15,7 @@
 import java.util.Hashtable;
 import java.util.Vector;
 
+import org.eclipse.jface.util.Geometry;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Font;
@@ -205,20 +207,16 @@
 	}
 
 	public Rectangle getBounds() {
-		int x = 0, y = 0;
-		int width = 0, height = 0;
-
-		for (int i = 0; i < areaRectangles.size(); i++) {
+		if (areaRectangles.size() == 0)
+			return new Rectangle(0, 0, 0, 0);
+		
+		AreaRectangle ar0 = (AreaRectangle) areaRectangles.get(0);
+		Rectangle bounds = Geometry.copy(ar0.rect);
+		for (int i = 1; i < areaRectangles.size(); i++) {
 			AreaRectangle ar = (AreaRectangle) areaRectangles.get(i);
-			if (i == 0) {
-				x = ar.rect.x;
-				y = ar.rect.y;
-			} else
-				x = Math.min(ar.rect.x, x);
-			width = Math.max(ar.rect.width, width);
-			height += ar.rect.height;
+			bounds.add(ar.rect);
 		}
-		return new Rectangle(x, y, width, height);
+		return bounds;
 	}
 
 	public boolean advanceLocator(GC gc, int wHint, Locator locator,
@@ -550,7 +548,7 @@
 		int sstart = -1;
 		int sstop = -1;
 
-		if (firstRow && bounds.x + swidth > leftOffset) {
+		if (firstRow && bounds.x < leftOffset) {
 			sstart = convertOffsetToStringIndex(gc, s, bounds.x, swidth,
 					leftOffset);
 		}
@@ -563,7 +561,9 @@
 			int lindex = sstart != -1 ? sstart : 0;
 			int rindex = sstop != -1 ? sstop : s.length();
 			String mid = s.substring(lindex, rindex);
-			selData.addSegment(mid);
+			if (mid.length() > 0 ) {
+			    selData.addSegment(mid);
+			}
 		}
 	}
 
@@ -659,15 +659,14 @@
 				// only wrap on the first fragment if we are not at the start of a line
 				if ((i != 0 || locator.x > locator.getStartX() + (isSelectable() ? 1 : 0)) && locator.x + lineExtent.x + fragment.length > rightEdge) {
 					// overflow
-					int lineWidth = locator.x + lineExtent.x;
-					if (isSelectable())
-						lineWidth += 1;
-					int ly = locator.getBaseline(lineHeight - fm.getLeading());
-					Rectangle br = new Rectangle(isSelectable()?
-							locator.x - 1:locator.x, ly,
-							isSelectable()?lineExtent.x + 1:lineExtent.x, lineHeight - descent + 3);
-					areaRectangles
-							.add(new AreaRectangle(br, lineStart, lastLoc));
+					if ( i != 0 ) {
+						int ly = locator.getBaseline(lineHeight - fm.getLeading());
+						Rectangle br = new Rectangle(isSelectable()?
+								locator.x - 1:locator.x, ly,
+								isSelectable()?lineExtent.x + 1:lineExtent.x, lineHeight - descent + 3);
+						areaRectangles
+						.add(new AreaRectangle(br, lineStart, lastLoc));
+					}
 
 					locator.rowHeight = Math.max(locator.rowHeight,
 							lineExtent.y);
diff --git a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TitleRegion.java b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TitleRegion.java
index a910810..b75b231 100644
--- a/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TitleRegion.java
+++ b/bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TitleRegion.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@
 
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.MenuManager;
+import org.eclipse.osgi.service.environment.Constants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.dnd.DragSource;
 import org.eclipse.swt.dnd.DragSourceEffect;
@@ -197,6 +198,10 @@
 				}
 				if (titleLabel.getVisible()) {
 					int tw = width - HMARGIN * 2 - SPACING * 2;
+					String os = System.getProperty("os.name"); //$NON-NLS-1$
+					if (Constants.OS_LINUX.equalsIgnoreCase(os)) {
+						tw += 1; // See Bug 342610
+					}
 					if (bsize != null)
 						tw -= bsize.x + SPACING;
 					if (msize != null)
diff --git a/bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF
index b14427b..1da7ddd 100644
--- a/bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.ide.application;singleton:=true
-Bundle-Version: 1.0.200.qualifier
+Bundle-Version: 1.0.300.qualifier
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
 Bundle-ClassPath: e4-ide-application.jar,
diff --git a/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java b/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java
index cf494cf..2a1b319 100644
--- a/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java
+++ b/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@
 import java.io.OutputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.Map;
 import java.util.Properties;
 
 import org.eclipse.core.runtime.IConfigurationElement;
@@ -70,6 +71,12 @@
     private static final Integer EXIT_RELAUNCH = new Integer(24);
 
     /**
+     * A special return code that will be recognized by the PDE launcher and used to
+     * show an error dialog if the workspace is locked.
+     */
+    private static final Integer EXIT_WORKSPACE_LOCKED = new Integer(15);
+    
+    /**
      * The ID of the application plug-in
      */
 	public static final String PLUGIN_ID = "org.eclipse.ui.ide.application"; //$NON-NLS-1$
@@ -102,10 +109,11 @@
         		shell.setImages(Dialog.getDefaultImages());
         	}
            
-            if (!checkInstanceLocation(shell)) {
+            Object instanceLocationCheck = checkInstanceLocation(shell, appContext.getArguments());
+			if (instanceLocationCheck != null) {
             	WorkbenchPlugin.unsetSplashShell(display);
                 Platform.endSplash();
-                return EXIT_OK;
+                return instanceLocationCheck;
             }
 
             // create the workbench with this advisor and run it until it exits
@@ -154,13 +162,14 @@
     }
 
     /**
-     * Return true if a valid workspace path has been set and false otherwise.
+     * Return <code>null</code> if a valid workspace path has been set and an exit code otherwise.
      * Prompt for and set the path if possible and required.
      * 
-     * @return true if a valid instance location has been set and false
+     * @param applicationArguments the command line arguments
+     * @return <code>null</code> if a valid instance location has been set and an exit code
      *         otherwise
      */
-    private boolean checkInstanceLocation(Shell shell) {
+    private Object checkInstanceLocation(Shell shell, Map applicationArguments) {
         // -data @none was specified but an ide requires workspace
         Location instanceLoc = Platform.getInstanceLocation();
         if (instanceLoc == null) {
@@ -169,7 +178,7 @@
                             shell,
                             IDEWorkbenchMessages.IDEApplication_workspaceMandatoryTitle,
                             IDEWorkbenchMessages.IDEApplication_workspaceMandatoryMessage);
-            return false;
+            return EXIT_OK;
         }
 
         // -data "/valid/path", workspace already set
@@ -177,7 +186,7 @@
             // make sure the meta data version is compatible (or the user has
             // chosen to overwrite it).
             if (!checkValidWorkspace(shell, instanceLoc.getURL())) {
-				return false;
+				return EXIT_OK;
 			}
 
             // at this point its valid, so try to lock it and update the
@@ -185,7 +194,7 @@
             try {
                 if (instanceLoc.lock()) {
                     writeWorkspaceVersion();
-                    return true;
+                    return null;
                 }
                 
                 // we failed to create the directory.  
@@ -194,6 +203,9 @@
                 // 2. directory could not be created
                 File workspaceDirectory = new File(instanceLoc.getURL().getFile());
                 if (workspaceDirectory.exists()) {
+                	if (isDevLaunchMode(applicationArguments)) {
+                		return EXIT_WORKSPACE_LOCKED;
+                	}
 	                MessageDialog.openError(
 	                        shell,
 	                        IDEWorkbenchMessages.IDEApplication_workspaceCannotLockTitle,
@@ -213,7 +225,7 @@
                         IDEWorkbenchMessages.InternalError,
                         e.getMessage());                
             }            
-            return false;
+            return EXIT_OK;
         }
 
         // -data @noDefault or -data not specified, prompt and set
@@ -224,7 +236,7 @@
         while (true) {
             URL workspaceUrl = promptForWorkspace(shell, launchData, force);
             if (workspaceUrl == null) {
-				return false;
+				return EXIT_OK;
 			}
 
             // if there is an error with the first selection, then force the
@@ -237,7 +249,7 @@
                 if (instanceLoc.setURL(workspaceUrl, true)) {
                     launchData.writePersistedData();
                     writeWorkspaceVersion();
-                    return true;
+                    return null;
                 }
             } catch (IllegalStateException e) {
                 MessageDialog
@@ -245,7 +257,7 @@
                                 shell,
                                 IDEWorkbenchMessages.IDEApplication_workspaceCannotBeSetTitle,
                                 IDEWorkbenchMessages.IDEApplication_workspaceCannotBeSetMessage);
-                return false;
+                return EXIT_OK;
             }
 
             // by this point it has been determined that the workspace is
@@ -255,6 +267,13 @@
         }
     }
 
+	private static boolean isDevLaunchMode(Map args) {
+		// see org.eclipse.pde.internal.core.PluginPathFinder.isDevLaunchMode()
+		if (Boolean.getBoolean("eclipse.pde.launch")) //$NON-NLS-1$
+			return true;
+		return args.containsKey("-pdelaunch"); //$NON-NLS-1$
+	}
+	
     /**
      * Open a workspace selection dialog on the argument shell, populating the
      * argument data with the user's selection. Perform first level validation
diff --git a/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java b/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java
index 81693f3..d343f26 100644
--- a/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java
+++ b/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java
@@ -17,12 +17,24 @@
 import java.util.Map;
 import java.util.TreeMap;
 
+import com.ibm.icu.text.Collator;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.Version;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+
 import org.eclipse.core.internal.resources.Workspace;
 import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.WorkspaceJob;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.IAdaptable;
@@ -36,6 +48,12 @@
 import org.eclipse.core.runtime.ProgressMonitorWrapper;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.WorkspaceJob;
+
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -45,14 +63,7 @@
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.util.Policy;
 import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
+
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.application.IWorkbenchConfigurer;
 import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
@@ -74,11 +85,6 @@
 import org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog;
 import org.eclipse.ui.progress.IProgressService;
 import org.eclipse.ui.statushandlers.AbstractStatusHandler;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.Version;
-
-import com.ibm.icu.text.Collator;
 
 /**
  * IDE-specified workbench advisor which configures the workbench for use as an
@@ -659,6 +665,10 @@
 		// //$NON-NLS-1$
 		// icons
 
+		// View icons
+		final String PATH_EVIEW= ICONS_PATH + "eview16/"; //$NON-NLS-1$
+
+
 		Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH);
 
 		declareWorkbenchImage(ideBundle,
@@ -733,6 +743,8 @@
 		declareWorkbenchImage(ideBundle, IDE.SharedImages.IMG_OPEN_MARKER,
 				PATH_ELOCALTOOL + "gotoobj_tsk.gif", true); //$NON-NLS-1$
 
+
+		// Quick fix icons
 		declareWorkbenchImage(ideBundle,
 				IDEInternalWorkbenchImages.IMG_ELCL_QUICK_FIX_ENABLED,
 				PATH_ELOCALTOOL + "smartmode_co.gif", true); //$NON-NLS-1$
@@ -741,6 +753,14 @@
 				IDEInternalWorkbenchImages.IMG_DLCL_QUICK_FIX_DISABLED,
 				PATH_DLOCALTOOL + "smartmode_co.gif", true); //$NON-NLS-1$
 
+		declareWorkbenchImage(ideBundle,
+				IDEInternalWorkbenchImages.IMG_OBJS_FIXABLE_WARNING,
+				PATH_OBJECT + "quickfix_warning_obj.gif", true); //$NON-NLS-1$
+		declareWorkbenchImage(ideBundle,
+				IDEInternalWorkbenchImages.IMG_OBJS_FIXABLE_ERROR,
+				PATH_OBJECT + "quickfix_error_obj.gif", true); //$NON-NLS-1$
+
+
 		// task objects
 		// declareRegistryImage(IDEInternalWorkbenchImages.IMG_OBJS_HPRIO_TSK,
 		// PATH_OBJECT+"hprio_tsk.gif");
@@ -785,7 +805,17 @@
 		declareWorkbenchImage(ideBundle,
 				IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEM_CATEGORY,
 				PATH_ETOOL + "problem_category.gif", true); //$NON-NLS-1$
-	
+
+		declareWorkbenchImage(ideBundle,
+				IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEMS_VIEW,
+				PATH_EVIEW + "problems_view.gif", true); //$NON-NLS-1$
+		declareWorkbenchImage(ideBundle,
+				IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEMS_VIEW_ERROR,
+				PATH_EVIEW + "problems_view_error.gif", true); //$NON-NLS-1$
+		declareWorkbenchImage(ideBundle,
+				IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEMS_VIEW_WARNING,
+				PATH_EVIEW + "problems_view_warning.gif", true); //$NON-NLS-1$
+
 		// synchronization indicator objects
 		// declareRegistryImage(IDEInternalWorkbenchImages.IMG_OBJS_WBET_STAT,
 		// PATH_OVERLAY+"wbet_stat.gif");
diff --git a/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java b/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java
index aef7fd6..356e425 100644
--- a/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java
+++ b/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java
@@ -17,7 +17,9 @@
 import java.util.List;
 import java.util.Map;
 
+import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProduct;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
@@ -41,8 +43,10 @@
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IFileEditorInput;
 import org.eclipse.ui.IPageListener;
 import org.eclipse.ui.IPartListener2;
 import org.eclipse.ui.IPerspectiveDescriptor;
@@ -55,6 +59,7 @@
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PerspectiveAdapter;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.WorkbenchException;
 import org.eclipse.ui.actions.ActionFactory;
 import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
@@ -62,6 +67,7 @@
 import org.eclipse.ui.application.IActionBarConfigurer;
 import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
 import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+import org.eclipse.ui.ide.FileStoreEditorInput;
 import org.eclipse.ui.internal.ide.AboutInfo;
 import org.eclipse.ui.internal.ide.EditorAreaDropAdapter;
 import org.eclipse.ui.internal.ide.IDEInternalPreferences;
@@ -69,6 +75,8 @@
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.ide.WorkbenchActionBuilder;
 import org.eclipse.ui.internal.ide.dialogs.WelcomeEditorInput;
+import org.eclipse.ui.internal.tweaklets.TitlePathUpdater;
+import org.eclipse.ui.internal.tweaklets.Tweaklets;
 import org.eclipse.ui.part.EditorInputTransfer;
 import org.eclipse.ui.part.MarkerTransfer;
 import org.eclipse.ui.part.ResourceTransfer;
@@ -108,6 +116,14 @@
 	private IWorkbenchAction openPerspectiveAction;
 
 	/**
+	 * The property change listener.
+	 * @since 3.6.1
+	 */
+	private IPropertyChangeListener propertyChangeListener;
+
+	private TitlePathUpdater titlePathUpdater;
+
+	/**
 	 * Crates a new IDE workbench window advisor.
 	 * 
 	 * @param wbAdvisor
@@ -119,6 +135,7 @@
 			IWorkbenchWindowConfigurer configurer) {
 		super(configurer);
 		this.wbAdvisor = wbAdvisor;
+		titlePathUpdater = (TitlePathUpdater) Tweaklets.get(TitlePathUpdater.KEY);
 	}
 
 	/*
@@ -171,6 +188,17 @@
 				.getBoolean(IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW);
 
 		if (promptOnExit) {
+			if (parentShell == null) {
+				IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+				if (workbenchWindow != null) {
+					parentShell = workbenchWindow.getShell();
+				}
+			}
+			if (parentShell != null) {
+				parentShell.setMinimized(false);
+				parentShell.forceActive();
+			}
+			
 			String message;
 
 			String productName = null;
@@ -231,7 +259,7 @@
 
 		hookTitleUpdateListeners(configurer);
 	}
-
+	
 	/**
 	 * Hooks the listeners needed on the window
 	 * 
@@ -315,18 +343,19 @@
 				});
 		
 		// Listen for changes of the workspace name.
+		propertyChangeListener = new IPropertyChangeListener() {
+			public void propertyChange(PropertyChangeEvent event) {
+				if (IDEInternalPreferences.WORKSPACE_NAME.equals(event
+						.getProperty())) {
+					// Make sure the title is actually updated by
+					// setting last active page.
+					lastActivePage = null;
+					updateTitle(false);
+				}
+			}
+		};
 		IDEWorkbenchPlugin.getDefault().getPreferenceStore()
-				.addPropertyChangeListener(new IPropertyChangeListener() {
-					public void propertyChange(PropertyChangeEvent event) {
-						if (IDEInternalPreferences.WORKSPACE_NAME.equals(event
-								.getProperty())) {
-							// Make sure the title is actually updated by
-							// setting last active page.
-							lastActivePage = null;
-							updateTitle(false);
-						}
-					}
-				});
+				.addPropertyChangeListener(propertyChangeListener);
 	}
 
 	private String computeTitle() {
@@ -362,7 +391,7 @@
 			if (input != null && !input.equals(wbAdvisor.getDefaultPageInput())) {
 				label = currentPage.getLabel();
 			}
-			if (label != null && !label.equals("")) { //$NON-NLS-1$ 
+			if (label != null && !label.equals("")) { //$NON-NLS-1$
 				title = NLS.bind(
 						IDEWorkbenchMessages.WorkbenchWindow_shellTitle, label,
 						title);
@@ -394,6 +423,34 @@
 		if (!newTitle.equals(oldTitle)) {
 			configurer.setTitle(newTitle);
 		}
+		setTitlePath();
+	}
+
+	private void setTitlePath() {
+
+		String titlePath = null;
+		if (lastActiveEditor != null) {
+			IEditorInput editorInput = lastActiveEditor.getEditorInput();
+			if (editorInput instanceof IFileEditorInput) {
+				titlePath = computeTitlePath((IFileEditorInput) editorInput);
+			} else if (editorInput instanceof FileStoreEditorInput) {
+				titlePath = computeTitlePath((FileStoreEditorInput) editorInput);
+			}
+		}
+		titlePathUpdater.updateTitlePath(getWindowConfigurer().getWindow().getShell(), titlePath);
+	}
+
+	private String computeTitlePath(FileStoreEditorInput editorInput) {
+		return editorInput.getURI().getPath().toString();
+	}
+
+	private String computeTitlePath(IFileEditorInput editorInput) {
+		IFile file = editorInput.getFile();
+		IPath location = file.getLocation();
+		if (location != null) {
+			return location.toFile().toString();
+		}
+		return null;
 	}
 
 	/**
@@ -486,6 +543,7 @@
 			page.openEditor(new WelcomeEditorInput(
 					welcomePerspectiveInfos[index]), WELCOME_EDITOR_ID, true);
 		}
+		cleanUpEditorArea();
 	}
 
 	/**
@@ -702,6 +760,11 @@
 	 * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#dispose()
 	 */
 	public void dispose() {
+		if (propertyChangeListener != null) {
+			IDEWorkbenchPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(propertyChangeListener);
+			propertyChangeListener = null;
+		}
+
 		if (openPerspectiveAction!=null) {
 			openPerspectiveAction.dispose();
 			openPerspectiveAction = null;
diff --git a/bundles/org.eclipse.ui.ide/.settings/.api_filters b/bundles/org.eclipse.ui.ide/.settings/.api_filters
deleted file mode 100644
index e1f541d..0000000
--- a/bundles/org.eclipse.ui.ide/.settings/.api_filters
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component id="org.eclipse.ui.ide" version="2">
-<resource path="extensions/org/eclipse/ui/actions/RefreshAction.java" type="org.eclipse.ui.actions.RefreshAction">
-<filter id="438431863">
-<message_arguments>
-<message_argument value="org.eclipse.ui.actions.RefreshAction"/>
-<message_argument value="refreshAll()"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="src/org/eclipse/ui/ide/undo/AbstractWorkspaceOperation.java" type="org.eclipse.ui.ide.undo.AbstractWorkspaceOperation">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.ui.ide.undo.AbstractWorkspaceOperation"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="src/org/eclipse/ui/ide/undo/CopyProjectOperation.java" type="org.eclipse.ui.ide.undo.CopyProjectOperation">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.ui.ide.undo.CopyProjectOperation"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="src/org/eclipse/ui/ide/undo/CopyResourcesOperation.java" type="org.eclipse.ui.ide.undo.CopyResourcesOperation">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.ui.ide.undo.CopyResourcesOperation"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="src/org/eclipse/ui/ide/undo/CreateFileOperation.java" type="org.eclipse.ui.ide.undo.CreateFileOperation">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.ui.ide.undo.CreateFileOperation"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="src/org/eclipse/ui/ide/undo/CreateFolderOperation.java" type="org.eclipse.ui.ide.undo.CreateFolderOperation">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.ui.ide.undo.CreateFolderOperation"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="src/org/eclipse/ui/ide/undo/CreateProjectOperation.java" type="org.eclipse.ui.ide.undo.CreateProjectOperation">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.ui.ide.undo.CreateProjectOperation"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="src/org/eclipse/ui/ide/undo/DeleteResourcesOperation.java" type="org.eclipse.ui.ide.undo.DeleteResourcesOperation">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.ui.ide.undo.DeleteResourcesOperation"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="src/org/eclipse/ui/ide/undo/MoveProjectOperation.java" type="org.eclipse.ui.ide.undo.MoveProjectOperation">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.ui.ide.undo.MoveProjectOperation"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="src/org/eclipse/ui/ide/undo/MoveResourcesOperation.java" type="org.eclipse.ui.ide.undo.MoveResourcesOperation">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.ui.ide.undo.MoveResourcesOperation"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="src/org/eclipse/ui/views/navigator/ResourceNavigatorMessages.java" type="org.eclipse.ui.views.navigator.ResourceNavigatorMessages">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.ui.views.navigator.ResourceNavigatorMessages"/>
-</message_arguments>
-</filter>
-</resource>
-</component>
diff --git a/bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF
index 31a8bfa..cf50509 100644
--- a/bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.ide; singleton:=true
-Bundle-Version: 3.6.0.qualifier
+Bundle-Version: 3.8.0.qualifier
 Bundle-ClassPath: e4-ide.jar,
  .
 Bundle-Activator: org.eclipse.ui.internal.ide.IDEWorkbenchPlugin
@@ -45,11 +45,12 @@
  org.eclipse.ui.views.tasklist,
  org.eclipse.ui.wizards.datatransfer,
  org.eclipse.ui.wizards.newresource
-Require-Bundle: org.eclipse.core.resources;bundle-version="[3.6.0,4.0.0)";resolution:=optional,
+Require-Bundle: org.eclipse.core.resources;bundle-version="[3.7.0,4.0.0)";resolution:=optional,
  org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="[1.0.0,2.0.0)",
  org.eclipse.help;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.ui.workbench;bundle-version="[3.7.0,4.0.0)",
  org.eclipse.ui.views;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
  org.eclipse.jface.text;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui.forms;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
diff --git a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/AddBookmarkAction.java b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/AddBookmarkAction.java
index ae497a0..84b1a44 100644
--- a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/AddBookmarkAction.java
+++ b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/AddBookmarkAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,18 +14,14 @@
 package org.eclipse.ui.actions;
 
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 
 import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.window.IShellProvider;
-
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.ide.undo.CreateMarkersOperation;
@@ -125,37 +121,23 @@
 	 * (non-Javadoc) Method declared on IAction.
 	 */
 	public void run() {
-		IStructuredSelection selection = getStructuredSelection();
-		for (Iterator i = selection.iterator(); i.hasNext();) {
-			Object o = i.next();
-			IFile file = null;
-			if (o instanceof IFile) {
-				file = (IFile) o;
-			} else if (o instanceof IAdaptable) {
-				Object resource = ((IAdaptable) o).getAdapter(IResource.class);
-				if (resource instanceof IFile) {
-					file = (IFile) resource;
-				}
-			}
-			if (file != null) {
-				if (promptForName) {
-					BookmarkPropertiesDialog dialog = new BookmarkPropertiesDialog(
-							shellProvider.getShell());
-					dialog.setResource(file);
-					dialog.open();
-				} else {
-					Map attrs = new HashMap();
-					attrs.put(IMarker.MESSAGE, file.getName());
-					CreateMarkersOperation op = new CreateMarkersOperation(
-							IMarker.BOOKMARK, attrs, file,
-							BookmarkMessages.CreateBookmark_undoText);
-					try {
-						PlatformUI.getWorkbench().getOperationSupport()
-								.getOperationHistory().execute(op, null,
-										WorkspaceUndoUtil.getUIInfoAdapter(shellProvider.getShell()));
-					} catch (ExecutionException e) {
-						IDEWorkbenchPlugin.log(null, e); // We don't care
-					}
+		if (getSelectedResources().isEmpty())
+			return;
+
+		IResource resource= (IResource)getSelectedResources().get(0);
+		if (resource != null) {
+			if (promptForName) {
+				BookmarkPropertiesDialog dialog= new BookmarkPropertiesDialog(shellProvider.getShell());
+				dialog.setResource(resource);
+				dialog.open();
+			} else {
+				Map attrs= new HashMap();
+				attrs.put(IMarker.MESSAGE, resource.getName());
+				CreateMarkersOperation op= new CreateMarkersOperation(IMarker.BOOKMARK, attrs, resource, BookmarkMessages.CreateBookmark_undoText);
+				try {
+					PlatformUI.getWorkbench().getOperationSupport().getOperationHistory().execute(op, null, WorkspaceUndoUtil.getUIInfoAdapter(shellProvider.getShell()));
+				} catch (ExecutionException e) {
+					IDEWorkbenchPlugin.log(null, e); // We don't care
 				}
 			}
 		}
@@ -169,7 +151,6 @@
 	 */
 	protected boolean updateSelection(IStructuredSelection selection) {
 		// @issue typed selections
-		return super.updateSelection(selection) && !selection.isEmpty()
-				&& selectionIsOfType(IResource.FILE);
+		return super.updateSelection(selection) && getSelectedResources().size() == 1;
 	}
 }
diff --git a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java
index 432e849..34dbd48 100644
--- a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java
+++ b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,24 +8,31 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Anton Leherbauer (Wind River) -  [296800] UI build actions should not lock the workspace
+ *     Broadcom Corporation - [335960]  Update BuildAction to use new Workspace Build Configurations API
  *******************************************************************************/
 package org.eclipse.ui.actions;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 
+import org.eclipse.core.resources.IBuildConfiguration;
 import org.eclipse.core.resources.ICommand;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
 import org.eclipse.core.resources.IncrementalProjectBuilder;
 import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.WorkspaceJob;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
@@ -38,9 +45,11 @@
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
 import org.eclipse.ui.internal.ide.actions.BuildUtilities;
+import org.eclipse.ui.progress.IProgressConstants2;
 
 /**
- * Standard actions for full and incremental builds of the selected project(s).
+ * Standard actions for full and incremental builds of the selected project(s)
+ * and their references project build configurations.
  * <p>
  * This class may be instantiated; it is not intended to be subclassed.
  * </p>
@@ -62,11 +71,17 @@
     private int buildType;
 
     /**
-     * The list of IProjects to build (computed lazily).
+     * The list of IProjects to build (computed lazily). This is computed from the
+     * list of project build configurations that are to be built.
      */
     private List projectsToBuild = null;
 
     /**
+     * The list of {@link IBuildConfiguration} to build (computed lazily).
+     */
+    private List/*<IBuildConfiguration>*/ projectConfigsToBuild = null;
+
+    /**
      * Creates a new action of the appropriate type. The action id is 
      * <code>ID_BUILD</code> for incremental builds and <code>ID_REBUILD_ALL</code>
      * for full builds.
@@ -121,26 +136,6 @@
         this.buildType = type;
 	}
 
-    /**
-     * Adds the given project and all of its prerequisities, transitively,
-     * to the provided set.
-     */
-    private void addAllProjects(IProject project, HashSet projects) {
-        if (project == null || !project.isAccessible()
-                || projects.contains(project)) {
-			return;
-		}
-        projects.add(project);
-        try {
-            IProject[] preReqs = project.getReferencedProjects();
-            for (int i = 0; i < preReqs.length; i++) {
-				addAllProjects(preReqs[i], projects);
-			}
-        } catch (CoreException e) {
-            //ignore inaccessible projects
-        }
-    }
-
     /* (non-Javadoc)
      * Method declared on WorkspaceAction.
      */
@@ -169,27 +164,47 @@
         return IDEWorkbenchMessages.BuildAction_problemTitle;
     }
 
-    /**
-     * Returns the projects to build.
-     * This contains the set of projects which have builders, across all selected resources.
-     */
-    List getProjectsToBuild() {
-        if (projectsToBuild == null) {
-            projectsToBuild = new ArrayList(3);
-            for (Iterator i = getSelectedResources().iterator(); i.hasNext();) {
-                IResource resource = (IResource) i.next();
-                IProject project = resource.getProject();
-                if (project != null) {
-                    if (!projectsToBuild.contains(project)) {
-                        if (hasBuilder(project)) {
-                            projectsToBuild.add(project);
-                        }
-                    }
-                }
-            }
-        }
-        return projectsToBuild;
-    }
+	/**
+	 * Returns the projects to build.
+	 * This contains the set of projects which have builders, across all selected resources.
+	 */
+	List getProjectsToBuild() {
+		if (projectsToBuild == null) {
+			Set projects = new HashSet(3);
+			List configurations = getBuildConfigurationsToBuild();
+			for (Iterator it = configurations.iterator(); it.hasNext();) {
+				projects.add(((IBuildConfiguration) it.next()).getProject());
+			}
+			projectsToBuild = new ArrayList(projects);
+		}
+		return projectsToBuild;
+	}
+
+	/**
+	 * This collection of project build configs, derived from the selected 
+	 * resources, is passed to the workspace for building.  The Workspace
+	 * is responsible for resolving references.
+	 * @return List of project build configurations to build.
+	 * @since 3.7
+	 */
+	protected List getBuildConfigurationsToBuild() {
+		if (projectConfigsToBuild == null) {
+			Set configs = new HashSet(3);
+			for (Iterator i = getSelectedResources().iterator(); i.hasNext();) {
+				IResource resource = (IResource) i.next();
+				IProject project = resource.getProject();
+				if (project != null && hasBuilder(project)) {
+					try {
+						configs.add(project.getActiveBuildConfig());
+					} catch(CoreException e) {
+						// Ignore project
+					}
+				}
+			}
+			projectConfigsToBuild = new ArrayList(configs);
+		}
+		return projectConfigsToBuild;
+	}
 
     /**
      * Returns whether there are builders configured on the given project.
@@ -215,14 +230,6 @@
     }
 
     /* (non-Javadoc)
-     * Method declared on WorkspaceAction.
-     */
-    protected void invokeOperation(IResource resource, IProgressMonitor monitor)
-            throws CoreException {
-        ((IProject) resource).build(buildType, monitor);
-    }
-    
-    /* (non-Javadoc)
      * Method declared on Action
      */
     public boolean isEnabled() {
@@ -247,69 +254,70 @@
     }
 
     /* (non-Javadoc)
-     * Method declared on WorkspaceAction.
-     *
-     * Change the order of the resources so that
-     * it matches the build order. Closed and
-     * non existant projects are eliminated. Also,
-     * any projects in cycles are eliminated.
-     */
-    List pruneResources(List resourceCollection) {
-        //recursively compute project prerequisites
-        HashSet toBuild = new HashSet();
-        for (Iterator it = resourceCollection.iterator(); it.hasNext();) {
-			addAllProjects((IProject) it.next(), toBuild);
-		}
-
-        // Optimize...
-        if (toBuild.size() < 2) {
-			return resourceCollection;
-		}
-
-        // Try the workspace's description build order if specified
-        String[] orderedNames = ResourcesPlugin.getWorkspace().getDescription()
-                .getBuildOrder();
-        if (orderedNames != null) {
-            List orderedProjects = new ArrayList(toBuild.size());
-            IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-            for (int i = 0; i < orderedNames.length; i++) {
-                IProject handle = root.getProject(orderedNames[i]);
-                if (toBuild.contains(handle)) {
-                    orderedProjects.add(handle);
-                    toBuild.remove(handle);
-                }
-            }
-            //Add anything not specified before we return
-            orderedProjects.addAll(toBuild);
-            return orderedProjects;
-        }
-
-        // Try the project prerequisite order then
-        IProject[] projects = new IProject[toBuild.size()];
-        projects = (IProject[]) toBuild.toArray(projects);
-        IWorkspace.ProjectOrder po = ResourcesPlugin.getWorkspace()
-                .computeProjectOrder(projects);
-        ArrayList orderedProjects = new ArrayList();
-        orderedProjects.addAll(Arrays.asList(po.projects));
-        return orderedProjects;
-    }
-
-    /* (non-Javadoc)
      * Method declared on IAction; overrides method on WorkspaceAction.
      * This override allows the user to save the contents of selected
      * open editors so that the updated contents will be used for building.
+     * The build is run as a background job.
      */
     public void run() {
-	    List projects = getProjectsToBuild();
-	    if (projects == null || projects.isEmpty()) {
+	    final List buildConfigurations = getBuildConfigurationsToBuild();
+	    if (buildConfigurations == null || buildConfigurations.isEmpty())
 			return;
-		}
 
 	    // Save all resources prior to doing build
-        BuildUtilities.saveEditors(projects);
+        BuildUtilities.saveEditors(getProjectsToBuild());
         runInBackground(null, ResourcesPlugin.FAMILY_MANUAL_BUILD);
     }
 
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.actions.WorkspaceAction#runInBackground(org.eclipse.core.runtime.jobs.ISchedulingRule, java.lang.Object[])
+     */
+    public void runInBackground(ISchedulingRule rule, Object[] jobFamilies) {
+        // Get immutable copies of the build settings
+		final int kind = buildType;
+	    List buildConfigurations = getBuildConfigurationsToBuild();
+	    if (buildConfigurations == null || buildConfigurations.isEmpty())
+			return;
+	    final IBuildConfiguration[] configs = (IBuildConfiguration[])buildConfigurations.toArray(new IBuildConfiguration[buildConfigurations.size()]);
+
+		// Schedule a Workspace Job to perform the build
+		Job job = new WorkspaceJob(removeMnemonics(getText())) {
+			/*
+			 * (non-Javadoc)
+			 * @see Job#belongsTo(Object)
+			 */
+			public boolean belongsTo(Object family) {
+				return ResourcesPlugin.FAMILY_MANUAL_BUILD.equals(family);
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * @see WorkspaceJob#runInWorkspace(IProgressMonitor)
+			 */
+			public IStatus runInWorkspace(IProgressMonitor monitor) {
+				IStatus status = null;
+				monitor.beginTask("", 10000); //$NON-NLS-1$
+				monitor.setTaskName(getOperationMessage());
+				try {
+					// Backwards compatibility: check shouldPerformResourcePruning(). 
+					// Previously if this returned true, the full reference graph is built, otherwise just build the selected configurations
+					ResourcesPlugin.getWorkspace().build(configs, kind, shouldPerformResourcePruning(), new SubProgressMonitor(monitor, 10000));
+				} catch (CoreException e) {
+					status = e.getStatus();
+				}
+				if (monitor.isCanceled()) {
+					throw new OperationCanceledException();
+				}
+				monitor.done();
+				return status == null ? Status.OK_STATUS : status;
+			}
+		};
+		job.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, Boolean.TRUE);
+		job.setUser(true);
+		job.schedule();
+    }
+
     /* (non-Javadoc)
      * Method declared on WorkspaceAction.
      */
@@ -323,6 +331,7 @@
      * enabled only if all of the selected resources have buildable projects.
      */
     protected boolean updateSelection(IStructuredSelection s) {
+        projectConfigsToBuild = null;
         projectsToBuild = null;
         IProject[] projects = (IProject[]) getProjectsToBuild().toArray(new IProject[0]);
         return BuildUtilities.isEnabled(projects, IncrementalProjectBuilder.INCREMENTAL_BUILD);
diff --git a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/DeleteResourceAction.java b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/DeleteResourceAction.java
index d98d674..67fb8de 100644
--- a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/DeleteResourceAction.java
+++ b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/DeleteResourceAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,7 +23,6 @@
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -36,8 +35,6 @@
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -149,12 +146,8 @@
 			detailsLabel.setText(IDEWorkbenchMessages.DeleteResourceAction_deleteContentsDetails);
 			detailsLabel.setFont(parent.getFont());
 			// indent the explanatory label
-			GC gc = new GC(detailsLabel);
-			gc.setFont(detailsLabel.getParent().getFont());
-			FontMetrics fontMetrics = gc.getFontMetrics();
-			gc.dispose();
 			GridData data = new GridData();
-			data.horizontalIndent = Dialog.convertHorizontalDLUsToPixels(fontMetrics, IDialogConstants.INDENT);
+			data.horizontalIndent = IDialogConstants.INDENT;
 			detailsLabel.setLayoutData(data);
 			// add a listener so that clicking on the label selects the
 			// corresponding radio button.
diff --git a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/GlobalBuildAction.java b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/GlobalBuildAction.java
index c6daa30f..a64a7d1 100644
--- a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/GlobalBuildAction.java
+++ b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/GlobalBuildAction.java
@@ -34,6 +34,7 @@
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
 import org.eclipse.ui.internal.ide.actions.BuildUtilities;
+import org.eclipse.ui.progress.IProgressConstants2;
 import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
@@ -196,6 +197,7 @@
             }
         };
         buildJob.setUser(true);
+        buildJob.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, Boolean.TRUE);
         buildJob.schedule();
     }
 
diff --git a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/NewWizardMenu.java b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/NewWizardMenu.java
index 60e56a1..d437396 100644
--- a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/NewWizardMenu.java
+++ b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/NewWizardMenu.java
@@ -21,9 +21,12 @@
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.Separator;
 import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.activities.WorkbenchActivityHelper;
+import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.actions.NewWizardShortcutAction;
 import org.eclipse.ui.internal.dialogs.WorkbenchWizardElement;
 import org.eclipse.ui.internal.registry.WizardsRegistryReader;
+import org.eclipse.ui.wizards.IWizardCategory;
 import org.eclipse.ui.wizards.IWizardDescriptor;
 
 /**
@@ -117,9 +120,36 @@
      * 
      * @return boolean
      */
-    private boolean hasExamples() {
-        return registryHasCategory(WizardsRegistryReader.FULL_EXAMPLES_WIZARD_CATEGORY);
-    }
+	private boolean hasExamples() {
+		boolean hasCategory = registryHasCategory(WizardsRegistryReader.FULL_EXAMPLES_WIZARD_CATEGORY);
+		if (hasCategory) {
+			IWizardCategory exampleCategory = WorkbenchPlugin
+					.getDefault()
+					.getNewWizardRegistry()
+					.findCategory(
+							WizardsRegistryReader.FULL_EXAMPLES_WIZARD_CATEGORY);
+			return hasWizards(exampleCategory);
+		}
+		return false;
+	}
+	
+	private boolean hasWizards(IWizardCategory category) {
+		IWizardDescriptor[] wizards = category.getWizards();
+		if (wizards.length>0) {
+			for (int i = 0; i < wizards.length; i++) {
+				if (!WorkbenchActivityHelper.filterItem(wizards[i])) {
+					return true;
+				}
+			}
+		}
+		IWizardCategory[] categories = category.getCategories();
+		for (int i = 0; i < categories.length; i++) {
+			if (hasWizards(categories[i])) {
+				return true;
+			}
+		}
+		return false;
+	}
 
     /* (non-Javadoc)
      * @see org.eclipse.ui.actions.BaseNewWizardMenu#addItems(org.eclipse.jface.action.IContributionManager)
diff --git a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenResourceAction.java b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenResourceAction.java
index 317fe1e..609b090 100644
--- a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenResourceAction.java
+++ b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenResourceAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -171,7 +171,7 @@
 			return false;
 		}
 		String message = IDEWorkbenchMessages.OpenResourceAction_openRequiredProjects;
-		MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(getShell(), IDEWorkbenchMessages.Question, message, null, false, store, key);
+		MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoQuestion(getShell(), IDEWorkbenchMessages.Question, message, null, false, store, key);
 		int result = dialog.getReturnCode();
 		// the result is equal to SWT.DEFAULT if the user uses the 'esc' key to close the dialog
 		if (result == Window.CANCEL || result == SWT.DEFAULT) {
@@ -225,6 +225,7 @@
 		Job job = new WorkspaceJob(removeMnemonics(getText())) {
 			private boolean openProjectReferences = true;
 			private boolean hasPrompted = false;
+			private boolean canceled = false;
 			/**
 			 * Opens a project along with all projects it references
 			 */
@@ -245,14 +246,19 @@
 					if (openProjectReferences && hasOtherClosedProjects()) {
 						Display.getDefault().syncExec(new Runnable() {
 							public void run() {
+								try {
 								openProjectReferences = promptToOpenWithReferences();
+								} catch (OperationCanceledException e) {
+									canceled = true;
+								}
 								//remember that we have prompted to avoid repeating the analysis
 								hasPrompted = true;
 							}
 						});
+						if (canceled)
+							throw new OperationCanceledException();
 					}
 				}
-
 				if (openProjectReferences) {
 					for (int i = 0; i < references.length; i++) {
 						doOpenWithReferences(references[i], monitor);
diff --git a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/WorkspaceAction.java b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/WorkspaceAction.java
index 5f14daa..a3131b3 100644
--- a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/WorkspaceAction.java
+++ b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/WorkspaceAction.java
@@ -16,6 +16,7 @@
 import java.util.List;
 
 import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.resources.WorkspaceJob;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
@@ -38,6 +39,7 @@
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.ide.StatusUtil;
 import org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog;
+import org.eclipse.ui.progress.IProgressConstants2;
 
 /**
  * The abstract superclass for actions which invoke commands implemented in
@@ -486,6 +488,8 @@
 		if (rule != null) {
 			job.setRule(rule);
 		}
+		if(job.belongsTo(ResourcesPlugin.FAMILY_MANUAL_BUILD))
+			job.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, Boolean.TRUE);
 		job.setUser(true);
 		job.schedule();
 	}
diff --git a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/FilteredResourcesSelectionDialog.java b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/FilteredResourcesSelectionDialog.java
index f7649d5..ea78f7a 100644
--- a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/FilteredResourcesSelectionDialog.java
+++ b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/FilteredResourcesSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -141,8 +141,6 @@
 		setSelectionHistory(new ResourceSelectionHistory());
 
 		setTitle(IDEWorkbenchMessages.OpenResourceDialog_title);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
-				IIDEHelpContextIds.OPEN_RESOURCE_DIALOG);
 
 		/*
 		 * Allow location of paths relative to a searchContainer, which is
@@ -189,6 +187,16 @@
 	/*
 	 * (non-Javadoc)
 	 * 
+	 * @see org.eclipse.ui.dialogs.SelectionStatusDialog#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	protected void configureShell(Shell shell) {
+		super.configureShell(shell);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(shell, IIDEHelpContextIds.OPEN_RESOURCE_DIALOG);
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.ui.dialogs.SelectionDialog#setTitle(java.lang.String)
 	 */
 	public void setTitle(String title) {
@@ -967,10 +975,13 @@
 			
 			int lastPatternDot = filenamePattern.lastIndexOf('.');
 			if (lastPatternDot != -1) {
-				namePattern = new SearchPattern();
-				namePattern.setPattern(filenamePattern.substring(0, lastPatternDot));
-				extensionPattern = new SearchPattern();
-				extensionPattern.setPattern(filenamePattern.substring(lastPatternDot + 1));
+				char last = filenamePattern.charAt(filenamePattern.length() - 1);
+				if (last != ' ' && last != '<' && getMatchRule() != SearchPattern.RULE_EXACT_MATCH) {
+					namePattern = new SearchPattern();
+					namePattern.setPattern(filenamePattern.substring(0, lastPatternDot));
+					extensionPattern = new SearchPattern();
+					extensionPattern.setPattern(filenamePattern.substring(lastPatternDot + 1));
+				}
 			}
 
 		}
diff --git a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportPage.java b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportPage.java
index b9d30df..b97ea8b 100644
--- a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportPage.java
+++ b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.osgi.util.NLS;
@@ -627,7 +628,7 @@
 
         ListSelectionDialog dialog = new ListSelectionDialog(getContainer()
                 .getShell(), editorMappings,
-                FileEditorMappingContentProvider.INSTANCE,
+                ArrayContentProvider.getInstance(),
                 FileEditorMappingLabelProvider.INSTANCE, IDEWorkbenchMessages.WizardExportPage_selectionDialogMessage){
         	protected int getShellStyle() {
         		return super.getShellStyle() | SWT.SHEET;
diff --git a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportResourcesPage.java b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportResourcesPage.java
index ed93697..2d56ef1 100644
--- a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportResourcesPage.java
+++ b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportResourcesPage.java
@@ -198,6 +198,7 @@
         listener = new SelectionAdapter() {
             public void widgetSelected(SelectionEvent e) {
                 resourceGroup.setAllSelections(true);
+                updateWidgetEnablements();
             }
         };
         selectButton.addSelectionListener(listener);
@@ -210,6 +211,7 @@
         listener = new SelectionAdapter() {
             public void widgetSelected(SelectionEvent e) {
                 resourceGroup.setAllSelections(false);
+                updateWidgetEnablements();
             }
         };
         deselectButton.addSelectionListener(listener);
diff --git a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewProjectReferencePage.java b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewProjectReferencePage.java
index 6dac88e..f129dfe 100644
--- a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewProjectReferencePage.java
+++ b/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewProjectReferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -86,9 +86,7 @@
         referenceProjectsViewer = CheckboxTableViewer.newCheckList(composite,
                 SWT.BORDER);
         referenceProjectsViewer.getTable().setFont(composite.getFont());
-        GridData data = new GridData();
-        data.horizontalAlignment = GridData.FILL;
-        data.grabExcessHorizontalSpace = true;
+        GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
 
         data.heightHint = getDefaultFontHeight(referenceProjectsViewer
                 .getTable(), PROJECT_LIST_MULTIPLIER);
diff --git a/bundles/org.eclipse.ui.ide/icons/full/dtool16/newprj_wiz.gif b/bundles/org.eclipse.ui.ide/icons/full/dtool16/newprj_wiz.gif
index 5b4b24c..e05f3bd 100644
--- a/bundles/org.eclipse.ui.ide/icons/full/dtool16/newprj_wiz.gif
+++ b/bundles/org.eclipse.ui.ide/icons/full/dtool16/newprj_wiz.gif
Binary files differ
diff --git a/bundles/org.eclipse.ui.ide/icons/full/etool16/newprj_wiz.gif b/bundles/org.eclipse.ui.ide/icons/full/etool16/newprj_wiz.gif
index fbbac0f..97d4cb0 100644
--- a/bundles/org.eclipse.ui.ide/icons/full/etool16/newprj_wiz.gif
+++ b/bundles/org.eclipse.ui.ide/icons/full/etool16/newprj_wiz.gif
Binary files differ
diff --git a/bundles/org.eclipse.ui.ide/icons/full/eview16/problems_view_error.gif b/bundles/org.eclipse.ui.ide/icons/full/eview16/problems_view_error.gif
new file mode 100644
index 0000000..b90bc75
--- /dev/null
+++ b/bundles/org.eclipse.ui.ide/icons/full/eview16/problems_view_error.gif
Binary files differ
diff --git a/bundles/org.eclipse.ui.ide/icons/full/eview16/problems_view_warning.gif b/bundles/org.eclipse.ui.ide/icons/full/eview16/problems_view_warning.gif
new file mode 100644
index 0000000..5f21b928
--- /dev/null
+++ b/bundles/org.eclipse.ui.ide/icons/full/eview16/problems_view_warning.gif
Binary files differ
diff --git a/bundles/org.eclipse.ui.ide/icons/full/obj16/quickfix_error_obj.gif b/bundles/org.eclipse.ui.ide/icons/full/obj16/quickfix_error_obj.gif
new file mode 100644
index 0000000..07a1054
--- /dev/null
+++ b/bundles/org.eclipse.ui.ide/icons/full/obj16/quickfix_error_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.ui.ide/icons/full/obj16/quickfix_warning_obj.gif b/bundles/org.eclipse.ui.ide/icons/full/obj16/quickfix_warning_obj.gif
new file mode 100644
index 0000000..1f0002b
--- /dev/null
+++ b/bundles/org.eclipse.ui.ide/icons/full/obj16/quickfix_warning_obj.gif
Binary files differ
diff --git a/bundles/org.eclipse.ui.ide/plugin.properties b/bundles/org.eclipse.ui.ide/plugin.properties
index 66c79b4..bf9beb0 100644
--- a/bundles/org.eclipse.ui.ide/plugin.properties
+++ b/bundles/org.eclipse.ui.ide/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2010 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -101,7 +101,7 @@
 DecoratorSpecificResourceFilterType.description = Displays an icon based on the presence of resource filters on a container.
 OpenWorkspaceFileAction.label = Open Reso&urce...
 SelectWorkingSetsAction.label = &Working Sets
-SelectWorkingSetsAction.tooltip = Modify workbench working sets
+SelectWorkingSetsAction.tooltip = Modify window working set
 
 AddToWorkingSetAction.label = Add To Working Se&t
 AddToWorkingSetAction.tooltip = Add the selected elements to a working set
@@ -134,7 +134,7 @@
 command.configureFilters.name = Configure Contents...
 command.configureFilters.mnemonic=C
 command.configureColumns.description = Configure the columns in the markers view
-command.configureColumns.name = Columns...
+command.configureColumns.name = Configure Columns...
 command.configureColumns.mnemonic=l
 command.correctionAssistProposals.description = Suggest possible fixes for a problem
 command.correctionAssistProposals.name = Quick Fix
@@ -187,13 +187,6 @@
 command.newQuickMenu.name= New menu
 command.newQuickMenu.description= Open the New menu
 
-category.update.name= Update
-category.update.description= Commands for Software Updates
-command.manageConfiguration.name= Manage Configuration
-command.manageConfiguration.description= Open the product configuration dialog
-command.findAndInstallUpdates.name= Find and Install Updates
-command.findAndInstallUpdates.description= Open the feature install and update dialog
-
 commandParameter.openFileByPath.filePath.name= File Path
 command.showResourceByPath.name= Show Resource in Navigator
 command.showResourceByPath.description= Show a resource in the Navigator given its path
@@ -202,6 +195,9 @@
 KeyBindingActionSet.label = Keyboard Shortcuts
 KeyBindingActionSet.showKeyAssist.label = &Key Assist...
 
+PreferenceKeywords.TextFont = text font
+PreferenceKeywords.TextEditorFont = text editor font
+PreferenceKeywords.EditorFont = editor font
 PreferenceKeywords.Editing = editing
 PreferenceKeywords.Appearance = appearance
 PreferenceKeywords.ColorLabels = color label
@@ -213,7 +209,7 @@
 PreferenceKeywords.Pin = pin
 PreferenceKeywords.Close = close
 PreferenceKeywords.Dirty = dirty
-PreferenceKeywords.Keys = binding command scheme emacs
+PreferenceKeywords.Keys = binding command scheme emacs shortcut
 PreferenceKeywords.Perspectives = open view switch
 PreferenceKeywords.StartupAndShutdown = workbench plug-in plugin refresh
 PreferenceKeywords.Workspace = build refresh save automatically open project line delimiter
diff --git a/bundles/org.eclipse.ui.ide/plugin.xml b/bundles/org.eclipse.ui.ide/plugin.xml
index 3c81979..5771e27 100644
--- a/bundles/org.eclipse.ui.ide/plugin.xml
+++ b/bundles/org.eclipse.ui.ide/plugin.xml
@@ -439,6 +439,15 @@
             id="org.eclipse.ui.ide.themes"
             label="%PreferenceKeywords.Themes"/>
       <keyword
+            id="org.eclipse.ui.ide.textFont"
+            label="%PreferenceKeywords.TextFont"/>
+      <keyword
+            id="org.eclipse.ui.ide.textEditorFont"
+            label="%PreferenceKeywords.TextEditorFont"/>
+      <keyword
+            id="org.eclipse.ui.ide.editorFont"
+            label="%PreferenceKeywords.EditorFont"/>
+      <keyword
             id="org.eclipse.ui.ide.apearancepage"
             label="%PreferenceKeywords.AppearancePage"/>
       <keyword
@@ -572,6 +581,9 @@
             id="org.eclipse.ui.preferencePages.ColorsAndFonts">
          <keywordReference id="org.eclipse.ui.ide.appearance"/>
          <keywordReference id="org.eclipse.ui.ide.themes"/>
+         <keywordReference id="org.eclipse.ui.ide.textFont"/>
+         <keywordReference id="org.eclipse.ui.ide.textEditorFont"/>
+         <keywordReference id="org.eclipse.ui.ide.editorFont"/>
       </page>
       <page
             name="%PreferencePages.Decorators"
@@ -690,6 +702,10 @@
             id="org.eclipse.ui.propertypages.project.reference"
             name="%PropertyPages.project.reference"
             >
+         <filter
+               name="open"
+               value="true">
+         </filter>
          <enabledWhen>
             <adapt type="org.eclipse.core.resources.IProject"/>
          </enabledWhen>
@@ -700,9 +716,27 @@
             id="org.eclipse.ui.propertypages.resource.filters"
             name="%PropertyPages.resource.filters">
          <enabledWhen>
-            <adapt type="org.eclipse.core.resources.IResource">
-            	<instanceof value="org.eclipse.core.resources.IContainer"/>
-            </adapt>
+            <or>
+               <adapt
+                     type="org.eclipse.core.resources.IResource">
+                  <and>
+                     <instanceof
+                           value="org.eclipse.core.resources.IContainer">
+                     </instanceof>
+                     <not>
+                        <instanceof
+                              value="org.eclipse.core.resources.IProject">
+                        </instanceof>
+                     </not>
+                  </and>
+               </adapt>
+               <adapt
+                     type="org.eclipse.core.resources.IProject">
+                  <test
+                        property="org.eclipse.core.resources.open">
+                  </test>
+               </adapt>
+            </or>
          </enabledWhen>
       </page>
       <page
@@ -729,6 +763,10 @@
             class="org.eclipse.ui.internal.ide.dialogs.ProjectLinkedResourcePage"
             id="org.eclipse.ui.propertypages.project.linkedResourcesPage"
             name="%linked_resources">
+         <filter
+               name="open"
+               value="true">
+         </filter>
          <enabledWhen>
             <adapt type="org.eclipse.core.resources.IProject"/>
          </enabledWhen>
@@ -883,20 +921,6 @@
             categoryId="org.eclipse.ui.category.edit"
             id="org.eclipse.ui.navigate.removeFromWorkingSet">
       </command>
-      <category
-            description="%category.update.description"
-            id="org.eclipse.ui.category.update"
-            name="%category.update.name"/>
-      <command
-            categoryId="org.eclipse.ui.category.update"
-            description="%command.manageConfiguration.description"
-            id="org.eclipse.ui.update.manageConfiguration"
-            name="%command.manageConfiguration.name"/>
-      <command
-            categoryId="org.eclipse.ui.category.update"
-            description="%command.findAndInstallUpdates.description"
-            id="org.eclipse.ui.update.findAndInstallUpdates"
-            name="%command.findAndInstallUpdates.name"/>
       <command
             categoryId="org.eclipse.ui.category.navigate"
             defaultHandler="org.eclipse.ui.internal.ide.handlers.ShowResourceByPathHandler"
@@ -1838,16 +1862,6 @@
                mnemonic="%command.configureColumns.mnemonic"
                style="push">
          </command>
-         <command
-               commandId="org.eclipse.ui.window.preferences"
-               label="%command.preferences.label"
-               mnemonic="%command.preferences.mnemonic"
-               style="push">
-            <parameter
-                  name="preferencePageId"
-                  value="org.eclipse.ui.ide.markers">
-            </parameter>
-         </command>
       </menuContribution>
       <menuContribution
             locationURI="menu:org.eclipse.ui.views.TaskList">
@@ -1901,16 +1915,6 @@
                mnemonic="%command.configureColumns.mnemonic"
                style="push">
          </command>
-         <command
-               commandId="org.eclipse.ui.window.preferences"
-               label="%command.preferences.label"
-               mnemonic="%command.preferences.mnemonic"
-               style="push">
-            <parameter
-                  name="preferencePageId"
-                  value="org.eclipse.ui.ide.markers">
-            </parameter>
-         </command>
       </menuContribution>
       <menuContribution
             locationURI="menu:org.eclipse.ui.views.BookmarkView">
@@ -1974,16 +1978,6 @@
                mnemonic="%command.configureColumns.mnemonic"
                style="push">
          </command>
-         <command
-               commandId="org.eclipse.ui.window.preferences"
-               label="%command.preferences.label"
-               mnemonic="%command.preferences.mnemonic"
-               style="push">
-            <parameter
-                  name="preferencePageId"
-                  value="org.eclipse.ui.ide.markers">
-            </parameter>
-         </command>
       </menuContribution>
       <menuContribution
             locationURI="menu:org.eclipse.ui.views.AllMarkersView">
@@ -2037,16 +2031,6 @@
                mnemonic="%command.configureColumns.mnemonic"
                style="push">
          </command>
-         <command
-               commandId="org.eclipse.ui.window.preferences"
-               label="%command.preferences.label"
-               mnemonic="%command.preferences.mnemonic"
-               style="push">
-            <parameter
-                  name="preferencePageId"
-                  value="org.eclipse.ui.ide.markers">
-            </parameter>
-         </command>
       </menuContribution>
    </extension>
    <extension
@@ -2145,7 +2129,7 @@
                   </test>
                </iterate>
                <count
-                     value="?">
+                     value="+">
                </count>
             </and>
          </enabledWhen>
@@ -2228,18 +2212,6 @@
             </iterate>
          </enabledWhen>
       </handler>
-      <handler
-            class="org.eclipse.ui.internal.views.markers.MarkerPreferencesHandler"
-            commandId="org.eclipse.ui.window.preferences">
-         <activeWhen>
-            <with
-                  variable="activePart">
-               <instanceof
-                     value="org.eclipse.ui.views.markers.MarkerSupportView">
-               </instanceof>
-            </with>
-         </activeWhen>
-      </handler>
    </extension>
    <extension
          point="org.eclipse.core.expressions.propertyTesters">
diff --git a/bundles/org.eclipse.ui.ide/schema/markerSupport.exsd b/bundles/org.eclipse.ui.ide/schema/markerSupport.exsd
index 14d2be4..909774e 100644
--- a/bundles/org.eclipse.ui.ide/schema/markerSupport.exsd
+++ b/bundles/org.eclipse.ui.ide/schema/markerSupport.exsd
@@ -73,7 +73,7 @@
                   The scope of the filter. One of 
 ON_ANY: any item in the workbench
 ON_SELECTED_ONLY: on the currently selected item
-ON_SELECTED_AND_CHILDREN: on the currently selected item and it&apos;s children
+ON_SELECTED_AND_CHILDREN: on the currently selected item and its children
 ON_ANY_IN_SAME_CONTAINER: on any item with the same top level container as the selection
                </documentation>
             </annotation>
@@ -89,6 +89,7 @@
                   </enumeration>
                </restriction>
             </simpleType>
+            
          </attribute>
          <attribute name="onDescription" type="string">
             <annotation>
@@ -242,7 +243,7 @@
 
 Top level markerGroupings are assumed to belong to the problems content generator.
 
-A markerGrouping is usually specified as the child of a markerContentGenerator. It is recommended that a markerContentGenerator defines it&apos;s own markerGroupings if possible.
+A markerGrouping is usually specified as the child of a markerContentGenerator. It is recommended that a markerContentGenerator defines its own markerGroupings if possible.
 
 Note that only the problems view supported markerGroupings pre 3.4.
 
@@ -517,7 +518,7 @@
 One of 
 ON_ANY: any item in the workbench
 ON_SELECTED_ONLY: on the currently selected item
-ON_SELECTED_AND_CHILDREN: on the currently selected item and it&apos;s children
+ON_SELECTED_AND_CHILDREN: on the currently selected item and its children
 ON_ANY_IN_SAME_CONTAINER: on any item with the same top level container as the selection.
 If this value is not set the value is ON_ANY
                </documentation>
@@ -590,7 +591,7 @@
          <meta.section type="examples"/>
       </appinfo>
       <documentation>
-         The following is an example of a problem filter definition in the marker support. This example only shows java warnings on the selected element and it&apos;s children and filters out those with the String NON-NLS
+         The following is an example of a problem filter definition in the marker support. This example only shows java warnings on the selected element and its children and filters out those with the String NON-NLS
 &lt;p&gt;
 &lt;pre&gt;
  &lt;extension point=&quot;org.eclipse.ui.ide.markerSupport&quot;&gt;
@@ -626,7 +627,7 @@
          <meta.section type="copyright"/>
       </appinfo>
       <documentation>
-         Copyright (c) 2005, 2007 IBM Corporation and others.&lt;br&gt;
+         Copyright (c) 2005, 2011 IBM Corporation and others.&lt;br&gt;
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0 which accompanies
 this distribution, and is available at &lt;a 
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ResourceEncodingFieldEditor.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ResourceEncodingFieldEditor.java
index e17e6b7..295f8ec 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ResourceEncodingFieldEditor.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ResourceEncodingFieldEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,14 +12,19 @@
 
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ProjectScope;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentType;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.dialogs.DialogPage;
 import org.eclipse.jface.dialogs.IDialogConstants;
@@ -27,6 +32,7 @@
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Group;
@@ -36,6 +42,8 @@
 import org.eclipse.ui.ide.IDEEncoding;
 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
 
 /**
  * The ResourceEncodingFieldEditor is a field editor for editing the encoding of
@@ -56,6 +64,8 @@
 
 	private Composite group;
 
+	private Button separateDerivedEncodingsButton = null;
+
 	/**
 	 * Creates a new encoding field editor for setting the encoding on the given
 	 * resource.
@@ -88,7 +98,7 @@
 	 * @param charsetResource
 	 *            must be an <code>IContainer</code> or an <code>IFile</code>.
 	 *  @param groupTitle
-	 *  		  the title for the field editor's control. If groupTitle is 
+	 *  		  the title for the field editor's control. If groupTitle is
 	 *            <code>null</code> the control will be unlabelled
 	 *            (by default a {@link Composite} instead of a {@link Group}.
 	 * 
@@ -140,6 +150,36 @@
 
 	}
 
+	private boolean getStoredSeparateDerivedEncodingsValue() {
+		// be careful looking up for our node so not to create any nodes as side effect
+		Preferences node = Platform.getPreferencesService().getRootNode()
+				.node(ProjectScope.SCOPE);
+		String projectName = ((IProject) resource).getName();
+		try {
+			//TODO once bug 90500 is fixed, should be as simple as this:
+			//			String path = projectName + IPath.SEPARATOR + ResourcesPlugin.PI_RESOURCES;
+			//			return node.nodeExists(path) ? node.node(path).getBoolean(ResourcesPlugin.PREF_SEPARATE_DERIVED_ENCODINGS, false) : false;
+			// for now, take the long way
+			if (!node.nodeExists(projectName))
+				return false;
+			node = node.node(projectName);
+			if (!node.nodeExists(ResourcesPlugin.PI_RESOURCES))
+				return false;
+			node = node.node(ResourcesPlugin.PI_RESOURCES);
+			return node.getBoolean(
+					ResourcesPlugin.PREF_SEPARATE_DERIVED_ENCODINGS, false);
+		} catch (BackingStoreException e) {
+			// default value
+			return false;
+		}
+	}
+
+	private boolean hasSameSeparateDerivedEncodings() {
+		return (separateDerivedEncodingsButton == null)
+				|| ((separateDerivedEncodingsButton != null) && (separateDerivedEncodingsButton
+						.getSelection() == getStoredSeparateDerivedEncodingsValue()));
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -154,7 +194,9 @@
 			encoding = null;
 		}
 		// Don't update if the same thing is selected
-		if (hasSameEncoding(encoding)) {
+		final boolean hasSameEncoding = hasSameEncoding(encoding);
+		final boolean hasSameSeparateDerivedEncodings = hasSameSeparateDerivedEncodings();
+		if (hasSameEncoding && hasSameSeparateDerivedEncodings) {
 			return;
 		}
 
@@ -200,11 +242,22 @@
 			 */
 			protected IStatus run(IProgressMonitor monitor) {
 				try {
-					if (resource instanceof IContainer) {
-						((IContainer) resource).setDefaultCharset(
-								finalEncoding, monitor);
-					} else {
-						((IFile) resource).setCharset(finalEncoding, monitor);
+					if (!hasSameEncoding) {
+						if (resource instanceof IContainer) {
+							((IContainer) resource).setDefaultCharset(
+									finalEncoding, monitor);
+						} else {
+							((IFile) resource).setCharset(finalEncoding,
+									monitor);
+						}
+					}
+					if (!hasSameSeparateDerivedEncodings) {
+						Preferences prefs = new ProjectScope((IProject) resource).getNode(ResourcesPlugin.PI_RESOURCES);
+						if (getStoredSeparateDerivedEncodingsValue())
+							prefs.remove(ResourcesPlugin.PREF_SEPARATE_DERIVED_ENCODINGS);
+						else
+							prefs.putBoolean(ResourcesPlugin.PREF_SEPARATE_DERIVED_ENCODINGS, true);
+						prefs.flush();
 					}
 					return Status.OK_STATUS;
 				} catch (CoreException e) {// If there is an error return the
@@ -214,6 +267,9 @@
 									IDEWorkbenchMessages.ResourceEncodingFieldEditor_ErrorStoringMessage,
 									e.getStatus());
 					return e.getStatus();
+				} catch (BackingStoreException e) {
+					IDEWorkbenchPlugin.log(IDEWorkbenchMessages.ResourceEncodingFieldEditor_ErrorStoringMessage, e);
+					return new Status(IStatus.ERROR, IDEWorkbenchPlugin.IDE_WORKBENCH, e.getMessage(), e);
 				}
 			}
 		};
@@ -227,8 +283,8 @@
 	 * 
 	 * @see org.eclipse.jface.preference.FieldEditor#store()
 	 */
-	public void store() {// Override the store method as we are not using a
-		// preference store
+	public void store() {
+		// Override the store method as we are not using a preference store
 		doStore();
 	}
 
@@ -237,8 +293,8 @@
 	 * 
 	 * @see org.eclipse.jface.preference.FieldEditor#load()
 	 */
-	public void load() {// Override the load method as we are not using a
-		// preference store
+	public void load() {
+		// Override the load method as we are not using a preference store
 		setPresentsDefaultValue(false);
 		doLoad();
 	}
@@ -249,11 +305,22 @@
 	 * @see org.eclipse.jface.preference.FieldEditor#loadDefault()
 	 */
 	public void loadDefault() {
+		// Override the loadDefault method as we are not using a preference store
 		setPresentsDefaultValue(true);
 		doLoadDefault();
 		refreshValidState();
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.FieldEditor#doLoadDefault()
+	 */
+	protected void doLoadDefault() {
+		super.doLoadDefault();
+		if (separateDerivedEncodingsButton != null)
+			separateDerivedEncodingsButton
+					.setSelection(getStoredSeparateDerivedEncodingsValue());
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -321,6 +388,14 @@
 									getDefaultEnc());
 				}
 
+				IContentType contentType = description.getContentType();
+				if (contentType != null && contentType.getDefaultCharset() == description.getCharset()) {
+					return NLS
+							.bind(
+									IDEWorkbenchMessages.ResourceInfo_fileContentTypeEncodingFormat,
+									getDefaultEnc());
+				}
+
 				return NLS
 						.bind(
 								IDEWorkbenchMessages.ResourceInfo_fileContentEncodingFormat,
@@ -360,6 +435,17 @@
 			label.setLayoutData(layoutData);
 
 		}
+
+		if (resource.getType() == IResource.PROJECT) {
+			separateDerivedEncodingsButton = new Button(group, SWT.CHECK);
+			GridData data = new GridData();
+			data.horizontalSpan = 2;
+			separateDerivedEncodingsButton.setLayoutData(data);
+			separateDerivedEncodingsButton
+					.setText(IDEWorkbenchMessages.ResourceEncodingFieldEditor_SeparateDerivedEncodingsLabel);
+			separateDerivedEncodingsButton
+					.setSelection(getStoredSeparateDerivedEncodingsValue());
+		}
 		return group;
 	}
 
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractMarkersOperation.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractMarkersOperation.java
index 6f74d45..18d862a 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractMarkersOperation.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractMarkersOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,8 @@
 import org.eclipse.core.runtime.jobs.MultiRule;
 import org.eclipse.ui.internal.ide.undo.MarkerDescription;
 import org.eclipse.ui.internal.ide.undo.UndoMessages;
+import org.eclipse.ui.views.markers.internal.MarkerType;
+import org.eclipse.ui.views.markers.internal.MarkerTypesModel;
 
 /**
  * An AbstractMarkersOperation represents an undoable operation that affects
@@ -253,17 +255,28 @@
 
 			}
 		}
+
 		if (types != null) {
+			MarkerType bookmarkType= MarkerTypesModel.getInstance().getType(IMarker.BOOKMARK);
+			MarkerType taskType= MarkerTypesModel.getInstance().getType(IMarker.TASK);
+			MarkerType problemType= MarkerTypesModel.getInstance().getType(IMarker.PROBLEM);
+
 			for (int i = 0; i < types.length; i++) {
 				// Marker type could be null if marker did not exist.
 				// This shouldn't happen, but can.
 				// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=158129
 				if (types[i] != null) {
-					if (types[i].equals(IMarker.BOOKMARK)) {
+					MarkerType type= MarkerTypesModel.getInstance().getType(types[i]);
+					if (type == null) {
+						// type is not known, use the workspace undo context
+						addContext(WorkspaceUndoUtil.getWorkspaceUndoContext());
+					} else if (type.isSubtypeOf(bookmarkType)) {
 						addContext(WorkspaceUndoUtil.getBookmarksUndoContext());
-					} else if (types[i].equals(IMarker.TASK)) {
+					} else if (type.isSubtypeOf(taskType)) {
 						addContext(WorkspaceUndoUtil.getTasksUndoContext());
-					} else if (types[i] != null) {
+					} else if (type.isSubtypeOf(problemType)) {
+						addContext(WorkspaceUndoUtil.getProblemsUndoContext());
+					} else {
 						// type is not known, use the workspace undo context
 						addContext(WorkspaceUndoUtil.getWorkspaceUndoContext());
 					}
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java
index b0e1f88..b9c5fa2 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.ui.ide.undo;
 
 import java.net.URI;
@@ -50,18 +49,19 @@
 import org.eclipse.ui.internal.ide.undo.FileDescription;
 import org.eclipse.ui.internal.ide.undo.UndoMessages;
 
+
 /**
  * WorkspaceUndoUtil defines common utility methods and constants used by
  * clients who create undoable workspace operations.
  * 
  * @since 3.3
- * 
  */
 public class WorkspaceUndoUtil {
 
 	private static ObjectUndoContext tasksUndoContext;
-
 	private static ObjectUndoContext bookmarksUndoContext;
+	private static ObjectUndoContext problemsUndoContext;
+
 
 	/**
 	 * Return the undo context that should be used for workspace-wide operations
@@ -104,6 +104,22 @@
 	}
 
 	/**
+	 * Return the undo context that should be used for operations involving
+	 * problems.
+	 * 
+	 * @return the problems undo context
+	 * @since 3.7
+	 */
+	public static IUndoContext getProblemsUndoContext() {
+		if (problemsUndoContext == null) {
+			problemsUndoContext = new ObjectUndoContext(new Object(),
+					"Problems Context"); //$NON-NLS-1$
+			problemsUndoContext.addMatch(getWorkspaceUndoContext());
+		}
+		return problemsUndoContext;
+	}
+
+	/**
 	 * Make an <code>IAdaptable</code> that adapts to the specified shell,
 	 * suitable for passing for passing to any
 	 * {@link org.eclipse.core.commands.operations.IUndoableOperation} or
@@ -327,6 +343,9 @@
 						|| (!source.isLinked() && !existing.isLinked()
 								&& !source.isVirtual() && !existing.isVirtual())) {
 					IResource[] children = ((IContainer) source).members();
+					// copy only linked resource children (267173)
+					if (source.isLinked() && source.getLocation().equals(existing.getLocation()))
+						children = filterNonLinkedResources(children);
 					ResourceDescription[] overwritten = copy(children,
 							destinationPath, resourcesAtDestination,
 							new SubProgressMonitor(monitor, 1), uiInfo, false,
@@ -513,7 +532,6 @@
 	 * is "VAR" and points to "C:\foo\bar\").
 	 *
 	 * @param locationURI
-	 * @param pvm the IPathVariableManager to use for resolving variables
 	 * @param resource 
 	 * @return an URI that was made relative to a variable
 	 */
@@ -586,16 +604,19 @@
 				// The resource is a folder and it exists in the destination.
 				// Move its children to the existing destination.
 				if (source.isLinked() == existing.isLinked()) {
-					IResource[] children = ((IContainer) source).members();
-					ResourceDescription[] overwritten = move(children,
-							destinationPath, resourcesAtDestination,
-							reverseDestinations, new SubProgressMonitor(
-									monitor, 1), uiInfo, false);
-					// We don't record the moved resources since the recursive
-					// call has done so. Just record the overwrites.
-					for (int j = 0; j < overwritten.length; j++) {
-						overwrittenResources.add(overwritten[j]);
-					}
+						IResource[] children = ((IContainer) source).members();
+						// move only linked resource children (267173)
+						if (source.isLinked() && source.getLocation().equals(existing.getLocation()))
+							children = filterNonLinkedResources(children);
+						ResourceDescription[] overwritten = move(children,
+								destinationPath, resourcesAtDestination,
+								reverseDestinations, new SubProgressMonitor(
+										monitor, 1), uiInfo, false);
+						// We don't record the moved resources since the recursive
+						// call has done so. Just record the overwrites.
+						for (int j = 0; j < overwritten.length; j++) {
+							overwrittenResources.add(overwritten[j]);
+						}
 					// Delete the source. No need to record it since it
 					// will get moved back.
 					delete(source, monitor, uiInfo, false, false);
@@ -680,6 +701,20 @@
 	}
 
 	/**
+	 * Returns only the linked resources out of an array of resources
+	 * @param resources The resources to filter
+	 * @return The linked resources
+	 */
+	private static IResource[] filterNonLinkedResources(IResource[] resources) {
+		List result = new ArrayList();
+		for (int i = 0; i < resources.length; i++) {
+			if (resources[i].isLinked())
+				result.add(resources[i]);
+		}
+		return (IResource[]) result.toArray(new IResource[0]);
+	}
+
+	/**
 	 * Recreate the resources from the specified resource descriptions.
 	 * 
 	 * @param resourcesToRecreate
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ContentTypeDecorator.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ContentTypeDecorator.java
index 9c8fe2a..10b4aaf 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ContentTypeDecorator.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ContentTypeDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.content.IContentDescription;
 import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.IDecoration;
 import org.eclipse.jface.viewers.ILabelProviderListener;
@@ -42,10 +43,13 @@
 		ImageDescriptor image = null;
 		IContentDescription contentDescription = null;
 		try {
+			Job.getJobManager().beginRule(file, null);
 			contentDescription = file.getContentDescription();
 		} catch (CoreException e) {
 			// We already have some kind of icon for this file so it's OK to not
 			// find a better icon.
+		} finally {
+			Job.getJobManager().endRule(file);
 		}
 		if (contentDescription != null) {
 			IContentType contentType = contentDescription.getContentType();
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEInternalWorkbenchImages.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEInternalWorkbenchImages.java
index c0e317a..7819475 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEInternalWorkbenchImages.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEInternalWorkbenchImages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,6 +51,12 @@
 
     public final static String IMG_ETOOL_PROBLEM_CATEGORY = "IMG_ETOOL_PROBLEM_CATEGORY"; //$NON-NLS-1$
 
+	public final static String IMG_ETOOL_PROBLEMS_VIEW= "IMG_ETOOL_PROBLEMS_VIEW"; //$NON-NLS-1$
+
+	public final static String IMG_ETOOL_PROBLEMS_VIEW_ERROR= "IMG_ETOOL_PROBLEMS_VIEW_ERROR"; //$NON-NLS-1$
+
+	public final static String IMG_ETOOL_PROBLEMS_VIEW_WARNING= "IMG_ETOOL_PROBLEMS_VIEW_WARNING"; //$NON-NLS-1$
+
     public final static String IMG_LCL_FLAT_LAYOUT = "IMG_LCL_FLAT_LAYOUT"; //$NON-NLS-1$
     
     public final static String IMG_LCL_HIERARCHICAL_LAYOUT = "IMG_LCL_HIERARCHICAL_LAYOUT"; //$NON-NLS-1$
@@ -98,9 +104,10 @@
 
     //Quick fix images
 	public static final String IMG_DLCL_QUICK_FIX_DISABLED = "IMG_DLCL_QUICK_FIX_DISABLED";//$NON-NLS-1$
-
 	public static final String IMG_ELCL_QUICK_FIX_ENABLED = "IMG_ELCL_QUICK_FIX_ENABLED"; //$NON-NLS-1$
-
+	public static final String IMG_OBJS_FIXABLE_WARNING= "IMG_OBJS_FIXABLE_WARNING"; //$NON-NLS-1$
+	public static final String IMG_OBJS_FIXABLE_ERROR= "IMG_OBJS_FIXABLE_ERROR"; //$NON-NLS-1$
+	
 
     /**
      * Returns the image descriptor for the workbench image with the given
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchMessages.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchMessages.java
index c9ca7a8..7a90233 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchMessages.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@
  * Dina Sayed, dsayed@eg.ibm.com, IBM -  bug 269844
  * Serge Beauchamp (Freescale Semiconductor) - [252996] Resource filters
  *     Markus Schorn (Wind River Systems) -  bug 284447
+ *     James Blackburn (Broadcom Corp.)   -  bug 340978
  *******************************************************************************/
 package org.eclipse.ui.internal.ide;
 
@@ -502,6 +503,8 @@
 	public static String IDEWorkspacePreference_savePriorToBuildingToolTip;
 	public static String IDEWorkspacePreference_RefreshButtonText;
 	public static String IDEWorkspacePreference_RefreshButtonToolTip;
+	public static String IDEWorkspacePreference_RefreshLightweightButtonText;
+	public static String IDEWorkspacePreference_RefreshLightweightButtonToolTip;
 	public static String IDEWorkspacePreference_fileLineDelimiter;
 	public static String IDEWorkspacePreference_defaultLineDelim;
 	public static String IDEWorkspacePreference_defaultLineDelimProj;
@@ -603,6 +606,7 @@
 	public static String ResourceInfo_locked;
 	public static String ResourceInfo_archive;
 	public static String ResourceInfo_derived;
+	public static String ResourceInfo_derivedHasDerivedAncestor;
 	public static String ResourceInfo_type;
 	public static String ResourceInfo_location;
 	public static String ResourceInfo_resolvedLocation;
@@ -624,6 +628,7 @@
 	public static String ResourceInfo_lastModified;
 	public static String ResourceInfo_fileEncodingTitle;
 	public static String ResourceInfo_fileContentEncodingFormat;
+	public static String ResourceInfo_fileContentTypeEncodingFormat;
 	public static String ResourceInfo_fileContainerEncodingFormat;
 	public static String ResourceInfo_containerEncodingFormat;
 	public static String ResourceInfo_exWarning;
@@ -649,6 +654,7 @@
 	// --- Linked Resource Editor ---
 	public static String LinkedResourceEditor_editLinkedLocation;
 	public static String LinkedResourceEditor_convertToVariableLocation;
+	public static String LinkedResourceEditor_remove;
 	public static String LinkedResourceEditor_resourceName;
 	public static String LinkedResourceEditor_path;
 	public static String LinkedResourceEditor_location;
@@ -666,6 +672,9 @@
 	public static String LinkedResourceEditor_descriptionBlock;
 	public static String LinkedResourceEditor_convertTitle;
 	public static String LinkedResourceEditor_convertMessage;
+	public static String LinkedResourceEditor_removeTitle;
+	public static String LinkedResourceEditor_removeMessage;
+	public static String LinkedResourceEditor_removingMessage;
 	
 	// ==============================================================================
 	// Editors
@@ -893,6 +902,7 @@
 	public static String ResourceEncodingFieldEditor_ErrorStoringMessage;
 	public static String ResourceEncodingFieldEditor_EncodingConflictTitle;
 	public static String ResourceEncodingFieldEditor_EncodingConflictMessage;
+	public static String ResourceEncodingFieldEditor_SeparateDerivedEncodingsLabel;
 
 	public static String ChooseWorkspaceDialog_dialogName;
 	public static String ChooseWorkspaceDialog_dialogTitle;
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java
index 9dc0408..62cfc17 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,6 +28,14 @@
 import org.eclipse.jface.resource.LocalResourceManager;
 import org.eclipse.jface.resource.ResourceManager;
 import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.ide.registry.MarkerImageProviderRegistry;
 import org.eclipse.ui.internal.ide.registry.ProjectImageRegistry;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -79,6 +87,8 @@
 	
 	private final static String ICONS_PATH = "$nl$/icons/full/";//$NON-NLS-1$
 
+	private static final int PROBLEMS_VIEW_CREATION_DELAY= 6000;
+
     /**
      * Project image registry; lazily initialized.
      */
@@ -330,4 +340,53 @@
 		if (resourceManager != null)
 			resourceManager.dispose();
 	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+
+		createProblemsViews();
+	}
+
+	/**
+	 * Create (but don't activate) the Problems views so that the view's tooltip and icon are
+	 * up-to-date.
+	 */
+	private void createProblemsViews() {
+		final Runnable r= new Runnable() {
+			public void run() {
+				IWorkbench workbench = PlatformUI.isWorkbenchRunning() ? PlatformUI.getWorkbench() : null;
+				if (workbench != null && (workbench.getDisplay().isDisposed() || PlatformUI.getWorkbench().isClosing()))
+					return;
+
+				if (workbench == null || workbench.isStarting()) {
+					Display.getDefault().timerExec(PROBLEMS_VIEW_CREATION_DELAY, this);
+					return;
+				}
+
+				IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
+				for (int i= 0; i < windows.length; i++) {
+					IWorkbenchWindow window= windows[i];
+					IWorkbenchPage activePage= window.getActivePage();
+					if (activePage == null)
+						continue;
+					IViewReference[] refs= activePage.getViewReferences();
+					for (int j= 0; j < refs.length; j++) {
+						IViewReference viewReference= refs[j];
+						if (IPageLayout.ID_PROBLEM_VIEW.equals(viewReference.getId()))
+							try {
+								if (viewReference.getPart(false) == null)
+									activePage.showView(viewReference.getId(), viewReference.getSecondaryId(), IWorkbenchPage.VIEW_CREATE);
+							} catch (PartInitException e) {
+								log("Could not create Problems view", e.getStatus()); //$NON-NLS-1$
+							}
+					}
+				}
+			}
+		};
+		Display.getDefault().timerExec(PROBLEMS_VIEW_CREATION_DELAY, r);
+	}
 }
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/LineDelimiterEditor.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/LineDelimiterEditor.java
index 1fb45cd..c2811e6 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/LineDelimiterEditor.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/LineDelimiterEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,8 +17,6 @@
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ProjectScope;
 import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -32,6 +30,7 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Group;
 import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
 
 /**
  * A class to handle editing of the Line delimiter preferences in core.
@@ -162,24 +161,31 @@
 	 * @return the currently stored encoding
 	 */
 	public String getStoredValue() {
-		IScopeContext[] scopeContext = new IScopeContext[] { getScopeContext() };
-		IEclipsePreferences node = scopeContext[0].getNode(Platform.PI_RUNTIME);
-		return node.get(Platform.PREF_LINE_SEPARATOR, null);
+		Preferences node = getPreferences();
+		try {
+			// be careful looking up for our node so not to create any nodes as side effect
+			if (node.nodeExists(Platform.PI_RUNTIME))
+				return node.node(Platform.PI_RUNTIME).get(
+						Platform.PREF_LINE_SEPARATOR, null);
+		} catch (BackingStoreException e) {
+			// ignore
+		}
+		return null;
 	}
 
 	/**
-	 * Answer the <code>IScopeContext</code> for the receiver, this will be a
-	 * project scope if the receiver is editing project preferences, otherwise
-	 * instance scope.
+	 * Answer the <code>Preferences</code> for the receiver, this will be a
+	 * project preferences if the receiver is editing project preferences, otherwise
+	 * instance preferences.
 	 * 
-	 * @return the scope context
+	 * @return the preferences
 	 */
-	private IScopeContext getScopeContext() {
+	private Preferences getPreferences() {
 		if (project != null) {
-			return new ProjectScope(project);
+			return Platform.getPreferencesService().getRootNode().node(ProjectScope.SCOPE).node(project.getName());
 		}
 
-		return new InstanceScope();
+		return Platform.getPreferencesService().getRootNode().node(InstanceScope.SCOPE);
 	}
 
 	/**
@@ -264,8 +270,7 @@
 			val = (String) lineSeparators.get(choiceCombo.getText());
 		}
 
-		IEclipsePreferences node = getScopeContext().getNode(
-				Platform.PI_RUNTIME);
+		Preferences node = getPreferences().node(Platform.PI_RUNTIME);
 		if (val == null) {
 			node.remove(Platform.PREF_LINE_SEPARATOR);
 		} else {
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ResourceWorkingSetUpdater.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ResourceWorkingSetUpdater.java
index 2d8261d..b2c2c45 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ResourceWorkingSetUpdater.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ResourceWorkingSetUpdater.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -206,7 +206,10 @@
 		for (Iterator iter = elements.iterator(); iter.hasNext();) {
 			IAdaptable element = (IAdaptable) iter.next();
 			boolean remove = false;
-			if (element instanceof IResource) {
+			if (element instanceof IProject) {
+				IProject project = (IProject) element;
+				remove = !project.exists();
+			} else if (element instanceof IResource) {
 				IResource resource = (IResource) element;
 				IProject project = resource.getProject();
 				remove = (project != null ? project.isOpen() : true)
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java
index 75e9918..9dc1414 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java
@@ -182,13 +182,13 @@
     
     private IWorkbenchAction exportResourcesAction;
 
-    IWorkbenchAction buildAllAction; // Incremental workspace build
+	private IWorkbenchAction buildAllAction; // Incremental workspace build
 
     private IWorkbenchAction cleanAction;
 
     private IWorkbenchAction toggleAutoBuildAction;
 
-    MenuManager buildWorkingSetMenu;
+	private MenuManager buildWorkingSetMenu;
 
     private IWorkbenchAction quickStartAction;
 
@@ -201,8 +201,14 @@
     private IWorkbenchAction introAction;
 
     // IDE-specific retarget actions
-    IWorkbenchAction buildProjectAction;
+	private IWorkbenchAction buildProjectAction;
+	
+	private CommandContributionItem minimizeItem;
+	
+	private CommandContributionItem zoomItem;
 
+	private CommandContributionItem arrangeWindowsItem;
+	
     // contribution items
     // @issue should obtain from ContributionItemFactory
     private NewWizardMenu newWizardMenu;
@@ -301,10 +307,10 @@
             }
         };
         /*
-         * In order to ensure that the pin action toolbar sets its size 
+         * In order to ensure that the pin action toolbar sets its size
          * correctly, the pin action should set its visiblity before we call updatePinActionToolbar().
          * 
-         * In other words we always want the PinActionContributionItem to be notified before the 
+         * In other words we always want the PinActionContributionItem to be notified before the
          * WorkbenchActionBuilder.
          */
         WorkbenchPlugin.getDefault().getPreferenceStore()
@@ -409,11 +415,11 @@
             helpToolBar.add(new Separator(IWorkbenchActionConstants.GROUP_HELP));
 //            helpToolBar.add(searchComboItem);
               // Add the group for applications to contribute
-            helpToolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP));              
+            helpToolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP));
             // Add to the cool bar manager
             coolBar.add(actionBarConfigurer.createToolBarContributionItem(helpToolBar,
                     IWorkbenchActionConstants.TOOLBAR_HELP));
-        }        
+        }
 
     }
 
@@ -613,6 +619,8 @@
         MenuManager menu = new MenuManager(
                 IDEWorkbenchMessages.Workbench_window, IWorkbenchActionConstants.M_WINDOW);
 
+        addMacWindowMenuItems(menu);
+        
         menu.add(newWindowAction);
 		menu.add(newEditorAction);
 		
@@ -623,6 +631,9 @@
         Separator sep = new Separator(IWorkbenchActionConstants.MB_ADDITIONS);
 		sep.setVisible(!Util.isMac());
 		menu.add(sep);
+		
+		if(Util.isCocoa())
+			menu.add(arrangeWindowsItem);
         
         // See the comment for quit in createFileMenu
         ActionContributionItem openPreferencesItem = new ActionContributionItem(openPreferencesAction);
@@ -633,7 +644,18 @@
         return menu;
     }
 
-    /**
+	private void addMacWindowMenuItems(MenuManager windowMenu) {
+
+		if (!Util.isCocoa())
+			return;
+
+		windowMenu.add(minimizeItem);
+		windowMenu.add(zoomItem);
+		windowMenu.add(new Separator());
+
+	}
+
+	/**
      * Adds the perspective actions to the specified menu.
      */
     private void addPerspectiveActions(MenuManager menu) {
@@ -796,6 +818,7 @@
         showInQuickMenu.dispose();
         newQuickMenu.dispose();
         
+
         // null out actions to make leak debugging easier
         closeAction = null;
         closeAllAction = null;
@@ -863,8 +886,10 @@
         prefListener = null;
         propPrefListener = null;
         introAction = null;
-        
-        super.dispose();
+        minimizeItem = null;
+        zoomItem = null;
+        arrangeWindowsItem = null;
+		super.dispose();
     }
 
     void updateModeLine(final String text) {
@@ -1141,6 +1166,20 @@
             }
         };
         register(newQuickMenu);
+        
+        
+		if (Util.isCocoa()) {
+
+			CommandContributionItemParameter minimizeParam = new CommandContributionItemParameter(window, null,
+					"org.eclipse.ui.cocoa.minimizeWindow", CommandContributionItem.STYLE_PUSH); //$NON-NLS-1$
+			minimizeItem = new CommandContributionItem(minimizeParam);
+			CommandContributionItemParameter zoomParam = new CommandContributionItemParameter(window, null,
+					"org.eclipse.ui.cocoa.zoomWindow", CommandContributionItem.STYLE_PUSH); //$NON-NLS-1$
+			zoomItem = new CommandContributionItem(zoomParam);
+			CommandContributionItemParameter arrangeWindowsParam = new CommandContributionItemParameter(window, null,
+					"org.eclipse.ui.cocoa.arrangeWindowsInFront", CommandContributionItem.STYLE_PUSH); //$NON-NLS-1$
+			arrangeWindowsItem = new CommandContributionItem(arrangeWindowsParam);
+		}
 
     }
 
@@ -1164,7 +1203,7 @@
         
         // See if a welcome page is specified.
         // Optimization: if welcome pages were found on a previous run, then just add the action.
-        String quickStartKey = IDEActionFactory.QUICK_START.getId(); 
+        String quickStartKey = IDEActionFactory.QUICK_START.getId();
         String showQuickStart = prefs.getString(quickStartKey);
         if (sameState && "true".equals(showQuickStart)) { //$NON-NLS-1$
             quickStartAction = IDEActionFactory.QUICK_START.create(window);
@@ -1428,7 +1467,7 @@
         		ISharedImages.IMG_TOOL_DELETE,
         		ISharedImages.IMG_TOOL_DELETE_DISABLED,
         		WorkbenchMessages.Workbench_delete,
-        		WorkbenchMessages.Workbench_deleteToolTip, 
+        		WorkbenchMessages.Workbench_deleteToolTip,
         		IWorkbenchHelpContextIds.DELETE_RETARGET_ACTION);
     }
     
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildUtilities.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildUtilities.java
index d948eb9..122d7d3 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildUtilities.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildUtilities.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -75,15 +75,25 @@
 		if (window == null) {
 			return new IProject[0];
 		}
-		ISelection selection = window.getSelectionService().getSelection();
+
+		IWorkbenchPage activePage= window.getActivePage();
+		if (activePage == null) {
+			return new IProject[0];
+		}
+
+		IWorkbenchPart activePart= activePage.getActivePart();
+		if (activePart == null) {
+			return new IProject[0];
+		}
+
+		ISelection selection= window.getSelectionService().getSelection(activePart.getSite().getId());
 		IProject[] selected = null;
 		if (selection != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
 			selected = extractProjects(((IStructuredSelection) selection).toArray());
 		} else {
 			//see if we can extract a selected project from the active editor
-			IWorkbenchPart part = window.getPartService().getActivePart();
-			if (part instanceof IEditorPart) {
-				IEditorPart editor = (IEditorPart) part;
+			if (activePart instanceof IEditorPart) {
+				IEditorPart editor= (IEditorPart)activePart;
 				IFile file = ResourceUtil.getFile(editor.getEditorInput());
 				if (file != null) {
 					selected = new IProject[] {file.getProject()};
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/OpenWorkspaceAction.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/OpenWorkspaceAction.java
index 413ed0f..cc158fc 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/OpenWorkspaceAction.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/OpenWorkspaceAction.java
@@ -10,18 +10,27 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.ide.actions;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.ActionContributionItem;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IContributionItem;
 import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.actions.ActionFactory;
 import org.eclipse.ui.internal.ide.ChooseWorkspaceData;
@@ -112,6 +121,111 @@
 	private static final String NEW_LINE = "\n"; //$NON-NLS-1$
 
 	private IWorkbenchWindow window;
+	
+	
+	private IContributionItem[] getContributionItems() {
+		ArrayList list = new ArrayList();
+		final ChooseWorkspaceData data = new ChooseWorkspaceData(Platform
+				.getInstanceLocation().getURL());
+		data.readPersistedData();
+		String current = data.getInitialDefault();
+		String[] workspaces = data.getRecentWorkspaces();
+		for (int i = 0; i < workspaces.length; i++) {
+			if (workspaces[i] != null && !workspaces[i].equals(current)) {
+				list.add(new ActionContributionItem(new WorkspaceMRUAction(
+						workspaces[i], data)));
+			}
+		}
+		if (list.size()>0) {
+			list.add(new Separator());
+		}
+		return (IContributionItem[]) list
+				.toArray(new IContributionItem[list.size()]);
+	}
+	
+	class MenuCreator implements IMenuCreator {
+		ArrayList menus = new ArrayList();
+
+		private MenuManager dropDownMenuMgr;
+
+		/**
+		 * Creates the menu manager for the drop-down.
+		 */
+		private void createDropDownMenuMgr() {
+			if (dropDownMenuMgr == null) {
+				dropDownMenuMgr = new MenuManager();
+				dropDownMenuMgr.setRemoveAllWhenShown(true);
+			}
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
+		 */
+		public Menu getMenu(Control parent) {
+			createDropDownMenuMgr();
+			dropDownMenuMgr.addMenuListener(new IMenuListener() {
+				public void menuAboutToShow(IMenuManager manager) {
+					IContributionItem[] items = getContributionItems();
+					for (int i = 0; i < items.length; i++) {
+						manager.add(items[i]);
+					}
+					manager.add(new OpenDialogAction());
+				}
+			});
+			return dropDownMenuMgr.createContextMenu(parent);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
+		 */
+		public Menu getMenu(Menu parent) {
+			createDropDownMenuMgr();
+			final Menu menu = new Menu(parent);
+			menu.addListener(SWT.Show, new Listener() {
+				public void handleEvent(Event event) {
+					if (menu.isDisposed()) {
+						return;
+					}
+					MenuItem[] items = menu.getItems();
+					for (int i = 0; i < items.length; i++) {
+						items[i].dispose();
+					}
+					IContributionItem[] contributions = getContributionItems();
+					for (int i = 0; i < contributions.length; i++) {
+						contributions[i].fill(menu, -1);
+					}
+					new ActionContributionItem(new OpenDialogAction()).fill(
+							menu, -1);
+				}
+			});
+			return menu;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.jface.action.IMenuCreator#dispose()
+		 */
+		public void dispose() {
+			if (dropDownMenuMgr != null) {
+				dropDownMenuMgr.dispose();
+				dropDownMenuMgr = null;
+			}
+			if (menus.size()>0) {
+				for (Iterator i = menus.iterator(); i.hasNext();) {
+					Menu m = (Menu) i.next();
+					if (!m.isDisposed()) {
+						m.dispose();
+					}
+				}
+				menus.clear();
+			}
+		}
+	}
 
 	/**
 	 * Set definition for this action and text so that it will be used for File
@@ -133,76 +247,7 @@
 		this.window = window;
 		setToolTipText(IDEWorkbenchMessages.OpenWorkspaceAction_toolTip);
 		setActionDefinitionId("org.eclipse.ui.file.openWorkspace"); //$NON-NLS-1$
-		setMenuCreator(new IMenuCreator() {
-			private MenuManager dropDownMenuMgr;
-
-			/**
-			 * Creates the menu manager for the drop-down.
-			 */
-			private void createDropDownMenuMgr() {
-				if (dropDownMenuMgr == null) {
-					dropDownMenuMgr = new MenuManager();
-					final ChooseWorkspaceData data = new ChooseWorkspaceData(
-							Platform.getInstanceLocation().getURL());
-					data.readPersistedData();
-					String current = data.getInitialDefault();
-					String[] workspaces = data.getRecentWorkspaces();
-					for (int i = 0; i < workspaces.length; i++) {
-						if (workspaces[i] != null
-								&& !workspaces[i].equals(current)) {
-							dropDownMenuMgr.add(new WorkspaceMRUAction(
-									workspaces[i], data));
-						}
-					}
-					if (!dropDownMenuMgr.isEmpty())
-						dropDownMenuMgr.add(new Separator());
-					dropDownMenuMgr.add(new OpenDialogAction());
-				}
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
-			 */
-			public Menu getMenu(Control parent) {
-				createDropDownMenuMgr();
-				return dropDownMenuMgr.createContextMenu(parent);
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
-			 */
-			public Menu getMenu(Menu parent) {
-				createDropDownMenuMgr();
-				Menu menu = new Menu(parent);
-				IContributionItem[] items = dropDownMenuMgr.getItems();
-				for (int i = 0; i < items.length; i++) {
-					IContributionItem item = items[i];
-					IContributionItem newItem = item;
-					if (item instanceof ActionContributionItem) {
-						newItem = new ActionContributionItem(
-								((ActionContributionItem) item).getAction());
-					}
-					newItem.fill(menu, -1);
-				}
-				return menu;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.action.IMenuCreator#dispose()
-			 */
-			public void dispose() {
-				if (dropDownMenuMgr != null) {
-					dropDownMenuMgr.dispose();
-					dropDownMenuMgr = null;
-				}
-			}
-		});
+		setMenuCreator(new MenuCreator());
 	}
 
 	/*
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/commands/CopyBuildIdToClipboardHandler.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/commands/CopyBuildIdToClipboardHandler.java
index fcf59f6..b760716 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/commands/CopyBuildIdToClipboardHandler.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/commands/CopyBuildIdToClipboardHandler.java
@@ -36,7 +36,7 @@
 	 */
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 		final String buildId = ConfigurationInfo.getBuildId();
-		if (buildId == null)
+		if (buildId == null || buildId.length() == 0)
 			throw new ExecutionException("No build ID in this instance."); //$NON-NLS-1$
 		Clipboard clipboard = null;
 		try {
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CleanDialog.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CleanDialog.java
index 4181760..872016c 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CleanDialog.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CleanDialog.java
@@ -16,6 +16,24 @@
 import java.util.Arrays;
 import java.util.List;
 
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.window.IShellProvider;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -27,28 +45,6 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.WorkspaceJob;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.window.IShellProvider;
-
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.actions.BuildAction;
 import org.eclipse.ui.actions.GlobalBuildAction;
@@ -57,6 +53,7 @@
 import org.eclipse.ui.internal.ide.actions.BuildUtilities;
 import org.eclipse.ui.model.WorkbenchContentProvider;
 import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.ui.progress.IProgressConstants2;
 
 /**
  * Dialog that asks the user to confirm a clean operation, and to configure
@@ -181,6 +178,7 @@
         cleanJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory()
                 .buildRule());
         cleanJob.setUser(true);
+        cleanJob.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, Boolean.TRUE);
         cleanJob.schedule();
     }
 
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileStatesPage.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileStatesPage.java
index 7b898d9..c581732 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileStatesPage.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileStatesPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -66,6 +66,8 @@
 
     private long STATE_SIZE_MAXIMUM = 100;
 
+    private static final int INDENT = 20;
+    
     /**
      * This method takes the string for the title of a text field and the value for the
      * text of the field.
@@ -99,6 +101,7 @@
         button.addListener(SWT.Selection, this);
         GridData data = new GridData();
         data.horizontalSpan = 2;
+        data.horizontalIndent= -INDENT;
         button.setLayoutData(data);
         button.setText(label);
         button.setSelection(selected);
@@ -122,7 +125,7 @@
         while (iter.hasNext())
 			((Control)iter.next()).setEnabled(newState);
 
-        if (validateLongTextEntry(longevityText) == FAILED_VALUE) {
+        if (validateLongTextEntry(longevityText, DAY_LENGTH) == FAILED_VALUE) {
             setValid(false);
             return;
         }
@@ -164,20 +167,16 @@
 			megabytes = 1;
 		}
 
-		this.applyPolicyButton = addCheckBox(IDEWorkbenchMessages.FileHistory_applyPolicy, description
-						.isApplyFileStatePolicy(), parent);
-
 		// button group
 		Composite composite= new Composite(parent, SWT.NONE);
 		GridLayout layout= new GridLayout();
 		layout.numColumns= 2;
-		layout.marginLeft= 10;
+		layout.marginLeft= INDENT;
 		layout.marginWidth= 0;
 		composite.setLayout(layout);
-		GridData gd= new GridData();
-		gd.horizontalIndent= 200;
-		composite.setLayoutData(gd);
 
+		this.applyPolicyButton = addCheckBox(IDEWorkbenchMessages.FileHistory_applyPolicy, description
+				.isApplyFileStatePolicy(), composite);
 
 		this.longevityText= addDependentLabelAndText(IDEWorkbenchMessages.FileHistory_longevity, String
                 .valueOf(days), composite);
@@ -237,7 +236,7 @@
 
     /**
      * Performs special processing when this page's Defaults button has been pressed.
-     * Reset the entries to thier default values.
+     * Reset the entries to their default values.
      */
     protected void performDefaults() {
         super.performDefaults();
@@ -264,7 +263,7 @@
      */
     public boolean performOk() {
 
-        long longevityValue = validateLongTextEntry(longevityText);
+        long longevityValue = validateLongTextEntry(longevityText, DAY_LENGTH);
         int maxFileStates = validateMaxFileStates();
         long maxStateSize = validateMaxFileStateSize();
         boolean applyPolicy = applyPolicyButton.getSelection();
@@ -322,14 +321,18 @@
     /**
      * Validate a text entry for a long field. Return the result if there are
      * no errors, otherwise return -1 and set the entry field error.
+     * @param scale the scale (factor by which the value is multiplied when it is persisted) 
      * @return long
      */
-    private long validateLongTextEntry(Text text) {
+    private long validateLongTextEntry(Text text, long scale) {
 
         long value;
 
         try {
-            value = Long.parseLong(text.getText());
+            String string = text.getText();
+			value = Long.parseLong(string);
+            if (value * scale / scale != value)
+            	throw new NumberFormatException(string);
 
         } catch (NumberFormatException exception) {
             setErrorMessage(MessageFormat.format(IDEWorkbenchMessages.FileHistory_invalid,
@@ -375,7 +378,7 @@
      * @return long
      */
     private long validateMaxFileStateSize() {
-        long maxFileStateSize = validateLongTextEntry(this.maxStateSizeText);
+        long maxFileStateSize = validateLongTextEntry(this.maxStateSizeText, MEGABYTES);
         if (maxFileStateSize == FAILED_VALUE) {
 			return maxFileStateSize;
 		}
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkspacePreferencePage.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkspacePreferencePage.java
index 5f477ad..45f370d 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkspacePreferencePage.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkspacePreferencePage.java
@@ -1,5 +1,5 @@
  /****************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     Dina Sayed, dsayed@eg.ibm.com, IBM -  bug 269844
  *     Markus Schorn (Wind River Systems) -  bug 284447
+ *     James Blackburn (Broadcom Corp.)   -  bug 340978
  *******************************************************************************/
 package org.eclipse.ui.internal.ide.dialogs;
 
@@ -66,11 +67,13 @@
 
 	private FieldEditor workspaceName;
 
-    private Button autoRefreshButton;
-    
-    private Button closeUnrelatedProjectButton;
-    
-    private ResourceEncodingFieldEditor encodingEditor;
+	private Button autoRefreshButton;
+
+	private Button lightweightRefreshButton;
+
+	private Button closeUnrelatedProjectButton;
+
+	private ResourceEncodingFieldEditor encodingEditor;
 
 	private LineDelimiterEditor lineSeparatorEditor;
 	
@@ -79,7 +82,6 @@
 
 	private RadioGroupFieldEditor openReferencesEditor;
 
-
     /*
      * (non-Javadoc)
      * 
@@ -259,10 +261,19 @@
         this.autoRefreshButton.setText(IDEWorkbenchMessages.IDEWorkspacePreference_RefreshButtonText);
         this.autoRefreshButton.setToolTipText(IDEWorkbenchMessages.IDEWorkspacePreference_RefreshButtonToolTip);
 
-        boolean autoRefresh = ResourcesPlugin.getPlugin()
+        this.lightweightRefreshButton = new Button(parent, SWT.CHECK);
+        this.lightweightRefreshButton.setText(IDEWorkbenchMessages.IDEWorkspacePreference_RefreshLightweightButtonText);
+        this.lightweightRefreshButton.setToolTipText(IDEWorkbenchMessages.IDEWorkspacePreference_RefreshLightweightButtonToolTip);
+
+        boolean lightweightRefresh = ResourcesPlugin.getPlugin()
                 .getPluginPreferences().getBoolean(
-                        ResourcesPlugin.PREF_AUTO_REFRESH);
+                		ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH);
+        boolean autoRefresh = ResourcesPlugin.getPlugin()
+		        .getPluginPreferences().getBoolean(
+		                ResourcesPlugin.PREF_AUTO_REFRESH);
+        
         this.autoRefreshButton.setSelection(autoRefresh);
+        this.lightweightRefreshButton.setSelection(lightweightRefresh);
     }
 
     /**
@@ -380,12 +391,15 @@
         boolean closeUnrelatedProj = store.getDefaultBoolean(IDEInternalPreferences.CLOSE_UNRELATED_PROJECTS);
         closeUnrelatedProjectButton.setSelection(closeUnrelatedProj);
 
-		
-        boolean autoRefresh = ResourcesPlugin.getPlugin()
+        boolean lightweightRefresh = ResourcesPlugin.getPlugin()
                 .getPluginPreferences().getDefaultBoolean(
-                        ResourcesPlugin.PREF_AUTO_REFRESH);
+                		ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH);
+        boolean autoRefresh = ResourcesPlugin.getPlugin()
+		        .getPluginPreferences().getDefaultBoolean(
+		                ResourcesPlugin.PREF_AUTO_REFRESH);
         autoRefreshButton.setSelection(autoRefresh);
-        
+        lightweightRefreshButton.setSelection(lightweightRefresh);
+
         clearUserSettings = true;
 
 		List encodings = WorkbenchEncoding.getDefinedEncodings();
@@ -451,7 +465,9 @@
 
         boolean autoRefresh = autoRefreshButton.getSelection();
         preferences.setValue(ResourcesPlugin.PREF_AUTO_REFRESH, autoRefresh);
-        
+        boolean lightweightRefresh = lightweightRefreshButton.getSelection();
+        preferences.setValue(ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH, lightweightRefresh);
+
         boolean closeUnrelatedProj = closeUnrelatedProjectButton.getSelection();
         getIDEPreferenceStore().setValue(IDEInternalPreferences.CLOSE_UNRELATED_PROJECTS, closeUnrelatedProj);
         
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/LinkedResourceEditor.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/LinkedResourceEditor.java
index be2d738..726f8dd 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/LinkedResourceEditor.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/LinkedResourceEditor.java
@@ -11,6 +11,7 @@
 
 package org.eclipse.ui.internal.ide.dialogs;
 
+import java.lang.reflect.InvocationTargetException;
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -28,13 +29,17 @@
 import org.eclipse.core.resources.IResourceVisitor;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.SubProgressMonitor;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
 import org.eclipse.jface.layout.TreeColumnLayout;
+import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.ColumnWeightData;
 import org.eclipse.jface.viewers.IContentProvider;
 import org.eclipse.jface.viewers.ILabelProvider;
@@ -49,8 +54,10 @@
 import org.eclipse.jface.window.Window;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.MouseAdapter;
 import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.graphics.Font;
@@ -138,6 +145,14 @@
 				convertLocation();
 			}
 		});
+		fRemoveButton = createButton(groupComponent,
+				IDEWorkbenchMessages.LinkedResourceEditor_remove);
+		fRemoveButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				removeSelection();
+			}
+		});
+		
 		updateSelection();
 	}
 
@@ -240,14 +255,21 @@
 		fTree.getTree().setHeaderVisible(true);
 		createButtons(pageComponent);
 
-		fTree.getTree().addMouseListener(new MouseListener() {
+		fTree.getTree().addMouseListener(new MouseAdapter() {
 			public void mouseDoubleClick(MouseEvent e) {
 		        if (getSelectedResource().length == 1)
 		        	editLocation();
 			}
-			public void mouseDown(MouseEvent e) { }
-			public void mouseUp(MouseEvent e) { }
         });
+		fTree.getTree().addKeyListener(new KeyAdapter() {
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == SWT.DEL) {
+					e.doit = false;
+					if (getSelectedResource().length > 0)
+						removeSelection();
+				}
+			}
+		});
 
         return pageComponent;
 	}
@@ -411,7 +433,8 @@
 	}
 
 	void refreshContent() {
-		if (fProjectFiles == null) {
+		IResource[] projectFiles;
+		if (!initialized) {
 			final LinkedList/* <IResource> */resources = new LinkedList/*
 																		 * <IResource
 																		 * >
@@ -430,13 +453,21 @@
 				});
 			} catch (CoreException e) {
 			}
-			fProjectFiles = (IResource[]) resources.toArray(new IResource[0]);
+			projectFiles = (IResource[]) resources.toArray(new IResource[0]);
+			initialized = true;
+		}
+		else {
+			ArrayList/*<IResource>*/ list = new ArrayList();
+			list.addAll(fBrokenResources.values());
+			list.addAll(fFixedResources.values());
+			list.addAll(fAbsoluteResources.values());
+			projectFiles = (IResource[]) list.toArray(new IResource[0]);
 		}
 		fBrokenResources = new TreeMap/* <String, IResource> */();
 		fFixedResources = new TreeMap/* <String, IResource> */();
 		fAbsoluteResources = new TreeMap/* <String, IResource> */();
-		for (int i = 0; i < fProjectFiles.length; i++) {
-			IResource resource = fProjectFiles[i];
+		for (int i = 0; i < projectFiles.length; i++) {
+			IResource resource = projectFiles[i];
 			String fullPath = resource.getFullPath().toPortableString();
 			try {
 				if (exists(resource)) {
@@ -479,6 +510,7 @@
 		fConvertAbsoluteButton.setEnabled((getSelectedResource().length > 0)
 				&& (areAbsolute(getSelectedResource())
 				|| areFixed(getSelectedResource())));
+		fRemoveButton.setEnabled(getSelectedResource().length > 0);
 	}
 
 	boolean areFixed(IResource[] res) {
@@ -520,6 +552,51 @@
 		}
 	}
 
+	private void removeSelection() {
+		if (MessageDialog.openConfirm(fRemoveButton.getShell(),
+				IDEWorkbenchMessages.LinkedResourceEditor_removeTitle,
+				IDEWorkbenchMessages.LinkedResourceEditor_removeMessage)) {
+			final IResource[] selectedResources = getSelectedResource();
+			final ArrayList/*<IResource>*/ removedResources = new ArrayList();
+
+			IRunnableWithProgress op = new IRunnableWithProgress() {
+				public void run(IProgressMonitor monitor) {
+					try {
+						monitor.beginTask(
+								IDEWorkbenchMessages.LinkedResourceEditor_removingMessage,
+								selectedResources.length);
+						for (int i = 0; i < selectedResources.length; i++) {
+							if (monitor.isCanceled())
+								break;
+							String fullPath = selectedResources[i]
+									.getFullPath().toPortableString();
+							try {
+								selectedResources[i].delete(true, new SubProgressMonitor(monitor, 1));
+								removedResources.add(selectedResources[i]);
+								fBrokenResources.remove(fullPath);
+								fFixedResources.remove(fullPath);
+								fAbsoluteResources.remove(fullPath);
+							} catch (CoreException e) {
+								e.printStackTrace();
+							}
+						}
+					} finally {
+						monitor.done();
+					}
+				}
+			};
+			try {
+				new ProgressMonitorDialog(fRemoveButton.getShell()).run(true,
+						true, op);
+			} catch (InvocationTargetException e) {
+				IDEWorkbenchPlugin.log(null, e);
+			} catch (InterruptedException e) {
+				IDEWorkbenchPlugin.log(null, e);
+			}
+			fTree.refresh();
+		}
+	}
+
 	private void convertToAbsolute(ArrayList/* <IResource> */resources,
 			IResource[] selectedResources) {
 		ArrayList/* <String> */report = new ArrayList/* <String> */();
@@ -927,7 +1004,7 @@
 			fTree.refresh();
 	}
 
-	IResource fProjectFiles[] = null;
+	boolean initialized = false;
 	TreeMap/* <String, IResource> */fBrokenResources = new TreeMap/*
 																	 * <String,
 																	 * IResource
@@ -947,6 +1024,7 @@
 	TreeViewer fTree;
 	Button fEditResourceButton;
 	Button fConvertAbsoluteButton;
+	Button fRemoveButton;
 
 	Image fixedImg = null;
 	Image brokenImg = null;
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/OpenResourceDialog.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/OpenResourceDialog.java
index 97c30eb..a763554 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/OpenResourceDialog.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/OpenResourceDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,11 +12,15 @@
 
 import java.util.Collections;
 
+import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IStatus;
-
-import org.eclipse.core.resources.IContainer;
-
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.util.Util;
+import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.MouseAdapter;
 import org.eclipse.swt.events.MouseEvent;
@@ -30,14 +34,6 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.util.Util;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
 import org.eclipse.ui.IEditorDescriptor;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
@@ -48,7 +44,6 @@
 import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
 import org.eclipse.ui.internal.WorkbenchImages;
 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
-import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
 
 
 /**
@@ -75,8 +70,6 @@
 			int typesMask) {
 		super(parentShell, true, container, typesMask);
 		setTitle(IDEWorkbenchMessages.OpenResourceDialog_title);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(parentShell,
-				IIDEHelpContextIds.OPEN_RESOURCE_DIALOG);
 	}
 
 	/* (non-Javadoc)
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ProjectContentsLocationArea.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ProjectContentsLocationArea.java
index 1c2cef5..35cd387 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ProjectContentsLocationArea.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ProjectContentsLocationArea.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -381,7 +381,7 @@
 	/**
 	 * Return the path on the location field.
 	 * 
-	 * @return String
+	 * @return the path or the field's text if the path is invalid
 	 */
 	private String getPathFromLocationField() {
 		URI fieldURI;
@@ -390,7 +390,8 @@
 		} catch (URISyntaxException e) {
 			return locationPathField.getText();
 		}
-		return fieldURI.getPath();
+		String path= fieldURI.getPath();
+		return path != null ? path : locationPathField.getText();
 	}
 
 	/**
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java
index 5931721..1be93f5 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,7 +22,6 @@
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.ResourceAttributes;
 import org.eclipse.core.runtime.CoreException;
@@ -105,6 +104,8 @@
 
 	private static String DERIVED = IDEWorkbenchMessages.ResourceInfo_derived;
 
+	private static String DERIVED_HAS_DERIVED_ANCESTOR = IDEWorkbenchMessages.ResourceInfo_derivedHasDerivedAncestor;
+
 	private static String TYPE_TITLE = IDEWorkbenchMessages.ResourceInfo_type;
 
 	private static String LOCATION_TITLE = IDEWorkbenchMessages.ResourceInfo_location;
@@ -416,36 +417,31 @@
 				setPermissionsSelection(previousPermissionsValue);
 			}
 		}
-		encodingEditor = new ResourceEncodingFieldEditor(
-				getFieldEditorLabel(resource), composite, resource);
-		encodingEditor.setPage(this);
-		encodingEditor.load();
+		//We can't save and load the preferences for closed project
+		if (resource.getProject().isOpen()) {
+			encodingEditor = new ResourceEncodingFieldEditor(
+					getFieldEditorLabel(resource), composite, resource);
+			encodingEditor.setPage(this);
+			encodingEditor.load();
 
-		encodingEditor.setPropertyChangeListener(new IPropertyChangeListener() {
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
-			 */
-			public void propertyChange(PropertyChangeEvent event) {
-				if (event.getProperty().equals(FieldEditor.IS_VALID)) {
-					setValid(encodingEditor.isValid());
+			encodingEditor.setPropertyChangeListener(new IPropertyChangeListener() {
+				/*
+				 * (non-Javadoc)
+				 * 
+				 * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+				 */
+				public void propertyChange(PropertyChangeEvent event) {
+					if (event.getProperty().equals(FieldEditor.IS_VALID)) {
+						setValid(encodingEditor.isValid());
+					}
 				}
+			});
 
+			if (resource.getType() == IResource.PROJECT) {
+				lineDelimiterEditor = new LineDelimiterEditor(composite, resource
+						.getProject());
+				lineDelimiterEditor.doLoad();
 			}
-		});
-
-		
-		if (resource.getType() == IResource.PROJECT) {
-			lineDelimiterEditor = new LineDelimiterEditor(composite, resource
-					.getProject());
-			lineDelimiterEditor.doLoad();
-		}
-		
-		//We can't save the preferences for close
-		if (resource.getType() == IResource.PROJECT && !((IProject)resource).isOpen()){
-			encodingEditor.setEnabled(false, composite);
-			lineDelimiterEditor.setEnabled(false);
 		}
 		
 		Dialog.applyDialogFont(composite);
@@ -639,12 +635,17 @@
 	 * 
 	 * @param composite
 	 *            the parent of the button
+	 * @param resource
+	 *            the resource the information is being taken from
 	 */
-	private void createDerivedButton(Composite composite) {
+	private void createDerivedButton(Composite composite, IResource resource) {
 
 		this.derivedBox = new Button(composite, SWT.CHECK | SWT.RIGHT);
 		this.derivedBox.setAlignment(SWT.LEFT);
-		this.derivedBox.setText(DERIVED);
+		if (resource.getParent().isDerived(IResource.CHECK_ANCESTORS))
+			this.derivedBox.setText(DERIVED_HAS_DERIVED_ANCESTOR);
+		else
+			this.derivedBox.setText(DERIVED);
 		this.derivedBox.setSelection(this.previousDerivedValue);
 	}
 
@@ -699,7 +700,7 @@
 			if ((fsAttributes & EFS.ATTRIBUTE_IMMUTABLE) != 0)
 				createImmutableButton(composite);
 		}
-		createDerivedButton(composite);
+		createDerivedButton(composite, resource);
 		// create warning for executable flag
 		if (executableBox != null && resource.getType() == IResource.FOLDER)
 			createExecutableWarning(composite, font);
@@ -904,7 +905,9 @@
 			setPermissionsSelection(defaultPermissionValues);
 		}
 
-		encodingEditor.loadDefault();
+		if (encodingEditor != null) {
+			encodingEditor.loadDefault();
+		}
 
 		if (lineDelimiterEditor != null) {
 			lineDelimiterEditor.loadDefault();
@@ -923,8 +926,6 @@
 		if (resource == null)
 			return true;
 
-		encodingEditor.store();
-
 		if (lineDelimiterEditor != null) {
 			lineDelimiterEditor.store();
 		}
@@ -1005,6 +1006,12 @@
 					IDEWorkbenchMessages.InternalError, exception
 							.getLocalizedMessage(), exception.getStatus());
 			return false;
+		} finally {
+			// This must be invoked after the 'derived' property has been set,
+			// because it may influence the place where encoding is stored.
+			if (encodingEditor != null) {
+				encodingEditor.store();
+			}
 		}
 		return true;
 	}
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceTreeAndListGroup.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceTreeAndListGroup.java
index 2077b2a..289bb14 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceTreeAndListGroup.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceTreeAndListGroup.java
@@ -62,7 +62,7 @@
 
     private Map checkedStateStore = new HashMap(9);
 
-    private Collection whiteCheckedTreeItems = new HashSet();
+    private HashSet whiteCheckedTreeItems = new HashSet();
 
     private ITreeContentProvider treeContentProvider;
 
@@ -389,7 +389,7 @@
     /**
      * Add all of the selected children of nextEntry to result recursively.
      * This does not set any values in the checked state.
-     * @param The treeElement being queried
+     * @param treeElement The tree elements being queried
      * @param addAll a boolean to indicate if the checked state store needs to be queried
      * @param filter IElementFilter - the filter being used on the data
      * @param monitor IProgressMonitor or null that the cancel is polled for 
@@ -484,7 +484,52 @@
         }
     }
 
-    /**
+    /** Returns whether all items in the list are checked.
+     * This method is required, because this widget will keep items grey
+     * checked even though all children are selected (see grayUpdateHierarchy()).
+     * @return true if all items in the list are checked - false if not
+     */
+    public boolean isEveryItemChecked() {
+        //Iterate through the children of the root as the root is not in the store
+    	Object[] children = treeContentProvider.getChildren(root);
+        for (int i = 0; i < children.length; ++i) {
+        	if (!whiteCheckedTreeItems.contains(children[i])) {
+                if (!treeViewer.getGrayed(children[i]))
+                	return false;
+        		if (!isEveryChildrenChecked(children[i]))
+        			return false;
+        	}
+        }
+        return true;
+    }
+
+	/**Verifies of all list items of the tree element are checked, and 
+	 * if all children are white checked.  If not, verify their children
+	 * so that if an element is not white checked, but all its children
+	 * are while checked, then, all items are considered checked.
+	 * @param treeElement the treeElement which status to verify
+	 * @return true if all items are checked, false otherwise.
+	 */
+	private boolean isEveryChildrenChecked(Object treeElement) {
+        List checked = (List) checkedStateStore.get(treeElement);
+        if (checked != null && (!checked.isEmpty())) {
+            Object[] listItems = listContentProvider.getElements(treeElement);
+        	if (listItems.length != checked.size())
+        		return false;
+		}
+    	Object[] children = treeContentProvider.getChildren(treeElement);
+        for (int i = 0; i < children.length; ++i) {
+        	if (!whiteCheckedTreeItems.contains(children[i])) {
+                if (!treeViewer.getGrayed(children[i]))
+                	return false;
+        		if (!isEveryChildrenChecked(children[i]))
+        			return false;
+        	}
+        }
+		return true;
+	}
+
+	/**
      *	Returns a flat list of all of the leaf elements which are checked.
      *
      *	@return all of the leaf elements which are checked. This API does not
@@ -1122,7 +1167,15 @@
      */
     public void setFocus() {
 
-        this.treeViewer.getTree().setFocus();
+        treeViewer.getTree().setFocus();
+        if(treeViewer.getSelection().isEmpty()) {
+        	Object[] elements = treeContentProvider.getElements(root);
+        	if(elements.length > 0) {
+        		StructuredSelection selection = new StructuredSelection(elements[0]);
+        		treeViewer.setSelection(selection);
+        	}
+        }
+        	
     }
 
 }
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/messages.properties b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/messages.properties
index e6feaa0..a733c55 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/messages.properties
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
+# Copyright (c) 2006, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,4 +10,4 @@
 ###############################################################################
 
 DefaultFileSystem_name = default
-FileSystemSelection_title = Choose file system:
\ No newline at end of file
+FileSystemSelection_title = Choose file s&ystem:
\ No newline at end of file
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/messages.properties b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/messages.properties
index 5b64168..a8e9009 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/messages.properties
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2010 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@
 #     Serge Beauchamp (Freescale Semiconductor) - [252996] Resource filters
 #     Serge Beauchamp (Freescale Semiconductor) - [229633] Group Support
 #     Markus Schorn (Wind River Systems) -  bug 284447
+#     James Blackburn (Broadcom Corp.)   - bug 340978
 ###############################################################################
 
 # package: org.eclipse.ui.ide
@@ -53,7 +54,7 @@
 ############################################################
 showAdvanced = &Advanced >>
 hideAdvanced = << &Advanced
-editfilters = Resource &Filters...
+editfilters = Resource F&ilters...
 useDefaultLocation=Use &default location
 createLinkedFolder=Link to alternate location (&Linked Folder)
 createVirtualFolder=Folder is not located in the file system (Vi&rtual Folder)
@@ -474,8 +475,10 @@
 IDEWorkspacePreference_autobuildToolTip = Build automatically on resource modification
 IDEWorkspacePreference_savePriorToBuilding= Save auto&matically before build
 IDEWorkspacePreference_savePriorToBuildingToolTip= Save modified resources automatically before manual build
-IDEWorkspacePreference_RefreshButtonText=&Refresh automatically
-IDEWorkspacePreference_RefreshButtonToolTip=Automatically refresh external workspace changes
+IDEWorkspacePreference_RefreshButtonText=&Refresh using native hooks or polling
+IDEWorkspacePreference_RefreshButtonToolTip=Automatically refresh external workspace changes using native hooks or polling
+IDEWorkspacePreference_RefreshLightweightButtonText=Refresh on acce&ss
+IDEWorkspacePreference_RefreshLightweightButtonToolTip=Automatically refresh external workspace changes on access via the workspace
 IDEWorkspacePreference_fileLineDelimiter=New text &file line delimiter
 IDEWorkspacePreference_defaultLineDelim=D&efault
 IDEWorkspacePreference_defaultLineDelimProj=Inh&erited from container
@@ -570,6 +573,7 @@
 ResourceInfo_locked = L&ocked
 ResourceInfo_archive = Ar&chive
 ResourceInfo_derived = Deri&ved
+ResourceInfo_derivedHasDerivedAncestor = Deri&ved (has derived ancestor)
 ResourceInfo_type = &Type:
 ResourceInfo_location = &Location:
 ResourceInfo_resolvedLocation = Resolved locatio&n:
@@ -643,8 +647,9 @@
 ResourceInfo_path = &Path:
 ResourceInfo_lastModified = Last &modified:
 ResourceInfo_fileEncodingTitle = Default encoding for &text files
-ResourceInfo_fileContentEncodingFormat = &Default (determined from content: {0})
-ResourceInfo_fileContainerEncodingFormat = Default (&inherited from container: {0})
+ResourceInfo_fileContentEncodingFormat = D&efault (determined from content: {0})
+ResourceInfo_fileContentTypeEncodingFormat = D&efault (determined from content type: {0})
+ResourceInfo_fileContainerEncodingFormat = D&efault (inherited from container: {0})
 ResourceInfo_containerEncodingFormat = &Inherited from container ({0})
 ResourceInfo_exWarning= Removing the executable flag on a folder will cause its children to become unreadable.
 ResourceInfo_edit=&Edit...
@@ -668,6 +673,7 @@
 # --- Linked Resource Editor ---
 LinkedResourceEditor_editLinkedLocation=&Edit...
 LinkedResourceEditor_convertToVariableLocation=&Convert...
+LinkedResourceEditor_remove=&Delete...
 LinkedResourceEditor_resourceName=Resource Name
 LinkedResourceEditor_path=Path
 LinkedResourceEditor_location=Location
@@ -685,7 +691,9 @@
 LinkedResourceEditor_descriptionBlock=Linked resources in project ''{0}'':
 LinkedResourceEditor_convertTitle = Convert linked resource locations
 LinkedResourceEditor_convertMessage = Are you sure you want to convert the linked resource location(s) between absolute and variable relative paths?  This operation cannot be undone.  
-
+LinkedResourceEditor_removeTitle = Delete linked resources
+LinkedResourceEditor_removeMessage = Are you sure you want to delete the selected linked resources?  This operation cannot be undone.  
+LinkedResourceEditor_removingMessage=Deleting linked resources...
 # ==============================================================================
 # Editors
 # ==============================================================================
@@ -915,6 +923,7 @@
 ResourceEncodingFieldEditor_ErrorStoringMessage=Error storing encoding
 ResourceEncodingFieldEditor_EncodingConflictTitle=Conflict in Encoding
 ResourceEncodingFieldEditor_EncodingConflictMessage= {0} conflicts with the encoding defined in the content type ({1}). Do you wish to set it anyways?
+ResourceEncodingFieldEditor_SeparateDerivedEncodingsLabel=&Store the encoding of derived resources separately
 
 ChooseWorkspaceDialog_dialogName=Workspace Launcher
 ChooseWorkspaceDialog_dialogTitle=Select a workspace
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchAdapterFactory.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchAdapterFactory.java
index 1a3b6bb..a252fbe 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchAdapterFactory.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchAdapterFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Fair Isaac Corporation <Hemant.Singh@Gmail.com> - http://bugs.eclipse.org/333590
  *******************************************************************************/
 package org.eclipse.ui.internal.ide.model;
 
@@ -21,6 +22,8 @@
 import org.eclipse.ui.IPersistableElement;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.model.IWorkbenchAdapter;
+import org.eclipse.ui.model.IWorkbenchAdapter2;
+import org.eclipse.ui.model.IWorkbenchAdapter3;
 
 /**
  * Dispenses adapters for various core objects.
@@ -81,7 +84,9 @@
         if (adapterType.isInstance(o)) {
             return o;
         }
-        if (adapterType == IWorkbenchAdapter.class) {
+        if (adapterType == IWorkbenchAdapter.class
+                || adapterType == IWorkbenchAdapter2.class
+                || adapterType == IWorkbenchAdapter3.class) {
             return getWorkbenchElement(o);
         }
         if (adapterType == IPersistableElement.class) {
@@ -111,8 +116,10 @@
      * @return the collection of adapter types
      */
     public Class[] getAdapterList() {
-        return new Class[] { IWorkbenchAdapter.class, IElementFactory.class,
-                IPersistableElement.class, IActionFilter.class, IUndoContext.class };
+        return new Class[] { IWorkbenchAdapter.class, IWorkbenchAdapter2.class,
+                IWorkbenchAdapter3.class, IElementFactory.class,
+                IPersistableElement.class, IActionFilter.class,
+                IUndoContext.class };
     }
 
     /**
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/AllMarkersView.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/AllMarkersView.java
index d6cbbba..a5d24a3 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/AllMarkersView.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/AllMarkersView.java
@@ -1,6 +1,6 @@
 package org.eclipse.ui.internal.views.markers;
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,10 +9,13 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.commands.operations.ObjectUndoContext;
+import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
 import org.eclipse.ui.views.markers.MarkerSupportView;
 import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
 
+
 /**
  * AllMarkersView is the view that shows all markers.
  * @since 3.4
@@ -27,4 +30,17 @@
 		super(MarkerSupportRegistry.ALL_MARKERS_GENERATOR);
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.internal.views.markers.ExtendedMarkersView#getUndoContext()
+	 * @since 3.7
+	 */
+	protected IUndoContext getUndoContext() {
+		ObjectUndoContext context= new ObjectUndoContext(new Object(), "All Markers Context"); //$NON-NLS-1$
+		context.addMatch(WorkspaceUndoUtil.getBookmarksUndoContext());
+		context.addMatch(WorkspaceUndoUtil.getTasksUndoContext());
+		context.addMatch(WorkspaceUndoUtil.getProblemsUndoContext());
+		return context;
+	}
+
 }
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/BookmarksView.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/BookmarksView.java
index d746c61..b7c8a5f 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/BookmarksView.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/BookmarksView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,12 +8,17 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  ******************************************************************************/
-
 package org.eclipse.ui.internal.views.markers;
 
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
 import org.eclipse.ui.views.markers.MarkerSupportView;
+import org.eclipse.ui.views.markers.internal.MarkerMessages;
 import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
 
+
 /**
  * The BookmarksView is the ide view for bookmarks.
  * @since 3.4
@@ -28,4 +33,23 @@
 		super(MarkerSupportRegistry.BOOKMARKS_GENERATOR);
 		
 	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.views.markers.internal.MarkerView#getUndoContext()
+	 * @since 3.7
+	 */
+	protected IUndoContext getUndoContext() {
+		return WorkspaceUndoUtil.getBookmarksUndoContext();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.views.markers.ExtendedMarkersView#getDeleteOperationName(org.eclipse.core.resources.IMarker[])
+	 * @since 3.7
+	 */
+	protected String getDeleteOperationName(IMarker[] markers) {
+		Assert.isLegal(markers.length > 0);
+		return markers.length == 1 ? MarkerMessages.deleteBookmarkMarker_operationName : MarkerMessages.deleteBookmarkMarkers_operationName;
+	}
+
 }
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ConfigureColumnsHandler.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ConfigureColumnsHandler.java
index 602ecd9..4b688ea 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ConfigureColumnsHandler.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ConfigureColumnsHandler.java
@@ -12,7 +12,6 @@
 
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.IHandler;
-import org.eclipse.jface.util.ConfigureColumns;
 import org.eclipse.ui.views.markers.MarkerViewHandler;
 
 /**
@@ -33,7 +32,7 @@
 		ExtendedMarkersView view = getView(event);
 		if (view == null)
 			return this;
-		ConfigureColumns.forTree(view.getViewer().getTree(), view.getSite());
+		new MarkersViewColumnsDialog(view).open();
 		return this;
 	}
 
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/DeleteHandler.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/DeleteHandler.java
index 29e6dfe..96c20ff 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/DeleteHandler.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/DeleteHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,17 +11,17 @@
 package org.eclipse.ui.internal.views.markers;
 
 import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.IUndoableOperation;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.WorkspaceJob;
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.ide.undo.DeleteMarkersOperation;
+import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
-import org.eclipse.ui.internal.ide.Policy;
 import org.eclipse.ui.views.markers.MarkerSupportView;
 import org.eclipse.ui.views.markers.MarkerViewHandler;
 import org.eclipse.ui.views.markers.internal.MarkerMessages;
@@ -39,9 +39,9 @@
 	 * 
 	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
 	 */
-	public Object execute(ExecutionEvent event) throws ExecutionException {
+	public Object execute(ExecutionEvent event) {
 
-		MarkerSupportView view = getView(event);
+		final MarkerSupportView view = getView(event);
 		if (view == null)
 			return this;
 
@@ -61,25 +61,19 @@
 			return view;
 		}
 		
-		WorkspaceJob deleteJob = new WorkspaceJob(IDEWorkbenchMessages.MarkerDeleteHandler_JobTitle){	//See Bug#250807
-				public IStatus runInWorkspace(IProgressMonitor monitor)
-				throws CoreException {
-					monitor.beginTask(IDEWorkbenchMessages.MarkerDeleteHandler_JobMessageLabel, 10*selected.length);
-					try {
-						for (int i = 0; i < selected.length; i++) {
-							if(monitor.isCanceled())return Status.CANCEL_STATUS;
-							selected[i].delete();
-							monitor.worked(10);
-						}
-					} catch (CoreException e) {
-						Policy.handle(e);
-						throw e;
-					}finally{
-						monitor.done();
-					}
-					return Status.OK_STATUS;
-	 			}
-			};
+		WorkspaceJob deleteJob= new WorkspaceJob(IDEWorkbenchMessages.MarkerDeleteHandler_JobTitle) { //See Bug#250807
+			public IStatus runInWorkspace(IProgressMonitor monitor) {
+				monitor.beginTask(IDEWorkbenchMessages.MarkerDeleteHandler_JobMessageLabel, 10 * selected.length);
+				try {
+					IUndoableOperation op= new DeleteMarkersOperation(selected, view.getDeleteOperationName(selected));
+					op.addContext(view.getUndoContext());
+					execute(op, MarkerMessages.deleteMarkers_errorMessage, monitor, WorkspaceUndoUtil.getUIInfoAdapter(view.getSite().getShell()));
+				} finally {
+					monitor.done();
+				}
+				return Status.OK_STATUS;
+			}
+		};
 		deleteJob.setUser(true);
 		deleteJob.schedule();
 
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java
index f302bc6..e466a6e 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.ui.internal.views.markers;
 
 import java.util.ArrayList;
@@ -17,9 +16,11 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.help.IContext;
@@ -51,6 +52,8 @@
 import org.eclipse.swt.dnd.Transfer;
 import org.eclipse.swt.events.HelpEvent;
 import org.eclipse.swt.events.HelpListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
@@ -71,17 +74,21 @@
 import org.eclipse.ui.ISelectionListener;
 import org.eclipse.ui.IViewPart;
 import org.eclipse.ui.IViewSite;
+import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchPartReference;
 import org.eclipse.ui.OpenAndLinkWithEditorHelper;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
 import org.eclipse.ui.ide.IDE;
 import org.eclipse.ui.ide.ResourceUtil;
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.ide.StatusUtil;
 import org.eclipse.ui.menus.IMenuService;
+import org.eclipse.ui.operations.RedoActionHandler;
+import org.eclipse.ui.operations.UndoActionHandler;
 import org.eclipse.ui.part.MarkerTransfer;
 import org.eclipse.ui.part.ViewPart;
 import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
@@ -95,6 +102,7 @@
 
 import com.ibm.icu.text.MessageFormat;
 
+
 /**
  * The ExtendedMarkersView is the internal implementation of the view that shows
  * markers using the markerGenerators extension point.
@@ -118,11 +126,11 @@
 	 */
 	public final Object MARKERSVIEW_UPDATE_JOB_FAMILY = new Object();
 
+	static final String MARKER_FIELD = "MARKER_FIELD"; //$NON-NLS-1$
+	
 	private static int instanceCount = 1;
 	private static final String TAG_GENERATOR = "markerContentGenerator"; //$NON-NLS-1$
 
-	private static final String MARKER_FIELD = "MARKER_FIELD"; //$NON-NLS-1$
-
 	private static final String TAG_EXPANDED = "expanded"; //$NON-NLS-1$
 
 	private static final String TAG_CATEGORY = "category"; //$NON-NLS-1$
@@ -138,6 +146,13 @@
 	private UIUpdateJob uiUpdateJob;
 	
 	private MarkersTreeViewer viewer;
+
+	/**
+	 * Tells whether the tree has been painted.
+	 * @since 3.7
+	 */
+	private boolean treePainted= false;
+	
 	private ISelectionListener pageSelectionListener;
 	private IPartListener2 partListener;
 	private Clipboard clipboard;
@@ -147,6 +162,11 @@
 	private IMemento memento;
 	private String[] defaultGeneratorIds = new String[0];
 
+	private UndoActionHandler undoAction;
+
+	private RedoActionHandler redoAction;
+
+
 	/**
 	 * Return a new instance of the receiver.
 	 * 
@@ -241,8 +261,19 @@
 				/*| SWT.VIRTUAL */| SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION));
 		viewer.getTree().setLinesVisible(true);
 		viewer.setUseHashlookup(true);
-		createColumns(new TreeColumn[0]);
+		createColumns(new TreeColumn[0], new int[0]);
 		viewer.setContentProvider(getContentProvider());
+
+		/*
+		 * Workaround for TeeColumn.getWidth() returning 0 in some cases, see
+		 * https://bugs.eclipse.org/341865 for details.
+		 */
+		viewer.getTree().addPaintListener(new PaintListener() {
+			public void paintControl(PaintEvent e) {
+				treePainted= true;
+				viewer.getTree().removePaintListener(this);
+			}
+		});
 	}
 
 	/**
@@ -250,22 +281,18 @@
 	 * 
 	 * @param currentColumns
 	 *            the columns to refresh
+	 * @param widths 
 	 */
-	private void createColumns(TreeColumn[] currentColumns) {
+	private void createColumns(TreeColumn[] currentColumns, int[] widths) {
 
 		Tree tree = viewer.getTree();
 		TableLayout layout = new TableLayout();
 
 		MarkerField[] fields = generator.getVisibleFields();
 
-		IMemento columnWidths = null;
-		if (memento != null)
-			columnWidths = memento.getChild(TAG_COLUMN_WIDTHS);
-
 		for (int i = 0; i < fields.length; i++) {
 			MarkerField markerField = fields[i];
-
-			TreeViewerColumn column;
+			TreeViewerColumn column = null;
 			if (i < currentColumns.length)
 				column = new TreeViewerColumn(viewer, currentColumns[i]);
 			else {
@@ -290,27 +317,20 @@
 			if (builder.getPrimarySortField().equals(markerField))
 				updateDirectionIndicator(column.getColumn(), markerField);
 
-			int columnWidth = -1;
-
-			if (i == 0) {
-				// Compute and store a font metric
-				GC gc = new GC(tree);
-				gc.setFont(tree.getFont());
-				FontMetrics fontMetrics = gc.getFontMetrics();
-				gc.dispose();
-				columnWidth = Math.max(markerField.getDefaultColumnWidth(tree),
-						fontMetrics.getAverageCharWidth() * 5);
+			IMemento columnWidths = null;
+			if (memento != null){
+				columnWidths = memento.getChild(TAG_COLUMN_WIDTHS);
 			}
-
+			
+			//adjust the column width
+			int columnWidth = i < widths.length ? widths[i] : -1;
+			columnWidth = getFieldWidth(markerField, columnWidth, false);
 			if (columnWidths != null) {
-				Integer value = columnWidths.getInteger(getFieldId(column
-						.getColumn()));
-
-				// Make sure we get a useful value
-				if (value != null && value.intValue() > 0)
-					columnWidth = value.intValue();
+				// save it
+				columnWidths.putInteger(
+						markerField.getConfigurationElement().getAttribute(
+						MarkerSupportInternalUtilities.ATTRIBUTE_ID), columnWidth);
 			}
-
 			// Take trim into account if we are using the default value, but not
 			// if it is restored.
 			if (columnWidth < 0)
@@ -318,14 +338,12 @@
 						.getDefaultColumnWidth(tree), true, true));
 			else
 				layout.addColumnData(new ColumnPixelData(columnWidth, true));
-
 		}
 
 		// Remove extra columns
 		if (currentColumns.length > fields.length) {
 			for (int i = fields.length; i < currentColumns.length; i++) {
 				currentColumns[i].dispose();
-
 			}
 		}
 
@@ -336,6 +354,48 @@
 
 	}
 
+	/**
+	 * 
+	 * @param markerField
+	 * @param preferredWidth
+	 * @param considerUIWidths
+	 * @return desired width for the column representing markerField
+	 */
+	int getFieldWidth(MarkerField markerField, int preferredWidth, boolean considerUIWidths) {
+		Tree tree = getViewer().getTree();
+
+		if (considerUIWidths) {
+			TreeColumn[] columns= tree.getColumns();
+			for (int i= 0; i < columns.length; i++) {
+				if (markerField.equals(columns[i].getData(MARKER_FIELD))) {
+					return columns[i].getWidth();
+				}
+			}
+		}
+
+		if (preferredWidth < 0 && memento != null) {
+			IMemento columnWidths = memento.getChild(TAG_COLUMN_WIDTHS);
+			if (columnWidths != null) {
+				Integer value = columnWidths.getInteger(markerField
+						.getConfigurationElement().getAttribute(
+								MarkerSupportInternalUtilities.ATTRIBUTE_ID));
+				// Make sure we get a useful value
+				if (value != null && value.intValue() >= 0)
+					preferredWidth = value.intValue();
+			}
+		}
+		if (preferredWidth <= 0) {
+			// Compute and store a font metric
+			GC gc = new GC(tree);
+			gc.setFont(tree.getFont());
+			FontMetrics fontMetrics = gc.getFontMetrics();
+			gc.dispose();
+			preferredWidth = Math.max(markerField.getDefaultColumnWidth(tree),
+					fontMetrics.getAverageCharWidth() * 5);
+		}
+		return preferredWidth;
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -363,6 +423,14 @@
 
 		getSite().setSelectionProvider(viewer);
 
+		IUndoContext undoContext= getUndoContext();
+		undoAction= new UndoActionHandler(getSite(), undoContext);
+		undoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_UNDO);
+		redoAction= new RedoActionHandler(getSite(), undoContext);
+		redoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_REDO);
+		getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
+		getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
+
 		startView();
 
 	}
@@ -542,6 +610,10 @@
 
 		getSite().getPage().removePostSelectionListener(pageSelectionListener);
 		getSite().getPage().removePartListener(partListener);
+
+		undoAction.dispose();
+		redoAction.dispose();
+
 		super.dispose();
 	}
 
@@ -657,7 +729,7 @@
 	 * 
 	 */
 	private IContentProvider getContentProvider() {
-		return new MarkerViewerContentProvider();
+		return new MarkerViewerContentProvider(this);
 	}
 
 	/**
@@ -761,7 +833,12 @@
 			 * IWorkbenchPartReference)
 			 */
 			public void partHidden(IWorkbenchPartReference partRef) {
-				// Do nothing by default
+				if (partRef.getId().equals(getSite().getId())) {
+					Markers markers = getActiveViewerInputClone();
+					Integer[] counts = markers.getMarkerCounts();
+					setTitleToolTip(getStatusMessage(markers, counts));
+				}
+
 			}
 
 			/*
@@ -792,11 +869,11 @@
 			 * IWorkbenchPartReference)
 			 */
 			public void partVisible(IWorkbenchPartReference partRef) {
-				if (partRef.getId().equals(
-						ExtendedMarkersView.this.getSite().getId())) {
+				if (partRef.getId().equals(getSite().getId())) {
 					pageSelectionListener.selectionChanged(getSite().getPage()
 							.getActivePart(), getSite().getPage()
 							.getSelection());
+					setTitleToolTip(null);
 				}
 
 			}
@@ -842,29 +919,37 @@
 	/**
 	 * Get the status message for the title and status line.
 	 * 
+	 * @param markers the markers for which to get the status message
+	 * @param counts an array of {@link Integer} where index indicates
+	 *            [errors,warnings,infos,others]
 	 * @return String
 	 */
-	private String getStatusMessage() {
-		Markers markers=getActiveViewerInputClone();
+	private String getStatusMessage(Markers markers, Integer[] counts) {
 		String status = MarkerSupportInternalUtilities.EMPTY_STRING;
 		int totalCount = builder.getTotalMarkerCount(markers);
 		int filteredCount = 0;
+		boolean markerLimitsEnabled = generator.isMarkerLimitsEnabled();
+		int markerLimit = generator.getMarkerLimits();
 		MarkerSupportItem[] categories = markers.getCategories();
 		// Categories might be null if building is still happening
 		if (categories != null && builder.isShowingHierarchy()) {
-			int markerLimit = MarkerSupportInternalUtilities.getMarkerLimit();
 
 			for (int i = 0; i < categories.length; i++) {
-				filteredCount += markerLimit < 0 ? categories[i]
-						.getChildrenCount() : Math.min(categories[i]
-						.getChildrenCount(), markerLimit);
+				
+				int childCount = categories[i].getChildrenCount();
+				if (markerLimitsEnabled)
+					childCount = Math.min(childCount, markerLimit);
+
+				filteredCount += childCount;
+				
 			}
 		} else {
-			filteredCount = MarkerSupportInternalUtilities.getMarkerLimit();
+			if(markerLimitsEnabled)
+				filteredCount = markerLimit;
+			else
+				filteredCount = -1;
 		}
 
-		Integer[] counts = markers.getMarkerCounts();
-
 		// Any errors or warnings? If not then send the filtering message
 		if (counts[0].intValue() == 0 && counts[1].intValue() == 0) {
 			if (filteredCount < 0 || filteredCount >= totalCount) {
@@ -1061,15 +1146,6 @@
 	}
 
 	/**
-	 * Set the generator for the view.
-	 * 
-	 * @param generator
-	 */
-	void internalSetGenerator(MarkerContentGenerator generator) {
-		this.generator=generator;
-	}
-
-	/**
 	 * @return Returns the generator.
 	 */
 	MarkerContentGenerator getGenerator() {
@@ -1191,11 +1267,19 @@
 		int[] positions = viewer.getTree().getColumnOrder();
 		for (int i = 0; i < fields.length; i++) {
 			TreeColumn column = viewer.getTree().getColumn(i);
-			columnEntry.putInteger(getFieldId(column), column.getWidth());
-			fields[positions[i]] = (MarkerField) column.getData(MARKER_FIELD);
+			MarkerField markerField= (MarkerField)column.getData(MARKER_FIELD);
+
+			/*
+			 * Workaround for TeeColumn.getWidth() returning 0 in some cases, see
+			 * https://bugs.eclipse.org/341865 for details.
+			 */
+			int width= getFieldWidth(markerField, -1, treePainted);
+
+			columnEntry.putInteger(getFieldId(column), width);
+			fields[positions[i]]= markerField;
 		}
 		if (generator != null) {
-			generator.saveSate(memento, fields);
+			generator.saveState(memento, fields);
 		}
 		builder.saveState(memento);
 	}
@@ -1217,19 +1301,6 @@
 		builder.setCategoryGroup(group);
 	}
 
-	/**
-	 * Set the content generator for the receiver and update.
-	 * 
-	 * @param generator
-	 */
-	void setContentGenerator(MarkerContentGenerator generator) {
-		viewer.setSelection(new StructuredSelection());
-		viewer.removeAndClearAll();
-		internalSetGenerator(generator);
-		createColumns(viewer.getTree().getColumns());
-		builder.setGenerator(generator);
-	}
-
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -1389,10 +1460,30 @@
 	}
 
 	/**
-	 * Update the title of the view.
+	 * Update the title and description of the view.
 	 */
 	void updateTitle() {
-		setContentDescription(getStatusMessage());
+		Markers markers = getActiveViewerInputClone();
+		Integer[] counts = markers.getMarkerCounts();
+		String statusMessage = getStatusMessage(markers, counts);
+
+		setContentDescription(statusMessage);
+
+		if (!"".equals(getTitleToolTip())) { //$NON-NLS-1$
+			setTitleToolTip(statusMessage);
+		}
+
+		updateTitleImage(counts);
+	}
+
+	/**
+	 * Updates this view's title image.
+	 * 
+	 * @param counts an array of {@link Integer} where index indicates
+	 *            [errors,warnings,infos,others]
+	 * @since 3.7
+	 */
+	void updateTitleImage(Integer[] counts) {
 	}
 
 	/**
@@ -1458,11 +1549,11 @@
 	/**
 	 * @param visible
 	 */
-	void setVisibleFields(Collection visible) {
+	void setVisibleFields(Collection visible,int[] widths) {
 		generator.setVisibleFields(visible);
 		//viewer.setSelection(new StructuredSelection());
 		//viewer.removeAndClearAll();
-		createColumns(viewer.getTree().getColumns());
+		createColumns(viewer.getTree().getColumns(), widths);
 		scheduleUpdate(0L);
 	}
 
@@ -1627,24 +1718,7 @@
 			try {
 				IDE.openEditor(page, marker, OpenStrategy.activateOnOpen());
 			} catch (PartInitException e) {
-
-				// Check for a nested CoreException
-				IStatus status = e.getStatus();
-				if (status != null
-						&& status.getException() instanceof CoreException) {
-					status = ((CoreException) status.getException())
-							.getStatus();
-				}
-
-				if (status == null)
-					StatusManager.getManager().handle(
-							StatusUtil.newStatus(IStatus.ERROR, e.getMessage(),
-									e), StatusManager.SHOW);
-
-				else
-					StatusManager.getManager().handle(status,
-							StatusManager.SHOW);
-
+				MarkerSupportInternalUtilities.showViewError(e);
 			}
 		}
 	}
@@ -1698,4 +1772,27 @@
 		}
 		
 	}
+
+	/**
+	 * Return the undo context associated with operations performed in this view. By default, return
+	 * the workspace undo context. Subclasses should override if a more specific undo context should
+	 * be used.
+	 *
+	 * @since 3.7
+	 */
+	protected IUndoContext getUndoContext() {
+		return (IUndoContext)ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class);
+	}
+
+	/**
+	 * Returns the name of the delete operation.
+	 * 
+	 * @param markers the markers to be deleted, must have at least one element
+	 * @since 3.7
+	 */
+	protected String getDeleteOperationName(IMarker[] markers) {
+		Assert.isLegal(markers.length > 0);
+		return markers.length == 1 ? MarkerMessages.deleteMarker_operationName : MarkerMessages.deleteMarkers_operationName;
+	}
+
 }
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/FiltersConfigurationDialog.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/FiltersConfigurationDialog.java
index fd59a6d..52fecf2 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/FiltersConfigurationDialog.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/FiltersConfigurationDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,42 +16,50 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
+import java.util.List;
 
-import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.IInputValidator;
 import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.Util;
+import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.CheckStateChangedEvent;
 import org.eclipse.jface.viewers.CheckboxTableViewer;
 import org.eclipse.jface.viewers.ICheckStateListener;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.window.Window;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
 import org.eclipse.ui.forms.events.ExpansionEvent;
-import org.eclipse.ui.forms.events.IExpansionListener;
 import org.eclipse.ui.forms.widgets.ExpandableComposite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.internal.ide.IDEInternalPreferences;
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.preferences.ViewSettingsDialog;
 import org.eclipse.ui.views.markers.FilterConfigurationArea;
@@ -66,40 +74,41 @@
 public class FiltersConfigurationDialog extends ViewSettingsDialog {
 
 	private static final String SELECTED_FILTER_GROUP = "SELECTED_FILTER_GROUP"; //$NON-NLS-1$
+	private static final String PREV_SELECTED_ELEMENTS = "PREV_SELECTED_ELEMENTS"; //$NON-NLS-1$
 
 	private Collection filterGroups;
 
-	private CheckboxTableViewer filtersList;
-
-	private GroupFilterConfigurationArea scopeArea = new ScopeArea();
+	private CheckboxTableViewer configsTable;
 
 	private MarkerFieldFilterGroup selectedFilterGroup;
 
-	private ScrolledForm form;
-
 	private MarkerContentGenerator generator;
 
-	private Collection filterAreas;
-
 	private boolean andFilters = false;
 
 	private Button removeButton;
-
 	private Button renameButton;
 	
-	private Button cloneButton;
-
+	private Button allButton;
 	private Button andButton;
-
 	private Button orButton;
 
-	private Label andOrLabel;
+	private Button limitButton;
+	private Text limitText;
+
+	private GroupFilterConfigurationArea scopeArea = new ScopeArea();
+	private ScrolledForm form;
+
+	private Collection configAreas;
+	private Label limitsLabel;
+	
+	private Object[] previouslyChecked = new Object[0];
 
 	/**
 	 * Create a new instance of the receiver on builder.
 	 * 
 	 * @param parentShell
-	 * @param generator 
+	 * @param generator
 	 */
 	public FiltersConfigurationDialog(Shell parentShell,
 			MarkerContentGenerator generator) {
@@ -121,68 +130,311 @@
 	/*
 	 * (non-Javadoc)
 	 * 
-	 * @see org.eclipse.jface.dialogs.Dialog#close()
+	 * @see org.eclipse.ui.internal.views.markers.ViewerSettingsAndStatusDialog#
+	 * configureShell(org.eclipse.swt.widgets.Shell)
 	 */
-	public boolean close() {
-		saveDialogSettings();
-		return super.close();
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(MarkerMessages.configureFiltersDialog_title);
 	}
 
 	/*
 	 * (non-Javadoc)
 	 * 
-	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 * @see org.eclipse.jface.dialogs.Dialog#isResizable()
+	 */
+	protected boolean isResizable() {
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.views.markers.ViewerSettingsAndStatusDialog#
+	 * createDialogContentArea(org.eclipse.swt.widgets.Composite)
 	 */
 	protected Control createDialogArea(Composite parent) {
 
-		parent.getShell().setText(MarkerMessages.configureFiltersDialog_title);
-
-		Composite top = (Composite) super.createDialogArea(parent);
-
-		initializeDialogUnits(top);
-
+		Composite container = new Composite(parent, SWT.NONE);
+		container.setLayout(new GridLayout());
+		container.setLayoutData(new GridData(GridData.FILL_BOTH));
+		container.setFont(parent.getFont());
+		
+		Composite composite = new Composite(container, SWT.NONE);
 		GridLayout layout = new GridLayout();
-		layout.numColumns = 3;
-		layout.makeColumnsEqualWidth = false;
-		top.setLayout(layout);
+		layout.marginHeight = 0;
+		composite.setLayout(layout);
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+		composite.setBackground(container.getBackground());
 
-		createFilterSelectionArea(top);
-		
-		Label seprator=new Label(top, SWT.SEPARATOR|SWT.VERTICAL);
-		seprator.setLayoutData(new GridData(SWT.NONE, SWT.FILL, false, true));
-		
-		final FormToolkit toolkit = new FormToolkit(top.getDisplay());
-		parent.addDisposeListener(new DisposeListener() {
+		createAndOrButtons(composite);
 
-			public void widgetDisposed(DisposeEvent e) {
-				toolkit.dispose();
+		Group configComposite = new Group(composite, SWT.NONE);
+		configComposite.setText(MarkerMessages.MarkerConfigurationsLabel);
 
-			}
-		});
-		form = toolkit.createScrolledForm(top);
-		form.setBackground(parent.getBackground());
+		configComposite.setLayout(new GridLayout(3, false));
+		GridData configData = new GridData(GridData.FILL_BOTH);
+		configData.horizontalIndent = 20;
+		configComposite.setLayoutData(configData);
+		configComposite.setBackground(composite.getBackground());
 
-		GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
-		form.setLayoutData(data);
-		form.getBody().setLayout(new GridLayout());
+		createConfigs(configComposite);
 
-		filterAreas = generator.createFilterConfigurationFields();
+		createConfigDesc(configComposite);
 
-		createFieldArea(toolkit, form, scopeArea, true);
-		Iterator areas = filterAreas.iterator();
+		createMarkerLimits(composite);
 
-		while (areas.hasNext()) {
-			createFieldArea(toolkit, form, (FilterConfigurationArea) areas
-					.next(), true);
+		Label separator = new Label(parent, SWT.HORIZONTAL | SWT.SEPARATOR);
+		separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+		applyDialogFont(container);
+
+		initUI();
+
+		return container;
+	}
+
+	private void initUI() {
+
+		configsTable.setInput(filterGroups);
+		IStructuredSelection selection = getInitialSelection();
+		configsTable.setSelection(selection);
+		if (selection.isEmpty()) {
+			setFieldsEnabled(false);
 		}
 
-		if (filterGroups.isEmpty())
-			setFieldsEnabled(false);
-		else
-			loadDialogSettings();
+		Iterator iterator = filterGroups.iterator();
+		while (iterator.hasNext()) {
+			MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) iterator
+					.next();
+			boolean enabled = group.isEnabled();
+			configsTable.setChecked(group, enabled);
+		}
 
-		applyDialogFont(top);
-		return top;
+		andButton.setSelection(andFilters);
+		orButton.setSelection(!andFilters);
+		updateRadioButtonsFromTable();
+		int limits = generator.getMarkerLimits();
+		boolean limitsEnabled = generator.isMarkerLimitsEnabled();
+		limitButton.setSelection(limitsEnabled);
+		limitsLabel.setEnabled(limitsEnabled);
+		limitText.setEnabled(limitsEnabled);
+		limitText.setText(Integer.toString(limits));
+		configsTable.getTable().setFocus();
+
+	}
+
+	private void updateRadioButtonsFromTable() {
+
+		boolean showAll = isShowAll();
+		allButton.setSelection(showAll);
+		andButton.setEnabled(!showAll);
+		orButton.setEnabled(!showAll);
+	}
+
+	private void updateShowAll(boolean showAll) {
+
+		allButton.setSelection(showAll);
+		andButton.setEnabled(!showAll);
+		orButton.setEnabled(!showAll);
+		if (showAll) {
+			previouslyChecked = configsTable.getCheckedElements();
+			configsTable.setAllChecked(false);
+		} else {
+			if (previouslyChecked != null && previouslyChecked.length > 0) {
+				configsTable.setCheckedElements(previouslyChecked);
+			} else {
+				// make the first entry checked
+				if (filterGroups.size() > 0) {
+					Object group = filterGroups.iterator().next();
+					configsTable.setChecked(group, true);
+				}
+			}
+		}
+	}
+
+	private boolean isShowAll() {
+		return configsTable.getCheckedElements().length == 0;
+	}
+
+	/**
+	 * @param parent
+	 */
+	private void createMarkerLimits(Composite parent) {
+
+		limitButton = new Button(parent, SWT.CHECK);
+		limitButton.setText(MarkerMessages.MarkerPreferences_MarkerLimits);
+		limitButton.addSelectionListener(new SelectionAdapter() {
+
+			public void widgetSelected(SelectionEvent e) {
+				limitsLabel.setEnabled(limitButton.getSelection());
+				limitText.setEnabled(limitButton.getSelection());
+			}
+		});
+		
+		GridData limitData = new GridData();
+		limitData.verticalIndent = 5;
+		limitButton.setLayoutData(limitData);
+
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout(2, false);
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		composite.setLayout(layout);
+		GridData compositeData = new GridData(GridData.FILL_HORIZONTAL);
+		compositeData.horizontalIndent = 20;
+		composite.setLayoutData(compositeData);
+
+		limitsLabel = new Label(composite, SWT.NONE);
+		limitsLabel.setText(MarkerMessages.MarkerPreferences_VisibleItems);
+
+		limitText = new Text(composite, SWT.BORDER);
+		GridData textData = new GridData();
+		textData.widthHint = convertWidthInCharsToPixels(10);
+		limitText.setLayoutData(textData);
+		limitText.addVerifyListener(new VerifyListener() {
+
+			public void verifyText(VerifyEvent e) {
+				if (e.character != 0 && e.keyCode != SWT.BS
+						&& e.keyCode != SWT.DEL
+						&& !Character.isDigit(e.character)) {
+					e.doit = false;
+				}
+			}
+		});
+
+		limitText.addModifyListener(new ModifyListener() {
+
+			public void modifyText(ModifyEvent e) {
+				try {
+					Integer.parseInt(limitText.getText());
+				} catch (NumberFormatException ex) {
+					limitText.setText(Integer.toString(generator.getMarkerLimits()));
+				}
+			}
+		});
+
+	}
+
+	/**
+	 * @param parent
+	 */
+	private void createConfigs(Composite parent) {
+
+		Composite composite = new Composite(parent, SWT.NONE);
+		composite.setLayout(new GridLayout(2, false));
+		composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+		composite.setBackground(parent.getBackground());
+
+		configsTable = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
+		GridData tableData = new GridData(SWT.FILL, SWT.FILL, true, true);
+		tableData.widthHint = convertHorizontalDLUsToPixels(120);
+		configsTable.getControl().setLayoutData(tableData);
+
+		configsTable.setContentProvider(ArrayContentProvider.getInstance());
+		configsTable.setLabelProvider(new LabelProvider() {
+			public String getText(Object element) {
+				return ((MarkerFieldFilterGroup) element).getName();
+			}
+		});
+
+		configsTable.addCheckStateListener(new ICheckStateListener() {
+			public void checkStateChanged(CheckStateChangedEvent event) {
+				configsTable.setSelection(new StructuredSelection(event
+						.getElement()));
+				updateRadioButtonsFromTable();
+			}
+		});
+
+		configsTable
+				.addSelectionChangedListener(new ISelectionChangedListener() {
+					public void selectionChanged(SelectionChangedEvent event) {
+						storeConfiguration();
+						MarkerFieldFilterGroup group = getSelectionFromTable();
+						if (group == null) {
+							setFieldsEnabled(false);
+						} else
+							setFieldsEnabled(true);
+						updateButtonEnablement(group);
+						updateConfigDesc(group);
+						selectedFilterGroup = group;
+					}
+				});
+
+		createButtons(composite);
+
+	}
+
+	private void storeConfiguration() {
+
+		if (selectedFilterGroup == null)
+			return;
+
+		scopeArea.applyToGroup(selectedFilterGroup);
+		Iterator areas = configAreas.iterator();
+		while (areas.hasNext()) {
+			FilterConfigurationArea area = (FilterConfigurationArea) areas
+					.next();
+
+			// Handle the internal special cases
+			if (area instanceof GroupFilterConfigurationArea)
+				((GroupFilterConfigurationArea) area)
+						.applyToGroup(selectedFilterGroup);
+			area.apply(selectedFilterGroup.getFilter(area.getField()));
+		}
+		configsTable.refresh(selectedFilterGroup);
+	}
+
+	private void updateConfigDesc(MarkerFieldFilterGroup configuration) {
+
+		if (configuration == null) {
+			return;
+		}
+
+		scopeArea.initializeFromGroup(configuration);
+		Iterator areas = configAreas.iterator();
+		while (areas.hasNext()) {
+			FilterConfigurationArea area = (FilterConfigurationArea) areas
+					.next();
+			if (area instanceof GroupFilterConfigurationArea)
+				((GroupFilterConfigurationArea) area)
+						.initializeFromGroup(configuration);
+			area.initialize(configuration.getFilter(area.getField()));
+		}
+
+	}
+
+	private void createConfigDesc(Composite parent) {
+
+		Label separator = new Label(parent, SWT.SEPARATOR | SWT.VERTICAL);
+		separator.setLayoutData(new GridData(GridData.FILL_VERTICAL));
+
+		Composite descComposite = new Composite(parent, SWT.NONE);
+		descComposite.setLayout(new FillLayout());
+		descComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+		descComposite.setBackground(parent.getBackground());
+
+		final FormToolkit toolkit = new FormToolkit(parent.getDisplay());
+		parent.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				toolkit.dispose();
+			}
+		});
+
+		form = toolkit.createScrolledForm(descComposite);
+		form.setBackground(parent.getBackground());
+
+		form.getBody().setLayout(new GridLayout());
+
+		configAreas = generator.createFilterConfigurationFields();
+
+		createFieldArea(toolkit, form, scopeArea, true);
+		Iterator areas = configAreas.iterator();
+		while (areas.hasNext()) {
+			createFieldArea(toolkit, form,
+					(FilterConfigurationArea) areas.next(), true);
+		}
+
 	}
 
 	/**
@@ -203,133 +455,33 @@
 		expandable.setText(area.getTitle());
 		expandable.setBackground(form.getBackground());
 		expandable.setLayout(new GridLayout());
-		expandable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, area.grabExcessVerticalSpace()));
-		expandable.addExpansionListener(new IExpansionListener() {
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.ui.forms.events.IExpansionListener#expansionStateChanged(org.eclipse.ui.forms.events.ExpansionEvent)
-			 */
+		expandable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, area
+				.grabExcessVerticalSpace()));
+		expandable.addExpansionListener(new ExpansionAdapter() {
 			public void expansionStateChanged(ExpansionEvent e) {
-				expandable.getParent().layout(true);
-
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.ui.forms.events.IExpansionListener#expansionStateChanging(org.eclipse.ui.forms.events.ExpansionEvent)
-			 */
-			public void expansionStateChanging(ExpansionEvent e) {
-
+				form.reflow(true);
 			}
 		});
 
 		Composite sectionClient = toolkit.createComposite(expandable);
-		sectionClient.setLayout(new GridLayout());
+		GridLayout gridLayout = new GridLayout();
+		gridLayout.verticalSpacing = 3;
+		sectionClient.setLayout(gridLayout);
 		sectionClient.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true,
 				false));
 		sectionClient.setBackground(form.getBackground());
+
 		area.createContents(sectionClient);
 		expandable.setClient(sectionClient);
 		expandable.setExpanded(expand);
+
 	}
 
 	/**
-	 * Create the area for selecting the filters and enabling/disabling them.
-	 * 
-	 * @param top
+	 * @param composite
 	 */
-	private void createFilterSelectionArea(Composite top) {
-
-		Composite filtersComposite = new Composite(top, SWT.NONE);
-		filtersComposite.setLayout(new GridLayout(2, false));
-		filtersComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
-				true));
-
-		Label title = new Label(filtersComposite, SWT.NONE);
-		title.setText(MarkerMessages.filtersDialog_entriesTitle);
-		GridData titleData = new GridData();
-		titleData.horizontalSpan = 2;
-		title.setLayoutData(titleData);
-
-		filtersList = CheckboxTableViewer.newCheckList(filtersComposite,
-				SWT.BORDER);
-		
-		filtersList.setContentProvider(new IStructuredContentProvider() {
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
-			 */
-			public void dispose() {
-				// Do nothing
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
-			 */
-			public Object[] getElements(Object inputElement) {
-				return filterGroups.toArray();
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
-			 *      java.lang.Object, java.lang.Object)
-			 */
-			public void inputChanged(Viewer viewer, Object oldInput,
-					Object newInput) {
-				// Do nothing
-			}
-		});
-
-		filtersList.setLabelProvider(new LabelProvider() {
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
-			 */
-			public String getText(Object element) {
-				return ((MarkerFieldFilterGroup) element).getName();
-			}
-		});
-
-		if (selectedFilterGroup != null)
-			filtersList.setSelection(new StructuredSelection(
-					selectedFilterGroup));
-
-		filtersList
-				.addSelectionChangedListener(new ISelectionChangedListener() {
-
-					/*
-					 * (non-Javadoc)
-					 * 
-					 * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
-					 */
-					public void selectionChanged(SelectionChangedEvent event) {
-						setSelectedFilter((MarkerFieldFilterGroup) ((IStructuredSelection) event
-								.getSelection()).getFirstElement());
-					}
-				});
-
-		filtersList.setInput(this);
-
-		Iterator filterIterator = filterGroups.iterator();
-		while (filterIterator.hasNext()) {
-			MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) filterIterator
-					.next();
-			filtersList.setChecked(group, group.isEnabled());
-		}
-
-		GridData listData = new GridData(SWT.FILL, SWT.FILL, true, true);
-		listData.widthHint = convertHorizontalDLUsToPixels(100);
-		filtersList.getControl().setLayoutData(listData);
-
-		Composite buttons = new Composite(filtersComposite, SWT.NONE);
+	private void createButtons(Composite composite) {
+		Composite buttons = new Composite(composite, SWT.NONE);
 		GridLayout buttonLayout = new GridLayout();
 		buttonLayout.marginWidth = 0;
 		buttons.setLayout(buttonLayout);
@@ -341,204 +493,145 @@
 		addNew.setText(MarkerMessages.MarkerFilter_addFilterName);
 		addNew.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				addNewFilter(false);
-			}			
-		});
-		setButtonLayoutData(addNew);
-		
-		cloneButton= new Button(buttons, SWT.PUSH);
-		cloneButton.setText(MarkerMessages.MarkerFilter_cloneFilterName);
-		cloneButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				addNewFilter(true);
+				addConfiguration();
 			}
 		});
-		setButtonLayoutData(cloneButton);
+		setButtonLayoutData(addNew);
 
 		removeButton = new Button(buttons, SWT.PUSH);
 		removeButton.setText(MarkerMessages.MarkerFilter_deleteSelectedName);
 		removeButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				removeFilters(filtersList.getSelection());
+				removeFilters(configsTable.getSelection());
 			}
 		});
+		removeButton.setEnabled(false);
 		setButtonLayoutData(removeButton);
 		
 		renameButton = new Button(buttons, SWT.PUSH);
 		renameButton.setText(MarkerMessages.MarkerFilter_renameName);
 		renameButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				MarkerFieldFilterGroup filterGroup = (MarkerFieldFilterGroup) ((IStructuredSelection) filtersList
-						.getSelection()).getFirstElement();
-				renameFilter(filterGroup);
+				renameFilter();
 			}
 		});
+		renameButton.setEnabled(false);
 		setButtonLayoutData(renameButton);
-		
-		andOrLabel = new Label(filtersComposite, SWT.NONE);
-		GridData labelData = new GridData();
-		labelData.horizontalSpan = 2;
-		andOrLabel.setLayoutData(labelData);
-		andOrLabel.setText(MarkerMessages.AND_OR_Label);
-		
-		andButton = new Button(filtersComposite, SWT.RADIO);
-		GridData data = new GridData(GridData.FILL_HORIZONTAL, SWT.NONE, true,
-				false);
-		data.horizontalSpan = 2;
-		data.horizontalIndent = IDialogConstants.INDENT;
-		andButton.setLayoutData(data);
-		andButton.setText(MarkerMessages.AND_Title);
-		andButton.setSelection(andFilters);
-		andButton.addSelectionListener(new SelectionAdapter() {
 
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-			 */
-			public void widgetSelected(SelectionEvent e) {
-				andFilters = true;
-			}
-		});
-
-		orButton = new Button(filtersComposite, SWT.RADIO);
-		data = new GridData(GridData.FILL_HORIZONTAL, SWT.NONE, true, false);
-		data.horizontalSpan = 2;
-		data.horizontalIndent = IDialogConstants.INDENT;
-		orButton.setLayoutData(data);
-		orButton.setText(MarkerMessages.OR_Title);
-		orButton.setSelection(!andFilters);
-		orButton.addSelectionListener(new SelectionAdapter() {
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-			 */
-			public void widgetSelected(SelectionEvent e) {
-				andFilters = false;
-			}
-		});
-		filtersList.addCheckStateListener(new ICheckStateListener() {
-			public void checkStateChanged(CheckStateChangedEvent event) {
-				updateAndOrEnblement();				
-			}
-		});
 	}
 
-	/**
-	 * Opens Input Dialog for name,creates a 
-	 * new filterGroup, and adds it to the filterGroups 
-	 * @param cloneSelected true clones the selected filterGroup
-	 * 				
-	 */
-	private void addNewFilter(boolean cloneSelected) {
-		String newName =getNewFilterName(getCurrentFilterNames(),null);
-		if (newName != null) {
-			createNewFilter(newName,cloneSelected);
-		}
-	}
-	/**
-	 * Opens Input Dialog for a new filter name
-	 * @param avoidNames filter names to avoid
-	 * @param initialName initial name of the filter
-	 * @return new filter name or null if canceled
-	 * 				
-	 */
-	private String getNewFilterName(final Collection avoidNames,String initialName){
-		InputDialog newDialog = new InputDialog(getShell(),
+	private void renameFilter() {
+		
+		MarkerFieldFilterGroup filterGroup = getSelectionFromTable();
+
+		IInputValidator nameValidator = getNameValidator(filterGroup.getName(), getCurrentConfigurationNames());
+		
+		InputDialog inputDialog = new InputDialog(getShell(),
 				MarkerMessages.MarkerFilterDialog_title,
 				MarkerMessages.MarkerFilterDialog_message,
-				initialName != null ? initialName
-						: MarkerMessages.MarkerFilter_newFilterName,
-				getNameValidator(avoidNames));
-		if (Window.OK == newDialog.open()) {
-			return newDialog.getValue();
+				filterGroup.getName(), nameValidator);
+		
+		if(inputDialog.open() == Window.OK) {
+			filterGroup.setName(inputDialog.getValue());
+			configsTable.refresh(filterGroup);
 		}
-		return null;
+				
 	}
 
-	/**
-	 * Get IInputValidator for checking if the new name is valid
-	 * @param avoidNames
-	 * @return IInputValidator
-	 */
-	private IInputValidator getNameValidator(final Collection avoidNames) {
+	private IInputValidator getNameValidator(final String currentName, final Collection existingNames) {
 		return new IInputValidator() {
-			public String isValid(String value) {
-				String newText=value.trim();
+			
+			public String isValid(String newText) {
+				newText = newText.trim();
 				if (newText.length() == 0)
 					return MarkerMessages.MarkerFilterDialog_emptyMessage;
-				if (avoidNames.contains(newText))
-					return NLS.bind(
-							MarkerMessages.filtersDialog_conflictingName,
-							newText);
+				if(existingNames.contains(newText) && !currentName.equals(newText)) {
+					return NLS.bind(MarkerMessages.filtersDialog_conflictingName, newText);
+				}
 				return null;
 			}
 		};
 	}
-	
-	/**
-	 * Get a collection of names of the filters currently in the list
-	 * @return Collection
-	 */
-	private Collection getCurrentFilterNames() {
-		Collection names = new ArrayList();
-		Iterator filterIterator = filterGroups.iterator();
-		while (filterIterator.hasNext()) {
-			names.add(((MarkerFieldFilterGroup) filterIterator.next()).getName());
-		}
-		return names;
-	}
-	/**
-	 * Create a new filterGroup, and adds it to the filterGroups 
-	 * @param cloneSelected true clones the selected filterGroup
-	 * @param newName name of new filterGroup
-	 */
-	private void createNewFilter(String newName,boolean cloneSelected) {
-		MarkerFieldFilterGroup group = new MarkerFieldFilterGroup(null, generator);
-		if(cloneSelected&&selectedFilterGroup!=null){
-			captureStateInto(group); //copy current values from UI
-		}
-		group.setName(newName);
-		filterGroups.add(group);
-		filtersList.refresh();
-		filtersList.setSelection(new StructuredSelection(group));
-		filtersList.setChecked(group, true);
-		updateAndOrEnblement();
+
+	private void createAndOrButtons(Composite parent) {
+
+		allButton = new Button(parent, SWT.CHECK);
+		allButton.setText(MarkerMessages.ALL_Title);
+		allButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				updateShowAll(allButton.getSelection());
+			}
+		});
+
+		andButton = new Button(parent, SWT.RADIO);
+		andButton.setText(MarkerMessages.AND_Title);
+		andButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				andFilters = true;
+			}
+		});
+		GridData andData = new GridData();
+		andData.horizontalIndent = 20;
+		andButton.setLayoutData(andData);
+
+		orButton = new Button(parent, SWT.RADIO);
+		orButton.setText(MarkerMessages.OR_Title);
+		orButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				andFilters = false;
+			}
+		});
+		GridData orData = new GridData();
+		orData.horizontalIndent = 20;
+		orButton.setLayoutData(orData);
+
 	}
 
 	/**
-	 * Renames the supplied MarkerFieldFilterGroup
-	 * @param filterGroup
+	 * Get a collection of names of the filters currently in the list
+	 * 
+	 * @return Collection
 	 */
-	private void renameFilter(MarkerFieldFilterGroup filterGroup) {
-		if (filterGroup != null) {
-			Collection names = getCurrentFilterNames();
-			String initial = null;
-			initial = filterGroup.getName();
-			names.remove(initial);
-			String newName=getNewFilterName(names, initial);
-			if(newName!=null){
-				filterGroup.setName(newName);
-				filtersList.update(filterGroup, null);
-			}
+	private Collection getCurrentConfigurationNames() {
+		Collection names = new ArrayList();
+		Iterator filterIterator = filterGroups.iterator();
+		while (filterIterator.hasNext()) {
+			names.add(((MarkerFieldFilterGroup) filterIterator.next())
+					.getName());
 		}
+		return names;
 	}
-	/**
-	 * Enable/disable 'and', 'or' buttons
-	 */
-	private void updateAndOrEnblement() {
-		if(filtersList.getCheckedElements().length==0){
-			andOrLabel.setEnabled(false);
-			andButton.setEnabled(false);
-			orButton.setEnabled(false);
-		}else{
-			andOrLabel.setEnabled(true);
-			andButton.setEnabled(true);
-			orButton.setEnabled(true);
+
+	private void addConfiguration() {
+		String newName = getNewConfigurationName(
+				getCurrentConfigurationNames(),
+				MarkerMessages.MarkerFilter_newFilterName);
+		MarkerFieldFilterGroup configuration = createConfiguration(newName);
+		filterGroups.add(configuration);
+		configsTable.refresh();
+		configsTable.setSelection(new StructuredSelection(configuration));
+		configsTable.setChecked(configuration, true);
+		updateRadioButtonsFromTable();
+	}
+
+	private String getNewConfigurationName(final Collection avoidNames,
+			String initialName) {
+
+		String configName = initialName;
+		for (int i = 1; avoidNames.contains(configName); i++) {
+			configName = initialName + ' ' + i;
 		}
+		return configName;
 	}
+
+	private MarkerFieldFilterGroup createConfiguration(String newName) {
+
+		MarkerFieldFilterGroup config = new MarkerFieldFilterGroup(null,
+				generator);
+		config.setName(newName);
+		return config;
+	}
+
 	/**
 	 * Return the dialog settings for the receiver.
 	 * 
@@ -565,38 +658,51 @@
 		return filterGroups;
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.dialogs.Dialog#isResizable()
-	 */
-	protected boolean isResizable() {
-		return true;
-	}
-
-	/**
-	 * Load the dialog settings.
-	 */
-	private void loadDialogSettings() {
+	private IStructuredSelection getInitialSelection() {
 		IDialogSettings settings = getDialogSettings();
 
-		String selection = settings.get(SELECTED_FILTER_GROUP);
+		String selectedGroupName = settings.get(SELECTED_FILTER_GROUP);
 
-		if (selection != null) {
+		MarkerFieldFilterGroup selectedGroup = null;
+		if (selectedGroupName == null && filterGroups.size() > 0) {
+			selectedGroup = (MarkerFieldFilterGroup) filterGroups.iterator()
+					.next();
+		} else {
+
 			Iterator groups = filterGroups.iterator();
 			while (groups.hasNext()) {
 				MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) groups
 						.next();
-				if (group.getName().equals(selection)) {
-					filtersList.setSelection(new StructuredSelection(group));
-					return;
+				if (group.getName().equals(selectedGroupName)) {
+					selectedGroup = group;
+					break;
 				}
 			}
 		}
 
-		// If there is no initial selection make one
-		filtersList.setSelection(new StructuredSelection(filterGroups
-				.iterator().next()));
+		String[] selectedElementNames = settings
+				.getArray(PREV_SELECTED_ELEMENTS);
+		List selectedElements = new ArrayList();
+
+		if (selectedElementNames != null) {
+			for (int i = 0; i < selectedElementNames.length; i++) {
+				Iterator filterGroupIterator = filterGroups.iterator();
+				while (filterGroupIterator.hasNext()) {
+					MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) filterGroupIterator
+							.next();
+					if (Util.equals(group.getName(), selectedElementNames[i])) {
+						selectedElements.add(group);
+						break;
+					}
+				}
+			}
+			previouslyChecked = selectedElements.toArray();
+		}
+
+		if (selectedGroup != null) {
+			return new StructuredSelection(selectedGroup);
+		}
+		return StructuredSelection.EMPTY;
 	}
 
 	/**
@@ -625,74 +731,49 @@
 	 */
 	protected void okPressed() {
 
-		if (!shouldContinue())
-			return;
+		generator.setMarkerLimitsEnabled(limitButton.getSelection());
+		generator.setMarkerLimits(Integer.parseInt(limitText.getText().trim()));
 
 		Iterator filterGroupIterator = filterGroups.iterator();
 		while (filterGroupIterator.hasNext()) {
 			MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) filterGroupIterator
 					.next();
-			group.setEnabled(filtersList.getChecked(group));
+			group.setEnabled(configsTable.getChecked(group));
 		}
-		captureStateInto(selectedFilterGroup);
+
+		storeConfiguration();
+		saveDialogSettings();
 
 		super.okPressed();
 
 	}
 
-	/**
-	 * 
-	 * Updates the filterGroup with the values showing in the dialog's GUI.
-	 * @param filterGroup 
-	 * 
-	 */
-	private void captureStateInto(MarkerFieldFilterGroup filterGroup) {
-		if (filterGroup != null) {
-
-			scopeArea.applyToGroup(filterGroup);
-			Iterator areas = filterAreas.iterator();
-			while (areas.hasNext()) {
-				FilterConfigurationArea area = (FilterConfigurationArea) areas
-						.next();
-
-				// Handle the internal special cases
-				if (area instanceof GroupFilterConfigurationArea)
-					((GroupFilterConfigurationArea) area)
-							.applyToGroup(filterGroup);
-				area.apply(filterGroup.getFilter(area.getField()));
-			}
-		}
-	}
-	
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.preferences.ViewSettingsDialog#performDefaults()
-	 */
 	protected void performDefaults() {
-		filterGroups.clear();
-		filterGroups.addAll(generator.getDeclaredFilters());
-		filtersList.refresh();
-		filtersList.setSelection(new StructuredSelection(
-				filterGroups.size() > 1 ? filterGroups.iterator().next()
-						: new Object[0]));
-		andFilters=false;
+
+		andFilters = false;
 		andButton.setSelection(andFilters);
 		orButton.setSelection(!andFilters);
-	}
 
-	/**
-	 * Return whether or not deselected elements should have been selected.
-	 * 
-	 * @return boolean
-	 */
-	private boolean shouldContinue() {
-		if (filtersList.getCheckedElements().length == 0) {
-			return MessageDialog.openQuestion(getShell(),
-					MarkerMessages.filtersDialogDeselectedFiltersTitle,
-					MarkerMessages.filtersDialogDeselectedFiltersMessage);
-		}
+		filterGroups.clear();
+		filterGroups.addAll(generator.getDeclaredFilters());
+		configsTable.refresh();
+		configsTable.setSelection(new StructuredSelection(
+				filterGroups.size() > 1 ? filterGroups.iterator().next()
+						: new Object[0]));
 
-		return true;
+		IPreferenceStore preferenceStore = IDEWorkbenchPlugin.getDefault()
+				.getPreferenceStore();
+		boolean useMarkerLimits = preferenceStore
+				.getBoolean(IDEInternalPreferences.USE_MARKER_LIMITS);
+		int markerLimits = useMarkerLimits ? preferenceStore
+				.getInt(IDEInternalPreferences.MARKER_LIMITS_VALUE) : 100;
+
+		limitButton.setSelection(useMarkerLimits);
+		limitsLabel.setEnabled(useMarkerLimits);
+		limitText.setEnabled(useMarkerLimits);
+		limitText.setText(Integer.toString(markerLimits));
+
+		updateRadioButtonsFromTable();
 	}
 
 	/**
@@ -703,33 +784,52 @@
 	private void removeFilters(ISelection selection) {
 		filterGroups.remove(((IStructuredSelection) selection)
 				.getFirstElement());
-		filtersList.refresh();
-		updateAndOrEnblement();
+		configsTable.refresh();
+		updateRadioButtonsFromTable();
 	}
 
 	/**
 	 * Save the dialog settings for the receiver.
 	 */
 	private void saveDialogSettings() {
+		
 		IDialogSettings settings = getDialogSettings();
 
 		if (selectedFilterGroup != null)
 			settings.put(SELECTED_FILTER_GROUP, selectedFilterGroup.getName());
 
+		String[] selectedNames = new String[previouslyChecked.length];
+		for (int i = 0; i < selectedNames.length; i++) {
+			selectedNames[i] = ((MarkerFieldFilterGroup)previouslyChecked[i]).getName();
+		}
+		settings.put(PREV_SELECTED_ELEMENTS, selectedNames);
+		
+	}
+
+	private void updateButtonEnablement(MarkerFieldFilterGroup group) {
+		boolean enabled = group != null && !group.isSystem();
+		removeButton.setEnabled(enabled);
+		renameButton.setEnabled(enabled);
+	}
+
+	private MarkerFieldFilterGroup getSelectionFromTable() {
+		IStructuredSelection selection = (IStructuredSelection) configsTable
+				.getSelection();
+		return (MarkerFieldFilterGroup) selection.getFirstElement();
 	}
 
 	/**
 	 * Set the control and all of it's visibility state to visible.
 	 * 
-	 * @param visible
+	 * @param enabled
 	 * @param control
 	 */
-	private void setEnabled(boolean visible, Control control) {
-		control.setEnabled(visible);
+	private void setEnabled(boolean enabled, Control control) {
+		control.setEnabled(enabled);
 		if (control instanceof Composite) {
 			Control[] children = ((Composite) control).getChildren();
 			for (int i = 0; i < children.length; i++) {
-				setEnabled(visible, children[i]);
+				setEnabled(enabled, children[i]);
 			}
 		}
 	}
@@ -737,52 +837,8 @@
 	/**
 	 * Set the enablement state of the fields to enabled.
 	 */
-	private void setFieldsEnabled(boolean visible) {
-		setEnabled(visible, form);
+	private void setFieldsEnabled(boolean enabled) {
+		setEnabled(enabled, form);
 	}
 
-	/**
-	 * Set the filter that is being worked on.
-	 * 
-	 * @param markerFieldFilterGroup
-	 */
-	private void setSelectedFilter(MarkerFieldFilterGroup markerFieldFilterGroup) {
-		if(selectedFilterGroup==markerFieldFilterGroup){
-			return;
-		}
-		removeButton
-				.setEnabled(!(markerFieldFilterGroup == null || markerFieldFilterGroup
-						.isSystem()));
-		renameButton
-				.setEnabled(!(markerFieldFilterGroup == null || markerFieldFilterGroup
-						.isSystem()));
-		cloneButton.setEnabled(markerFieldFilterGroup != null);
-		
-		MarkerFieldFilterGroup old = selectedFilterGroup;
-		selectedFilterGroup = markerFieldFilterGroup;
-		if (old != null)
-			scopeArea.applyToGroup(old);
-
-		if (selectedFilterGroup == null) {
-			setFieldsEnabled(false);
-			return;
-		}
-
-		setFieldsEnabled(true);
-		scopeArea.initializeFromGroup(selectedFilterGroup);
-		Iterator areas = filterAreas.iterator();
-		while (areas.hasNext()) {
-			FilterConfigurationArea area = (FilterConfigurationArea) areas
-					.next();
-			if (old != null) {
-				if (area instanceof GroupFilterConfigurationArea)
-					((GroupFilterConfigurationArea) area).applyToGroup(old);
-				area.apply(old.getFilter(area.getField()));
-			}
-			if (area instanceof GroupFilterConfigurationArea)
-				((GroupFilterConfigurationArea) area)
-						.initializeFromGroup(selectedFilterGroup);
-			area.initialize(selectedFilterGroup.getFilter(area.getField()));
-		}
-	}
 }
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/FiltersContribution.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/FiltersContribution.java
index 1a8a44c..7787272 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/FiltersContribution.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/FiltersContribution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,8 +38,11 @@
 	 * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
 	 */
 	protected IContributionItem[] getContributionItems() {
+		final ExtendedMarkersView view = getView();
+		if (view == null)
+			return new IContributionItem[0];
 
-		Collection groups = getView().getAllFilters();
+		Collection groups = view.getAllFilters();
 
 		if (groups.size() == 0)
 			return new IContributionItem[0];
@@ -60,7 +63,6 @@
 				public void fill(Menu menu, int index) {
 					MenuItem item = new MenuItem(menu, SWT.CHECK);
 					item.setText(group.getName());
-					ExtendedMarkersView view = getView();
 					item.addListener(SWT.Selection, getMenuItemListener(group,
 							view));
 
@@ -126,7 +128,9 @@
 					 * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
 					 */
 					public void handleEvent(Event event) {
-						getView().disableAllFilters();
+						ExtendedMarkersView view = getView();
+						if (view != null)
+							view.disableAllFilters();
 					}
 				});
 			}
@@ -138,7 +142,11 @@
 			 *         filters are selected.
 			 */
 			private boolean noFiltersSelected() {
-				Iterator groupsIterator = getView().getAllFilters().iterator();
+				ExtendedMarkersView view = getView();
+				if (view == null)
+					return true;
+
+				Iterator groupsIterator= view.getAllFilters().iterator();
 				while (groupsIterator.hasNext()) {
 					MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) groupsIterator
 							.next();
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/GroupsContribution.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/GroupsContribution.java
index 93d23dd..1001840 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/GroupsContribution.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/GroupsContribution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,8 +44,11 @@
 	 * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
 	 */
 	protected IContributionItem[] getContributionItems() {
+		ExtendedMarkersView view = getView();
+		if (view == null)
+			return new IContributionItem[0];
 
-		Collection groups = getView().getBuilder().getGenerator().getMarkerGroups();
+		Collection groups = view.getBuilder().getGenerator().getMarkerGroups();
 
 		if (groups.isEmpty())
 			return new IContributionItem[0];
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerCategory.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerCategory.java
index d63005c..baa339b 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerCategory.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerCategory.java
@@ -94,13 +94,14 @@
 		//			new Object[] { getName() });
 		//}
 		int size = getChildrenCount();
-		int limit = MarkerSupportInternalUtilities.getMarkerLimit();
+		MarkerContentGenerator generator = markers.getBuilder().getGenerator();
+		boolean limitsEnabled = generator.isMarkerLimitsEnabled();
+		int limit = generator.getMarkerLimits();
 
-		if (limit > 0 && size > limit) {
+		if (limitsEnabled && size > limit) {
 			return NLS.bind(MarkerMessages.Category_Limit_Label, new Object[] {
 					name,
-					String.valueOf(MarkerSupportInternalUtilities
-							.getMarkerLimit()),
+					String.valueOf(limit),
 					String.valueOf(getChildrenCount()) });
 		}
 		if (size == 1)
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerContentGenerator.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerContentGenerator.java
index 5fb26702..bb99427 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerContentGenerator.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerContentGenerator.java
@@ -67,11 +67,13 @@
 	private static final String TAG_GROUP_ENTRY = "filterGroup"; //$NON-NLS-1$
 	private static final String TAG_AND = "andFilters"; //$NON-NLS-1$
 	private static final String TAG_LEGACY_FILTER_ENTRY = "filter"; //$NON-NLS-1$
+	private static final String TAG_MARKER_LIMIT = "markerLimit"; //$NON-NLS-1$
+	private static final String TAG_MARKER_LIMIT_ENABLED = "markerLimitEnabled"; //$NON-NLS-1$
 	
 	/*Use this to indicate filter change rather than a null*/
 	private final Collection FILTERS_CHANGED = Collections.EMPTY_SET;
 
-	//Carries the description for the generator, as coded in the given extension point 
+	//Carries the description for the generator, as coded in the given extension point
 	private ContentGeneratorDescriptor generatorDescriptor;
 
 	// fields
@@ -81,6 +83,8 @@
 	private Collection enabledFilters;
 	private Collection filters;
 	private boolean andFilters = false;
+	private int markerLimits = 100;
+	private boolean markerLimitsEnabled = true;
 
 	/**
 	 * focusResources
@@ -99,8 +103,8 @@
 	 * Create a new MarkerContentGenerator
 	 * 
 	 * @param generatorDescriptor
-	 * @param builder 
-	 * @param viewId 
+	 * @param builder
+	 * @param viewId
 	 * 				needed for backward compatibility
 	 */
 	public MarkerContentGenerator(
@@ -199,11 +203,8 @@
 		return hidden.toArray();
 	}
 
-	void initialise(IMemento memento) {
-		initialiseVisibleFields(memento);
-	}
+	void saveState(IMemento memento, MarkerField[] displayedFields) {
 
-	void saveSate(IMemento memento, MarkerField[] displayedFields) {
 		for (int i = 0; i < displayedFields.length; i++) {
 			memento.createChild(TAG_COLUMN_VISIBILITY, displayedFields[i]
 					.getConfigurationElement().getAttribute(
@@ -212,48 +213,62 @@
 	}
 
 	void restoreState(IMemento memento) {
-		initialiseVisibleFields(memento);
-	}
 
-	/**
-	 * Initialize the visible fields based on the initial settings or the
-	 * contents of the {@link IMemento}
-	 * 
-	 * @param memento
-	 *            IMemento
-	 */
-	private void initialiseVisibleFields(IMemento memento) {
+		initDefaults();
 
-		if (memento == null
-				|| memento.getChildren(TAG_COLUMN_VISIBILITY).length == 0) {
-			MarkerField[] initialFields = getInitialVisible();
-
-			visibleFields = new MarkerField[initialFields.length];
-			System.arraycopy(initialFields, 0, visibleFields, 0,
-					initialFields.length);
+		if (memento == null) {
 			return;
 		}
-
-		IMemento[] visible = memento.getChildren(TAG_COLUMN_VISIBILITY);
-		Collection newVisible = new ArrayList();
-
-		MarkerField[] all = getAllFields();
-		Hashtable allTable = new Hashtable();
-
-		for (int i = 0; i < all.length; i++) {
-			allTable.put(all[i].getConfigurationElement().getAttribute(
-					MarkerSupportInternalUtilities.ATTRIBUTE_ID), all[i]);
+		
+		Integer limits = memento.getInteger(TAG_MARKER_LIMIT);
+		if (limits != null) {
+			markerLimits = limits.intValue();
 		}
 
-		for (int i = 0; i < visible.length; i++) {
-			String key = visible[i].getID();
-			if (allTable.containsKey(key)) {
-				newVisible.add(allTable.get(key));
+		Boolean limitsEnabled = memento.getBoolean(TAG_MARKER_LIMIT_ENABLED);
+		if (limitsEnabled != null) {
+			markerLimitsEnabled = limitsEnabled.booleanValue();
+		}
+		
+		if (memento.getChildren(TAG_COLUMN_VISIBILITY).length != 0) {
+
+			IMemento[] visible = memento.getChildren(TAG_COLUMN_VISIBILITY);
+			Collection newVisible = new ArrayList();
+	
+			MarkerField[] all = getAllFields();
+			Hashtable allTable = new Hashtable();
+	
+			for (int i = 0; i < all.length; i++) {
+				allTable.put(all[i].getConfigurationElement().getAttribute(
+						MarkerSupportInternalUtilities.ATTRIBUTE_ID), all[i]);
 			}
+	
+			for (int i = 0; i < visible.length; i++) {
+				String key = visible[i].getID();
+				if (allTable.containsKey(key)) {
+					newVisible.add(allTable.get(key));
+				}
+			}
+	
+			visibleFields = new MarkerField[newVisible.size()];
+			newVisible.toArray(visibleFields);
 		}
+	}
 
-		visibleFields = new MarkerField[newVisible.size()];
-		newVisible.toArray(visibleFields);
+	private void initDefaults() {
+		
+		IPreferenceStore store = IDEWorkbenchPlugin.getDefault()
+				.getPreferenceStore();
+		markerLimitsEnabled = store
+				.getBoolean(IDEInternalPreferences.USE_MARKER_LIMITS);
+		markerLimits = store.getInt(IDEInternalPreferences.MARKER_LIMITS_VALUE);
+
+		MarkerField[] initialFields = getInitialVisible();
+
+		visibleFields = new MarkerField[initialFields.length];
+		System.arraycopy(initialFields, 0, visibleFields, 0,
+				initialFields.length);
+
 	}
 
 	/**
@@ -390,6 +405,34 @@
 	boolean andFilters() {
 		return andFilters;
 	}
+	
+	/**
+	 * @return Returns the markerLimits.
+	 */
+	public int getMarkerLimits() {
+		return markerLimits;
+	}
+	
+	/**
+	 * @param markerLimits The markerLimits to set.
+	 */
+	public void setMarkerLimits(int markerLimits) {
+		this.markerLimits = markerLimits;
+	}
+	
+	/**
+	 * @return Returns the markerLimitsEnabled.
+	 */
+	public boolean isMarkerLimitsEnabled() {
+		return markerLimitsEnabled;
+	}
+	
+	/**
+	 * @param markerLimitsEnabled The markerLimitsEnabled to set.
+	 */
+	public void setMarkerLimitsEnabled(boolean markerLimitsEnabled) {
+		this.markerLimitsEnabled = markerLimitsEnabled;
+	}
 
 	/**
 	 * @return Collection of declared MarkerFieldFilterGroup(s)
@@ -426,6 +469,23 @@
 
 	}
 
+	private void loadLimitSettings(IMemento memento) {
+		
+		if (memento == null)
+			return;
+
+		Integer limits = memento.getInteger(TAG_MARKER_LIMIT);
+		if (limits != null) {
+			markerLimits = limits.intValue();
+		}
+
+		Boolean limitsEnabled = memento.getBoolean(TAG_MARKER_LIMIT_ENABLED);
+		if (limitsEnabled != null) {
+			markerLimitsEnabled = limitsEnabled.booleanValue();
+		}
+		
+	}
+	
 	/**
 	 * Load the settings from the memento.
 	 * 
@@ -464,8 +524,10 @@
 			return;
 
 		try {
-			loadFilterSettings(XMLMemento.createReadRoot(new StringReader(
-					mementoString)));
+			XMLMemento root = XMLMemento.createReadRoot(new StringReader(
+					mementoString));
+			loadLimitSettings(root);
+			loadFilterSettings(root);
 		} catch (WorkbenchException e) {
 			StatusManager.getManager().handle(e.getStatus());
 		}
@@ -596,6 +658,7 @@
 	private void writeFiltersPreference() {
 		XMLMemento memento = XMLMemento.createWriteRoot(TAG_FILTERS_SECTION);
 
+		writeLimitSettings(memento);
 		writeFiltersSettings(memento);
 
 		StringWriter writer = new StringWriter();
@@ -630,6 +693,13 @@
 		}
 	}
 
+	private void writeLimitSettings(XMLMemento memento) {
+		
+		memento.putInteger(TAG_MARKER_LIMIT, markerLimits);
+		memento.putBoolean(TAG_MARKER_LIMIT_ENABLED, markerLimitsEnabled);
+
+	}
+	
 	/**
 	 * Write the settings for the filters to the memento.
 	 * 
@@ -754,43 +824,45 @@
 
 	/**
 	 * Select the given MarkerEntry
-	 * 	@return <code>true</code> if it matches all enabled filters 
+	 * 	@return <code>true</code> if it matches all enabled filters
 	 */
 	boolean select(MarkerEntry entry) {
 		try {
-			Collection enabledFilters = getEnabledFilters();
-			IResource[] resources = getSelectedResources();
-			boolean andFilters = andFilters();
-			if (enabledFilters.size() > 0) {
-				Iterator filtersIterator = enabledFilters.iterator();
-				if (andFilters) {
-					while (filtersIterator.hasNext()) {
-						MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) filtersIterator
-								.next();
-						if (!group.selectByScope(entry, resources)
-								|| !group.selectByFilters(entry)) {
-							return false;
-						}
-					}
-					return true;
-				}
-
-				while (filtersIterator.hasNext()) {
-					MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) filtersIterator
-							.next();
-					if (group.selectByScope(entry, resources)
-							&& group.selectByFilters(entry)) {
-						return true;
-					}
-				}
-				return false;
-			}
-			return true;
+			return select(entry, getSelectedResources(), getEnabledFilters(), andFilters());
 		} finally {
 			entry.clearCache();
 		}
 	}
 
+	boolean select(MarkerEntry entry, IResource[] selResources,
+			Collection enabledFilters, boolean andFilters) {
+		if (enabledFilters.size() > 0) {
+			Iterator filtersIterator = enabledFilters.iterator();
+			if (andFilters) {
+				while (filtersIterator.hasNext()) {
+					MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) filtersIterator
+							.next();
+					if (!group.selectByScope(entry, selResources)
+							|| !group.selectByFilters(entry)) {
+						return false;
+					}
+				}
+				return true;
+			}
+
+			while (filtersIterator.hasNext()) {
+				MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) filtersIterator
+						.next();
+				if (group.selectByScope(entry, selResources)
+						&& group.selectByFilters(entry)) {
+					return true;
+				}
+			}
+			return false;
+		}
+		return true;
+	}
+
 	/**
 	 * Update the focus resources from list. If there is an update required
 	 * return <code>true</code>. This method assumes that there are filters on
@@ -911,7 +983,7 @@
 	 * would need a good amount of testing with various combination of filters
 	 * and scopes. The key here is to understand and getting it right how filter
 	 * scope and our trimmed, optimized resources and selected resource elements
-	 * interact. 
+	 * interact.
 	 * Another possible way to check if content has changed is by
 	 * comparing the markers gathered freshly with the previously gathered
 	 * markers(cache them when an update is not canceled), whether this up to a
@@ -928,8 +1000,8 @@
 //	 * manually is not required at all since nothing had changed.This is
 //	 * particularly useful when a filter is set to 'On Selected element scope'.A
 //	 * change in a filter is a combination of both its scope and other settings.
-//	 * 
-//	 * 
+//	 *
+//	 *
 //	 * @return true if the resource-content has changed due to change in filter
 //	 *         settings or selection. false if content has not change or an
 //	 *         update has cleared the changes.
@@ -1026,7 +1098,7 @@
 				}
 			}
 		} catch (Exception e) {
-			//do not propagate but do show the error 
+			//do not propagate but do show the error
 			MarkerSupportInternalUtilities.showViewError(e);
 			return false;
 		} finally {
@@ -1049,6 +1121,9 @@
 		if (monitor.isCanceled()) {
 			return false;
 		}
+		IResource[] selected = getSelectedResources();
+		Collection filters = getEnabledFilters();
+		boolean andFilters = andFilters();
 		Iterator iterator = resources.iterator();
 		while (iterator.hasNext()) {
 			IMarker[] markers = null;
@@ -1068,11 +1143,14 @@
 			if (monitor.isCanceled()) {
 				return false;
 			}
-			for (int i = 0; i < markers.length; i++) {
-				MarkerEntry entry = new MarkerEntry(markers[i]);
-				if (select(entry)) {
+			MarkerEntry entry = null;
+			int lenght =  markers.length;
+			for (int i = 0; i < lenght; i++) {
+				entry = new MarkerEntry(markers[i]);
+				if (select(entry, selected, filters, andFilters)) {
 					result.add(entry);
 				}
+				entry.clearCache();
 				if (i % 500 == 0) {
 					if (monitor.isCanceled()) {
 						return false;
@@ -1084,6 +1162,9 @@
 	}
 
 	void dispose() {
-
+		if (filterPreferenceListener != null) {
+			IDEWorkbenchPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(filterPreferenceListener);
+			filterPreferenceListener = null;
+		}
 	}
 }
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerFieldFilterGroup.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerFieldFilterGroup.java
index 89ce7da..034ca1d 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerFieldFilterGroup.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerFieldFilterGroup.java
@@ -95,6 +95,7 @@
 	private static final String TAG_SCOPE = "scope"; //$NON-NLS-1$
 	private static final String TAG_FIELD_FILTER_ENTRY = "fieldFilter"; //$NON-NLS-1$
 	private static final String TAG_WORKING_SET = "workingSet"; //$NON-NLS-1$
+	private static final String TAG_LIMIT = "filterLimit"; //$NON-NLS-1$
 	// The identifier for user filters
 	private static String USER = "USER"; //$NON-NLS-1$
 
@@ -106,6 +107,8 @@
 	private boolean enabled = true;
 	protected MarkerFieldFilter[] fieldFilters;
 	private int scope;
+	private int limit;
+	
 	private String name;
 	private String id;
 
@@ -131,11 +134,16 @@
 
 		if (configurationElement == null)
 			return;
-		String enablementString = configurationElement
+		String stringValue = configurationElement
 				.getAttribute(MarkerSupportRegistry.ENABLED);
-		if (MarkerSupportInternalUtilities.FALSE.equals(enablementString))
+		if (MarkerSupportInternalUtilities.FALSE.equals(stringValue)) {
 			enabled = false;
-
+		}
+		stringValue = configurationElement
+				.getAttribute(MarkerSupportRegistry.FILTER_LIMIT);
+		if (stringValue == null || stringValue.length() == 0) {
+			limit = -1;
+		}
 	}
 
 	/**
@@ -433,9 +441,10 @@
 	 */
 	void loadSettings(IMemento memento) {
 
-		String enabledString = memento.getString(TAG_ENABLED);
-		if (enabledString != null && enabledString.length() > 0)
-			enabled = Boolean.valueOf(enabledString).booleanValue();
+		String stringValue = memento.getString(TAG_ENABLED);
+		if (stringValue != null && stringValue.length() > 0){
+			enabled = Boolean.valueOf(stringValue).booleanValue();
+		}
 		scope = memento.getInteger(TAG_SCOPE).intValue();
 
 		String workingSetName = memento.getString(TAG_WORKING_SET);
@@ -444,6 +453,11 @@
 			setWorkingSet(PlatformUI.getWorkbench().getWorkingSetManager()
 					.getWorkingSet(workingSetName));
 
+		stringValue = memento.getString(TAG_LIMIT);
+		if (stringValue != null && stringValue.length() > 0) {
+			setLimit(Integer.parseInt(stringValue));
+		}
+		
 		Map filterMap = new HashMap();
 		MarkerFieldFilter[] filters = getFieldFilters();
 		for (int i = 0; i < filters.length; i++) {
@@ -502,6 +516,7 @@
 	 */
 	protected boolean populateClone(MarkerFieldFilterGroup clone) {
 		clone.scope = this.scope;
+		clone.limit = limit;
 		clone.workingSet = this.workingSet;
 		clone.enabled = this.enabled;
 		clone.fieldFilters = new MarkerFieldFilter[getFieldFilters().length];
@@ -560,6 +575,7 @@
 	void saveFilterSettings(IMemento memento) {
 		memento.putString(TAG_ENABLED, String.valueOf(enabled));
 		memento.putString(TAG_SCOPE, String.valueOf(scope));
+		memento.putString(TAG_LIMIT, String.valueOf(limit));
 
 		if (workingSet != null) {
 			memento.putString(TAG_WORKING_SET, workingSet.getName());
@@ -661,6 +677,21 @@
 	void setWorkingSet(IWorkingSet workingSet) {
 		this.workingSet = workingSet;
 	}
+	
+	/**
+	 * @return Returns -1 for no limit else the limit.
+	 */
+	int getLimit() {
+		return limit;
+	}
+
+	/**
+	 * @param limit
+	 *            The limit to set, -1 or 0 for no limit.
+	 */
+	void setLimit(int limit) {
+		this.limit = limit;
+	}
 
 	/**
 	 * Refresh the MarkerFieldFilterGroup .
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerLocationField.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerLocationField.java
index 6063488..7bfe426 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerLocationField.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerLocationField.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,7 +41,7 @@
 	 * @return int
 	 */
 	public int getDefaultColumnWidth(Control control) {
-		return 10 * MarkerSupportInternalUtilities.getFontWidth(control);
+		return 15 * MarkerSupportInternalUtilities.getFontWidth(control);
 	}
 
 	/*
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPreferencesDialog.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPreferencesDialog.java
deleted file mode 100644
index a4cf2ea..0000000
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPreferencesDialog.java
+++ /dev/null
@@ -1,483 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.ui.internal.views.markers;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.jface.resource.JFaceColors;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.internal.ide.IDEInternalPreferences;
-import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
-import org.eclipse.ui.preferences.ViewSettingsDialog;
-import org.eclipse.ui.views.markers.MarkerField;
-import org.eclipse.ui.views.markers.internal.MarkerMessages;
-
-/**
- * MarkerPreferencesDialog is the dialog for showing marker preferences.
- * 
- * @since 3.4
- * 
- */
-public class MarkerPreferencesDialog extends ViewSettingsDialog {
-
-	private IntegerFieldEditor limitEditor;
-
-	private Button enablementButton;
-
-	private Composite editArea;
-
-	private Label messageLabel;
-
-	private ExtendedMarkersView extendedView;
-
-	private ArrayList visible;
-
-	private ArrayList hidden;
-
-	private ListViewer visibleViewer;
-
-	private ListViewer nonVisibleViewer;
-
-	/**
-	 * Create a new instance of the receiver.
-	 * 
-	 * @param view -
-	 *            the view this is being launched from
-	 */
-	public MarkerPreferencesDialog(ExtendedMarkersView view) {
-		super(view.getSite().getShell());
-		this.extendedView = view;
-
-		Object[] visibleFields = view.getVisibleFields();
-		Object[] hiddenFields = view.getHiddenFields();
-
-		visible = new ArrayList();
-		hidden = new ArrayList();
-
-		for (int i = 0; i < visibleFields.length; i++) {
-			visible.add(visibleFields[i]);
-		}
-
-		for (int i = 0; i < hiddenFields.length; i++) {
-			hidden.add(hiddenFields[i]);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
-	 */
-	protected void configureShell(Shell newShell) {
-		super.configureShell(newShell);
-		newShell.setText(MarkerMessages.MarkerPreferences_DialogTitle);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.window.Window#getShellStyle()
-	 */
-	protected int getShellStyle() {
-		return super.getShellStyle() | SWT.RESIZE;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
-	 */
-	protected Control createDialogArea(Composite parent) {
-
-		Composite dialogArea = (Composite) super.createDialogArea(parent);
-
-		boolean checked = IDEWorkbenchPlugin.getDefault().getPreferenceStore()
-				.getBoolean(IDEInternalPreferences.USE_MARKER_LIMITS);
-		enablementButton = new Button(dialogArea, SWT.CHECK);
-		enablementButton.setText(MarkerMessages.MarkerPreferences_MarkerLimits);
-		enablementButton.setSelection(checked);
-
-		editArea = new Composite(dialogArea, SWT.NONE);
-		editArea.setLayout(new GridLayout());
-		GridData editData = new GridData(GridData.FILL_BOTH
-				| GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
-		editData.horizontalIndent = 10;
-		editArea.setLayoutData(editData);
-
-		limitEditor = new IntegerFieldEditor(
-				"limit", MarkerMessages.MarkerPreferences_VisibleItems, editArea) { //$NON-NLS-1$
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.preference.IntegerFieldEditor#checkState()
-			 */
-			protected boolean checkState() {
-				boolean state = super.checkState();
-				setValid(state, getErrorMessage());
-				return state;
-			}
-		};
-		limitEditor.setPreferenceStore(IDEWorkbenchPlugin.getDefault()
-				.getPreferenceStore());
-		limitEditor
-				.setPreferenceName(IDEInternalPreferences.MARKER_LIMITS_VALUE);
-		limitEditor.load();
-
-		GridData checkedData = new GridData(SWT.FILL, SWT.NONE, true, false);
-		checkedData.horizontalSpan = limitEditor.getNumberOfControls();
-		enablementButton.setLayoutData(checkedData);
-
-		enablementButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				setLimitEditorEnablement(editArea, enablementButton
-						.getSelection());
-			}
-		});
-
-		setLimitEditorEnablement(editArea, checked);
-
-		messageLabel = new Label(dialogArea, SWT.NONE);
-
-		messageLabel.setBackground(JFaceColors.getErrorBackground(dialogArea
-				.getDisplay()));
-		messageLabel.setForeground(JFaceColors.getErrorText(dialogArea
-				.getDisplay()));
-		messageLabel
-				.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
-
-		createColumnsArea(dialogArea);
-
-		applyDialogFont(dialogArea);
-		return dialogArea;
-	}
-
-	/**
-	 * Create an area for the selected columns
-	 * 
-	 * @param dialogArea
-	 */
-	private void createColumnsArea(Composite dialogArea) {
-
-		initializeDialogUnits(dialogArea);
-		Group columnsComposite = new Group(dialogArea, SWT.NONE);
-		columnsComposite.setText(MarkerMessages.MarkerPreferences_ColumnGroupTitle);
-		FormLayout layout = new FormLayout();
-		columnsComposite.setLayout(layout);
-
-		columnsComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
-				true));
-		Label visibleItemsLabel = new Label(columnsComposite, SWT.NONE);
-		visibleItemsLabel.setText(MarkerMessages.MarkerPreferences_VisibleColumnsTitle);
-		FormData visibleLabelData = new FormData();
-		visibleLabelData.right = new FormAttachment(45, 0);
-		visibleLabelData.left = new FormAttachment(
-				IDialogConstants.BUTTON_MARGIN);
-		visibleLabelData.top = new FormAttachment(0);
-		visibleItemsLabel.setLayoutData(visibleLabelData);
-
-		int rightMargin = IDialogConstants.BUTTON_MARGIN * -1;
-
-		Label nonVisibleLabel = new Label(columnsComposite, SWT.NONE);
-		nonVisibleLabel.setText(MarkerMessages.MarkerPreferences_HiddenColumnsTitle);
-		FormData nonVisibleLabelData = new FormData();
-		nonVisibleLabelData.right = new FormAttachment(100);
-		nonVisibleLabelData.left = new FormAttachment(55, 0);
-		nonVisibleLabelData.top = new FormAttachment(0);
-		nonVisibleLabel.setLayoutData(nonVisibleLabelData);
-
-		visibleViewer = new ListViewer(columnsComposite,
-				SWT.BORDER);
-
-		FormData visibleViewerData = new FormData();
-		visibleViewerData.right = new FormAttachment(visibleItemsLabel, 0,
-				SWT.RIGHT);
-		visibleViewerData.left = new FormAttachment(visibleItemsLabel, 0,
-				SWT.LEFT);
-		visibleViewerData.top = new FormAttachment(visibleItemsLabel,
-				IDialogConstants.BUTTON_MARGIN);
-		visibleViewerData.bottom = new FormAttachment(100, rightMargin);
-		visibleViewerData.height = convertHeightInCharsToPixels(15);
-		visibleViewerData.width = convertWidthInCharsToPixels(25);
-
-		visibleViewer.getControl().setLayoutData(visibleViewerData);
-
-		visibleViewer.setContentProvider(new IStructuredContentProvider() {
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
-			 */
-			public Object[] getElements(Object inputElement) {
-				return visible.toArray();
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
-			 */
-			public void dispose() {
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
-			 *      java.lang.Object, java.lang.Object)
-			 */
-			public void inputChanged(Viewer viewer, Object oldInput,
-					Object newInput) {
-			}
-
-		});
-
-		visibleViewer.setLabelProvider(markerFieldLabelProvider());
-
-		visibleViewer.setInput(this);
-
-		nonVisibleViewer = new ListViewer(columnsComposite,
-				SWT.BORDER);
-
-		nonVisibleViewer.setLabelProvider(markerFieldLabelProvider());
-
-		nonVisibleViewer.setContentProvider(new IStructuredContentProvider() {
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
-			 */
-			public Object[] getElements(Object inputElement) {
-				return hidden.toArray();
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
-			 */
-			public void dispose() {
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
-			 *      java.lang.Object, java.lang.Object)
-			 */
-			public void inputChanged(Viewer viewer, Object oldInput,
-					Object newInput) {
-			}
-
-		});
-		nonVisibleViewer.setInput(this);
-
-		FormData nonVisibleViewerData = new FormData();
-		nonVisibleViewerData.right = new FormAttachment(nonVisibleLabel, 0,
-				SWT.RIGHT);
-		nonVisibleViewerData.left = new FormAttachment(nonVisibleLabel, 0,
-				SWT.LEFT);
-		nonVisibleViewerData.top = new FormAttachment(nonVisibleLabel,
-				IDialogConstants.BUTTON_MARGIN);
-		nonVisibleViewerData.bottom = new FormAttachment(100, rightMargin);
-		nonVisibleViewerData.height = convertHeightInCharsToPixels(15);
-		nonVisibleViewerData.width = convertWidthInCharsToPixels(25);
-
-		nonVisibleViewer.getControl().setLayoutData(nonVisibleViewerData);
-
-		Button toNonVisibleButton = new Button(columnsComposite, SWT.PUSH);
-		toNonVisibleButton
-				.setText(getDefaultOrientation() == SWT.RIGHT_TO_LEFT ? MarkerMessages.MarkerPreferences_MoveLeft
-						: MarkerMessages.MarkerPreferences_MoveRight);
-
-		FormData toNonVisibleButtonData = new FormData();
-
-		toNonVisibleButtonData.top = new FormAttachment(visibleViewer
-				.getControl(), IDialogConstants.BUTTON_BAR_HEIGHT, SWT.TOP);
-		toNonVisibleButtonData.left = new FormAttachment(visibleViewer
-				.getControl(), IDialogConstants.BUTTON_MARGIN);
-		toNonVisibleButtonData.right = new FormAttachment(nonVisibleViewer
-				.getControl(), rightMargin);
-		toNonVisibleButton.setLayoutData(toNonVisibleButtonData);
-
-		toNonVisibleButton.addSelectionListener(new SelectionAdapter() {
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-			 */
-			public void widgetSelected(SelectionEvent e) {
-				List selection = ((IStructuredSelection) visibleViewer
-						.getSelection()).toList();
-				hidden.addAll(selection);
-				visible.removeAll(selection);
-				visibleViewer.refresh();
-				nonVisibleViewer.refresh();
-				setValid(
-						visible.size() > 0,
-						MarkerMessages.MarkerPreferences_AtLeastOneVisibleColumn);
-			}
-		});
-
-		Button toVisibleButton = new Button(columnsComposite, SWT.PUSH);
-		toVisibleButton
-				.setText(getDefaultOrientation() == SWT.RIGHT_TO_LEFT ? MarkerMessages.MarkerPreferences_MoveRight
-						: MarkerMessages.MarkerPreferences_MoveLeft);
-
-		FormData toVisibleButtonData = new FormData();
-
-		toVisibleButtonData.top = new FormAttachment(toNonVisibleButton,
-				IDialogConstants.BUTTON_MARGIN);
-		toVisibleButtonData.left = new FormAttachment(visibleViewer
-				.getControl(), IDialogConstants.BUTTON_MARGIN);
-		toVisibleButtonData.right = new FormAttachment(nonVisibleViewer
-				.getControl(), rightMargin);
-		toVisibleButton.setLayoutData(toVisibleButtonData);
-
-		toVisibleButton.addSelectionListener(new SelectionAdapter() {
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-			 */
-			public void widgetSelected(SelectionEvent e) {
-				List selection = ((IStructuredSelection) nonVisibleViewer
-						.getSelection()).toList();
-				hidden.removeAll(selection);
-				visible.addAll(selection);
-				visibleViewer.refresh();
-				nonVisibleViewer.refresh();
-				setValid(
-						visible.size() > 0,
-						MarkerMessages.MarkerPreferences_AtLeastOneVisibleColumn);
-			}
-		});
-
-	}
-
-	/**
-	 * Return a label provider for fields.
-	 * @return LabelProvider
-	 */
-	private LabelProvider markerFieldLabelProvider() {
-		return new LabelProvider() {
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
-			 */
-			public String getText(Object element) {
-				return ((MarkerField) element).getName();
-			}
-		};
-	}
-
-	/**
-	 * Set the enabled state of the OK button by state.
-	 * 
-	 * @param state
-	 */
-	protected void setValid(boolean state, String errorMessage) {
-		Button okButton = getButton(IDialogConstants.OK_ID);
-
-		if (okButton == null)
-			return;
-
-		if (state)
-			messageLabel.setText(MarkerSupportInternalUtilities.EMPTY_STRING);
-		else
-			messageLabel.setText(errorMessage);
-
-		okButton.setEnabled(state);
-
-	}
-
-	/**
-	 * Enable the limitEditor based on checked.
-	 * 
-	 * @param control
-	 *            The parent of the editor
-	 * @param checked
-	 */
-	private void setLimitEditorEnablement(Composite control, boolean checked) {
-		limitEditor.setEnabled(checked, control);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
-	 */
-	protected void okPressed() {
-
-		limitEditor.store();
-		IDEWorkbenchPlugin.getDefault().getPreferenceStore().setValue(
-				IDEInternalPreferences.USE_MARKER_LIMITS,
-				enablementButton.getSelection());
-		IDEWorkbenchPlugin.getDefault().savePluginPreferences();
-
-		extendedView.setVisibleFields(visible);
-
-		super.okPressed();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.preferences.ViewSettingsDialog#performDefaults()
-	 */
-	protected void performDefaults() {
-		super.performDefaults();
-		limitEditor.loadDefault();
-		boolean checked = IDEWorkbenchPlugin.getDefault().getPreferenceStore()
-				.getDefaultBoolean(IDEInternalPreferences.USE_MARKER_LIMITS);
-		enablementButton.setSelection(checked);
-		setLimitEditorEnablement(editArea, checked);
-
-		Object[] visibleFields=extendedView.getBuilder().getGenerator().getInitialVisible();
-		Object[] allFields=extendedView.getBuilder().getGenerator().getAllFields();
-		visible.clear();
-		hidden.clear();
-		for (int i = 0; i < allFields.length; i++) {
-			hidden.add(allFields[i]);
-		}
-		for (int i = 0; i < visibleFields.length; i++) {
-			hidden.remove(visibleFields[i]);
-			visible.add(visibleFields[i]);
-		}
-		visibleViewer.refresh();
-		nonVisibleViewer.refresh();
-	}
-
-}
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPreferencesHandler.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPreferencesHandler.java
deleted file mode 100644
index b85aa9a..0000000
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPreferencesHandler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal.views.markers;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.ui.views.markers.MarkerViewHandler;
-
-/**
- * MarkerPreferencesHandler is the handler for opening the marker preferences dialog.
- * @since 3.4
- *
- */
-public class MarkerPreferencesHandler extends MarkerViewHandler implements
-		IHandler {
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-	 */
-	public Object execute(ExecutionEvent event) {
-		
-		ExtendedMarkersView view = getView(event);
-		if(view == null)
-			return this;
-		
-		new MarkerPreferencesDialog(view).open();
-		return this;
-	}
-
-}
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerSupportInternalUtilities.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerSupportInternalUtilities.java
index 48b92c9..09d20d2 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerSupportInternalUtilities.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerSupportInternalUtilities.java
@@ -32,6 +32,7 @@
 import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.ide.Policy;
+import org.eclipse.ui.internal.ide.StatusUtil;
 import org.eclipse.ui.internal.util.BundleUtility;
 import org.eclipse.ui.statushandlers.StatusAdapter;
 import org.eclipse.ui.statushandlers.StatusManager;
@@ -309,23 +310,6 @@
 
 	}
 
-	/**
-	 * Get the marker limit for the receiver.
-	 * 
-	 * @return int
-	 */
-	static int getMarkerLimit() {
-
-		// If limits are enabled return it. Otherwise return -1
-		if (IDEWorkbenchPlugin.getDefault().getPreferenceStore().getBoolean(
-				IDEInternalPreferences.USE_MARKER_LIMITS)) {
-			return IDEWorkbenchPlugin.getDefault().getPreferenceStore().getInt(
-					IDEInternalPreferences.MARKER_LIMITS_VALUE);
-
-		}
-		return -1;
-
-	}
 
 	/**
 	 * Return the severity value for item. A value of -1 indicates
@@ -394,30 +378,44 @@
 	 * @param exception
 	 */
 	public static void logViewError(Exception exception) {
-		if (exception instanceof CoreException) {
-			StatusManager.getManager().handle(
-					((CoreException) exception).getStatus(),StatusManager.LOG);
-			return;
-		}
-		StatusManager.getManager().handle(
-				new Status(IStatus.ERROR, IDEWorkbenchPlugin.IDE_WORKBENCH,
-						exception.getLocalizedMessage(), exception),
-				StatusManager.LOG);
+		handleViewError(exception, StatusManager.LOG);
 	}
+
 	/**
 	 * Show an exception from a markers view.
 	 * 
 	 * @param exception
 	 */
 	public static void showViewError(Exception exception) {
+		handleViewError(exception, StatusManager.LOG | StatusManager.SHOW);
+	}
+
+	/**
+	 * @param exception
+	 * @param handlingMethod
+	 *            StatusManager.LOG, StatusManager.SHOW,etc, bitwise ORed
+	 */
+	public static void handleViewError(Exception exception, int handlingMethod) {
 		if (exception instanceof CoreException) {
-			StatusManager.getManager().handle(
-					((CoreException) exception).getStatus(),StatusManager.LOG|StatusManager.SHOW);
+			// Check for a nested CoreException
+			IStatus status = ((CoreException) exception).getStatus();
+			if (status != null
+					&& status.getException() instanceof CoreException) {
+				exception = (CoreException) status.getException();
+				status = ((CoreException) exception).getStatus();
+			}
+
+			if (status == null)
+				StatusManager.getManager().handle(
+						StatusUtil.newStatus(IStatus.ERROR,
+								exception.getLocalizedMessage(), exception),
+						handlingMethod);
+			else
+				StatusManager.getManager().handle(status, handlingMethod);
 			return;
 		}
-		StatusManager.getManager().handle(
-				new Status(IStatus.ERROR, IDEWorkbenchPlugin.IDE_WORKBENCH,
-						exception.getLocalizedMessage(), exception),
-				StatusManager.LOG|StatusManager.SHOW);
+		StatusManager.getManager().handle(StatusUtil.newStatus(IStatus.ERROR,
+				exception.getLocalizedMessage(), exception),
+				handlingMethod);
 	}
 }
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerViewerContentProvider.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerViewerContentProvider.java
index f4d9852..386c89d 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerViewerContentProvider.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerViewerContentProvider.java
@@ -24,6 +24,14 @@
 
 	// private MarkersTreeViewer viewer;
 	private Object input;
+	private final ExtendedMarkersView markersView;
+
+	/**
+	 * @param extendedMarkersView
+	 */
+	public MarkerViewerContentProvider(ExtendedMarkersView extendedMarkersView) {
+		this.markersView = extendedMarkersView;
+	}
 
 	/*
 	 * (non-Javadoc)
@@ -76,13 +84,16 @@
 	 * @return Object[]
 	 */
 	private Object[] getLimitedChildren(Object[] children) {
-		int newLength = MarkerSupportInternalUtilities.getMarkerLimit();
-		if (newLength > 0 && newLength < children.length) {
-			Object[] newChildren = new Object[newLength];
-			System.arraycopy(children, 0, newChildren, 0, newLength);
-			return newChildren;
-		}
-		return children;
+		
+		boolean limitsEnabled = markersView.getGenerator().isMarkerLimitsEnabled();
+		int limits = markersView.getGenerator().getMarkerLimits();
+		
+		if (!limitsEnabled || limits <= 0 || limits > children.length)
+			return children;
+		
+		Object[] newChildren = new Object[limits];
+		System.arraycopy(children, 0, newChildren, 0, limits);
+		return newChildren;
 	}
 
 	/*
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/Markers.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/Markers.java
index 439f119..377d0cf 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/Markers.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/Markers.java
@@ -29,8 +29,9 @@
 import org.eclipse.ui.views.markers.internal.MarkerMessages;
 
 /**
- * The Markers object contains the MarkerEntry(s) collected and updated by the system,
- * also  maintains the categories that markers are grouped into.
+ * The Markers object contains the MarkerEntry(s) collected and updated by the
+ * system, also maintains the categories that markers are grouped into.
+ * 
  * @since 3.6
  * 
  */
@@ -39,41 +40,39 @@
 	static final MarkerCategory[] EMPTY_CATEGORY_ARRAY = new MarkerCategory[0];
 	static final MarkerEntry[] EMPTY_ENTRY_ARRAY = new MarkerEntry[0];
 
-	 //the marker entries
+	// the marker entries
 	private MarkerEntry[] markerEntryArray = EMPTY_ENTRY_ARRAY;
-	//the categories
+	// the categories
 	private MarkerCategory[] categories = EMPTY_CATEGORY_ARRAY;
 
-	
 	private CachedMarkerBuilder builder;
-	
-	private boolean inChange=false;
+
+	private boolean inChange = false;
 
 	// markerToEntryMap is a lazily created map from the markers to thier
 	// corresponding entry
 	private Map markerToEntryMap = null;
 	private Integer[] markerCounts;
 
-
 	Markers(CachedMarkerBuilder builder) {
 		this.builder = builder;
-		inChange=false;
+		inChange = false;
 	}
 
 	/**
 	 * Update with newly collected markers
 	 * 
 	 * @param markerEntries
-	 * 						the new marker entries 
+	 *            the new marker entries
 	 * @param sortAndGroup
-	 * 			true 	sort and group them
+	 *            true sort and group them
 	 * @param monitor
 	 */
 	synchronized boolean updateWithNewMarkers(Collection markerEntries,
 			boolean sortAndGroup, IProgressMonitor monitor) {
-		boolean initialVal=inChange;
+		boolean initialVal = inChange;
 		try {
-			inChange=true;
+			inChange = true;
 			if (markerToEntryMap != null) {
 				markerToEntryMap.clear();
 				markerToEntryMap = null;
@@ -103,7 +102,7 @@
 			}
 			return true;
 		} finally {
-			inChange=initialVal;
+			inChange = initialVal;
 		}
 	}
 
@@ -113,9 +112,9 @@
 	 * @param monitor
 	 */
 	synchronized boolean sortAndMakeCategories(IProgressMonitor monitor) {
-		boolean initialVal=inChange;
+		boolean initialVal = inChange;
 		try {
-			inChange=true;
+			inChange = true;
 			// Sort by Category first
 			if (builder.isShowingHierarchy()) {
 				MarkerCategory[] markerCategories = groupIntoCategories(
@@ -132,7 +131,7 @@
 
 			return sortMarkerEntries(monitor);
 		} finally {
-			inChange=initialVal;
+			inChange = initialVal;
 		}
 	}
 
@@ -143,9 +142,9 @@
 		if (monitor.isCanceled()) {
 			return false;
 		}
-		boolean initialVal=inChange;
+		boolean initialVal = inChange;
 		try {
-			inChange=true;
+			inChange = true;
 			if (builder.isShowingHierarchy()) {
 				Comparator comparator = builder.getComparator()
 						.getFieldsComparator();
@@ -168,8 +167,8 @@
 				}
 				int avaialble = markerEntryArray.length - 1;
 				int effLimit = getShowingLimit(avaialble);
-				MarkerSortUtil.sortStartingKElement(markerEntryArray, builder
-						.getComparator(), effLimit, monitor);
+				MarkerSortUtil.sortStartingKElement(markerEntryArray,
+						builder.getComparator(), effLimit, monitor);
 			}
 			if (monitor.isCanceled()) {
 				return false;
@@ -177,19 +176,25 @@
 			monitor.worked(50);
 			return true;
 		} finally {
-			inChange=initialVal;
+			inChange = initialVal;
 		}
 	}
 
 	/**
 	 * get marker limit to show, if any.
-	 * @param avaliable
+	 * 
+	 * @param available
 	 */
-	private int getShowingLimit(int avaliable) {
-		int limit = MarkerSupportInternalUtilities.getMarkerLimit();
+	private int getShowingLimit(int available) {
+		
+		boolean limitsEnabled = builder.getGenerator().isMarkerLimitsEnabled();
+		if(!limitsEnabled)
+			return available;
+		
+		int limit = builder.getGenerator().getMarkerLimits();
 		int effLimit = limit;
-		if (avaliable < effLimit || limit == -1) {
-			effLimit = avaliable;
+		if (available < effLimit || limit <= 0) {
+			effLimit = available;
 		}
 		return effLimit;
 	}
@@ -203,8 +208,8 @@
 	 */
 	MarkerCategory[] groupIntoCategories(IProgressMonitor monitor,
 			MarkerEntry[] newMarkers) {
-		Map boundaryInfoMap = groupMarkerEntries(newMarkers, builder
-				.getCategoryGroup(), newMarkers.length - 1, monitor);
+		Map boundaryInfoMap = groupMarkerEntries(newMarkers,
+				builder.getCategoryGroup(), newMarkers.length - 1, monitor);
 		Iterator iterator = boundaryInfoMap.keySet().iterator();
 		int start = 0;
 		MarkerCategory[] markerCategories = new MarkerCategory[boundaryInfoMap
@@ -215,8 +220,8 @@
 			Object key = iterator.next();
 			end = ((Integer) boundaryInfoMap.get(key)).intValue();
 			markerCategories[i++] = new MarkerCategory(this, start, end,
-					builder.getCategoryGroup().getMarkerField().getValue(
-							newMarkers[start]));
+					builder.getCategoryGroup().getMarkerField()
+							.getValue(newMarkers[start]));
 			start = end + 1;
 		}
 		return markerCategories;
@@ -234,21 +239,21 @@
 	 * @return {@link Map}
 	 * 
 	 */
-	private Map groupMarkerEntries(MarkerEntry[] entries, MarkerGroup group, int k,
-			IProgressMonitor monitor) {
+	private Map groupMarkerEntries(MarkerEntry[] entries, MarkerGroup group,
+			int k, IProgressMonitor monitor) {
 		TreeMap map = new TreeMap(group.getEntriesComparator());
 		for (int i = 0; i <= k; i++) {
 			IMarker marker = entries[i].getMarker();
 			if (marker == null) {
 				continue;// skip stale markers
 			}
-			if(monitor.isCanceled()){
+			if (monitor.isCanceled()) {
 				map.clear();
 				return map;
 			}
 			try {
-				MarkerGroupingEntry groupingEntry = group.findGroupValue(marker
-						.getType(), marker);
+				MarkerGroupingEntry groupingEntry = group.findGroupValue(
+						marker.getType(), marker);
 				List list = (List) map.get(groupingEntry);
 				if (list == null) {
 					list = new ArrayList();
@@ -262,7 +267,7 @@
 		Iterator keys = map.keySet().iterator();
 		int i = 0;
 		while (keys.hasNext()) {
-			if(monitor.isCanceled()){
+			if (monitor.isCanceled()) {
 				map.clear();
 				return map;
 			}
@@ -287,16 +292,16 @@
 	 */
 	Integer[] getMarkerCounts() {
 		if (markerCounts == null) {
-			markerCounts=getMarkerCounts(markerEntryArray);
+			markerCounts = getMarkerCounts(markerEntryArray);
 
 		}
 		return markerCounts;
 	}
 
 	/**
-	 * Returns an array of marker counts for the given MarkerEntry array
-	 * , where getMarkerCounts()[severity] is the number of markers in 
-	 * the list with the given severity.
+	 * Returns an array of marker counts for the given MarkerEntry array , where
+	 * getMarkerCounts()[severity] is the number of markers in the list with the
+	 * given severity.
 	 * 
 	 * @return an array of {@link Integer} where index indicates
 	 *         [errors,warnings,infos,others]
@@ -366,7 +371,7 @@
 	 * @return MarkerSupportItem[]
 	 */
 	public MarkerSupportItem[] getElements() {
-		if(builder.isShowingHierarchy()){
+		if (builder.isShowingHierarchy()) {
 			return categories;
 		}
 		return markerEntryArray;
@@ -378,10 +383,9 @@
 	CachedMarkerBuilder getBuilder() {
 		return builder;
 	}
-	
+
 	/**
-	 * Use clone where thread safety is concerned.
-	 * The method is non-blocking.
+	 * Use clone where thread safety is concerned. The method is non-blocking.
 	 */
 	Markers getClone() {
 		Markers markers = new Markers(builder);
@@ -399,7 +403,9 @@
 		return inChange;
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see java.lang.Object#hashCode()
 	 */
 	public int hashCode() {
@@ -409,7 +415,9 @@
 		return result;
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see java.lang.Object#equals(java.lang.Object)
 	 */
 	public boolean equals(Object obj) {
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersContribution.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersContribution.java
index 990c326..84c0b25 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersContribution.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersContribution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,7 +45,7 @@
 	/**
 	 * Get the view this contribution is working on.
 	 * 
-	 * @return ExtendedMarkersView
+	 * @return ExtendedMarkersView or <code>null</code> if the active view isn't a marker view
 	 */
 	ExtendedMarkersView getView() {
 		IWorkbenchWindow active = PlatformUI.getWorkbench()
@@ -56,7 +56,7 @@
 		if (page == null)
 			return null;
 		IWorkbenchPart part = page.getActivePart();
-		if (part == null)
+		if (!(part instanceof ExtendedMarkersView))
 			return null;
 
 		return (ExtendedMarkersView) part;
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersPropertyPage.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersPropertyPage.java
index f124dfc..a3bec66 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersPropertyPage.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersPropertyPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -122,7 +122,7 @@
 		Label label = new Label(parent, SWT.NONE);
 		label.setText(MarkerMessages.propertiesDialog_creationTime_text);
 
-		Label creationTime = new Label(parent, SWT.NONE);
+		Text creationTime = new Text(parent, SWT.SINGLE | SWT.READ_ONLY);
 		creationTime.setText(Util.getCreationTime(marker));
 	}
 
@@ -236,8 +236,7 @@
 		severityImage.setImage(Util.getImage(marker.getAttribute(
 				IMarker.SEVERITY, -1)));
 
-		Label severityLabel = new Label(composite, SWT.NONE);
-
+		Text severityLabel = new Text(composite, SWT.SINGLE | SWT.READ_ONLY);
 		int severity = marker.getAttribute(IMarker.SEVERITY, -1);
 		if (severity == IMarker.SEVERITY_ERROR) {
 			severityLabel.setText(MarkerMessages.propertiesDialog_errorLabel);
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersViewColumnsDialog.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersViewColumnsDialog.java
new file mode 100644
index 0000000..5b8b075
--- /dev/null
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersViewColumnsDialog.java
@@ -0,0 +1,296 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.views.markers;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.views.markers.MarkerField;
+
+/**
+ * MarkersViewSettingDialog is the dialog for showing marker preferences.
+ * 
+ * 
+ * @since 3.7
+ * @author Hitesh Soliwal
+ * 
+ */
+public class MarkersViewColumnsDialog extends ViewerColumnsDialog {
+
+	private ExtendedMarkersView extendedView;
+
+	/**
+	 * Create a new instance of the receiver.
+	 * 
+	 * @param view
+	 *            - the view this is being launched from
+	 */
+	public MarkersViewColumnsDialog(ExtendedMarkersView view) {
+		super(view.getSite().getShell());
+		this.extendedView = view;
+		initialize(false);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets
+	 * .Shell)
+	 */
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(JFaceResources
+				.getString("ConfigureColumnsDialog_Title")); //$NON-NLS-1$
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.window.Window#getShellStyle()
+	 */
+	protected int getShellStyle() {
+		return super.getShellStyle() | SWT.RESIZE;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets
+	 * .Composite)
+	 */
+	protected Control createDialogArea(Composite parent) {
+		Control control = super.createDialogArea(parent);
+		return control;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	protected void okPressed() {
+		extendedView.setVisibleFields(getVisibleFields(), getNewWidths());
+		super.okPressed();
+	}
+
+	/**
+	 */
+	private int[] getNewWidths() {
+		List visible = getVisible();
+		int[] widths = new int[visible.size()];
+		int i = 0;
+		Iterator iterator = visible.iterator();
+		while (iterator.hasNext()) {
+			widths[i] = ((FieldEntry) iterator.next()).width;
+			i++;
+		}
+		return widths;
+	}
+
+	private Collection getVisibleFields() {
+		List visible = getVisible();
+		List list = new ArrayList(visible.size());
+		Iterator iterator = visible.iterator();
+		while (iterator.hasNext()) {
+			list.add(((FieldEntry) iterator.next()).field);
+		}
+		return list;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.preferences.ViewSettingsDialog#performDefaults()
+	 */
+	protected void performDefaults() {
+		initialize(true);
+		super.performDefaults();
+	}
+
+	/**
+	 */
+	void initialize(boolean defaultWidths) {
+		MarkerField[] allFields = extendedView.getBuilder().getGenerator()
+				.getAllFields();
+		MarkerField[] visibleFields = null;
+		if (defaultWidths) {
+			visibleFields = extendedView.getBuilder().getGenerator()
+					.getInitialVisible();
+		} else {
+			visibleFields = extendedView.getBuilder().getGenerator()
+					.getVisibleFields();
+		}
+		List visible = getVisible();
+		List nonVisible = getNonVisible();
+		visible.clear();
+		nonVisible.clear();
+		FieldEntry entry = null;
+		for (int i = 0; i < allFields.length; i++) {
+			if (!contains(visibleFields, allFields[i])) {
+				entry = new FieldEntry(allFields[i], -1);
+				entry.width = extendedView.getFieldWidth(entry.field,
+						defaultWidths ? 0 : -1, !defaultWidths);
+				entry.visible = false;
+				nonVisible.add(entry);
+			}
+		}
+		for (int i = 0; i < visibleFields.length; i++) {
+			entry = new FieldEntry(visibleFields[i], -1);
+			entry.width = extendedView.getFieldWidth(entry.field,
+					defaultWidths ? 0 : -1, !defaultWidths);
+			entry.visible = true;
+			visible.add(entry);
+		}
+	}
+
+	/**
+	 * @param visibleFields
+	 * @param field
+	 */
+	private boolean contains(MarkerField[] visibleFields, MarkerField field) {
+		for (int i = 0; i < visibleFields.length; i++) {
+			if (visibleFields[i].equals(field)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.views.markers.ViewerColumnsDialog#getLabelProvider
+	 * ()
+	 */
+	protected ITableLabelProvider getLabelProvider() {
+		return new TableLabelProvider() {
+			public String getText(Object element) {
+				return ((FieldEntry) element).field.getName();
+			}
+		};
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.views.markers.ViewerColumnsDialog#
+	 * getColumnInfoProvider()
+	 */
+	protected IColumnInfoProvider getColumnInfoProvider() {
+
+		return new IColumnInfoProvider() {
+			public int getColumnIndex(Object columnObj) {
+				return getVisible().indexOf(columnObj);
+			}
+
+			public int getColumnWidth(Object columnObj) {
+				FieldEntry field = (FieldEntry) columnObj;
+				if (field.width <= 0) {
+					field.width = extendedView.getFieldWidth(field.field,
+							field.width, false);
+				}
+				return field.width;
+			}
+
+			public boolean isColumnVisible(Object columnObj) {
+				return ((FieldEntry) columnObj).visible;
+			}
+
+			public boolean isColumnMovable(Object columnObj) {
+				return true;
+			}
+
+			public boolean isColumnResizable(Object columnObj) {
+				return true;
+			}
+		};
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.views.markers.ViewerColumnsDialog#getColumnUpdater
+	 * ()
+	 */
+	protected IColumnUpdater getColumnUpdater() {
+
+		return new IColumnUpdater() {
+			public void setColumnVisible(Object columnObj, boolean visible) {
+				((FieldEntry) columnObj).visible = visible;
+			}
+
+			public void setColumnMovable(Object columnObj, boolean movable) {
+				// not implemented
+			}
+
+			public void setColumnIndex(Object columnObj, int index) {
+				// ignore
+			}
+
+			public void setColumnResizable(Object columnObj, boolean resizable) {
+				// ignore
+			}
+
+			public void setColumnWidth(Object columnObj, int newWidth) {
+				((FieldEntry) columnObj).width = newWidth;
+			}
+		};
+	}
+
+	static class FieldEntry {
+		final MarkerField field;
+		int width;
+		boolean visible;
+
+		FieldEntry(MarkerField field, int width) {
+			this.field = field;
+			this.width = width;
+			visible = false;
+		}
+
+		public int hashCode() {
+			final int prime = 31;
+			int result = 1;
+			result = prime * result + ((field == null) ? 0 : field.hashCode());
+			return result;
+		}
+
+		public boolean equals(Object obj) {
+			if (this == obj)
+				return true;
+			if (obj == null)
+				return false;
+			if (getClass() != obj.getClass())
+				return false;
+			FieldEntry other = (FieldEntry) obj;
+			if (field == null) {
+				if (other.field != null)
+					return false;
+			} else if (!field.equals(other.field))
+				return false;
+			return true;
+		}
+
+	}
+}
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ProblemsView.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ProblemsView.java
index 53e9cca..2f049da 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ProblemsView.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ProblemsView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,17 +8,24 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  ******************************************************************************/
-
 package org.eclipse.ui.internal.views.markers;
 
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
 import org.eclipse.ui.views.markers.MarkerSupportView;
+import org.eclipse.ui.views.markers.internal.MarkerMessages;
 import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
 
+
 /**
- * The ProblemsView is the view supplied by the ide to show
- * problems.
+ * The Problems view is the view supplied by the IDE to show problems.
+ * 
  * @since 3.4
- *
  */
 public class ProblemsView extends MarkerSupportView {
 
@@ -30,4 +37,34 @@
 		
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.views.markers.ExtendedMarkersView#updateTitleImage(java.lang.Integer[])
+	 */
+	void updateTitleImage(Integer[] counts) {
+		Image image= WorkbenchPlugin.getDefault().getSharedImages().getImage(IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEMS_VIEW);
+		if (counts[0].intValue() > 0)
+			image= WorkbenchPlugin.getDefault().getSharedImages().getImage(IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEMS_VIEW_ERROR);
+		else if (counts[1].intValue() > 0)
+			image= WorkbenchPlugin.getDefault().getSharedImages().getImage(IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEMS_VIEW_WARNING);
+		setTitleImage(image);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.views.markers.internal.MarkerView#getUndoContext()
+	 * @since 3.7
+	 */
+	protected IUndoContext getUndoContext() {
+		return WorkspaceUndoUtil.getProblemsUndoContext();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.views.markers.ExtendedMarkersView#getDeleteOperationName(org.eclipse.core.resources.IMarker[])
+	 * @since 3.7
+	 */
+	protected String getDeleteOperationName(IMarker[] markers) {
+		Assert.isLegal(markers.length > 0);
+		return markers.length == 1 ? MarkerMessages.deleteProblemMarker_operationName : MarkerMessages.deleteProblemMarkers_operationName;
+	}
+
 }
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixHandler.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixHandler.java
index e302957..f18328d 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixHandler.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@
 
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -71,8 +72,9 @@
 		if (view == null)
 			return this;
 
-		final Map resolutions = new LinkedHashMap();
-		final IMarker selected = view.getSelectedMarkers()[0];
+		final Map resolutionsMap = new LinkedHashMap();
+		final IMarker[] selectedMarkers = view.getSelectedMarkers();
+		final IMarker firstSelectedMarker = selectedMarkers[0];
 
 		IRunnableWithProgress resolutionsRunnable = new IRunnableWithProgress() {
 			public void run(IProgressMonitor monitor) {
@@ -83,26 +85,24 @@
 
 				IMarker[] allMarkers = view.getAllMarkers();
 				monitor.worked(20);
-				IMarkerResolution[] found = IDE.getMarkerHelpRegistry()
-						.getResolutions(selected);
+				IMarkerResolution[] resolutions = IDE.getMarkerHelpRegistry().getResolutions(firstSelectedMarker);
 				int progressCount = 80;
-				if (found.length > 1)
-					progressCount = progressCount / found.length;
-				for (int i = 0; i < found.length; i++) {
-					IMarkerResolution markerResolution = found[i];
+				if (resolutions.length > 1)
+					progressCount= progressCount / resolutions.length;
+				for (int i = 0; i < resolutions.length; i++) {
+					IMarkerResolution markerResolution= resolutions[i];
 					if (markerResolution instanceof WorkbenchMarkerResolution) {
-						IMarker[] other = ((WorkbenchMarkerResolution) markerResolution)
-								.findOtherMarkers(allMarkers);
-						Collection markers = new ArrayList();
-						markers.add(selected);
-						for (int j = 0; j < other.length; j++) {
-							markers.add(other[j]);
+						IMarker[] other = ((WorkbenchMarkerResolution)markerResolution).findOtherMarkers(allMarkers);
+						if (containsAllButFirst(other, selectedMarkers)) {
+							Collection markers = new ArrayList(other.length + 1);
+							markers.add(firstSelectedMarker);
+							markers.addAll(Arrays.asList(other));
+							resolutionsMap.put(markerResolution, markers);
 						}
-						resolutions.put(markerResolution, markers);
-					} else {
-						Collection markers = new ArrayList();
-						markers.add(selected);
-						resolutions.put(markerResolution, markers);
+					} else if (selectedMarkers.length == 1) {
+						Collection markers = new ArrayList(1);
+						markers.add(firstSelectedMarker);
+						resolutionsMap.put(markerResolution, markers);
 					}
 					monitor.worked(progressCount);
 				}
@@ -133,22 +133,31 @@
 					exception);
 		}
 
-		String markerDescription = selected.getAttribute(IMarker.MESSAGE,
+		String markerDescription= firstSelectedMarker.getAttribute(IMarker.MESSAGE,
 				MarkerSupportInternalUtilities.EMPTY_STRING);
-		if (resolutions.isEmpty()) {
-			MessageDialog
-					.openInformation(
-							view.getSite().getShell(),
-							MarkerMessages.resolveMarkerAction_dialogTitle,
-							NLS	.bind(MarkerMessages.MarkerResolutionDialog_NoResolutionsFound,
-									  new Object[] { markerDescription }));
+		if (resolutionsMap.isEmpty()) {
+			if (selectedMarkers.length == 1) {
+				MessageDialog
+				.openInformation(
+						view.getSite().getShell(),
+						MarkerMessages.resolveMarkerAction_dialogTitle,
+						NLS	.bind(MarkerMessages.MarkerResolutionDialog_NoResolutionsFound,
+								new Object[] { markerDescription }));
+			} else {
+				MessageDialog
+				.openInformation(
+						view.getSite().getShell(),
+						MarkerMessages.resolveMarkerAction_dialogTitle,
+						MarkerMessages.MarkerResolutionDialog_NoResolutionsFoundForMultiSelection);
+				
+			}
 		} else {
 
 			String description = NLS.bind(
 					MarkerMessages.MarkerResolutionDialog_Description,
 					markerDescription);
 
-			Wizard wizard = new QuickFixWizard(description, resolutions, view
+			Wizard wizard= new QuickFixWizard(description, selectedMarkers, resolutionsMap, view
 					.getSite());
 			wizard.setWindowTitle(MarkerMessages.resolveMarkerAction_dialogTitle);
 			WizardDialog dialog = new QuickFixWizardDialog(view.getSite()
@@ -157,4 +166,23 @@
 		}
 		return this;
 	}
+
+	/**
+	 * Checks whether the given extent contains all all but the first element from the given array.
+	 * 
+	 * @param extent the array which should contain the elements
+	 * @param members the elements to check
+	 * @return <code>true</code> if all but the first element are inside the extent
+	 * @since 3.7
+	 */
+	private static boolean containsAllButFirst(Object[] extent, Object[] members) {
+		outer: for (int i= 1; i < members.length; i++) {
+			for (int j= 0; j < extent.length; j++) {
+				if (members[i] == extent[j])
+					continue outer;
+			}
+			return false;
+		}
+		return true;
+	}
 }
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixPage.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixPage.java
index 584e7f3..23955fd 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixPage.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@
 import java.util.Collection;
 import java.util.Map;
 
+import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.dialogs.Dialog;
@@ -31,10 +32,10 @@
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.ITableLabelProvider;
 import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.ListViewer;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.jface.wizard.WizardPage;
@@ -54,10 +55,12 @@
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableColumn;
 import org.eclipse.ui.IMarkerResolution;
-import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IMarkerResolution2;
 import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.OpenAndLinkWithEditorHelper;
+import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
 import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
 import org.eclipse.ui.statushandlers.StatusManager;
 import org.eclipse.ui.views.markers.WorkbenchMarkerResolution;
@@ -73,24 +76,26 @@
 public class QuickFixPage extends WizardPage {
 
 	private Map resolutions;
-	private ListViewer resolutionsList;
+
+	private TableViewer resolutionsList;
 	private CheckboxTableViewer markersTable;
 	private IWorkbenchPartSite site;
+	private final IMarker[] selectedMarkers;
+
 
 	/**
 	 * Create a new instance of the receiver.
 	 * 
-	 * @param problemDescription
-	 *            the description of the problem being fixed
-	 * @param resolutions
-	 *            {@link Map} with key of {@link IMarkerResolution} and value of
+	 * @param problemDescription the description of the problem being fixed
+	 * @param selectedMarkers the selected markers
+	 * @param resolutions {@link Map} with key of {@link IMarkerResolution} and value of
 	 *            {@link Collection} of {@link IMarker}
-	 * @param site
-	 *            The IWorkbenchPartSite to show markers
+	 * @param site The IWorkbenchPartSite to show markers
 	 */
-	public QuickFixPage(String problemDescription, Map resolutions,
+	public QuickFixPage(String problemDescription, IMarker[] selectedMarkers, Map resolutions,
 			IWorkbenchPartSite site) {
 		super(problemDescription);
+		this.selectedMarkers= selectedMarkers;
 		this.resolutions = resolutions;
 		this.site = site;
 		setTitle(MarkerMessages.resolveMarkerAction_dialogTitle);
@@ -161,7 +166,9 @@
 		resolutionsList.setSelection(new StructuredSelection(resolutionsList
 				.getElementAt(0)));
 
-		markersTable.setAllChecked(true);
+		markersTable.setCheckedElements(selectedMarkers);
+		
+		setPageComplete(markersTable.getCheckedElements().length > 0);
 	}
 
 	/**
@@ -220,7 +227,7 @@
 	 * @param control
 	 */
 	private void createResolutionsList(Composite control) {
-		resolutionsList = new ListViewer(control, SWT.BORDER | SWT.SINGLE
+		resolutionsList= new TableViewer(control, SWT.BORDER | SWT.SINGLE
 				| SWT.V_SCROLL);
 		resolutionsList.setContentProvider(new IStructuredContentProvider() {
 			/*
@@ -262,6 +269,16 @@
 			public String getText(Object element) {
 				return ((IMarkerResolution) element).getLabel();
 			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+			 * @since 3.7
+			 */
+			public Image getImage(Object element) {
+				return element instanceof IMarkerResolution2 ? ((IMarkerResolution2)element).getImage() : null;
+			}
 		});
 
 		resolutionsList.setInput(this);
@@ -287,19 +304,9 @@
 					 * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
 					 */
 					public void selectionChanged(SelectionChangedEvent event) {
-
 						markersTable.refresh();
-
-						IWorkbenchWindow window = PlatformUI.getWorkbench()
-								.getActiveWorkbenchWindow();
-						if (window == null)
-							return;
-						IWorkbenchPage page = window.getActivePage();
-						if (page == null)
-							return;
-
+						setPageComplete(markersTable.getCheckedElements().length > 0);
 					}
-
 				});
 	}
 
@@ -455,25 +462,32 @@
 			}
 		});
 
-		markersTable
-				.addSelectionChangedListener(new ISelectionChangedListener() {
-					/*
-					 * (non-Javadoc)
-					 * 
-					 * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
-					 */
-					public void selectionChanged(SelectionChangedEvent event) {
+		new OpenAndLinkWithEditorHelper(markersTable) {
+			
+			{ setLinkWithEditor(false); }
 
-						if (event.getSelection().isEmpty())
-							return;
-						IMarker marker = (IMarker) ((IStructuredSelection) event
-								.getSelection()).getFirstElement();
-						ExtendedMarkersView.openMarkerInEditor(marker, site
-								.getPage());
+			protected void activate(ISelection selection) {
+				open(selection, true);
+			}
 
+			/** Not supported*/
+			protected void linkToEditor(ISelection selection) {
+			}
+			
+			protected void open(ISelection selection, boolean activate) {
+				if (selection.isEmpty())
+					return;
+				IMarker marker = (IMarker) ((IStructuredSelection) selection)
+						.getFirstElement();
+				if (marker != null && marker.getResource() instanceof IFile) {
+					try {
+						IDE.openEditor(site.getPage(), marker, activate);
+					} catch (PartInitException e) {
+						MarkerSupportInternalUtilities.showViewError(e);
 					}
-				});
-
+				}
+			}
+		};
 		markersTable.setInput(this);
 	}
 
@@ -514,15 +528,6 @@
 		return null;
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
-	 */
-	public boolean isPageComplete() {
-		return true;
-	}
-
 	/**
 	 * Finish has been pressed. Process the resolutions. monitor the monitor to
 	 * report to.
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixWizard.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixWizard.java
index 26bb848..e066500 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixWizard.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,6 +36,7 @@
  */
 class QuickFixWizard extends Wizard {
 
+	private IMarker[] selectedMarkers;
 	private Map resolutionMap;
 	private String description;
 	private IWorkbenchPartSite partSite;
@@ -44,12 +45,12 @@
 	 * Create the wizard with the map of resolutions.
 	 * 
 	 * @param description the description of the problem
-	 * @param resolutions
-	 *            Map key {@link IMarkerResolution} value {@link IMarker} []
+	 * @param selectedMarkers the markers that were selected
+	 * @param resolutions Map key {@link IMarkerResolution} value {@link IMarker} []
 	 * @param site the {@link IWorkbenchPartSite} to open the markers in
 	 */
-	public QuickFixWizard(String description,Map resolutions, IWorkbenchPartSite site) {
-		super();
+	public QuickFixWizard(String description, IMarker[] selectedMarkers, Map resolutions, IWorkbenchPartSite site) {
+		this.selectedMarkers= selectedMarkers;
 		this.resolutionMap = resolutions;
 		this.description = description;
 		partSite = site;
@@ -66,7 +67,7 @@
 	 */
 	public void addPages() {
 		super.addPages();
-		addPage(new QuickFixPage(description,resolutionMap,partSite));
+		addPage(new QuickFixPage(description, selectedMarkers, resolutionMap, partSite));
 	}
 
 	/*
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/SortFieldContribution.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/SortFieldContribution.java
index cff6aa8..2879a0c 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/SortFieldContribution.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/SortFieldContribution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,8 +51,11 @@
 	 * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
 	 */
 	protected IContributionItem[] getContributionItems() {
+		ExtendedMarkersView view = getView();
+		if (view == null)
+			return new IContributionItem[0];
 
-		MarkerField[] fields = getView().getVisibleFields();
+		MarkerField[] fields = view.getVisibleFields();
 
 		if (fields.length == 0)
 			return new IContributionItem[0];
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TasksView.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TasksView.java
index 9e47707..770aaf2 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TasksView.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TasksView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,12 +8,17 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  ******************************************************************************/
-
 package org.eclipse.ui.internal.views.markers;
 
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
 import org.eclipse.ui.views.markers.MarkerSupportView;
+import org.eclipse.ui.views.markers.internal.MarkerMessages;
 import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
 
+
 /**
  * TasksView is the ide view for showing tasks.
  * @since 3.4
@@ -28,4 +33,23 @@
 		super(MarkerSupportRegistry.TASKS_GENERATOR);
 		
 	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.views.markers.internal.MarkerView#getUndoContext()
+	 * @since 3.7
+	 */
+	protected IUndoContext getUndoContext() {
+		return WorkspaceUndoUtil.getTasksUndoContext();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.views.markers.ExtendedMarkersView#getDeleteOperationName(org.eclipse.core.resources.IMarker[])
+	 * @since 3.7
+	 */
+	protected String getDeleteOperationName(IMarker[] markers) {
+		Assert.isLegal(markers.length > 0);
+		return markers.length == 1 ? MarkerMessages.deleteTaskMarker_operationName : MarkerMessages.deleteTaskMarkers_operationName;
+	}
+
 }
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TypesConfigurationArea.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TypesConfigurationArea.java
index 3a6bd52..9833332 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TypesConfigurationArea.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TypesConfigurationArea.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -315,7 +315,7 @@
 		gridData.widthHint = Dialog.convertVerticalDLUsToPixels(
 				getFontMetrics(), 100);
 		gridData.heightHint = Dialog.convertVerticalDLUsToPixels(
-				getFontMetrics(), 75);
+				getFontMetrics(), 50);
 
 		final ITreeContentProvider typesContentProvider = getTypesContentProvider();
 		typesViewer.getControl().setLayoutData(gridData);
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ViewerColumnsDialog.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ViewerColumnsDialog.java
new file mode 100644
index 0000000..fe195a4
--- /dev/null
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ViewerColumnsDialog.java
@@ -0,0 +1,994 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.views.markers;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Random;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.views.markers.internal.MarkerMessages;
+
+/**
+ * This was introduced as a fix to Bug 231081 and related, as an effort to
+ * combine the columns and preference dialogs into one. It should be noted that
+ * the class can be re-used or turned into a tool for column viewers in general,
+ * but with some modifications. See example attached at the end of this class
+ * 
+ * @since 3.7
+ * 
+ * @author Hitesh Soliwal
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ * 
+ */
+abstract class ViewerColumnsDialog extends ViewerSettingsAndStatusDialog {
+
+	/** The list contains columns that are currently visible in viewer */
+	private List visible;
+
+	/** The list contains columns that are note shown in viewer */
+	private List nonVisible;
+
+	private TableViewer visibleViewer, nonVisibleViewer;
+
+	private Button upButton, downButton;
+
+	private Button toVisibleBtt, toNonVisibleBtt;
+
+	private Label widthLabel;
+	private Text widthText;
+
+	private Point tableLabelSize;
+
+	/**
+	 * Create a new instance of the receiver.
+	 * 
+	 * @param parentShell
+	 */
+	ViewerColumnsDialog(Shell parentShell) {
+		super(parentShell);
+	}
+
+	/**
+	 * Initialize visible /non-visible columns.
+	 * 
+	 * @param columnObjs
+	 */
+	void setColumnsObjs(Object[] columnObjs) {
+		IColumnInfoProvider columnInfo = doGetColumnInfoProvider();
+		IColumnUpdater updater = doGetColumnUpdater();
+		List visible = getVisible();
+		List nonVisible = getNonVisible();
+		visible.clear();
+		nonVisible.clear();
+		Object data = null;
+		for (int i = 0; i < columnObjs.length; i++) {
+			data = columnObjs[i];
+			if (columnInfo.isColumnVisible(data)) {
+				updater.setColumnVisible(data, true);
+				updater.setColumnIndex(data, visible.size());
+				visible.add(data);
+			} else {
+				updater.setColumnVisible(data, false);
+				updater.setColumnIndex(data, nonVisible.size());
+				nonVisible.add(data);
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.views.markers.ViewerSettingsAndStatusDialog#
+	 * createDialogContentArea(org.eclipse.swt.widgets.Composite)
+	 */
+	protected Control createDialogContentArea(Composite dialogArea) {
+		Composite composite = new Composite(dialogArea, SWT.NONE);
+		GridLayout gridLayout = new GridLayout(4, false);
+		gridLayout.marginHeight = 0;
+		composite.setLayout(gridLayout);
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		createInvisibleTable(composite);
+		createMoveButtons(composite);
+		createVisibleTable(composite);
+		createUpDownBtt(composite);
+		createWidthArea(composite);
+		Object element = visibleViewer.getElementAt(0);
+		if (element != null)
+			visibleViewer.setSelection(new StructuredSelection(element));
+		visibleViewer.getTable().setFocus();
+		return composite;
+	}
+
+	/**
+	 * The Up and Down button to change column ordering.
+	 * 
+	 * @param parent
+	 */
+	Control createUpDownBtt(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout compositeLayout = new GridLayout();
+		compositeLayout.marginHeight = 0;
+		compositeLayout.marginWidth = 0;
+		composite.setLayout(compositeLayout);
+		composite.setLayoutData(new GridData(SWT.NONE, SWT.FILL, false, true));
+		
+		Composite bttArea = new Composite(composite, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginHeight = 0;
+		bttArea.setLayout(layout);
+		bttArea.setLayoutData(new GridData(SWT.NONE, SWT.CENTER, false, true));
+		upButton = new Button(bttArea, SWT.PUSH);
+		upButton.setText(JFaceResources.getString("ConfigureColumnsDialog_up")); //$NON-NLS-1$
+		upButton.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				handleUpButton(event);
+			}
+		});
+		setButtonLayoutData(upButton);
+		((GridData)upButton.getLayoutData()).verticalIndent = tableLabelSize.y;
+		upButton.setEnabled(false);
+
+		downButton = new Button(bttArea, SWT.PUSH);
+		downButton.setText(JFaceResources
+				.getString("ConfigureColumnsDialog_down")); //$NON-NLS-1$
+		downButton.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				handleDownButton(event);
+			}
+		});
+		setButtonLayoutData(downButton);
+		downButton.setEnabled(false);
+		return bttArea;
+	}
+
+	/**
+	 * Create the controls responsible to display/edit column widths.
+	 * 
+	 * @param parent
+	 * @return {@link Control}
+	 */
+	Control createWidthArea(Composite parent) {
+
+		Label dummy = new Label(parent, SWT.NONE);
+		dummy.setLayoutData(new GridData(SWT.NONE, SWT.NONE, false, false, 2, 1));
+		
+		Composite widthComposite = new Composite(parent, SWT.NONE);
+		GridLayout gridLayout = new GridLayout(2, false);
+		gridLayout.marginHeight = 0;
+		widthComposite.setLayout(gridLayout);
+		widthComposite.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));
+		
+		widthLabel = new Label(widthComposite, SWT.NONE);
+		widthLabel.setText(MarkerMessages.MarkerPreferences_WidthOfShownColumn);
+		GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+		widthLabel.setLayoutData(gridData);
+
+		widthText = new Text(widthComposite, SWT.BORDER);
+		widthText.addVerifyListener(new VerifyListener() {
+
+			public void verifyText(VerifyEvent e) {
+				if (e.character != 0 && e.keyCode != SWT.BS
+						&& e.keyCode != SWT.DEL
+						&& !Character.isDigit(e.character)) {
+					e.doit = false;
+				}
+			}
+		});
+
+		gridData = new GridData();
+		gridData.widthHint = convertWidthInCharsToPixels(5);
+		widthText.setLayoutData(gridData);
+		widthText.addModifyListener(new ModifyListener() {
+
+			public void modifyText(ModifyEvent e) {
+				updateWidth();
+			}
+		});
+		setWidthEnabled(false);
+		return widthText;
+	}
+
+	private void setWidthEnabled(boolean enabled) {
+		widthLabel.setEnabled(enabled);
+		widthText.setEnabled(enabled);
+	}
+
+	/**
+	 * Creates the table that lists out visible columns in the viewer
+	 * 
+	 * @param parent
+	 * @return {@link Control}
+	 */
+	Control createVisibleTable(Composite parent) {
+
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout gridLayout = new GridLayout(1, false);
+		gridLayout.marginHeight =0;
+		composite.setLayout(gridLayout);
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		Label label = new Label(composite, SWT.NONE);
+		label.setText(MarkerMessages.MarkerPreferences_VisibleColumnsTitle);
+
+		final Table table = new Table(composite, SWT.BORDER | SWT.MULTI);
+		GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		data.widthHint = convertWidthInCharsToPixels(20);
+		data.heightHint = table.getItemHeight() * 15;
+		table.setLayoutData(data);
+
+		final TableColumn column = new TableColumn(table, SWT.NONE);
+		column.setText(MarkerMessages.MarkerPreferences_VisibleColumnsTitle);
+		Listener columnResize = new Listener() {
+			public void handleEvent(Event event) {
+				column.setWidth(table.getClientArea().width);
+			}
+		};
+		table.addListener(SWT.Resize, columnResize);
+
+		visibleViewer = new TableViewer(table);
+		visibleViewer.setLabelProvider(doGetLabelProvider());
+		visibleViewer.setContentProvider(ArrayContentProvider.getInstance());
+		visibleViewer
+				.addSelectionChangedListener(new ISelectionChangedListener() {
+					public void selectionChanged(SelectionChangedEvent event) {
+						handleVisibleSelection(event.getSelection());
+					}
+				});
+		table.addListener(SWT.MouseDoubleClick, new Listener() {
+			public void handleEvent(Event event) {
+				handleToNonVisibleButton(event);
+			}
+		});
+		visibleViewer.setInput(getVisible());
+		return table;
+	}
+
+	/**
+	 * Creates the table that lists out non-visible columns in the viewer
+	 * 
+	 * @param parent
+	 * @return {@link Control}
+	 */
+	Control createInvisibleTable(Composite parent) {
+
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout gridLayout = new GridLayout(1, false);
+		gridLayout.marginHeight = 0;
+		composite.setLayout(gridLayout);
+
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		Label label = new Label(composite, SWT.NONE);
+		label.setText(MarkerMessages.MarkerPreferences_HiddenColumnsTitle);
+		applyDialogFont(label);
+		tableLabelSize = label.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+
+		final Table table = new Table(composite, SWT.BORDER | SWT.MULTI);
+		GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		data.widthHint = convertWidthInCharsToPixels(20);
+		data.heightHint = table.getItemHeight() * 15;
+		table.setLayoutData(data);
+
+		final TableColumn column = new TableColumn(table, SWT.NONE);
+		column.setText(MarkerMessages.MarkerPreferences_HiddenColumnsTitle);
+		Listener columnResize = new Listener() {
+			public void handleEvent(Event event) {
+				column.setWidth(table.getClientArea().width);
+			}
+		};
+		table.addListener(SWT.Resize, columnResize);
+
+		nonVisibleViewer = new TableViewer(table);
+		nonVisibleViewer.setLabelProvider(doGetLabelProvider());
+		nonVisibleViewer.setContentProvider(ArrayContentProvider.getInstance());
+		nonVisibleViewer
+				.addSelectionChangedListener(new ISelectionChangedListener() {
+					public void selectionChanged(SelectionChangedEvent event) {
+						handleNonVisibleSelection(event.getSelection());
+					}
+				});
+		table.addListener(SWT.MouseDoubleClick, new Listener() {
+			public void handleEvent(Event event) {
+				handleToVisibleButton(event);
+			}
+		});
+		nonVisibleViewer.setInput(getNonVisible());
+		return table;
+	}
+
+	/**
+	 * Creates buttons for moving columns from non-visible to visible and
+	 * vice-versa
+	 * 
+	 * @param parent
+	 * @return {@link Control}
+	 */
+	Control createMoveButtons(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout compositeLayout = new GridLayout();
+		compositeLayout.marginHeight = 0;
+		compositeLayout.marginWidth = 0;
+		composite.setLayout(compositeLayout);
+		composite.setLayoutData(new GridData(SWT.NONE, SWT.FILL, false, true));
+
+		Composite bttArea = new Composite(composite, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginHeight = 0;
+		bttArea.setLayout(layout);
+		bttArea.setLayoutData(new GridData(SWT.NONE, SWT.CENTER, false, true));
+
+		toVisibleBtt = new Button(bttArea, SWT.PUSH);
+		toVisibleBtt.setText(MarkerMessages.MarkerPreferences_MoveRight);
+		setButtonLayoutData(toVisibleBtt);
+		((GridData)toVisibleBtt.getLayoutData()).verticalIndent = tableLabelSize.y;
+		toVisibleBtt.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				handleToVisibleButton(event);
+			}
+		});
+		toVisibleBtt.setEnabled(false);
+
+		toNonVisibleBtt = new Button(bttArea, SWT.PUSH);
+		toNonVisibleBtt.setText(MarkerMessages.MarkerPreferences_MoveLeft);
+		setButtonLayoutData(toNonVisibleBtt);
+
+		toNonVisibleBtt.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				handleToNonVisibleButton(event);
+			}
+		});
+		toNonVisibleBtt.setEnabled(false);
+
+		return bttArea;
+	}
+
+	/**
+	 * Handles a selection change in the viewer that lists out the non-visible
+	 * columns
+	 * 
+	 * @param selection
+	 */
+	void handleNonVisibleSelection(ISelection selection) {
+		Object[] nvKeys = ((IStructuredSelection) selection).toArray();
+		toVisibleBtt.setEnabled(nvKeys.length > 0);
+		if (visibleViewer.getControl().isFocusControl()
+				&& getVisible().size() <= 1) {
+			handleStatusUdpate(IStatus.INFO,
+					MarkerMessages.MarkerPreferences_AtLeastOneVisibleColumn);
+		} else {
+			handleStatusUdpate(IStatus.INFO, getDefaultMessage());
+		}
+	}
+
+	/**
+	 * Handles a selection change in the viewer that lists out the visible
+	 * columns. Takes care of various enablements.
+	 * 
+	 * @param selection
+	 */
+	void handleVisibleSelection(ISelection selection) {
+		List selVCols = ((IStructuredSelection) selection).toList();
+		List allVCols = getVisible();
+		toNonVisibleBtt.setEnabled(selVCols.size() > 0
+				&& allVCols.size() > selVCols.size());
+
+		IColumnInfoProvider infoProvider = doGetColumnInfoProvider();
+		boolean moveDown = !selVCols.isEmpty(), moveUp = !selVCols.isEmpty();
+		Iterator iterator = selVCols.iterator();
+		while (iterator.hasNext()) {
+			Object columnObj = iterator.next();
+			if (!infoProvider.isColumnMovable(columnObj)) {
+				moveUp = false;
+				moveDown = false;
+				break;
+			}
+			int i = allVCols.indexOf(columnObj);
+			if (i == 0) {
+				moveUp = false;
+				if (!moveDown) {
+					break;
+				}
+			}
+			if (i == (allVCols.size() - 1)) {
+				moveDown = false;
+				if (!moveUp) {
+					break;
+				}
+			}
+		}
+		upButton.setEnabled(moveUp);
+		downButton.setEnabled(moveDown);
+
+		boolean edit = selVCols.size() == 1 ? infoProvider
+				.isColumnResizable(selVCols.get(0)) : false;
+		setWidthEnabled(edit);
+		if (edit) {
+			int width = infoProvider.getColumnWidth(selVCols.get(0));
+			widthText.setText(Integer.toString(width));
+		} else {
+			widthText.setText(""); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Applies to visible columns, and handles the changes in the order of
+	 * columns
+	 * 
+	 * @param e
+	 *            event from the button click
+	 */
+	void handleDownButton(Event e) {
+		IStructuredSelection selection = (IStructuredSelection) visibleViewer
+				.getSelection();
+		Object[] selVCols = selection.toArray();
+		List allVCols = getVisible();
+		IColumnUpdater updater = doGetColumnUpdater();
+		for (int i = selVCols.length - 1; i >= 0; i--) {
+			Object colObj = selVCols[i];
+			int index = allVCols.indexOf(colObj);
+			updater.setColumnIndex(colObj, index + 1);
+			allVCols.remove(index);
+			allVCols.add(index + 1, colObj);
+		}
+		visibleViewer.refresh();
+		handleVisibleSelection(selection);
+	}
+
+	/**
+	 * Applies to visible columns, and handles the changes in the order of
+	 * columns
+	 * 
+	 * @param e
+	 *            event from the button click
+	 */
+	void handleUpButton(Event e) {
+		IStructuredSelection selection = (IStructuredSelection) visibleViewer
+				.getSelection();
+		Object[] selVCols = selection.toArray();
+		List allVCols = getVisible();
+		IColumnUpdater updater = doGetColumnUpdater();
+		for (int i = 0; i < selVCols.length; i++) {
+			Object colObj = selVCols[i];
+			int index = allVCols.indexOf(colObj);
+			updater.setColumnIndex(colObj, index - 1);
+			allVCols.remove(index);
+			allVCols.add(index - 1, colObj);
+		}
+		visibleViewer.refresh();
+		handleVisibleSelection(selection);
+	}
+
+	/**
+	 * Moves selected columns from non-visible to visible state
+	 * 
+	 * @param e
+	 *            event from the button click
+	 */
+	void handleToVisibleButton(Event e) {
+		IStructuredSelection selection = (IStructuredSelection) nonVisibleViewer
+				.getSelection();
+		List selVCols = selection.toList();
+		List nonVisible = getNonVisible();
+		nonVisible.removeAll(selVCols);
+
+		List list = getVisible();
+		list.addAll(selVCols);
+
+		updateVisibility(selVCols, true);
+		updateIndices(getVisible());
+		updateIndices(getNonVisible());
+
+		visibleViewer.refresh();
+		visibleViewer.setSelection(selection);
+		nonVisibleViewer.refresh();
+		handleVisibleSelection(selection);
+		handleNonVisibleSelection(nonVisibleViewer.getSelection());
+
+	}
+
+	/**
+	 * Moves selected columns from visible to non-visible state
+	 * 
+	 * @param e
+	 *            event from the button click
+	 */
+	protected void handleToNonVisibleButton(Event e) {
+		if (visibleViewer.getControl().isFocusControl()
+				&& getVisible().size() <= 1) {
+			handleStatusUdpate(IStatus.INFO,
+					MarkerMessages.MarkerPreferences_AtLeastOneVisibleColumn);
+			return;
+		}
+		IStructuredSelection selection = (IStructuredSelection) visibleViewer
+				.getSelection();
+		List selVCols = selection.toList();
+		getVisible().removeAll(selVCols);
+		getNonVisible().addAll(selVCols);
+
+		updateVisibility(selVCols, false);
+		updateIndices(getVisible());
+		updateIndices(getNonVisible());
+
+		nonVisibleViewer.refresh();
+		nonVisibleViewer.setSelection(selection);
+		visibleViewer.refresh();
+		handleVisibleSelection(visibleViewer.getSelection());
+		handleNonVisibleSelection(nonVisibleViewer.getSelection());
+	}
+
+	void updateIndices(List list) {
+		ListIterator iterator = list.listIterator();
+		IColumnUpdater updater = doGetColumnUpdater();
+		while (iterator.hasNext()) {
+			updater.setColumnIndex(iterator.next(), iterator.previousIndex());
+		}
+	}
+
+	void updateVisibility(List list, boolean visibility) {
+		IColumnUpdater updater = doGetColumnUpdater();
+		Iterator iterator = list.iterator();
+		while (iterator.hasNext()) {
+			updater.setColumnVisible(iterator.next(), visibility);
+		}
+	}
+	
+	protected void performDefaults() {
+		refreshViewers();
+		super.performDefaults();
+	}
+
+	/**
+	 * Updates the UI based on values of the variable
+	 */
+	void refreshViewers() {
+		if (nonVisibleViewer != null) {
+			nonVisibleViewer.refresh();
+		}
+		if (visibleViewer != null) {
+			visibleViewer.refresh();
+		}
+	}
+
+	/**
+	 * @return List of visible columns
+	 */
+	public List getVisible() {
+		if (visible == null) {
+			visible = new ArrayList();
+		}
+		return visible;
+	}
+
+	/**
+	 * @return List of non-visible columns
+	 */
+	public List getNonVisible() {
+		if (nonVisible == null) {
+			nonVisible = new ArrayList();
+		}
+		return nonVisible;
+	}
+
+	/**
+	 * An adapter class to {@link ITableLabelProvider}
+	 * 
+	 */
+	class TableLabelProvider extends LabelProvider implements
+			ITableLabelProvider {
+		public Image getColumnImage(Object element, int columnIndex) {
+			return null;
+		}
+
+		public String getColumnText(Object element, int columnIndex) {
+			return getText(element);
+		}
+	}
+
+	/**
+	 * Internal helper to @see {@link ViewerColumnsDialog#getLabelProvider()}
+	 */
+	ITableLabelProvider doGetLabelProvider() {
+		return getLabelProvider();
+	}
+
+	/**
+	 * The tables-columns need to be displayed appropriately. The supplied
+	 * column objects are adapted to text and image as dictacted by this
+	 * {@link ITableLabelProvider}
+	 */
+	protected abstract ITableLabelProvider getLabelProvider();
+
+	/**
+	 * Internal helper to @see
+	 * {@link ViewerColumnsDialog#getColumnInfoProvider()}
+	 */
+	IColumnInfoProvider doGetColumnInfoProvider() {
+		return getColumnInfoProvider();
+	}
+
+	/**
+	 * To configure the columns we need further information. The supplied column
+	 * objects are adapted for its properties via {@link IColumnInfoProvider}
+	 */
+	protected abstract IColumnInfoProvider getColumnInfoProvider();
+
+	/**
+	 * Internal helper to @see {@link ViewerColumnsDialog#getColumnUpdater()}
+	 */
+	IColumnUpdater doGetColumnUpdater() {
+		return getColumnUpdater();
+	}
+
+	/**
+	 * To configure properties/order of the columns is achieved via
+	 * {@link IColumnUpdater}
+	 */
+	protected abstract IColumnUpdater getColumnUpdater();
+
+	/**
+	 * 
+	 */
+	private void updateWidth() {
+		try {
+			int width = Integer.parseInt(widthText.getText());
+			Object data = ((IStructuredSelection) visibleViewer.getSelection())
+					.getFirstElement();
+			if (data != null) {
+				IColumnUpdater updater = getColumnUpdater();
+				updater.setColumnWidth(data, width);
+			}
+		} catch (NumberFormatException ex) {
+			// ignore
+		}
+	}
+
+	/**
+	 * Update various aspects of a columns from a viewer such
+	 * {@link TableViewer}
+	 */
+	public interface IColumnInfoProvider {
+
+		/**
+		 * Get corresponding index for the column
+		 * 
+		 * @param columnObj
+		 */
+		public int getColumnIndex(Object columnObj);
+
+		/**
+		 * Get the width of the column
+		 * 
+		 * @param columnObj
+		 */
+		public int getColumnWidth(Object columnObj);
+
+		/**
+		 * Returns true if the column represented by parameters is showing in
+		 * the viewer
+		 * 
+		 * @param columnObj
+		 */
+		public boolean isColumnVisible(Object columnObj);
+
+		/**
+		 * Returns true if the column represented by parameters is configured as
+		 * movable
+		 * 
+		 * @param columnObj
+		 */
+		public boolean isColumnMovable(Object columnObj);
+
+		/**
+		 * Returns true if the column represented by parameters is configured as
+		 * resizable
+		 * 
+		 * @param columnObj
+		 */
+		public boolean isColumnResizable(Object columnObj);
+
+	}
+
+	/**
+	 * Update various aspects of a columns from a viewer such
+	 * {@link TableViewer}
+	 */
+	public interface IColumnUpdater {
+
+		/**
+		 * Set the column represented by parameters as visible
+		 * 
+		 * @param columnObj
+		 * @param visible
+		 */
+		public void setColumnVisible(Object columnObj, boolean visible);
+
+		/**
+		 * Dummy method - more a result of symmetry
+		 * 
+		 * @param columnObj
+		 * @param movable
+		 */
+		public void setColumnMovable(Object columnObj, boolean movable);
+
+		/**
+		 * Call back to notify change in the index of the column represented by
+		 * columnObj
+		 * 
+		 * @param columnObj
+		 * @param index
+		 */
+		public void setColumnIndex(Object columnObj, int index);
+
+		/**
+		 * Dummy method - more a result of symmetry
+		 * 
+		 * @param columnObj
+		 * @param resizable
+		 */
+		public void setColumnResizable(Object columnObj, boolean resizable);
+
+		/**
+		 * Call back to notify change in the width of the column represented by
+		 * columnObj
+		 * 
+		 * @param columnObj
+		 * @param newWidth
+		 */
+		public void setColumnWidth(Object columnObj, int newWidth);
+
+	}
+
+	// //////////////////////////////////////////////////////////////////////////////////
+	/**
+	 * Ignore the class below as it is simply meant to test the above. I intend
+	 * to retain this for a while.
+	 */
+	static class TestData {
+
+		final Object key;
+
+		final int keyIndex;
+
+		int newIndex, width;
+
+		boolean visibility, movable, resizable;
+
+		TestData(Object key, int currIndex) {
+			this.key = key;
+			this.keyIndex = currIndex;
+		}
+
+		public int hashCode() {
+			final int prime = 31;
+			int result = 1;
+			result = prime * result + ((key == null) ? 0 : key.hashCode());
+			result = prime * result + keyIndex;
+			return result;
+		}
+
+		public boolean equals(Object obj) {
+			if (this == obj) {
+				return true;
+			}
+			if (obj == null) {
+				return false;
+			}
+			if (!(obj instanceof TestData)) {
+				return false;
+			}
+			TestData other = (TestData) obj;
+			if (key == null) {
+				if (other.key != null) {
+					return false;
+				}
+			} else if (!key.equals(other.key)) {
+				return false;
+			}
+			if (keyIndex != other.keyIndex) {
+				return false;
+			}
+			return true;
+		}
+
+		public String toString() {
+			return key.toString();
+		}
+
+		private static ViewerColumnsDialog getColumnsDialog(Shell shell,
+				final TestData[] colums) {
+			ViewerColumnsDialog dialog = new ViewerColumnsDialog(shell) {
+
+				protected IColumnInfoProvider getColumnInfoProvider() {
+					return getInfoProvider(colums);
+				}
+
+				protected ITableLabelProvider getLabelProvider() {
+					return new TableLabelProvider();
+				}
+
+				protected IColumnUpdater getColumnUpdater() {
+					return getUpdater(colums);
+				}
+			};
+			dialog.setColumnsObjs(colums);
+			return dialog;
+		}
+
+		private static IColumnUpdater getUpdater(final TestData[] data) {
+			return new IColumnUpdater() {
+
+				public void setColumnWidth(Object columnObj, int newWidth) {
+					((TestData) columnObj).width = newWidth;
+				}
+
+				public void setColumnVisible(Object columnObj, boolean visible) {
+					((TestData) columnObj).visibility = visible;
+				}
+
+				public void setColumnResizable(Object columnObj,
+						boolean resizable) {
+
+				}
+
+				public void setColumnMovable(Object columnObj, boolean movable) {
+					((TestData) columnObj).movable = movable;
+
+				}
+
+				public void setColumnIndex(Object columnObj, int index) {
+					((TestData) columnObj).newIndex = index;
+				}
+			};
+		}
+
+		private static IColumnInfoProvider getInfoProvider(
+				final TestData[] colData) {
+			return new IColumnInfoProvider() {
+
+				public boolean isColumnVisible(Object columnObj) {
+					return ((TestData) columnObj).visibility;
+				}
+
+				public boolean isColumnResizable(Object columnObj) {
+					return ((TestData) columnObj).resizable;
+				}
+
+				public boolean isColumnMovable(Object columnObj) {
+					return ((TestData) columnObj).movable;
+				}
+
+				public int getColumnWidth(Object columnObj) {
+					return ((TestData) columnObj).width;
+				}
+
+				public int getColumnIndex(Object columnObj) {
+					return ((TestData) columnObj).newIndex;
+				}
+			};
+		}
+
+		private static TestData[] genData(int count) {
+			String[] cols = new String[count];
+			for (int i = 0; i < cols.length; i++) {
+				cols[i] = new String("Column-" + (i + 1)); //$NON-NLS-1$
+			}
+			Random random = new Random();
+
+			boolean[] visibility = new boolean[cols.length];
+			Arrays.fill(visibility, true);
+			int ranInt = random.nextInt() % cols.length;
+			for (int i = 0; i < ranInt; i++) {
+				visibility[random.nextInt(ranInt)] = false;
+			}
+
+			boolean[] resizable = new boolean[cols.length];
+			Arrays.fill(resizable, true);
+			ranInt = random.nextInt() % cols.length;
+			for (int i = 0; i < ranInt; i++) {
+				resizable[random.nextInt(ranInt)] = false;
+			}
+
+			boolean[] movable = new boolean[cols.length];
+			Arrays.fill(movable, true);
+			ranInt = random.nextInt() % cols.length;
+			for (int i = 0; i < ranInt; i++) {
+				movable[random.nextInt(ranInt)] = false;
+			}
+
+			int[] widths = new int[cols.length];
+			Arrays.fill(widths, 100);
+			return TestData.generateColumnsData(cols, visibility, resizable,
+					movable, widths);
+		}
+
+		public static TestData[] generateColumnsData(Object[] keys,
+				boolean[] visibility, boolean[] resizable, boolean[] movable,
+				int[] widths) {
+			TestData[] colData = new TestData[keys.length];
+			int m = 0, n = 0;
+			for (int i = 0; i < colData.length; i++) {
+				TestData data = new TestData(keys[i], i);
+				data.visibility = visibility[i];
+				data.resizable = resizable[i];
+				data.movable = movable[i];
+				data.width = widths[i];
+				if (data.visibility) {
+					data.newIndex = m++;
+				} else {
+					data.newIndex = n++;
+				}
+				colData[i] = data;
+			}
+			return colData;
+		}
+
+		/**
+		 * Demo
+		 * 
+		 * @param args
+		 */
+		public static void main(String[] args) {
+			Display display = new Display();
+			final Shell shell = new Shell(display);
+			shell.setLayout(new FillLayout());
+			ViewerColumnsDialog dialog = getColumnsDialog(shell, genData(100));
+			dialog.open();
+			shell.dispose();
+			while (!shell.isDisposed()) {
+				if (!display.readAndDispatch()) {
+					display.sleep();
+				}
+			}
+			display.dispose();
+
+		}
+
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ViewerSettingsAndStatusDialog.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ViewerSettingsAndStatusDialog.java
new file mode 100644
index 0000000..955b960
--- /dev/null
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ViewerSettingsAndStatusDialog.java
@@ -0,0 +1,300 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.views.markers;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.preferences.ViewSettingsDialog;
+
+/**
+ * @since 3.7
+ * @author Hitesh Soliwal
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public abstract class ViewerSettingsAndStatusDialog extends ViewSettingsDialog {
+
+	private Label imageLabel;
+	/** The message area */
+	private Text messageArea;
+	private Composite msgParent;
+
+	/**
+	 * @param parentShell
+	 */
+	public ViewerSettingsAndStatusDialog(Shell parentShell) {
+		super(parentShell);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets
+	 * .Shell)
+	 */
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.window.Window#getShellStyle()
+	 */
+	protected int getShellStyle() {
+		return super.getShellStyle() | SWT.RESIZE;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.Dialog#getInitialSize()
+	 */
+	protected Point getInitialSize() {
+		Point size = super.getInitialSize();
+		size.y += convertHeightInCharsToPixels(3);
+		return size;
+	}
+
+	protected Control createDialogArea(Composite parent) {
+
+		Composite dialogArea = (Composite) super.createDialogArea(parent);
+
+		dialogArea.setLayout(new GridLayout(1, true));
+
+		initializeDialogUnits(dialogArea);
+
+		createMessageArea(dialogArea).setLayoutData(
+				new GridData(SWT.FILL, SWT.NONE, true, false));
+
+		createDialogContentArea(dialogArea).setLayoutData(
+				new GridData(SWT.FILL, SWT.FILL, true, true));
+
+		applyDialogFont(dialogArea);
+
+		initializeDialog();
+
+		return dialogArea;
+	}
+
+	/**
+	 * @param dialogArea
+	 */
+	protected abstract Control createDialogContentArea(Composite dialogArea);
+
+	/**
+	 * 
+	 */
+	protected void initializeDialog() {
+		handleStatusUdpate(IStatus.INFO, getDefaultMessage());
+	}
+
+	/**
+	 * Create message area.
+	 * 
+	 * @param parent
+	 */
+	Control createMessageArea(Composite parent) {
+		msgParent = new Composite(parent, SWT.BORDER);
+		msgParent.setBackground(getMessageBackground());
+		msgParent.setLayout(new GridLayout(2, false));
+
+		imageLabel = new Label(msgParent, SWT.NONE);
+		imageLabel.setBackground(msgParent.getBackground());
+		imageLabel.setImage(JFaceResources
+				.getImage(Dialog.DLG_IMG_MESSAGE_INFO));
+		imageLabel
+				.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+
+		messageArea = new Text(msgParent, SWT.READ_ONLY | SWT.NONE | SWT.WRAP
+				| SWT.MULTI | SWT.V_SCROLL);
+		messageArea.setEditable(false);
+		messageArea.setBackground(msgParent.getBackground());
+		messageArea
+				.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+		return msgParent;
+	}
+
+	/**
+	 * Display the message and an appropriate icon.
+	 * 
+	 * @param status
+	 */
+	protected void handleStatusUdpate(IStatus status) {
+		handleStatusUdpate(status.getSeverity(), status.getMessage());
+	}
+
+	/**
+	 * Display the message and an appropriate icon.
+	 * 
+	 * @param messgage
+	 * @param severity
+	 */
+	protected void handleStatusUdpate(int severity, String messgage) {
+		Image image = null;
+		Button okBttn = getButton(OK);
+		switch (severity) {
+		case IStatus.ERROR: {
+			if (messgage == null) {
+				messgage = getErrorMessage();
+			}
+			image = getErrorImage();
+			break;
+		}
+		case IStatus.WARNING: {
+			image = getWarningImage();
+			break;
+		}
+		case IStatus.OK:
+		case IStatus.INFO:
+		default:
+			image = getInfoImage();
+		}
+		if (messgage == null) {
+			messgage = getDefaultMessage();
+		}
+		if (messgage.equals(MarkerSupportInternalUtilities.EMPTY_STRING)) {
+			handleMessageAreaVisibility(false);
+			image = null;
+		} else {
+			handleMessageAreaVisibility(true);
+		}
+		if (okBttn != null) {
+			okBttn.setEnabled(severity == IStatus.OK
+					|| severity == IStatus.INFO || severity == IStatus.WARNING);
+		}
+		if (msgParent != null) {
+			setMessageImage(image);
+			setMessageText(messgage);
+			msgParent.layout();
+		}
+	}
+
+	/**
+	 * @param image
+	 */
+	protected void setMessageImage(Image image) {
+		if (imageLabel != null) {
+			imageLabel.setImage(image);
+		}
+	}
+
+	/**
+	 * @param messgage
+	 */
+	protected void setMessageText(String messgage) {
+		if (messageArea != null) {
+			messageArea.setText(messgage);
+		}
+	}
+
+	/**
+	 * 
+	 */
+	protected Image getMessageImage() {
+		if (imageLabel != null) {
+			imageLabel.getImage();
+		}
+		return null;
+	}
+
+	/**
+	 */
+	protected String getMessageText() {
+		if (messageArea != null) {
+			return messageArea.getText();
+		}
+		return null;
+	}
+
+	/**
+	 * 
+	 * @param visible
+	 */
+	protected void handleMessageAreaVisibility(boolean visible) {
+		if (msgParent == null || msgParent.isDisposed()) {
+			return;
+		}
+		GridData data = (GridData) msgParent.getLayoutData();
+		if (data.exclude == visible) {
+			data.exclude = !visible;
+			msgParent.setVisible(visible);
+			msgParent.getParent().layout();
+		}
+	}
+
+	/**
+	 * Return the Color to display when dialog is opened.
+	 */
+	protected Color getMessageBackground() {
+		return getShell().getDisplay()
+				.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
+	}
+
+	/**
+	 * Return the message to display when dialog is opened.
+	 */
+	protected String getDefaultMessage() {
+		return MarkerSupportInternalUtilities.EMPTY_STRING;
+	}
+
+	/**
+	 * @return Returns the error message to display for a wrong limit value.
+	 */
+	protected String getErrorMessage() {
+		return JFaceResources.getString("StringFieldEditor.errorMessage"); //$NON-NLS-1$
+	}
+
+	/**
+	 */
+	protected Image getInfoImage() {
+		return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_INFO);
+	}
+
+	/**
+	 */
+	protected Image getWarningImage() {
+		return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING);
+	}
+
+	/**
+	 */
+	protected Image getErrorImage() {
+		return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_ERROR);
+	}
+
+	protected void performDefaults() {
+		super.performDefaults();
+	}
+
+	protected boolean isResizable() {
+		return true;
+	}
+
+	protected void okPressed() {
+		super.okPressed();
+	}
+
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ArchiveFileExportOperation.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ArchiveFileExportOperation.java
index 53710ec..9504059 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ArchiveFileExportOperation.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ArchiveFileExportOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -162,6 +162,20 @@
             throws InterruptedException {
         exportResource(exportResource, 1);
     }
+    
+    /**
+     * Creates and returns the string that should be used as the name of the entry in the archive.
+     * @param exportResource the resource to export
+     * @param leadupDepth the number of resource levels to be included in the path including the resourse itself.
+     */
+    private String createDestinationName(int leadupDepth, IResource exportResource) {
+        IPath fullPath = exportResource.getFullPath();
+        if (createLeadupStructure) {
+        	return fullPath.makeRelative().toString();
+        }
+		return fullPath.removeFirstSegments(
+                fullPath.segmentCount() - leadupDepth).toString();
+    }
 
     /**
      *  Export the passed resource to the destination .zip
@@ -177,14 +191,7 @@
 		}
 
         if (exportResource.getType() == IResource.FILE) {
-            String destinationName;
-            IPath fullPath = exportResource.getFullPath();
-            if (createLeadupStructure) {
-				destinationName = fullPath.makeRelative().toString();
-			} else {
-				destinationName = fullPath.removeFirstSegments(
-                        fullPath.segmentCount() - leadupDepth).toString();
-			}
+        	String destinationName = createDestinationName(leadupDepth, exportResource);
             monitor.subTask(destinationName);
 
             try {
@@ -206,6 +213,15 @@
                 // this should never happen because an #isAccessible check is done before #members is invoked
                 addError(NLS.bind(DataTransferMessages.DataTransfer_errorExporting, exportResource.getFullPath()), e);
             }
+            
+            if (children.length == 0) { // create an entry for empty containers, see bug 278402
+            	String destinationName = createDestinationName(leadupDepth, exportResource);
+                try {
+            		exporter.write((IContainer) exportResource, destinationName + IPath.SEPARATOR);
+                } catch (IOException e) {
+                    addError(NLS.bind(DataTransferMessages.DataTransfer_errorExporting, exportResource.getFullPath().makeRelative(), e.getMessage()), e);
+                }
+            }
 
             for (int i = 0; i < children.length; i++) {
 				exportResource(children[i], leadupDepth + 1);
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java
index e99c29f..aa05a19 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java
@@ -51,8 +51,7 @@
 	public static String FileImport_fromDirectory;
 	public static String FileImport_importFileSystem;
 	public static String FileImport_overwriteExisting;
-	public static String FileImport_createComplete;
-	public static String FileImport_createSelectedFolders;
+	public static String FileImport_createTopLevel;
 	public static String FileImport_createVirtualFolders;
 	public static String FileImport_importElementsAs;
 	public static String FileImport_createVirtualFoldersTooltip;
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceImportPage1.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceImportPage1.java
index 2e49488..3776888 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceImportPage1.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceImportPage1.java
@@ -80,9 +80,7 @@
 
     protected Button overwriteExistingResourcesCheckbox;
 
-    protected Button createContainerStructureButton;
-
-    protected Button createOnlySelectedButton;
+    protected Button createTopLevelFolderCheckbox;
 
     protected Button createVirtualFoldersButton;
 
@@ -286,25 +284,12 @@
         overwriteExistingResourcesCheckbox.setFont(optionsGroup.getFont());
         overwriteExistingResourcesCheckbox.setText(DataTransferMessages.FileImport_overwriteExisting);
 
-        // create containers radio
-        createContainerStructureButton = new Button(optionsGroup, SWT.RADIO);
-        createContainerStructureButton.setFont(optionsGroup.getFont());
-        createContainerStructureButton.setText(DataTransferMessages.FileImport_createComplete);
-        createContainerStructureButton.setSelection(false);
-
-        createContainerStructureButton.addSelectionListener(new SelectionAdapter() {
-        	public void widgetSelected(SelectionEvent e) {
-        		updateWidgetEnablements();
-        	}
-        });
-
-        // create selection only radio
-        createOnlySelectedButton = new Button(optionsGroup, SWT.RADIO);
-        createOnlySelectedButton.setFont(optionsGroup.getFont());
-        createOnlySelectedButton.setText(DataTransferMessages.FileImport_createSelectedFolders);
-        createOnlySelectedButton.setSelection(true);
-
-        createOnlySelectedButton.addSelectionListener(new SelectionAdapter() {
+        // create top-level folder check box
+        createTopLevelFolderCheckbox= new Button(optionsGroup, SWT.CHECK);
+        createTopLevelFolderCheckbox.setFont(optionsGroup.getFont());
+        createTopLevelFolderCheckbox.setText(DataTransferMessages.FileImport_createTopLevel);
+        createTopLevelFolderCheckbox.setSelection(false);
+        createTopLevelFolderCheckbox.addSelectionListener(new SelectionAdapter() {
         	public void widgetSelected(SelectionEvent e) {
         		updateWidgetEnablements();
         	}
@@ -535,6 +520,7 @@
         //Update enablements when this is selected
         updateWidgetEnablements();
         fileSystemStructureProvider.clearVisitedDirs();
+        selectionGroup.setFocus();
     }
 
     /**
@@ -830,18 +816,22 @@
     protected boolean importResources(List fileSystemObjects) {
         ImportOperation operation;
         
-        boolean shouldImportTopLevelFoldersRecursively = allItemsAreChecked() &&
-        											createOnlySelectedButton.getSelection() &&
+        boolean shouldImportTopLevelFoldersRecursively = selectionGroup.isEveryItemChecked() &&
+        											!createTopLevelFolderCheckbox.getSelection() &&
         											(createLinksInWorkspaceButton != null && createLinksInWorkspaceButton.getSelection()) &&
         											(createVirtualFoldersButton != null && createVirtualFoldersButton.getSelection() == false);
 		
+		File sourceDirectory = getSourceDirectory();
+		if (createTopLevelFolderCheckbox.getSelection() && sourceDirectory.getParentFile() != null)
+        	sourceDirectory = sourceDirectory.getParentFile();
+        
         if (shouldImportTopLevelFoldersRecursively)
             operation = new ImportOperation(getContainerFullPath(),
-                    getSourceDirectory(), fileSystemStructureProvider,
+                    sourceDirectory, fileSystemStructureProvider,
                     this, Arrays.asList(new File[] {getSourceDirectory()}));
         else
         	operation = new ImportOperation(getContainerFullPath(),
-                getSourceDirectory(), fileSystemStructureProvider,
+                sourceDirectory, fileSystemStructureProvider,
                 this, fileSystemObjects);
 
         operation.setContext(getShell());
@@ -868,8 +858,7 @@
      * Initializes the specified operation appropriately.
      */
     protected void initializeOperation(ImportOperation op) {
-        op.setCreateContainerStructure(createContainerStructureButton
-                .getSelection());
+        op.setCreateContainerStructure(false);
         op.setOverwriteResources(overwriteExistingResourcesCheckbox
                 .getSelection());
         if (createLinksInWorkspaceButton != null && createLinksInWorkspaceButton.getSelection()) {
@@ -950,8 +939,7 @@
 
             boolean createStructure = settings
                     .getBoolean(STORE_CREATE_CONTAINER_STRUCTURE_ID);
-            createContainerStructureButton.setSelection(createStructure);
-            createOnlySelectedButton.setSelection(!createStructure);
+            createTopLevelFolderCheckbox.setSelection(createStructure);
 
             if (createVirtualFoldersButton != null) {
 	            boolean createVirtualFolders = settings
@@ -995,7 +983,7 @@
                     overwriteExistingResourcesCheckbox.getSelection());
 
             settings.put(STORE_CREATE_CONTAINER_STRUCTURE_ID,
-                    createContainerStructureButton.getSelection());
+                    createTopLevelFolderCheckbox.getSelection());
 
             if (createVirtualFoldersButton != null) {
 	            settings.put(STORE_CREATE_VIRTUAL_FOLDERS_ID,
@@ -1166,6 +1154,7 @@
         super.setVisible(visible);
         resetSelection();
         if (visible) {
+        	this.selectionGroup.setFocus();
 			this.sourceNameField.setFocus();
 		}
     }
@@ -1197,23 +1186,13 @@
 			relativePathVariableGroup.setEnabled(createLinksInWorkspaceButton.getSelection());
 			createVirtualFoldersButton.setEnabled(createLinksInWorkspaceButton.getSelection());
 	
-			if ((!selectionGroup.getAllCheckedListItems().isEmpty() && !allItemsAreChecked()) ||
-				(createOnlySelectedButton.getSelection() == false)) {
+			if (!selectionGroup.isEveryItemChecked() ||
+				(createTopLevelFolderCheckbox.getSelection())) {
 	        	createVirtualFoldersButton.setSelection(true);
 			}
     	}
     }
 
-    private boolean allItemsAreChecked() {
-		List checkedItems = selectionGroup.getAllCheckedListItems();
-		if (!checkedItems.isEmpty()) {
-			List allItems = selectionGroup.getAllListItems();
-        	if (checkedItems.size() == allItems.size())
-        		return true;
-        }
-		return false;
-    }
-    
     /**
      *	Answer a boolean indicating whether self's source specification
      *	widgets currently all contain valid values.
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java
index 8dbe51f..77f861e 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java
@@ -57,8 +57,8 @@
 import org.eclipse.jface.viewers.CheckStateChangedEvent;
 import org.eclipse.jface.viewers.CheckboxTreeViewer;
 import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.IColorProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.Viewer;
@@ -296,6 +296,8 @@
 	private Button copyCheckbox;
 
 	private boolean copyFiles = false;
+	
+	private boolean lastCopyFiles = false;
 
 	private ProjectRecord[] selectedProjects = new ProjectRecord[0];
 
@@ -643,7 +645,7 @@
 		// project location entry field
 		this.directoryPathField = new Text(projectGroup, SWT.BORDER);
 
-		GridData directoryPathData = new GridData(SWT.FILL, SWT.NONE, true, false);
+		GridData directoryPathData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
 		directoryPathData.widthHint = new PixelConverter(directoryPathField).convertWidthInCharsToPixels(25);
 		directoryPathField.setLayoutData(directoryPathData);
 		
@@ -661,7 +663,7 @@
 		// project location entry field
 		archivePathField = new Text(projectGroup, SWT.BORDER);
 
-		GridData archivePathData = new GridData(SWT.FILL, SWT.NONE, true, false);
+		GridData archivePathData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
 		archivePathData.widthHint = new PixelConverter(archivePathField).convertWidthInCharsToPixels(25);
 		archivePathField.setLayoutData(archivePathData); // browse button
 		browseArchivesButton = new Button(projectGroup, SWT.PUSH);
@@ -850,7 +852,7 @@
 
 		final File directory = new File(path);
 		long modified = directory.lastModified();
-		if (path.equals(lastPath) && lastModified == modified) {
+		if (path.equals(lastPath) && lastModified == modified && lastCopyFiles == copyFiles) {
 			// since the file/folder was not modified and the path did not
 			// change, no refreshing is required
 			return;
@@ -858,6 +860,7 @@
 
 		lastPath = path;
 		lastModified = modified;
+		lastCopyFiles = copyFiles;
 
 		// We can't access the radio button from the inner class so get the
 		// status beforehand
@@ -1353,6 +1356,12 @@
 			// if location is null, project already exists in this location or
 			// some error condition occured.
 			if (locationURI != null) {
+				// validate the location of the project being copied
+				IStatus result = ResourcesPlugin.getWorkspace().validateProjectLocationURI(project,
+						locationURI);
+				if(!result.isOK())					
+					throw new InvocationTargetException(new CoreException(result));
+				
 				importSource = new File(locationURI);
 				IProjectDescription desc = workspace
 						.newProjectDescription(projectName);
@@ -1497,7 +1506,8 @@
 	public ProjectRecord[] getProjectRecords() {
 		List projectRecords = new ArrayList();
 		for (int i = 0; i < selectedProjects.length; i++) {
-			if (isProjectInWorkspace(selectedProjects[i].getProjectName())) {
+			if ( (isProjectInWorkspacePath(selectedProjects[i].getProjectName()) && copyFiles)||
+					isProjectInWorkspace(selectedProjects[i].getProjectName())) {
 				selectedProjects[i].hasConflicts = true;
 			}
 			projectRecords.add(selectedProjects[i]);
@@ -1507,6 +1517,19 @@
 	}
 
 	/**
+	 * Determine if there is a directory with the project name in the workspace path.
+	 * 
+	 * @param projectName the name of the project
+	 * @return true if there is a directory with the same name of the imported project
+	 */
+	private boolean isProjectInWorkspacePath(String projectName){
+		final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IPath wsPath = workspace.getRoot().getLocation();
+		IPath localProjectPath = wsPath.append(projectName);
+		return localProjectPath.toFile().exists();
+	}
+
+	/**
 	 * Determine if the project with the given name is in the current workspace.
 	 * 
 	 * @param projectName
@@ -1543,6 +1566,7 @@
 			// checkbox
 			copyFiles = settings.getBoolean(STORE_COPY_PROJECT_ID);
 			copyCheckbox.setSelection(copyFiles);
+			lastCopyFiles = copyFiles;
 		}
 				
 		// Second, check to see if we don't have an initial path, 
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties
index e69980c..db0ad31 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties
@@ -49,8 +49,7 @@
 FileImport_fromDirectory = From director&y:
 FileImport_importFileSystem = Import resources from the local file system.
 FileImport_overwriteExisting = &Overwrite existing resources without warning
-FileImport_createComplete = &Create complete folder structure
-FileImport_createSelectedFolders = Create s&elected folders only
+FileImport_createTopLevel = &Create top-level folder
 FileImport_createVirtualFolders = Create &virtual folders
 FileImport_importElementsAs=Create l&ink locations relative to:
 FileImport_createVirtualFoldersTooltip = This option needs to be set when a partial hierarchy is selected.
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerField.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerField.java
index b504ebf..b9bb730 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerField.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerField.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,6 +28,7 @@
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.util.BundleUtility;
@@ -73,15 +74,15 @@
 					}
 				}
 				if (IDE.getMarkerHelpRegistry().hasResolutions(marker)) {
-					if (image == null){
-						image = getImageManager()
-						.createImage(
-								IDEInternalWorkbenchImages
-										.getImageDescriptor(IDEInternalWorkbenchImages.IMG_ELCL_QUICK_FIX_ENABLED));
-			
-					}else{
-						descriptors[IDecoration.BOTTOM_RIGHT] =
-							getIDEImageDescriptor(MarkerSupportInternalUtilities.IMG_MARKERS_QUICK_FIX_DECORATION_PATH);
+					if (image == MarkerSupportInternalUtilities.getSeverityImage(IMarker.SEVERITY_WARNING)) {
+						image = WorkbenchPlugin.getDefault().getSharedImages().getImage(IDEInternalWorkbenchImages.IMG_OBJS_FIXABLE_WARNING);
+					} else if (image == MarkerSupportInternalUtilities.getSeverityImage(IMarker.SEVERITY_ERROR)) {
+						image = WorkbenchPlugin.getDefault().getSharedImages().getImage(IDEInternalWorkbenchImages.IMG_OBJS_FIXABLE_ERROR);
+					} else if (image != null) {
+						descriptors[IDecoration.BOTTOM_RIGHT] = getIDEImageDescriptor(MarkerSupportInternalUtilities.IMG_MARKERS_QUICK_FIX_DECORATION_PATH);
+					}
+					if (image == null) {
+						image = WorkbenchPlugin.getDefault().getSharedImages().getImage(IDEInternalWorkbenchImages.IMG_ELCL_QUICK_FIX_ENABLED);
 					}
 				}
 
@@ -254,7 +255,7 @@
 	 */
 	public void update(ViewerCell cell) {
 		cell.setText(getValue((MarkerItem) cell.getElement()));
-
+		cell.setImage(null);
 	}
 
 }
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerViewHandler.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerViewHandler.java
index 7b27455..1b502d1 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerViewHandler.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerViewHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007,2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,7 +46,7 @@
 	 */
 	public MarkerSupportView getView(ExecutionEvent event) {
 		IWorkbenchPart part = HandlerUtil.getActivePart(event);
-		if (part == null)
+		if (!(part instanceof MarkerSupportView))
 			return null;
 		return (MarkerSupportView) part;
 	}
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogMarkerProperties.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogMarkerProperties.java
index 7b13317..5d327bd 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogMarkerProperties.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogMarkerProperties.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -85,7 +85,7 @@
 	/**
 	 * The control for the Creation Time field.
 	 */
-	private Label creationTime;
+	private Text creationTime;
 
 	/**
 	 * The text control for the Resource field.
@@ -339,7 +339,7 @@
         label.setText(MarkerMessages
                 .propertiesDialog_creationTime_text);
 
-        creationTime = new Label(parent, SWT.NONE);
+        creationTime = new Text(parent, SWT.SINGLE | SWT.READ_ONLY);
 	}
 
 	/**
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogProblemProperties.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogProblemProperties.java
index d9a1751..ddc39a5 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogProblemProperties.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogProblemProperties.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,10 +18,11 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
 
 public class DialogProblemProperties extends DialogMarkerProperties {
 
-	private Label severityLabel;
+	private Text severityLabel;
 
 	private Label severityImage;
 
@@ -50,7 +51,7 @@
 		composite.setLayout(layout);
 
 		severityImage = new Label(composite, SWT.NONE);
-		severityLabel = new Label(composite, SWT.NONE);
+		severityLabel = new Text(composite, SWT.SINGLE | SWT.READ_ONLY);
 	}
 
 	/*
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerMessages.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerMessages.java
index cf32d8a..486b7f1 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerMessages.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -76,6 +76,8 @@
 	public static String filtersDialog_title;
 	public static String configureFiltersCommand_title;
 	public static String configureFiltersDialog_title;
+	
+	public static String configEditDialog_name;
 
 	public static String filtersDialog_showItemsOfType;
 	public static String filtersDialog_anyResource;
@@ -145,6 +147,17 @@
 	public static String marker_statusSelectedCount;
 	public static String errorsAndWarningsSummaryBreakdown;
 
+	public static String deleteMarkers_errorMessage;
+	public static String deleteMarker_operationName;
+	public static String deleteMarkers_operationName;
+	public static String deleteBookmarkMarker_operationName;
+	public static String deleteBookmarkMarkers_operationName;
+	public static String deleteTaskMarker_operationName;
+	public static String deleteTaskMarkers_operationName;
+	public static String deleteProblemMarker_operationName;
+	public static String deleteProblemMarkers_operationName;
+
+
 	public static String deleteCompletedAction_title;
 
 	public static String markCompletedAction_title;
@@ -198,15 +211,16 @@
 	public static String MarkerFilter_filtersTitle;
 	public static String MarkerFilter_addFilterName;
 	public static String MarkerFilter_cloneFilterName;
+	public static String MarkerFilter_editFilterName;
 	public static String MarkerFilter_deleteSelectedName;
 	public static String MarkerFilter_renameName;
 	public static String MarkerFilter_showAllCommand_title;
 	public static String MarkerFilter_ConfigureContentsCommand_title;
-
+	
 	public static String MarkerFilterDialog_title;
 	public static String MarkerFilterDialog_message;
 	public static String MarkerFilterDialog_emptyMessage;
-
+	public static String MarkerFilterDialog_YouHaveDisabledMarkerLimit;
 	public static String MarkerFilterDialog_errorTitle;
 	public static String MarkerFilterDialog_failedFilterMessage;
 
@@ -219,7 +233,8 @@
 	public static String MarkerPreferences_VisibleColumnsTitle;
 	public static String MarkerPreferences_HiddenColumnsTitle;
 	public static String MarkerPreferences_AtLeastOneVisibleColumn;
-
+	public static String MarkerPreferences_WidthOfShownColumn;
+	
 	public static String ProblemFilterDialog_System_Filters_Title;
 	public static String ProblemFilterDialog_All_Problems;
 	public static String ProblemFilterDialog_Selected_Types;
@@ -239,6 +254,8 @@
 	public static String FieldMessage_NullMessage;
 	public static String FieldCategory_Uncategorized;
 	public static String FieldMessage_WrongType;
+	public static String FiltersConfigurationDialog_title;
+	public static String FiltersConfigurationDialog_message;
 	public static String Category_Label;
 	public static String Category_Limit_Label;
 	public static String Category_One_Item_Label;
@@ -253,6 +270,7 @@
 	public static String MarkerResolutionDialog_CannotFixTitle;
 	public static String MarkerResolutionDialog_CannotFixMessage;
 	public static String MarkerResolutionDialog_NoResolutionsFound;
+	public static String MarkerResolutionDialog_NoResolutionsFoundForMultiSelection;
 
 	public static String MarkerResolutionDialog_Title;
 	public static String MarkerResolutionDialog_CalculatingTask;
@@ -285,9 +303,10 @@
 
 	public static String PasteHandler_title;
 
-	public static String AND_OR_Label;
+	public static String ALL_Title;
 	public static String AND_Title;
 	public static String OR_Title;
+	public static String MarkerConfigurationsLabel;
 
 	public static String ContentGenerator_NoGrouping;
 	public static String newViewTitle;
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSupportRegistry.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSupportRegistry.java
index dea9094..6213cba 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSupportRegistry.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSupportRegistry.java
@@ -60,6 +60,12 @@
 	private static final Object WARNING = "WARNING";//$NON-NLS-1$
 
 	private static final String MARKER_ID = "markerId"; //$NON-NLS-1$
+	
+	/**
+	 * Filter enablement : A zero/negative integer implies that the limit is
+	 * disabled.
+	 */
+	public static final String FILTER_LIMIT = "filterLimit"; //$NON-NLS-1$
 
 	/**
 	 * The tag for the marker support extension
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/messages.properties b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/messages.properties
index 9cd27fa..7abc9fa 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/messages.properties
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2010 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -60,6 +60,8 @@
 deleteActionConfirmTitle = Delete Selected Entries
 deleteActionConfirmMessage = Do you want to delete the selected entries? Deleted markers may be recreated by a build or may not be recoverable.
 
+configEditDialog_name = N&ame:
+
 filtersDialog_title = Filters
 filtersDialog_entriesTitle = &Configurations:
 filtersDialog_showItemsOfType = Show items of &type:
@@ -77,7 +79,7 @@
 filtersDialog_deselectAllTypes = Dese&lect All
 filtersDialog_conflictingName =  A filter already exists with the name {0}
 filtersDialogDeselectedFiltersTitle = Confirm Show All
-filtersDialogDeselectedFiltersMessage = You have not checked any configurations. This will show all entries. Continue?
+filtersDialogDeselectedFiltersMessage = You have not checked any configurations. This will show all entries.
 
 filtersDialog_descriptionLabel = Te&xt: 
 filtersDialog_contains = contains
@@ -133,6 +135,16 @@
 marker_statusSelectedCount={0,choice,0#0 items |1#{0,number,integer} item |1<{0,number,integer} items} selected
 errorsAndWarningsSummaryBreakdown = {0,choice,0#0 errors|1#{0,number,integer} error|1<{0,number,integer} errors}, {1,choice,0#0 warnings|1#{1,number,integer} warning|1<{1,number,integer} warnings}, {2,choice,0#0 others|1#{2,number,integer} other|1<{2,number,integer} others}
 
+deleteMarkers_errorMessage= Error deleting markers
+deleteMarker_operationName= Delete Marker
+deleteMarkers_operationName= Delete Markers
+deleteBookmarkMarker_operationName= Delete Bookmark
+deleteBookmarkMarkers_operationName= Delete Bookmarks
+deleteTaskMarker_operationName= Delete Task
+deleteTaskMarkers_operationName= Delete Tasks
+deleteProblemMarker_operationName= Delete Problem
+deleteProblemMarkers_operationName= Delete Problems
+
 deleteCompletedAction_title = Delete Completed &Tasks
 markCompletedAction_title = &Mark Completed
 markCompletedHandler_task = Marking selected tasks completed
@@ -175,34 +187,38 @@
 RemoveMarker_errorTitle=Error
 
 MarkerFilter_defaultFilterName=Default
-MarkerFilter_newFilterName=New Filter
+MarkerFilter_newFilterName=New Configuration
 MarkerFilter_filtersTitle=User f&ilters:
-MarkerFilter_addFilterName=&New...
+MarkerFilter_addFilterName=&New
 MarkerFilter_cloneFilterName=D&uplicate...
+MarkerFilter_editFilterName=&Edit...
 MarkerFilter_deleteSelectedName = Remo&ve
 MarkerFilter_renameName = &Rename
 MarkerFilter_showAllCommand_title = &Show All
 MarkerFilter_ConfigureContentsCommand_title = &Configure Contents...
 
-MarkerFilterDialog_title=Filter Name
-MarkerFilterDialog_message=Select a filter name
+MarkerFilterDialog_title=Configuration Name
+MarkerFilterDialog_message=Enter a name for the configuration:
 MarkerFilterDialog_emptyMessage=Name must not be empty
-AND_OR_Label=Show results matching: 
-AND_Title = A&ll enabled filters
-OR_Title = &Any enabled filter
+ALL_Title = Sho&w all items
+AND_Title = Show items that match a&ll the configurations checked below
+OR_Title = Show items that match a&ny configuration checked below
+MarkerConfigurationsLabel = &Configurations:
 
 MarkerFilterDialog_errorTitle = An error has occurred
 MarkerFilterDialog_failedFilterMessage = Could not create filter {0}. 
 
 MarkerPreferences_DialogTitle = Preferences
-MarkerPreferences_MarkerLimits = Use marker &limits
-MarkerPreferences_VisibleItems = Limit visible &items per group to:
-MarkerPreferences_MoveLeft = <<
-MarkerPreferences_MoveRight = >>
+MarkerPreferences_MarkerLimits = &Use item limits
+MarkerPreferences_MoveLeft = <- &Hide 
+MarkerPreferences_MoveRight = &Show ->
 MarkerPreferences_ColumnGroupTitle = Hide/Show Columns
-MarkerPreferences_VisibleColumnsTitle = &Show
-MarkerPreferences_HiddenColumnsTitle = &Hide
+MarkerPreferences_VisibleColumnsTitle = Sh&own:
+MarkerPreferences_HiddenColumnsTitle = H&idden:
 MarkerPreferences_AtLeastOneVisibleColumn = There must be at least one visible column.
+MarkerPreferences_VisibleItems = Number of items visible per &group:
+MarkerFilterDialog_YouHaveDisabledMarkerLimit= You have selected to disable limiting items per group.
+MarkerPreferences_WidthOfShownColumn= &Width of the selected shown column:
 
 ProblemFilterDialog_System_Filters_Title = System filte&rs:
 ProblemFilterDialog_All_Problems = Enabled for all problems
@@ -214,7 +230,7 @@
 ProblemFilterDialog_Does_Not_Contain_Description = On any description not containing {0}
 ProblemFilterDialog_any = Filter on any element
 ProblemFilterDialog_sameContainer = Filter on any in the same container
-ProblemFilterDialog_selectedAndChildren = Filter on selected element and it's children
+ProblemFilterDialog_selectedAndChildren = Filter on selected element and its children
 ProblemFilterDialog_selected = Filter on selected element only
 ProblemFilterDialog_workingSet = Filter on working set {0}  
 
@@ -224,6 +240,8 @@
 FieldMessage_WrongType = {0} is not of a displayable type
 
 FieldCategory_Uncategorized = Other
+FiltersConfigurationDialog_title=Configure Contents
+FiltersConfigurationDialog_message=Configure the items to be shown in the view
 Category_Label = {0} ({1} items)
 Category_One_Item_Label = {0} (1 item)
 Category_Limit_Label = {0} ({1} of {2} items)
@@ -238,6 +256,7 @@
 MarkerResolutionDialog_CannotFixTitle = Could not fix
 MarkerResolutionDialog_CannotFixMessage = Could not fix {0}
 MarkerResolutionDialog_NoResolutionsFound = No fixes available for ''{0}''.
+MarkerResolutionDialog_NoResolutionsFoundForMultiSelection =  The selected problems do not have a common applicable quick fix.\n\nOnly select similar problems or try Source > Clean Up... to fix multiple problems at once.
 
 MarkerResolutionDialog_AddOthers = Find Si&milar Problems
 
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/MainActionGroup.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/MainActionGroup.java
index 6387af3..40b251b 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/MainActionGroup.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/MainActionGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -128,7 +128,7 @@
                 .getAffectedChildren(IResourceDelta.CHANGED);
         for (int i = 0; i < projDeltas.length; ++i) {
             IResourceDelta projDelta = projDeltas[i];
-            //changing the project open state or description will effect open/close/build action enablement
+            //changing the project open state or description will affect open/close/build action enablement
             if ((projDelta.getFlags() & (IResourceDelta.OPEN | IResourceDelta.DESCRIPTION)) != 0) {
                 if (sel.contains(projDelta.getResource())) {
                     getNavigator().getSite().getShell().getDisplay().syncExec(
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/NavigatorDropAdapter.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/NavigatorDropAdapter.java
index 7c0cd95..a845689 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/NavigatorDropAdapter.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/NavigatorDropAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredViewer;
@@ -39,6 +40,8 @@
 import org.eclipse.ui.actions.ReadOnlyStateChecker;
 import org.eclipse.ui.dialogs.IOverwriteQuery;
 import org.eclipse.ui.ide.dialogs.ImportTypeDialog;
+import org.eclipse.ui.internal.ide.IDEInternalPreferences;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.views.navigator.ResourceNavigatorMessages;
 import org.eclipse.ui.part.PluginDropAdapter;
 import org.eclipse.ui.part.ResourceTransfer;
@@ -328,19 +331,26 @@
 			}
 			// if all sources are either links or groups, copy then normally, don't show the dialog
 			if (!allSourceAreLinksOrGroups) {
-				ImportTypeDialog dialog = new ImportTypeDialog(getShell(), getCurrentOperation(), sources, target);
-				dialog.setResource(target);
-				if (dialog.open() == Window.OK) {
-					if (dialog.getSelection() == ImportTypeDialog.IMPORT_VIRTUAL_FOLDERS_AND_LINKS)
-						operation.setVirtualFolders(true);
-					if (dialog.getSelection() == ImportTypeDialog.IMPORT_LINK)
-						operation.setCreateLinks(true);
-					if (dialog.getVariable() != null)
-						operation.setRelativeVariable(dialog.getVariable());
-					operation.copyResources(sources, target);
+				IPreferenceStore store= IDEWorkbenchPlugin.getDefault().getPreferenceStore();
+				String dndPreference= store.getString(target.isVirtual() ? IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE : IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE);
+
+				if (dndPreference.equals(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_PROMPT)) {
+					ImportTypeDialog dialog = new ImportTypeDialog(getShell(), getCurrentOperation(), sources, target);
+					dialog.setResource(target);
+					if (dialog.open() == Window.OK) {
+						if (dialog.getSelection() == ImportTypeDialog.IMPORT_VIRTUAL_FOLDERS_AND_LINKS)
+							operation.setVirtualFolders(true);
+						if (dialog.getSelection() == ImportTypeDialog.IMPORT_LINK)
+							operation.setCreateLinks(true);
+						if (dialog.getVariable() != null)
+							operation.setRelativeVariable(dialog.getVariable());
+						operation.copyResources(sources, target);
+					}
+					else
+						return problems;
 				}
 				else
-					return problems;
+					operation.copyResources(sources, target);
 			}
 			else
 				operation.copyResources(sources, target);
diff --git a/bundles/org.eclipse.ui.navigator.resources/.settings/.api_filters b/bundles/org.eclipse.ui.navigator.resources/.settings/.api_filters
index bcfb5f8..813ebc0 100755
--- a/bundles/org.eclipse.ui.navigator.resources/.settings/.api_filters
+++ b/bundles/org.eclipse.ui.navigator.resources/.settings/.api_filters
@@ -1,38 +1,33 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <component id="org.eclipse.ui.navigator.resources" version="2">
-    <resource path="src/org/eclipse/ui/navigator/resources/ProjectExplorer.java" type="org.eclipse.ui.navigator.resources.ProjectExplorer">
-        <filter id="642777099">
+    <resource path="src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java" type="org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider">
+        <filter id="640712815">
             <message_arguments>
                 <message_argument value="CommonNavigator"/>
-                <message_argument value="ProjectExplorer"/>
+                <message_argument value="WorkingSetActionProvider"/>
                 <message_argument value="setWorkingSetLabel(String)"/>
             </message_arguments>
         </filter>
-        <filter id="642777099">
-            <message_arguments>
-                <message_argument value="CommonNavigator"/>
-                <message_argument value="ProjectExplorer"/>
-                <message_argument value="getWorkingSetLabel()"/>
-            </message_arguments>
-        </filter>
-        <filter id="642777099">
-            <message_arguments>
-                <message_argument value="CommonNavigator"/>
-                <message_argument value="ProjectExplorer"/>
-                <message_argument value="getRootMode()"/>
-            </message_arguments>
-        </filter>
-        <filter id="642777099">
-            <message_arguments>
-                <message_argument value="CommonNavigator"/>
-                <message_argument value="ProjectExplorer"/>
-                <message_argument value="setRootMode(int)"/>
-            </message_arguments>
-        </filter>
         <filter id="640712815">
             <message_arguments>
                 <message_argument value="CommonViewer"/>
-                <message_argument value="ProjectExplorer"/>
+                <message_argument value="WorkingSetActionProvider"/>
+                <message_argument value="getFrameList()"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java" type="org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider$WorkingSetManagerListener">
+        <filter id="640712815">
+            <message_arguments>
+                <message_argument value="CommonNavigator"/>
+                <message_argument value="WorkingSetManagerListener"/>
+                <message_argument value="setWorkingSetLabel(String)"/>
+            </message_arguments>
+        </filter>
+        <filter id="640712815">
+            <message_arguments>
+                <message_argument value="CommonViewer"/>
+                <message_argument value="WorkingSetManagerListener"/>
                 <message_argument value="getFrameList()"/>
             </message_arguments>
         </filter>
@@ -61,30 +56,6 @@
             </message_arguments>
         </filter>
     </resource>
-    <resource path="src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java" type="org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider$WorkingSetManagerListener">
-        <filter id="640712815">
-            <message_arguments>
-                <message_argument value="CommonViewer"/>
-                <message_argument value="WorkingSetManagerListener"/>
-                <message_argument value="getFrameList()"/>
-            </message_arguments>
-        </filter>
-        <filter id="640712815">
-            <message_arguments>
-                <message_argument value="CommonNavigator"/>
-                <message_argument value="WorkingSetManagerListener"/>
-                <message_argument value="setWorkingSetLabel(String)"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/internal/navigator/resources/actions/TextActionHandler.java" type="org.eclipse.ui.internal.navigator.resources.actions.TextActionHandler">
-        <filter id="571473929">
-            <message_arguments>
-                <message_argument value="TextActionHandler"/>
-                <message_argument value="TextActionHandler"/>
-            </message_arguments>
-        </filter>
-    </resource>
     <resource path="src/org/eclipse/ui/navigator/resources/GoIntoActionProvider.java" type="org.eclipse.ui.navigator.resources.GoIntoActionProvider">
         <filter id="640712815">
             <message_arguments>
@@ -94,4 +65,41 @@
             </message_arguments>
         </filter>
     </resource>
+    <resource path="src/org/eclipse/ui/navigator/resources/ProjectExplorer.java" type="org.eclipse.ui.navigator.resources.ProjectExplorer">
+        <filter id="640712815">
+            <message_arguments>
+                <message_argument value="CommonViewer"/>
+                <message_argument value="ProjectExplorer"/>
+                <message_argument value="getFrameList()"/>
+            </message_arguments>
+        </filter>
+        <filter id="642777099">
+            <message_arguments>
+                <message_argument value="CommonNavigator"/>
+                <message_argument value="ProjectExplorer"/>
+                <message_argument value="getRootMode()"/>
+            </message_arguments>
+        </filter>
+        <filter id="642777099">
+            <message_arguments>
+                <message_argument value="CommonNavigator"/>
+                <message_argument value="ProjectExplorer"/>
+                <message_argument value="getWorkingSetLabel()"/>
+            </message_arguments>
+        </filter>
+        <filter id="642777099">
+            <message_arguments>
+                <message_argument value="CommonNavigator"/>
+                <message_argument value="ProjectExplorer"/>
+                <message_argument value="setRootMode(int)"/>
+            </message_arguments>
+        </filter>
+        <filter id="642777099">
+            <message_arguments>
+                <message_argument value="CommonNavigator"/>
+                <message_argument value="ProjectExplorer"/>
+                <message_argument value="setWorkingSetLabel(String)"/>
+            </message_arguments>
+        </filter>
+    </resource>
 </component>
diff --git a/bundles/org.eclipse.ui.navigator.resources/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.navigator.resources/META-INF/MANIFEST.MF
index eabdc2e..04036da 100644
--- a/bundles/org.eclipse.ui.navigator.resources/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.navigator.resources/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.navigator.resources; singleton:=true
-Bundle-Version: 3.4.200.qualifier
+Bundle-Version: 3.4.300.qualifier
 Bundle-Activator: org.eclipse.ui.internal.navigator.resources.plugin.WorkbenchNavigatorPlugin
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.ui.navigator.resources/plugin.xml b/bundles/org.eclipse.ui.navigator.resources/plugin.xml
index f7789cb..71daa83 100644
--- a/bundles/org.eclipse.ui.navigator.resources/plugin.xml
+++ b/bundles/org.eclipse.ui.navigator.resources/plugin.xml
@@ -333,7 +333,7 @@
     <extension
           point="org.eclipse.core.runtime.adapters">
        <factory
-             adaptableType="org.eclipse.ui.navigator.CommonNavigator"
+             adaptableType="org.eclipse.ui.navigator.resources.ProjectExplorer"
             class="org.eclipse.ui.internal.navigator.resources.workbench.TabbedPropertySheetAdapterFactory">
          <adapter type="org.eclipse.ui.views.properties.IPropertySheetPage"/>
       </factory>
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java
index 2dc235c..eacb7de 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java
@@ -106,7 +106,7 @@
 	public Object[] getChildren(Object parentElement) {
 		if (parentElement instanceof IWorkingSet) {
 			IWorkingSet workingSet = (IWorkingSet) parentElement;
-			if (workingSet.isAggregateWorkingSet()) {
+			if (workingSet.isAggregateWorkingSet() && projectExplorer != null) {
 				switch (projectExplorer.getRootMode()) {
 					case ProjectExplorer.WORKING_SETS :
 						return ((IAggregateWorkingSet) workingSet).getComponents();
@@ -156,6 +156,9 @@
 	}
  
 	private void updateRootMode() {
+		if (projectExplorer == null) {
+			return;
+		}
 		if( extensionStateModel.getBooleanProperty(SHOW_TOP_LEVEL_WORKING_SETS) )
 			projectExplorer.setRootMode(ProjectExplorer.WORKING_SETS);
 		else
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java
index b6dda8d..472bb84 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,6 +39,7 @@
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.util.LocalSelectionTransfer;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -49,6 +50,8 @@
 import org.eclipse.ui.actions.MoveFilesAndFoldersOperation;
 import org.eclipse.ui.actions.ReadOnlyStateChecker;
 import org.eclipse.ui.ide.dialogs.ImportTypeDialog;
+import org.eclipse.ui.internal.ide.IDEInternalPreferences;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.navigator.Policy;
 import org.eclipse.ui.internal.navigator.resources.plugin.WorkbenchNavigatorMessages;
 import org.eclipse.ui.internal.navigator.resources.plugin.WorkbenchNavigatorPlugin;
@@ -215,7 +218,6 @@
 		if (LocalSelectionTransfer.getTransfer().isSupportedType(
 				currentTransfer)) {
 			resources = getSelectedResources();
-			aDropTargetEvent.detail = DND.DROP_NONE;
 		} else if (ResourceTransfer.getInstance().isSupportedType(
 				currentTransfer)) {
 			resources = (IResource[]) aDropTargetEvent.data;
@@ -422,18 +424,25 @@
 			// if all sources are either links or groups, copy then normally,
 			// don't show the dialog
 			if (!allSourceAreLinksOrVirtualFolders) {
-				ImportTypeDialog dialog = new ImportTypeDialog(getShell(), dropAdapter.getCurrentOperation(), sources, target);
-				dialog.setResource(target);
-				if (dialog.open() == Window.OK) {
-					if (dialog.getSelection() == ImportTypeDialog.IMPORT_VIRTUAL_FOLDERS_AND_LINKS)
-						operation.setVirtualFolders(true);
-					if (dialog.getSelection() == ImportTypeDialog.IMPORT_LINK)
-						operation.setCreateLinks(true);
-					if (dialog.getVariable() != null)
-						operation.setRelativeVariable(dialog.getVariable());
+				IPreferenceStore store= IDEWorkbenchPlugin.getDefault().getPreferenceStore();
+				String dndPreference= store.getString(target.isVirtual() ? IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE : IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE);
+
+				if (dndPreference.equals(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_PROMPT)) {
+					ImportTypeDialog dialog = new ImportTypeDialog(getShell(), dropAdapter.getCurrentOperation(), sources, target);
+					dialog.setResource(target);
+					if (dialog.open() == Window.OK) {
+						if (dialog.getSelection() == ImportTypeDialog.IMPORT_VIRTUAL_FOLDERS_AND_LINKS)
+							operation.setVirtualFolders(true);
+						if (dialog.getSelection() == ImportTypeDialog.IMPORT_LINK)
+							operation.setCreateLinks(true);
+						if (dialog.getVariable() != null)
+							operation.setRelativeVariable(dialog.getVariable());
+						operation.copyResources(sources, target);
+					} else
+						return problems;
+				}
+				else
 					operation.copyResources(sources, target);
-				} else
-					return problems;
 			} else
 				operation.copyResources(sources, target);
 		}
diff --git a/bundles/org.eclipse.ui.navigator/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.navigator/META-INF/MANIFEST.MF
index 28a210a..6117c39 100644
--- a/bundles/org.eclipse.ui.navigator/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.navigator/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.navigator; singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.5.100.qualifier
 Bundle-Activator: org.eclipse.ui.internal.navigator.NavigatorPlugin
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.ui.navigator/schema/navigatorContent.exsd b/bundles/org.eclipse.ui.navigator/schema/navigatorContent.exsd
index 7d7a26d..e29a843 100644
--- a/bundles/org.eclipse.ui.navigator/schema/navigatorContent.exsd
+++ b/bundles/org.eclipse.ui.navigator/schema/navigatorContent.exsd
@@ -3,7 +3,7 @@
 <schema targetNamespace="org.eclipse.ui.navigator" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
       <appInfo>
-         <meta.schema plugin="org.eclipse.ui.navigator" id="navigatorContent" name="navigatorContent"/>
+         <meta.schema plugin="org.eclipse.ui.navigator" id="navigatorContent" name="Navigator Content"/>
       </appInfo>
       <documentation>
          A content extension provides a content and label provider 
@@ -963,7 +963,7 @@
          <meta.section type="copyright"/>
       </appInfo>
       <documentation>
-         Copyright (c) 2002, 2010 IBM Corporation and others.&lt;br&gt;
+         Copyright (c) 2002, 2011 IBM Corporation and others.&lt;br&gt;
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0 which accompanies
 this distribution, and is available at &lt;a 
diff --git a/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceContentProvider.java b/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceContentProvider.java
index b25b1d2..47de131 100644
--- a/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceContentProvider.java
+++ b/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,8 @@
  *     IBM Corporation - initial API and implementation
  *     Anton Leherbauer, Wind River
  *       bug 261031 [CommonNavigator] IPipelinedContentProvider getParent() returning the suggested parent is not ignored
+ *     William Chen, chenwmw@gmail.com 
+ *       bug 343721 getParent of NavigatorContentServiceContentProvider does not return expected node.
  *******************************************************************************/
 package org.eclipse.ui.internal.navigator;
 
@@ -295,10 +297,6 @@
 						if (overridingExtensions.length > 0) {
 							parent[0] = pipelineParent(anElement, overridingExtensions, parent);
 						}
-
-						if (parent[0] != null) {
-							return;
-						}
 					}
 				}
 
@@ -308,6 +306,10 @@
 									foundExtension.getDescriptor().getId(), anElement }), e);
 				}
 			});
+
+			if (parent[0] != null) {
+				return parent[0];
+			}
 		}
 		return parent[0];
 	}
diff --git a/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorContentService.java b/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorContentService.java
index 4833258..46a5546 100644
--- a/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorContentService.java
+++ b/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorContentService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@
 import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.ViewerSorter;
+
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.ISaveablesSource;
 
@@ -201,7 +202,8 @@
 	INavigatorViewerDescriptor getViewerDescriptor();
 
 	/**
-	 * See <a href="#active">above</a> for the definition of <i>active</i>.
+	 * See <a href="INavigatorContentService.html#active">above</a> for the
+	 * definition of <i>active</i>.
 	 * 
 	 * @param anExtensionId
 	 *            The unqiue identifier from a content extension.
@@ -214,8 +216,9 @@
 	boolean isActive(String anExtensionId);
 
 	/**
-	 *  See <a href="#visible">above</a> for the definition of <i>visible</i>.
-	 *  
+	 * See <a href="INavigatorContentService.html#visible">above</a> for the
+	 * definition of <i>visible</i>.
+	 * 
 	 * @param anExtensionId
 	 *            The unqiue identifier from a content extension.
 	 * @return True if and only if the given extension id is <i>visible</i> to
diff --git a/bundles/org.eclipse.ui.views.properties.tabbed/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.views.properties.tabbed/META-INF/MANIFEST.MF
index 9c74b53..88ea324 100644
--- a/bundles/org.eclipse.ui.views.properties.tabbed/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.views.properties.tabbed/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.views.properties.tabbed;singleton:=true
-Bundle-Version: 3.5.100.qualifier
+Bundle-Version: 3.5.200.qualifier
 Bundle-Activator: org.eclipse.ui.internal.views.properties.tabbed.TabbedPropertyViewPlugin
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/OverridableTabListContentProvider.java b/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/OverridableTabListContentProvider.java
index 84c70eb..dc85ced 100644
--- a/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/OverridableTabListContentProvider.java
+++ b/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/OverridableTabListContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,10 +11,12 @@
 package org.eclipse.ui.internal.views.properties.tabbed.view;
 
 import org.eclipse.core.runtime.Assert;
+
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.Viewer;
+
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.part.IContributedContentsView;
 import org.eclipse.ui.views.properties.IPropertySheetPage;
@@ -38,7 +40,7 @@
  * @author Anthony Hunter
  * @since 3.4
  */
-public class OverridableTabListContentProvider extends TabListContentProvider
+class OverridableTabListContentProvider extends TabListContentProvider
 		implements IOverridableTabListContentProvider, ITabSelectionListener {
 
 	/**
diff --git a/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabDescriptor.java b/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabDescriptor.java
index e47cd18..d2bfee6 100755
--- a/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabDescriptor.java
+++ b/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2007 IBM Corporation and others.
+ * Copyright (c) 2001, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,11 +10,15 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.views.properties.tabbed.view;
 
+import com.ibm.icu.text.MessageFormat;
+
+import org.eclipse.swt.graphics.Image;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.swt.graphics.Image;
+
 import org.eclipse.ui.internal.views.properties.tabbed.TabbedPropertyViewPlugin;
 import org.eclipse.ui.internal.views.properties.tabbed.TabbedPropertyViewStatusCodes;
 import org.eclipse.ui.internal.views.properties.tabbed.l10n.TabbedPropertyMessages;
@@ -22,8 +26,6 @@
 import org.eclipse.ui.views.properties.tabbed.AbstractTabDescriptor;
 import org.eclipse.ui.views.properties.tabbed.ISectionDescriptor;
 
-import com.ibm.icu.text.MessageFormat;
-
 /**
  * Represents the default implementation of a tab descriptor on the tabbed
  * property tabs extensions.
@@ -286,4 +288,16 @@
 	public String getText() {
 		return label;
 	}
+
+	/**
+	 * Disposes this descriptor.
+	 * 
+	 * @since 3.7
+	 */
+	public void dispose() {
+		if (image != null) {
+			image.dispose();
+			image = null;
+		}
+	}
 }
diff --git a/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyRegistry.java b/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyRegistry.java
index a6b3c33..e994a41 100755
--- a/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyRegistry.java
+++ b/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2008 IBM Corporation and others.
+ * Copyright (c) 2001, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,15 +16,19 @@
 import java.util.Iterator;
 import java.util.List;
 
+import com.ibm.icu.text.MessageFormat;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionPoint;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
+
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
+
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.internal.views.properties.tabbed.TabbedPropertyViewPlugin;
 import org.eclipse.ui.internal.views.properties.tabbed.TabbedPropertyViewStatusCodes;
@@ -37,8 +41,6 @@
 import org.eclipse.ui.views.properties.tabbed.ITabDescriptorProvider;
 import org.eclipse.ui.views.properties.tabbed.ITypeMapper;
 
-import com.ibm.icu.text.MessageFormat;
-
 /**
  * Provides information about the tabbed property extension points. Each tabbed
  * property registry is associated with a unique contributor ID.
@@ -70,7 +72,7 @@
 
 	private static final String ATT_CONTRIBUTOR_ID = "contributorId"; //$NON-NLS-1$
 
-	private static final String ATT_TYPE_MAPPER = "typeMapper"; //$NON-NLS-1$	
+	private static final String ATT_TYPE_MAPPER = "typeMapper"; //$NON-NLS-1$
 
 	private static final String ATT_LABEL_PROVIDER = "labelProvider"; //$NON-NLS-1$
 
@@ -537,4 +539,23 @@
 				TabbedPropertyViewStatusCodes.TAB_ERROR, message, null);
 		TabbedPropertyViewPlugin.getPlugin().getLog().log(status);
 	}
+
+	/**
+	 * Disposes this registry.
+	 * 
+	 * @since 3.7
+	 */
+	public void dispose() {
+		if (labelProvider != null) {
+			labelProvider.dispose();
+			labelProvider = null;
+		}
+
+		if (tabDescriptors != null) {
+			for (int i= 0; i < tabDescriptors.length; i++) {
+				if (tabDescriptors[i] instanceof TabDescriptor)
+					((TabDescriptor)tabDescriptors[i]).dispose();
+			}
+		}
+	}
 }
diff --git a/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyRegistryFactory.java b/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyRegistryFactory.java
index 53714da..60cf094 100755
--- a/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyRegistryFactory.java
+++ b/bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyRegistryFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2007 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -98,6 +98,7 @@
 		if (data != null) {
 			data.references.remove(target);
 			if (data.references.isEmpty()) {
+				data.registry.dispose();
 				idToCacheData.remove(key);
 			}
 		}
diff --git a/bundles/org.eclipse.ui.views/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.views/META-INF/MANIFEST.MF
index f1d3b4a..b2bd090 100644
--- a/bundles/org.eclipse.ui.views/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.views/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ui.views; singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.6.0.qualifier
 Bundle-ClassPath: .
 Bundle-Activator: org.eclipse.ui.internal.views.ViewsPlugin
 Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.ui.views/src/org/eclipse/ui/internal/views/properties/messages.properties b/bundles/org.eclipse.ui.views/src/org/eclipse/ui/internal/views/properties/messages.properties
index 97ba2b4..598fa6e 100644
--- a/bundles/org.eclipse.ui.views/src/org/eclipse/ui/internal/views/properties/messages.properties
+++ b/bundles/org.eclipse.ui.views/src/org/eclipse/ui/internal/views/properties/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -18,7 +18,7 @@
 Categories_text = Show &Categories
 Categories_toolTip = Show Categories
 
-Columns_text = Co&lumns...
+Columns_text = Configure Co&lumns...
 Columns_toolTip = Configure Columns
 
 CopyProperty_text = &Copy
diff --git a/bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/contentoutline/ContentOutlinePage.java b/bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/contentoutline/ContentOutlinePage.java
index 5bf036c..34718eb 100644
--- a/bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/contentoutline/ContentOutlinePage.java
+++ b/bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/contentoutline/ContentOutlinePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,6 +41,8 @@
  * <code>createControl</code> to configure the tree viewer with a proper content 
  * provider, label provider, and input element.
  * </p>
+ * <p>Subclasses may provide a hint for constructing the tree viewer
+ * using {@link #getTreeStyle()}.</p>
  * <p>
  * Note that those wanting to use a control other than internally created
  * <code>TreeViewer</code> will need to implement 
@@ -75,10 +77,21 @@
      * @param parent
      */
     public void createControl(Composite parent) {
-        treeViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL
-                | SWT.V_SCROLL);
+        treeViewer = new TreeViewer(parent, getTreeStyle());
         treeViewer.addSelectionChangedListener(this);
     }
+    
+	/**
+	 * A hint for the styles to use while constructing the TreeViewer.
+	 * <p>Subclasses may override.</p>
+	 * 
+	 * @return the tree styles to use. By default, SWT.MULTI | SWT.H_SCROLL |
+	 *         SWT.V_SCROLL
+	 * @since 3.6
+	 */
+	protected int getTreeStyle() {
+		return SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL;
+	}
 
     /**
      * Fires a selection changed event.
diff --git a/bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java b/bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java
index 306709d..942bb29 100644
--- a/bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java
+++ b/bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     Markus Alexander Kuppe (Versant Corp.) - https://bugs.eclipse.org/248103
  *     Semion Chichelnitsky (semion@il.ibm.com) - bug 272564
+ *     Craig Foote (Footeware.ca) - https://bugs.eclipse.org/325743
  *******************************************************************************/
 package org.eclipse.ui.views.properties;
 
@@ -185,7 +186,7 @@
         super.dispose();
 
         // remove ourselves as a selection and registry listener
-        getSite().getPage().removeSelectionListener(this);
+        getSite().getPage().removePostSelectionListener(this);
         RegistryFactory.getRegistry().removeListener(this);
         
         currentPart = null;
@@ -244,7 +245,7 @@
      * Method declared on IViewPart.
      */
     public void init(IViewSite site) throws PartInitException {
-   		site.getPage().addSelectionListener(this);
+   		site.getPage().addPostSelectionListener(this);
    		super.init(site);
     }
 
@@ -297,12 +298,9 @@
      * since 3.4
      */
     protected void partHidden(IWorkbenchPart part) {
-        // if we are pinned, then we are not interested if parts are hidden, if
-        // our target part is hidden, we should still show whatever content we
-        // have been pinned on
-        if (!isPinned()) {
-            super.partHidden(part);
-        }
+    	// Explicitly ignore parts becoming hidden as this
+    	// can cause issues when the Property View is maximized
+    	// See bug 325743 for more details
     }
     
 	/**
diff --git a/bundles/org.eclipse.ui.workbench/.settings/.api_filters b/bundles/org.eclipse.ui.workbench/.settings/.api_filters
deleted file mode 100644
index 076de14..0000000
--- a/bundles/org.eclipse.ui.workbench/.settings/.api_filters
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component id="org.eclipse.ui.workbench" version="2">
-    <resource path="Eclipse UI/org/eclipse/ui/branding/IBundleGroupConstants.java" type="org.eclipse.ui.branding.IBundleGroupConstants">
-        <filter id="403767336">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.branding.IBundleGroupConstants"/>
-                <message_argument value="BRANDING_BUNDLE_ID"/>
-            </message_arguments>
-        </filter>
-        <filter id="403767336">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.branding.IBundleGroupConstants"/>
-                <message_argument value="BRANDING_BUNDLE_VERSION"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="Eclipse UI/org/eclipse/ui/menus/CommandContributionItemParameter.java" type="org.eclipse.ui.menus.CommandContributionItemParameter">
-        <filter id="338948223">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.menus.CommandContributionItemParameter"/>
-                <message_argument value="CommandContributionItemParameter(IServiceLocator, String, String, Map, ImageDescriptor, ImageDescriptor, ImageDescriptor, String, String, String, int, String, boolean)"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="Eclipse UI/org/eclipse/ui/menus/MenuUtil.java" type="org.eclipse.ui.menus.MenuUtil">
-        <filter id="336744520">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.menus.MenuUtil"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="Eclipse UI/org/eclipse/ui/part/AbstractMultiEditor.java" type="org.eclipse.ui.part.AbstractMultiEditor">
-        <filter id="338944126">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.part.AbstractMultiEditor"/>
-                <message_argument value="setChildren(IEditorPart[])"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="Eclipse UI/org/eclipse/ui/progress/IProgressConstants.java" type="org.eclipse.ui.progress.IProgressConstants">
-        <filter id="403767336">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.progress.IProgressConstants"/>
-                <message_argument value="SHOW_IN_TASKBAR_ICON_PROPERTY"/>
-            </message_arguments>
-        </filter>
-        <filter id="403767336">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.progress.IProgressConstants"/>
-                <message_argument value="COMMAND_PROPERTY"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="Eclipse UI/org/eclipse/ui/services/IEvaluationReference.java" type="org.eclipse.ui.services.IEvaluationReference">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.services.IEvaluationReference"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="Eclipse UI/org/eclipse/ui/services/IServiceScopes.java" type="org.eclipse.ui.services.IServiceScopes">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.services.IServiceScopes"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchStatusDialogManager.java" type="org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager">
-        <filter id="336744520">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="META-INF/MANIFEST.MF">
-        <filter id="923795461">
-            <message_arguments>
-                <message_argument value="3.6.0.qualifier"/>
-                <message_argument value="3.5.0.I20090603-2000"/>
-            </message_arguments>
-        </filter>
-    </resource>
-</component>
diff --git a/bundles/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.ui.prefs
index 3732137..93c32e6 100644
--- a/bundles/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.ui.prefs
+++ b/bundles/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.ui.prefs
@@ -13,7 +13,7 @@
 org.eclipse.jdt.ui.ondemandthreshold=99
 org.eclipse.jdt.ui.overrideannotation=true
 org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return Returns the ${bare_field_name}.\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} The ${bare_field_name} to set.\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) ${year} IBM Corporation and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n *     IBM Corporation - initial API and implementation\n ******************************************************************************/\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @since 3.5\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template></templates>
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return Returns the ${bare_field_name}.\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} The ${bare_field_name} to set.\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) ${year} IBM Corporation and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n *     IBM Corporation - initial API and implementation\n ******************************************************************************/\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @since 3.7\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template></templates>
 sp_cleanup.add_default_serial_version_id=true
 sp_cleanup.add_generated_serial_version_id=false
 sp_cleanup.add_missing_annotations=true
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorRegistry.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorRegistry.java
index 824c84f..4bfba47 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorRegistry.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -216,7 +216,7 @@
 
     /**
      * Removes the given property listener from this registry.
-     * Has no affect if an identical listener is not registered.
+     * Has no effect if an identical listener is not registered.
      *
      * @param listener a property listener
      */
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IMemento.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IMemento.java
index 1f0f45f..7ea81fa 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IMemento.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IMemento.java
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.ui;
 
+import org.w3c.dom.DOMException;
+
 /**
  * Interface to a memento used for saving the important state of an object in a
  * form that can be persisted in the file system.
@@ -36,11 +38,16 @@
  * the value of <code>TAG_ID</code> is reserved for internal use.
  * </p>
  * <p>
+ * The default implementation can throw a {@link DOMException} for createChild
+ * and put operations. See {@link XMLMemento}.
+ * </p>
+ * <p>
  * This interface is not intended to be implemented or extended by clients.
  * </p>
  * 
  * @see IPersistableElement
  * @see IElementFactory
+ * @see XMLMemento
  * @noimplement This interface is not intended to be implemented by clients.
  */
 public interface IMemento {
@@ -83,19 +90,24 @@
     public IMemento createChild(String type, String id);
 
     /**
-     * Returns the first child with the given type id.
-     *
-     * @param type the type id
-     * @return the first child with the given type
-     */
+	 * Returns the first child with the given type id.
+	 * 
+	 * @param type
+	 *            the type id
+	 * @return the first child with the given type. May return <code>null</code>
+	 *         .
+	 */
     public IMemento getChild(String type);
 
     /**
-     * Returns all children with the given type id.
-     *
-     * @param type the type id
-     * @return an array of children with the given type
-     */
+	 * Returns all children with the given type id.
+	 * 
+	 * @param type
+	 *            the type id
+	 * @return an array of children with the given type. This will not be
+	 *         <code>null</code>. If there are no keys, an array of length zero
+	 *         will be returned.
+	 */
     public IMemento[] getChildren(String type);
 
     /**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPageService.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPageService.java
index a7488f3..99416bc 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPageService.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPageService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -65,19 +65,21 @@
      */
     public IWorkbenchPage getActivePage();
 
-    /**
-     * Removes the given page listener.
-     * Has no affect if an identical listener is not registered.
-     *
-     * @param listener a page listener
-     */
+	/**
+	 * Removes the given page listener. Has no effect if an identical listener
+	 * is not registered.
+	 * 
+	 * @param listener
+	 *            a page listener
+	 */
     public void removePageListener(IPageListener listener);
 
-    /**
-     * Removes the given page's perspective listener.
-     * Has no affect if an identical listener is not registered.
-     *
-     * @param listener a perspective listener
-     */
+	/**
+	 * Removes the given page's perspective listener. Has no effect if an
+	 * identical listener is not registered.
+	 * 
+	 * @param listener
+	 *            a perspective listener
+	 */
     public void removePerspectiveListener(IPerspectiveListener listener);
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPartListener2.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPartListener2.java
index b4da216..2226bbf 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPartListener2.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPartListener2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,17 +8,27 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.ui;
 
+import org.eclipse.jface.dialogs.IPageChangeProvider;
+import org.eclipse.jface.dialogs.IPageChangedListener;
+import org.eclipse.jface.dialogs.PageChangedEvent;
+
+
 /**
  * Interface for listening to part lifecycle events.
  * <p>
  * This is a replacement for <code>IPartListener</code>.
- * <p> 
+ * <p>
+ * As of 3.5, if the implementation of this listener also implements
+ * {@link IPageChangedListener} then it will also be notified about
+ * {@link PageChangedEvent}s from parts that implement
+ * {@link IPageChangeProvider}.
+ * </p>
+ * <p>
  * This interface may be implemented by clients.
  * </p>
- *
+ * 
  * @see IPartService#addPartListener(IPartListener2)
  */
 public interface IPartListener2 {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPartService.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPartService.java
index 748c7af..fed2e0b 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPartService.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPartService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -81,7 +81,7 @@
 
     /**
      * Removes the given part listener.
-     * Has no affect if an identical listener is not registered.
+     * Has no effect if an identical listener is not registered.
      *
      * @param listener a part listener
      */
@@ -89,7 +89,7 @@
 
     /**
      * Removes the given part listener.
-     * Has no affect if an identical listener is not registered.
+     * Has no effect if an identical listener is not registered.
      *
      * @param listener a part listener
      */
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISaveablePart2.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISaveablePart2.java
index d4ee727..96d2b62 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISaveablePart2.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISaveablePart2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,7 +48,7 @@
 	
 	/**
 	 * Standard return code constant (value 3) indicating that the default
-	 * behavior for prompting the user to save will be use.
+	 * behavior for prompting the user to save will be used.
 	 */
 	public static final int DEFAULT = 3;
 		
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java
index 1c3a5db..aa2f6e8 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java
@@ -503,6 +503,14 @@
      */
     public static final String WINDOW_SHOW_KEY_ASSIST = "org.eclipse.ui.window.showKeyAssist"; //$NON-NLS-1$
 
+	/**
+	 * Id for command "Lock Toolbar" in category "Window" (value is
+	 * <code>"org.eclipse.ui.window.lockToolbar"</code>).
+	 * 
+	 * @since 3.7
+	 */
+	public static final String WINDOW_LOCK_TOOLBAR = "org.eclipse.ui.window.lockToolBar"; //$NON-NLS-1$
+
     // Help Category:
 
     /**
@@ -558,6 +566,14 @@
 	public static final String VIEWS_SHOW_VIEW_PARM_ID = "org.eclipse.ui.views.showView.viewId"; //$NON-NLS-1$
 
 	/**
+	 * Id for parameter "Secondary Id" in command "Show View" in category "Views"
+	 * (value is <code>"org.eclipse.ui.views.showView.secondaryId"</code>).
+	 * 
+	 * @since 3.7
+	 */
+	public static final String VIEWS_SHOW_VIEW_SECONDARY_ID = "org.eclipse.ui.views.showView.secondaryId"; //$NON-NLS-1$
+
+	/**
 	 * Id for parameter "As Fastview" in command "Show View" in category "Views"
 	 * (value is <code>"org.eclipse.ui.views.showView.makeFast"</code>).
 	 * Optional.
@@ -566,7 +582,7 @@
 	 */
 	public static final String VIEWS_SHOW_VIEW_PARM_FASTVIEW = "org.eclipse.ui.views.showView.makeFast"; //$NON-NLS-1$
 
-    // Perspectives Category:
+	// Perspectives Category:
 
     /**
      * Id for command "Show Perspective" in category "Perspectives"
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPart.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPart.java
index 7d83fcc..b7be38a 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPart.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -205,7 +205,7 @@
 
     /**
      * Removes the given property listener from this workbench part.
-     * Has no affect if an identical listener is not registered.
+     * Has no effect if an identical listener is not registered.
      *
      * @param listener a property listener
      */
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPartReference.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPartReference.java
index 242c36b..abd4253 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPartReference.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPartReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 20078 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java
index e0779b8..ccafc70 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -596,5 +596,16 @@
 	 * 
 	 * @since 3.4
 	 */
-	public static final String DISABLE_OPEN_EDITOR_IN_PLACE = "DISABLE_OPEN_EDITOR_IN_PLACE"; //$NON-NLS-1$	
+	public static final String DISABLE_OPEN_EDITOR_IN_PLACE = "DISABLE_OPEN_EDITOR_IN_PLACE"; //$NON-NLS-1$
+
+	/**
+	 * Workbench preference id for indicating the size of the list of most
+	 * recently used working sets.
+	 * <p>
+	 * Integer-valued. The default value for this preference is: <code>5</code>.
+	 * </p>
+	 * 
+	 * @since 3.7
+	 */
+	public static final String RECENTLY_USED_WORKINGSETS_SIZE = "RECENTLY_USED_WORKINGSETS_SIZE"; //$NON-NLS-1$
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPropertyPage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPropertyPage.java
index 0cdf088..fbda04e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPropertyPage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPropertyPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,11 @@
  * &LT;/extension&GT;
  * </pre>
  * </p>
+ * <p>
+ * Property pages that support multiple selected objects should
+ * implement {@link IWorkbenchPropertyPageMulti} instead.
+ * </p>
+ * @see IWorkbenchPropertyPageMulti
  */
 public interface IWorkbenchPropertyPage extends IPreferencePage {
     /**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPropertyPageMulti.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPropertyPageMulti.java
new file mode 100644
index 0000000..3df6189
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPropertyPageMulti.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Broadcom Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Broadcom Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.preference.IPreferencePage;
+
+/**
+ * This interface is similar to {@link IWorkbenchPropertyPage} with the addition
+ * of support for multiple selection.
+ * 
+ * @see IWorkbenchPropertyPage
+ * @since 3.7
+ */
+public interface IWorkbenchPropertyPageMulti extends IPreferencePage {
+
+	/**
+	 * Sets the elements that own properties shown on this page. This method
+	 * will be called if the property page responds to multiple selection.
+	 * 
+	 * @param elements
+	 *            objects that own the properties shown in this page
+	 */
+	public void setElements(IAdaptable[] elements);
+
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkingSetManager.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkingSetManager.java
index 222dc2a..79a2d92 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkingSetManager.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkingSetManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -350,4 +350,21 @@
 	 * @since 3.4
 	 */
 	public void addToWorkingSets(IAdaptable element, IWorkingSet[] workingSets);
+
+	/**
+	 * Sets maximum length of the recent working sets list.
+	 * 
+	 * @param length
+	 *            maximum number of recent working sets to be kept in the list
+	 * @since 3.7
+	 */
+	public void setRecentWorkingSetsLength(int length);
+
+	/**
+	 * Returns the maximum length of the recent working sets list.
+	 * 
+	 * @return the maximum length of the recent working sets list.
+	 * @since 3.7
+	 */
+	public int getRecentWorkingSetsLength();
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/XMLMemento.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/XMLMemento.java
index ad99331..25292d5 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/XMLMemento.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/XMLMemento.java
@@ -21,6 +21,7 @@
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.w3c.dom.Attr;
+import org.w3c.dom.DOMException;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
@@ -143,12 +144,14 @@
     }
 
     /**
-     * Returns a root memento for writing a document.
-     * 
-     * @param type the element node type to create on the document
-     * @return the root memento for writing a document
-     */
-    public static XMLMemento createWriteRoot(String type) {
+	 * Returns a root memento for writing a document.
+	 * 
+	 * @param type
+	 *            the element node type to create on the document
+	 * @return the root memento for writing a document
+	 * @throws DOMException
+	 */
+	public static XMLMemento createWriteRoot(String type) throws DOMException {
         Document document;
         try {
             document = DocumentBuilderFactory.newInstance()
@@ -179,29 +182,61 @@
         this.element = element;
     }
 
-    /* (non-Javadoc)
-     * Method declared in IMemento.
-     */
-    public IMemento createChild(String type) {
+	/**
+	 * Creates a new child of this memento with the given type.
+	 * <p>
+	 * The <code>getChild</code> and <code>getChildren</code> methods are used
+	 * to retrieve children of a given type.
+	 * </p>
+	 * 
+	 * @param type
+	 *            the type
+	 * @return a new child memento
+	 * @see #getChild
+	 * @see #getChildren
+	 * @throws DOMException
+	 *             if the child cannot be created
+	 */
+	public IMemento createChild(String type) throws DOMException {
         Element child = factory.createElement(type);
         element.appendChild(child);
         return new XMLMemento(factory, child);
     }
 
-    /* (non-Javadoc)
-     * Method declared in IMemento.
-     */
-    public IMemento createChild(String type, String id) {
+	/**
+	 * Creates a new child of this memento with the given type and id. The id is
+	 * stored in the child memento (using a special reserved key,
+	 * <code>TAG_ID</code>) and can be retrieved using <code>getId</code>.
+	 * <p>
+	 * The <code>getChild</code> and <code>getChildren</code> methods are used
+	 * to retrieve children of a given type.
+	 * </p>
+	 * 
+	 * @param type
+	 *            the type
+	 * @param id
+	 *            the child id
+	 * @return a new child memento with the given type and id
+	 * @see #getID
+	 * @throws DOMException
+	 *             if the child cannot be created
+	 */
+	public IMemento createChild(String type, String id) throws DOMException {
         Element child = factory.createElement(type);
         child.setAttribute(TAG_ID, id == null ? "" : id); //$NON-NLS-1$
         element.appendChild(child);
         return new XMLMemento(factory, child);
     }
 
-    /* (non-Javadoc)
-     * Method declared in IMemento.
-     */
-    public IMemento copyChild(IMemento child) {
+	/**
+	 * Create a copy of the child node and append it to this node.
+	 * 
+	 * @param child
+	 * @return An IMenento for the new child node.
+	 * @throws DOMException
+	 *             if the child cannot be created
+	 */
+	public IMemento copyChild(IMemento child) throws DOMException {
         Element childElement = ((XMLMemento) child).element;
         Element newElement = (Element) factory.importNode(childElement, true);
         element.appendChild(newElement);
@@ -341,10 +376,17 @@
         return Boolean.valueOf(attr.getValue());
 	}
 
-    /* (non-Javadoc)
-     * Method declared in IMemento.
-     */
-    public String getTextData() {
+	/**
+	 * Returns the data of the Text node of the memento. Each memento is allowed
+	 * only one Text node.
+	 * 
+	 * @return the data of the Text node of the memento, or <code>null</code> if
+	 *         the memento has no Text node.
+	 * @since 2.0
+	 * @throws DOMException
+	 *             if the text node is too big
+	 */
+	public String getTextData() throws DOMException {
         Text textNode = getTextNode();
         if (textNode != null) {
             return textNode.getData();
@@ -391,10 +433,14 @@
     }
 
     /**
-     * Places the element's attributes into the document.
-     * @param copyText true if the first text node should be copied
-     */
-    private void putElement(Element element, boolean copyText) {
+	 * Places the element's attributes into the document.
+	 * 
+	 * @param copyText
+	 *            true if the first text node should be copied
+	 * @throws DOMException
+	 *             if the attributes or children cannot be copied to this node.
+	 */
+	private void putElement(Element element, boolean copyText) throws DOMException {
         NamedNodeMap nodeMap = element.getAttributes();
         int size = nodeMap.getLength();
         for (int i = 0; i < size; i++) {
@@ -419,33 +465,60 @@
         }
     }
 
-    /* (non-Javadoc)
-     * Method declared in IMemento.
-     */
-    public void putFloat(String key, float f) {
+	/**
+	 * Sets the value of the given key to the given floating point number.
+	 * 
+	 * @param key
+	 *            the key
+	 * @param f
+	 *            the value
+	 * @throws DOMException
+	 *             if the attribute cannot be set
+	 */
+	public void putFloat(String key, float f) throws DOMException {
         element.setAttribute(key, String.valueOf(f));
     }
 
-    /* (non-Javadoc)
-     * Method declared in IMemento.
-     */
-    public void putInteger(String key, int n) {
+	/**
+	 * Sets the value of the given key to the given integer.
+	 * 
+	 * @param key
+	 *            the key
+	 * @param n
+	 *            the value
+	 * @throws DOMException
+	 *             if the attribute cannot be set
+	 */
+	public void putInteger(String key, int n) throws DOMException {
         element.setAttribute(key, String.valueOf(n));
     }
 
-    /* (non-Javadoc)
-     * Method declared in IMemento.
-     */
-    public void putMemento(IMemento memento) {
+	/**
+	 * Copy the attributes and children from <code>memento</code> to the
+	 * receiver.
+	 * 
+	 * @param memento
+	 *            the IMemento to be copied.
+	 * @throws DOMException
+	 *             if the attributes or children cannot be copied to this node.
+	 */
+	public void putMemento(IMemento memento) throws DOMException {
     	// Do not copy the element's top level text node (this would overwrite the existing text).
     	// Text nodes of children are copied.
         putElement(((XMLMemento) memento).element, false);
     }
 
-    /* (non-Javadoc)
-     * Method declared in IMemento.
-     */
-    public void putString(String key, String value) {
+	/**
+	 * Sets the value of the given key to the given string.
+	 * 
+	 * @param key
+	 *            the key
+	 * @param value
+	 *            the value
+	 * @throws DOMException
+	 *             if the attribute cannot be set
+	 */
+	public void putString(String key, String value) throws DOMException {
         if (value == null) {
 			return;
 		}
@@ -453,16 +526,32 @@
     }
 
 	/**
+	 * Sets the value of the given key to the given boolean value.
+	 * 
+	 * @param key
+	 *            the key
+	 * @param value
+	 *            the value
 	 * @since 3.4
+	 * @throws DOMException
+	 *             if the attribute cannot be set
 	 */
-	public void putBoolean(String key, boolean value) {
+	public void putBoolean(String key, boolean value) throws DOMException {
 		element.setAttribute(key, value ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
 	}
 
-    /* (non-Javadoc)
-     * Method declared in IMemento.
-     */
-    public void putTextData(String data) {
+	/**
+	 * Sets the memento's Text node to contain the given data. Creates the Text
+	 * node if none exists. If a Text node does exist, it's current contents are
+	 * replaced. Each memento is allowed only one text node.
+	 * 
+	 * @param data
+	 *            the data to be placed on the Text node
+	 * @since 2.0
+	 * @throws DOMException
+	 *             if the text node cannot be created under this node.
+	 */
+	public void putTextData(String data) throws DOMException {
         Text textNode = getTextNode();
         if (textNode == null) {
             textNode = factory.createTextNode(data);
@@ -495,8 +584,6 @@
      */
     private static final class DOMWriter extends PrintWriter {
     	
-    	private int tab;
-
     	/* constants */
     	private static final String XML_VERSION = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; //$NON-NLS-1$
 
@@ -507,7 +594,6 @@
     	 */
     	public DOMWriter(Writer output) {
     		super(output);
-    		tab = 0;
     		println(XML_VERSION);
     	}
 
@@ -523,7 +609,6 @@
         	boolean hasChildren = element.hasChildNodes();
         	startTag(element, hasChildren);
         	if (hasChildren) {
-	        	tab++;
 	        	boolean prevWasText = false;
 	        	NodeList children = element.getChildNodes();
 	    		for (int i = 0; i < children.getLength(); i++) {
@@ -531,7 +616,6 @@
 	    			if (node instanceof Element) {
 	    				if (!prevWasText) {
 	    					println();
-	    					printTabulation();
 	    				}
 	    				print((Element) children.item(i));
 	    				prevWasText = false;
@@ -541,25 +625,13 @@
 	    				prevWasText = true;
 	    			}
 	    		}
-	    		tab--;
 	    		if (!prevWasText) {
 	    			println();
-	    			printTabulation();
 	    		}
 	    		endTag(element);
         	}
     	}
 
-    	private void printTabulation() {
-        	// Indenting is disabled, as it can affect the result of getTextData().
-        	// In 3.0, elements were separated by a newline but not indented.
-    		// This causes getTextData() to return "\n" even if no text data had explicitly been set.
-        	// The code here emulates that behaviour.
-    		
-//    		for (int i = 0; i < tab; i++)
-//    			super.print("\t"); //$NON-NLS-1$
-    	}
-
     	private void startTag(Element element, boolean hasChildren) {
     		StringBuffer sb = new StringBuffer();
     		sb.append("<"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java
index 4cdbd3c..83185dd 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java
@@ -10,35 +10,27 @@
  *******************************************************************************/
 package org.eclipse.ui.actions;
 
-import org.eclipse.osgi.util.NLS;
-
 import org.eclipse.core.runtime.IProduct;
 import org.eclipse.core.runtime.Platform;
-
+import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
-
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.IWorkbenchPreferenceConstants;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.internal.CloseAllSavedAction;
 import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
 import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
-import org.eclipse.ui.internal.IntroAction;
-import org.eclipse.ui.internal.LockToolBarAction;
 import org.eclipse.ui.internal.NavigationHistoryAction;
-import org.eclipse.ui.internal.OpenPreferencesAction;
-import org.eclipse.ui.internal.ResetPerspectiveAction;
-import org.eclipse.ui.internal.SaveAction;
-import org.eclipse.ui.internal.SaveAllAction;
-import org.eclipse.ui.internal.SaveAsAction;
-import org.eclipse.ui.internal.SavePerspectiveAction;
 import org.eclipse.ui.internal.ToggleEditorsVisibilityAction;
+import org.eclipse.ui.internal.Workbench;
 import org.eclipse.ui.internal.WorkbenchImages;
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.actions.CommandAction;
-import org.eclipse.ui.internal.actions.DynamicHelpAction;
-import org.eclipse.ui.internal.actions.HelpContentsAction;
-import org.eclipse.ui.internal.actions.HelpSearchAction;
+import org.eclipse.ui.internal.intro.IntroDescriptor;
+import org.eclipse.ui.internal.intro.IntroMessages;
+import org.eclipse.ui.internal.util.PrefUtil;
 
 /**
  * Access to standard actions provided by the workbench.
@@ -352,9 +344,19 @@
             if (window == null) {
                 throw new IllegalArgumentException();
             }
-            IWorkbenchAction action = new IntroAction(window);
-            action.setId(getId());
-            return action;
+
+			WorkbenchCommandAction action = new WorkbenchCommandAction(getCommandId(), window);
+
+			action.setId(getId());
+			action.setText(IntroMessages.Intro_action_text);
+			window.getWorkbench().getHelpSystem()
+					.setHelp(action, IWorkbenchHelpContextIds.INTRO_ACTION);
+			IntroDescriptor introDescriptor = ((Workbench) window.getWorkbench())
+					.getIntroDescriptor();
+			if (introDescriptor != null)
+				action.setImageDescriptor(introDescriptor.getImageDescriptor());
+
+			return action;
         }
     };
 
@@ -627,8 +629,8 @@
 	 * Workbench action (id: "lockToolBar"): Lock/unlock the workbench window tool bar. This action
 	 * maintains its enablement state.
 	 */
-    public static final ActionFactory LOCK_TOOL_BAR = new ActionFactory(
-            "lockToolBar") {//$NON-NLS-1$
+	public static final ActionFactory LOCK_TOOL_BAR = new ActionFactory(
+			"lockToolBar", IWorkbenchCommandConstants.WINDOW_LOCK_TOOLBAR) {//$NON-NLS-1$
         
         /* (non-Javadoc)
          * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
@@ -637,8 +639,12 @@
             if (window == null) {
                 throw new IllegalArgumentException();
             }
-            IWorkbenchAction action = new LockToolBarAction(window);
-            action.setId(getId());
+			WorkbenchCommandAction action = new WorkbenchCommandAction(getCommandId(), window);
+			action.setId(getId());
+			action.setText(WorkbenchMessages.LockToolBarAction_text);
+			action.setToolTipText(WorkbenchMessages.LockToolBarAction_toolTip);
+			window.getWorkbench().getHelpSystem()
+					.setHelp(action, IWorkbenchHelpContextIds.LOCK_TOOLBAR_ACTION);
             return action;
         }
     };
@@ -955,8 +961,14 @@
             if (window == null) {
                 throw new IllegalArgumentException();
             }
-            IWorkbenchAction action = new OpenPreferencesAction(window);
+
+            WorkbenchCommandAction action = new WorkbenchCommandAction(
+					getCommandId(), window);
             action.setId(getId());
+            action.setText(WorkbenchMessages.OpenPreferences_text);
+			action.setToolTipText(WorkbenchMessages.OpenPreferences_toolTip);
+            window.getWorkbench().getHelpSystem().setHelp(action,
+            		IWorkbenchHelpContextIds.OPEN_PREFERENCES_ACTION);
             return action;
         }
     };
@@ -1238,12 +1250,17 @@
          * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
          */
         public IWorkbenchAction create(IWorkbenchWindow window) {
-            if (window == null) {
-                throw new IllegalArgumentException();
-            }
-            IWorkbenchAction action = new ResetPerspectiveAction(window);
-            action.setId(getId());
-            return action;
+			if (window == null) {
+				throw new IllegalArgumentException();
+			}
+			WorkbenchCommandAction action = new WorkbenchCommandAction(getCommandId(), window);
+
+			action.setId(getId());
+			action.setText(WorkbenchMessages.ResetPerspective_text);
+			action.setToolTipText(WorkbenchMessages.ResetPerspective_toolTip);
+			window.getWorkbench().getHelpSystem()
+					.setHelp(action, IWorkbenchHelpContextIds.RESET_PERSPECTIVE_ACTION);
+			return action;
         }
     };
 
@@ -1283,8 +1300,12 @@
             if (window == null) {
                 throw new IllegalArgumentException();
             }
-            IWorkbenchAction action = new SaveAction(window);
+			WorkbenchCommandAction action = new WorkbenchCommandAction(getCommandId(), window);
+			action.setText(WorkbenchMessages.SaveAction_text);
+			action.setToolTipText(WorkbenchMessages.SaveAction_toolTip);
             action.setId(getId());
+			window.getWorkbench().getHelpSystem()
+					.setHelp(action, IWorkbenchHelpContextIds.SAVE_ACTION);
             return action;
         }
     };
@@ -1303,7 +1324,11 @@
             if (window == null) {
                 throw new IllegalArgumentException();
             }
-            IWorkbenchAction action = new SaveAllAction(window);
+			IWorkbenchAction action = new WorkbenchCommandAction(getCommandId(), window);
+			action.setText(WorkbenchMessages.SaveAll_text);
+			action.setToolTipText(WorkbenchMessages.SaveAll_toolTip);
+			window.getWorkbench().getHelpSystem()
+					.setHelp(action, IWorkbenchHelpContextIds.SAVE_ALL_ACTION);
             action.setId(getId());
             return action;
         }
@@ -1323,7 +1348,11 @@
             if (window == null) {
                 throw new IllegalArgumentException();
             }
-            IWorkbenchAction action = new SaveAsAction(window);
+			IWorkbenchAction action = new WorkbenchCommandAction(getCommandId(), window);
+			action.setText(WorkbenchMessages.SaveAs_text);
+			action.setToolTipText(WorkbenchMessages.SaveAs_toolTip);
+			window.getWorkbench().getHelpSystem()
+					.setHelp(action, IWorkbenchHelpContextIds.SAVE_AS_ACTION);
             action.setId(getId());
             return action;
         }
@@ -1339,14 +1368,19 @@
         /* (non-Javadoc)
          * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
          */
-        public IWorkbenchAction create(IWorkbenchWindow window) {
-            if (window == null) {
-                throw new IllegalArgumentException();
-            }
-            IWorkbenchAction action = new SavePerspectiveAction(window);
-            action.setId(getId());
-            return action;
-        }
+		public IWorkbenchAction create(IWorkbenchWindow window) {
+			if (window == null) {
+				throw new IllegalArgumentException();
+			}
+			WorkbenchCommandAction action = new WorkbenchCommandAction(getCommandId(), window);
+
+			action.setId(getId());
+			action.setText(WorkbenchMessages.SavePerspective_text);
+			action.setToolTipText(WorkbenchMessages.SavePerspective_toolTip);
+			window.getWorkbench().getHelpSystem()
+					.setHelp(action, IWorkbenchHelpContextIds.SAVE_PERSPECTIVE_ACTION);
+			return action;
+		}
     };
 
 	/**
@@ -1572,8 +1606,23 @@
             if (window == null) {
                 throw new IllegalArgumentException();
             }
-            IWorkbenchAction action = new HelpContentsAction(window);
-            action.setId(getId());
+
+			WorkbenchCommandAction action = new WorkbenchCommandAction(getCommandId(), window);
+
+			// support for allowing a product to override the text for the
+			// action
+			String overrideText = PrefUtil.getAPIPreferenceStore().getString(
+					IWorkbenchPreferenceConstants.HELP_CONTENTS_ACTION_TEXT);
+			if ("".equals(overrideText)) { //$NON-NLS-1$
+				action.setText(WorkbenchMessages.HelpContentsAction_text);
+				action.setToolTipText(WorkbenchMessages.HelpContentsAction_toolTip);
+			} else {
+				action.setText(overrideText);
+				action.setToolTipText(Action.removeMnemonics(overrideText));
+			}
+			window.getWorkbench().getHelpSystem()
+					.setHelp(action, IWorkbenchHelpContextIds.HELP_CONTENTS_ACTION);
+			action.setId(getId());
             return action;
         }
     };
@@ -1594,8 +1643,22 @@
             if (window == null) {
                 throw new IllegalArgumentException();
             }
-            IWorkbenchAction action = new HelpSearchAction(window);
-            action.setId(getId());
+			WorkbenchCommandAction action = new WorkbenchCommandAction(getCommandId(), window);
+
+			// support for allowing a product to override the text for the
+			// action
+			String overrideText = PrefUtil.getAPIPreferenceStore().getString(
+					IWorkbenchPreferenceConstants.HELP_SEARCH_ACTION_TEXT);
+			if ("".equals(overrideText)) { //$NON-NLS-1$
+				action.setText(WorkbenchMessages.HelpSearchAction_text);
+				action.setToolTipText(WorkbenchMessages.HelpSearchAction_toolTip);
+			} else {
+				action.setText(overrideText);
+				action.setToolTipText(Action.removeMnemonics(overrideText));
+			}
+			window.getWorkbench().getHelpSystem()
+					.setHelp(action, IWorkbenchHelpContextIds.HELP_SEARCH_ACTION);
+			action.setId(getId());
             return action;
         }
     };
@@ -1616,7 +1679,23 @@
             if (window == null) {
                 throw new IllegalArgumentException();
             }
-            IWorkbenchAction action = new DynamicHelpAction(window);
+
+			WorkbenchCommandAction action = new WorkbenchCommandAction(getCommandId(), window);
+
+			// support for allowing a product to override the text for the
+			// action
+			String overrideText = PrefUtil.getAPIPreferenceStore().getString(
+					IWorkbenchPreferenceConstants.DYNAMIC_HELP_ACTION_TEXT);
+			if ("".equals(overrideText)) { //$NON-NLS-1$
+				action.setText(WorkbenchMessages.DynamicHelpAction_text);
+				action.setToolTipText(WorkbenchMessages.DynamicHelpAction_toolTip);
+			} else {
+				action.setText(overrideText);
+				action.setToolTipText(Action.removeMnemonics(overrideText));
+			}
+			window.getWorkbench().getHelpSystem()
+					.setHelp(action, IWorkbenchHelpContextIds.DYNAMIC_HELP_ACTION);
+
             action.setId(getId());
             return action;
         }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java
index bea66b9..a77a9ad 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -154,6 +154,7 @@
 					WorkbenchPlugin.getDefault().getPreferenceStore()
 							.removePropertyChangeListener(perfs[0]);
 					window.getPartService().removePartListener(partListener);
+					super.dispose();
 				}
 			};
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/IWorkbenchWindowConfigurer.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/IWorkbenchWindowConfigurer.java
index c1cff67..a70337c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/IWorkbenchWindowConfigurer.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/IWorkbenchWindowConfigurer.java
@@ -89,12 +89,16 @@
      */
     public boolean getShowMenuBar();
 
-    /**
-     * Sets whether the underlying workbench window has a menu bar.
-     * 
-     * @param show <code>true</code> for a menu bar, and <code>false</code>
-     * for no menu bar
-     */
+	/**
+	 * Sets whether the underlying workbench window has a menu bar.
+	 * 
+	 * When this method is not called, the value defaults to <code>true</code>
+	 * 
+	 * @param show
+	 *            <code>true</code> for a menu bar, and <code>false</code> for
+	 *            no menu bar
+	 * 
+	 */
     public void setShowMenuBar(boolean show);
 
     /**
@@ -108,12 +112,15 @@
      */
     public boolean getShowCoolBar();
 
-    /**
-     * Sets whether the underlying workbench window has a cool bar.
-     * 
-     * @param show <code>true</code> for a cool bar, and <code>false</code>
-     * for no cool bar
-     */
+	/**
+	 * Sets whether the underlying workbench window has a cool bar.
+	 * 
+	 * When this method is not called, the value defaults to <code>true</code>
+	 * 
+	 * @param show
+	 *            <code>true</code> for a cool bar, and <code>false</code> for
+	 *            no cool bar
+	 */
     public void setShowCoolBar(boolean show);
 
     /**
@@ -127,12 +134,15 @@
      */
     public boolean getShowStatusLine();
 
-    /**
-     * Sets whether the underlying workbench window has a status line.
-     * 
-     * @param show <code>true</code> for a status line, and <code>false</code>
-     * for no status line
-     */
+	/**
+	 * Sets whether the underlying workbench window has a status line.
+	 * 
+	 * When this method is not called, the value defaults to <code>true</code>
+	 * 
+	 * @param show
+	 *            <code>true</code> for a status line, and <code>false</code>
+	 *            for no status line
+	 */
     public void setShowStatusLine(boolean show);
 
     /**
@@ -147,13 +157,16 @@
      */
     public boolean getShowPerspectiveBar();
 
-    /**
-     * Sets whether the underlying workbench window has a perspective bar (the 
-     * perspective bar provides buttons to quickly switch between perspectives).
-     * 
-     * @param show <code>true</code> for a perspective bar, and
-     * <code>false</code> for no perspective bar
-     */
+	/**
+	 * Sets whether the underlying workbench window has a perspective bar (the
+	 * perspective bar provides buttons to quickly switch between perspectives).
+	 * 
+	 * When this method is not called, the value defaults to <code>false</code>
+	 * 
+	 * @param show
+	 *            <code>true</code> for a perspective bar, and
+	 *            <code>false</code> for no perspective bar
+	 */
     public void setShowPerspectiveBar(boolean show);
 
     /**
@@ -167,12 +180,16 @@
      */
     public boolean getShowFastViewBars();
 
-    /**
-     * Sets whether the underlying workbench window has fast view bars. 
-     * 
-     * @param enable <code>true</code> for fast view bars, and 
-     * <code>false</code> for no fast view bars
-     */
+	/**
+	 * Sets whether the underlying workbench window has fast view bars.
+	 * 
+	 * When this method is not called, the value defaults to <code>false</code>
+	 * 
+	 * 
+	 * @param enable
+	 *            <code>true</code> for fast view bars, and <code>false</code>
+	 *            for no fast view bars
+	 */
     public void setShowFastViewBars(boolean enable);
 
     /**
@@ -186,12 +203,15 @@
      */
     public boolean getShowProgressIndicator();
 
-    /**
-     * Sets whether the underlying workbench window has a progress indicator.
-     * 
-     * @param show <code>true</code> for a progress indicator, and <code>false</code>
-     * for no progress indicator
-     */
+	/**
+	 * Sets whether the underlying workbench window has a progress indicator.
+	 * 
+	 * When this method is not called, the value defaults to <code>false</code>
+	 * 
+	 * @param show
+	 *            <code>true</code> for a progress indicator, and
+	 *            <code>false</code> for no progress indicator
+	 */
     public void setShowProgressIndicator(boolean show);
 
     /**
@@ -223,14 +243,14 @@
      */
     public Point getInitialSize();
 
-    /**
+	/**
      * Sets the size to use for the window's shell when it is created.
      * This method has no effect after the shell is created.
      * That is, it must be called within the <code>preWindowOpen</code>
      * callback on <code>WorkbenchAdvisor</code>.
-     *
+	 * 
      * @param initialSize the initial size to use for the shell
-     */
+	 */
     public void setInitialSize(Point initialSize);
 
     /**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/WorkbenchWindowAdvisor.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/WorkbenchWindowAdvisor.java
index 13e2c2b..80657d1 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/WorkbenchWindowAdvisor.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/WorkbenchWindowAdvisor.java
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.ui.application;
 
+import java.util.ArrayList;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
@@ -21,6 +22,9 @@
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.WorkbenchException;
 import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.internal.EditorAreaHelper;
+import org.eclipse.ui.internal.PartStack;
+import org.eclipse.ui.internal.WorkbenchPage;
 import org.eclipse.ui.internal.WorkbenchWindowConfigurer;
 import org.eclipse.ui.internal.util.PrefUtil;
 import org.eclipse.ui.intro.IIntroManager;
@@ -134,6 +138,34 @@
         // do nothing
     }
 
+	/**
+	 * Close any empty editor stacks that may have been left open when the
+	 * Workbench Window shut down. May be called from
+	 * {@link #postWindowRestore()} in the subclass but is not called by
+	 * default.
+	 * 
+	 * @since 3.7
+	 */
+	protected void cleanUpEditorArea() {
+		// close any empty Editor stacks that may have been left open
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=110684
+		if (getWindowConfigurer() != null && getWindowConfigurer().getWindow() != null
+				&& getWindowConfigurer().getWindow().getActivePage() != null) {
+			WorkbenchPage activePage = (WorkbenchPage) getWindowConfigurer().getWindow()
+					.getActivePage();
+			EditorAreaHelper editorAreaHelper = activePage.getEditorPresentation();
+			if (editorAreaHelper != null) {
+				ArrayList workbooks = editorAreaHelper.getWorkbooks();
+				for (int i = 0; i < workbooks.size(); i++) {
+					PartStack editorStack = (PartStack) workbooks.get(i);
+					if (editorStack.getChildren().length == 0) {
+						editorStack.getContainer().remove(editorStack);
+					}
+				}
+			}
+		}
+	}
+
     /**
      * Opens the introduction componenet.  
      * <p>
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/IContextService.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/IContextService.java
index d56034e..84105ba 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/IContextService.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/contexts/IContextService.java
@@ -11,7 +11,6 @@
 package org.eclipse.ui.contexts;
 
 import java.util.Collection;
-
 import org.eclipse.core.commands.contexts.Context;
 import org.eclipse.core.commands.contexts.IContextManagerListener;
 import org.eclipse.core.expressions.Expression;
@@ -40,6 +39,14 @@
 public interface IContextService extends IServiceWithSources {
 
 	/**
+	 * The identifier for the context that is active when a workbench is active.
+	 * 
+	 * @since 3.7
+	 * 
+	 */
+	public static final String CONTEXT_ID_WORKBENCH_MENU = "org.eclipse.ui.contexts.workbenchMenu"; //$NON-NLS-1$
+
+	/**
 	 * The identifier for the context that is active when a shell registered as
 	 * a dialog.
 	 */
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java
index f5014ad..d47eba5 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@
 import org.eclipse.jface.util.Util;
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.osgi.util.TextProcessor;
 import org.eclipse.swt.SWT;
@@ -55,11 +56,16 @@
  * internal and external editors.
  * 
  * @since 3.3
+ * @noextend This class is not intended to be subclassed by clients.
  */
 
-public final class EditorSelectionDialog extends Dialog {
+public class EditorSelectionDialog extends Dialog {
 	private EditorDescriptor selectedEditor;
 
+	private EditorDescriptor hiddenSelectedEditor;
+
+	private int hiddenTableTopIndex;
+
 	private Button externalButton;
 
 	private Table editorTable;
@@ -70,7 +76,13 @@
 
 	private Button okButton;
 
-	private static final String STORE_ID_INTERNAL_EXTERNAL = "EditorSelectionDialog.STORE_ID_INTERNAL_EXTERNAL";//$NON-NLS-1$
+	/**
+	 * For internal use only.
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
+	 * @since 3.7
+	 */
+	protected static final String STORE_ID_INTERNAL_EXTERNAL = "EditorSelectionDialog.STORE_ID_INTERNAL_EXTERNAL";//$NON-NLS-1$
 
 	private String message = WorkbenchMessages.EditorSelection_chooseAnEditor;
 
@@ -157,10 +169,13 @@
 		((GridLayout) contents.getLayout()).numColumns = 2;
 
 		// begin the layout
-		Label textLabel = new Label(contents, SWT.NONE);
+		Label textLabel = new Label(contents, SWT.WRAP);
+
 		textLabel.setText(message);
 		GridData data = new GridData();
 		data.horizontalSpan = 2;
+		data.horizontalAlignment = SWT.FILL;
+		data.widthHint = TABLE_WIDTH;
 		textLabel.setLayoutData(data);
 		textLabel.setFont(font);
 
@@ -229,11 +244,32 @@
 	}
 
 	protected void fillEditorTable() {
-		if (internalButton.getSelection()) {
-			editorTableViewer.setInput(getInternalEditors());
-		} else {
-			editorTableViewer.setInput(getExternalEditors());
+		EditorDescriptor newSelection = null;
+		int newTopIndex = 0;
+
+		boolean showInternal = internalButton.getSelection();
+		boolean isShowingInternal = editorTableViewer.getInput() == getInternalEditors();
+		if (showInternal != isShowingInternal) {
+			newSelection = hiddenSelectedEditor;
+			newTopIndex = hiddenTableTopIndex;
+			if (editorTable.getSelectionIndex() != -1) {
+				hiddenSelectedEditor = (EditorDescriptor) editorTable.getSelection()[0].getData();
+				hiddenTableTopIndex = editorTable.getTopIndex();
+			}
 		}
+
+		editorTableViewer.setInput(showInternal ? getInternalEditors() : getExternalEditors());
+
+		if (newSelection != null) {
+			editorTable.setTopIndex(newTopIndex);
+			editorTableViewer.setSelection(new StructuredSelection(newSelection), true);
+		} else {
+			// set focus to first element, but don't select it:
+			editorTable.setTopIndex(0);
+			editorTable.setSelection(0);
+			editorTable.deselectAll();
+		}
+		editorTable.setFocus();
 	}
 
 	/**
@@ -347,7 +383,7 @@
 			TableItem ti = new TableItem(editorTable, SWT.NULL);
 			ti.setData(editor);
 			ti.setText(editor.getLabel());
-			Image image = editor.getImageDescriptor().createImage();
+			Image image = (Image) resourceManager.get(editor.getImageDescriptor());
 			ti.setImage(image);
 
 			// need to pass an array to setSelection -- 1FSKYVO: SWT:ALL -
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java
index a1686f8..3671307 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java
@@ -25,7 +25,7 @@
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.LinkedList;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
 import org.eclipse.core.commands.AbstractHandler;
@@ -2214,7 +2214,7 @@
 
 		private static final int MAX_HISTORY_SIZE = 60;
 
-		private final List historyList;
+		private final Set historyList;
 
 		private final String rootNodeName;
 
@@ -2222,7 +2222,7 @@
 
 		private SelectionHistory(String rootNodeName, String infoNodeName) {
 
-			historyList = Collections.synchronizedList(new LinkedList() {
+			historyList = Collections.synchronizedSet(new LinkedHashSet() {
 
 				private static final long serialVersionUID = 0L;
 
@@ -2232,11 +2232,12 @@
 				 * @see java.util.LinkedList#add(java.lang.Object)
 				 */
 				public boolean add(Object arg0) {
-					if (this.size() >= MAX_HISTORY_SIZE)
-						this.removeFirst();
-					if (!this.contains(arg0))
-						return super.add(arg0);
-					return false;
+					if (this.size() >= MAX_HISTORY_SIZE) {
+						Iterator iterator = this.iterator();
+						iterator.next();
+						iterator.remove();
+					}
+					return super.add(arg0);
 				}
 
 			});
@@ -2259,6 +2260,7 @@
 		 *            the item to be added to the history
 		 */
 		public synchronized void accessed(Object object) {
+			historyList.remove(object);
 			historyList.add(object);
 		}
 
@@ -3283,13 +3285,14 @@
 		 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
 		 */
 		public int compare(Object o1, Object o2) {
-			if ((isHistoryElement(o1) && isHistoryElement(o2))
-					|| (!isHistoryElement(o1) && !isHistoryElement(o2)))
+			boolean h1 = isHistoryElement(o1);
+			boolean h2 = isHistoryElement(o2);
+			if (h1 == h2)
 				return getItemsComparator().compare(o1, o2);
 
-			if (isHistoryElement(o1))
+			if (h1)
 				return -2;
-			if (isHistoryElement(o2))
+			if (h2)
 				return +2;
 
 			return 0;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyDialogAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyDialogAction.java
index 3374289..f584e01 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyDialogAction.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyDialogAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     James Blackburn (Broadcom Corp.) - Bug 294628 multiple selection
  *******************************************************************************/
 package org.eclipse.ui.dialogs;
 
@@ -94,13 +95,13 @@
     }
 
 	/**
-	 * Returns whether the provided object has pages registered in the property
+	 * Returns whether the provided selection has pages registered in the property
 	 * page manager.
 	 * 
 	 * @param object
 	 * @return boolean
 	 */
-	private boolean hasPropertyPagesFor(Object object) {
+	private boolean hasPropertyPagesFor(IStructuredSelection object) {
 		return PropertyPageContributorManager.getManager().getApplicableContributors(object).size() != 0;
 	}
 
@@ -115,7 +116,7 @@
 	 * state of the action on each selection change.
 	 * </p>
 	 * 
-	 * @return <code>true</code> if the selection is of size 1 and there are
+	 * @return <code>true</code> if the selection is not empty and there are
 	 *         property pages for the selected element, and <code>false</code>
 	 *         otherwise
 	 */
@@ -128,7 +129,7 @@
 
 	/**
 	 * Returns whether this action is applicable to the current selection. This
-	 * checks that the selection is of size 1, and checks with the workbench's
+	 * checks that the selection is not empty, and checks with the workbench's
 	 * property page manager to see if there are any property pages registered
 	 * for the selected element's type.
 	 * <p>
@@ -138,12 +139,12 @@
 	 * 
 	 * @param selection
 	 *            The selection to test
-	 * @return <code>true</code> if the selection is of size 1 and there are
+	 * @return <code>true</code> if the selection is of not empty and there are
 	 *         property pages for the selected element, and <code>false</code>
 	 *         otherwise
 	 */
 	public boolean isApplicableForSelection(IStructuredSelection selection) {
-		return selection.size() == 1 && hasPropertyPagesFor(selection.getFirstElement());
+		return !selection.isEmpty() && hasPropertyPagesFor(selection);
 	}
 
 	
@@ -167,13 +168,11 @@
 	 * @since 3.1
 	 */
 	public PreferenceDialog createDialog() {
-
-		Object element = getStructuredSelection().getFirstElement();
-		if (element == null) {
+		if (getStructuredSelection().isEmpty())
 			return null;
-		}
+
 		return PropertyDialog
-				.createDialogOn(shellProvider.getShell(), initialPageId, element);
+				.createDialogOn(shellProvider.getShell(), initialPageId, getStructuredSelection());
 	}
 
 	
@@ -181,6 +180,6 @@
 	 * @see org.eclipse.ui.actions.SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection)
 	 */
 	public void selectionChanged(IStructuredSelection selection) {
-		setEnabled(selection.size() == 1 && selection.getFirstElement() != null);
+		setEnabled(!selection.isEmpty());
 	}
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyPage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyPage.java
index a4bf64d..1d6667d 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyPage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PropertyPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,12 +13,16 @@
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.ui.IWorkbenchPropertyPage;
+import org.eclipse.ui.IWorkbenchPropertyPageMulti;
 
 /**
  * Abstract base implementation of a workbench property page (
  * <code>IWorkbenchPropertyPage</code>). The implementation is a JFace
  * preference page with an adaptable element.
  * <p>
+ * Property pages that support multiple selected objects should
+ * implement {@link IWorkbenchPropertyPageMulti} instead.
+ * <p>
  * Subclasses must implement the <code>createContents</code> framework method to
  * supply the property page's main control.
  * </p>
@@ -38,9 +42,9 @@
  * </p>
  * 
  * @see IWorkbenchPropertyPage
+ * @see IWorkbenchPropertyPageMulti
  */
-public abstract class PropertyPage extends PreferencePage implements
-        IWorkbenchPropertyPage {
+public abstract class PropertyPage extends PreferencePage implements IWorkbenchPropertyPage {
     /**
      * The element.
      */
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/TypeFilteringDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/TypeFilteringDialog.java
index 6d4984a..df7b898 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/TypeFilteringDialog.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/TypeFilteringDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@
 import java.util.StringTokenizer;
 
 import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.CheckboxTableViewer;
 import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.swt.SWT;
@@ -219,8 +220,7 @@
         listViewer.getTable().setLayoutData(data);
         listViewer.getTable().setFont(parent.getFont());
         listViewer.setLabelProvider(FileEditorMappingLabelProvider.INSTANCE);
-        listViewer
-                .setContentProvider(FileEditorMappingContentProvider.INSTANCE);
+		listViewer.setContentProvider(ArrayContentProvider.getInstance());
         listViewer.setComparator(new ViewerComparator());
         addSelectionButtons(composite);
         createUserEntryGroup(composite);
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/HandlerUtil.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/HandlerUtil.java
index 056c7df..498d9d6 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/HandlerUtil.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/HandlerUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,6 +20,7 @@
 import org.eclipse.core.expressions.IEvaluationContext;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.ISources;
 import org.eclipse.ui.IWorkbenchPart;
@@ -286,6 +287,43 @@
 	}
 
 	/**
+	 * Return the input of the active editor.
+	 * 
+	 * @param event
+	 *            The execution event that contains the application context
+	 * @return the input of the active editor, or <code>null</code>.
+	 * @since 3.7
+	 */
+	public static IEditorInput getActiveEditorInput(ExecutionEvent event) {
+		Object o = getVariable(event, ISources.ACTIVE_EDITOR_INPUT_NAME);
+		if (o instanceof IEditorInput) {
+			return (IEditorInput) o;
+		}
+		return null;
+	}
+
+	/**
+	 * Return the input of the active editor.
+	 * 
+	 * @param event
+	 *            The execution event that contains the application context
+	 * @return the input of the active editor. Will not return <code>null</code>
+	 *         .
+	 * @throws ExecutionException
+	 *             If the active editor input variable is not found.
+	 * @since 3.7
+	 */
+	public static IEditorInput getActiveEditorInputChecked(ExecutionEvent event)
+			throws ExecutionException {
+		Object o = getVariableChecked(event, ISources.ACTIVE_EDITOR_INPUT_NAME);
+		if (!(o instanceof IEditorInput)) {
+			incorrectTypeFound(event, ISources.ACTIVE_EDITOR_INPUT_NAME, IEditorInput.class,
+					o.getClass());
+		}
+		return (IEditorInput) o;
+	}
+
+	/**
 	 * Return the active part.
 	 * 
 	 * @param event
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java
index d1fa612..bf42b84 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java
@@ -11,7 +11,6 @@
 package org.eclipse.ui.handlers;
 
 import java.util.Map;
-
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -66,15 +65,15 @@
 				.getActiveWorkbenchWindowChecked(event);
 		// Get the view identifier, if any.
 		final Map parameters = event.getParameters();
-		final Object value = parameters
-				.get(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_ID);
+		final Object viewId = parameters.get(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_ID);
+		final Object secondary = parameters.get(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_SECONDARY_ID);
 		makeFast = "true".equals(parameters.get(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_FASTVIEW)); //$NON-NLS-1$
 		
-		if (value == null) {
+		if (viewId == null) {
 			openOther(window);
 		} else {
             try {
-                openView((String) value, window);
+				openView((String) viewId, (String) secondary, window);
             } catch (PartInitException e) {
                 throw new ExecutionException("Part could not be initialized", e); //$NON-NLS-1$
             }
@@ -103,7 +102,7 @@
 		final IViewDescriptor[] descriptors = dialog.getSelection();
 		for (int i = 0; i < descriptors.length; ++i) {
 			try {
-                openView(descriptors[i].getId(), window);
+				openView(descriptors[i].getId(), null, window);
 			} catch (PartInitException e) {
 				StatusUtil.handleStatus(e.getStatus(),
 						WorkbenchMessages.ShowView_errorTitle
@@ -118,12 +117,13 @@
 	 * 
 	 * @param viewId
 	 *            The view to open; must not be <code>null</code>
+	 * @param secondaryId
+	 *            an optional secondary id; may be <code>null</code>
 	 * @throws PartInitException
 	 *             If the part could not be initialized.
 	 */
-	private final void openView(final String viewId,
-			final IWorkbenchWindow activeWorkbenchWindow)
-			throws PartInitException {
+	private final void openView(final String viewId, final String secondaryId,
+			final IWorkbenchWindow activeWorkbenchWindow) throws PartInitException {
 
 		final IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
 		if (activePage == null) {
@@ -137,7 +137,7 @@
             // If we're making a fast view then use the new mechanism directly
             boolean useNewMinMax = Perspective.useNewMinMax(persp);
             if (useNewMinMax) {
-            	IViewReference ref = persp.getViewReference(viewId, null);
+				IViewReference ref = persp.getViewReference(viewId, secondaryId);
             	if (ref == null)
             		return;
 
@@ -147,10 +147,10 @@
         		return;
             }
             
-            IViewReference ref = wp.findViewReference(viewId);
+			IViewReference ref = wp.findViewReference(viewId, secondaryId);
             
             if (ref == null) {
-                IViewPart part = wp.showView(viewId, null, IWorkbenchPage.VIEW_CREATE);
+				IViewPart part = wp.showView(viewId, secondaryId, IWorkbenchPage.VIEW_CREATE);
                 ref = (IViewReference)wp.getReference(part); 
             }
             
@@ -159,7 +159,7 @@
             }
             wp.activate(ref.getPart(true));
         } else {
-            activePage.showView(viewId);
+			activePage.showView(viewId, secondaryId, IWorkbenchPage.VIEW_ACTIVATE);
         }
 		
 	}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractWorkingSetManager.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractWorkingSetManager.java
index 72e7c15..d5c31dc 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractWorkingSetManager.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractWorkingSetManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,7 +23,6 @@
 import java.util.Map;
 import java.util.SortedSet;
 import java.util.TreeSet;
-
 import org.eclipse.core.commands.common.EventManager;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IAdaptable;
@@ -39,6 +38,7 @@
 import org.eclipse.core.runtime.dynamichelpers.IExtensionChangeHandler;
 import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker;
 import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.osgi.util.NLS;
@@ -47,6 +47,7 @@
 import org.eclipse.ui.IElementFactory;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.IWorkbenchPreferenceConstants;
 import org.eclipse.ui.IWorkingSet;
 import org.eclipse.ui.IWorkingSetElementAdapter;
 import org.eclipse.ui.IWorkingSetManager;
@@ -64,6 +65,7 @@
 import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
 import org.eclipse.ui.internal.registry.WorkingSetDescriptor;
 import org.eclipse.ui.internal.registry.WorkingSetRegistry;
+import org.eclipse.ui.internal.util.PrefUtil;
 import org.eclipse.ui.progress.WorkbenchJob;
 import org.eclipse.ui.statushandlers.StatusManager;
 import org.osgi.framework.Bundle;
@@ -96,12 +98,8 @@
 					((AbstractWorkingSet) o2).getUniqueId());
 		}
 	});
-    
-    /**
-     * Size of the list of most recently used working sets.
-     */
-    private static final int MRU_SIZE = 5;
-    private List recentWorkingSets = new ArrayList();
+
+	private List recentWorkingSets = new ArrayList();
 
     private BundleContext bundleContext;
     private Map/*<String, IWorkingSetUpdater>*/ updaters= new HashMap();
@@ -320,9 +318,7 @@
 			}
         recentWorkingSets.remove(workingSet);
         recentWorkingSets.add(0, workingSet);
-        if (recentWorkingSets.size() > MRU_SIZE) {
-            recentWorkingSets.remove(MRU_SIZE);
-        }
+        sizeRecentWorkingSets();
     }
 
     //---- equals and hash code -----------------------------------------------
@@ -504,16 +500,25 @@
      * 
      * @param memento the persistence store
      */
-    protected void restoreWorkingSetState(IMemento memento) {
-        IMemento[] children = memento
-                .getChildren(IWorkbenchConstants.TAG_WORKING_SET);
-        for (int i = 0; i < children.length; i++) {
-            IWorkingSet workingSet = restoreWorkingSet(children[i]);
-            if (workingSet != null) {
-            	internalAddWorkingSet(workingSet);
-            }
-        }
-    }
+	protected void restoreWorkingSetState(IMemento memento) {
+		IMemento[] children = memento.getChildren(IWorkbenchConstants.TAG_WORKING_SET);
+		for (int i = 0; i < children.length; i++) {
+			IWorkingSet workingSet = restoreWorkingSet(children[i]);
+			if (workingSet != null) {
+				workingSets.add(workingSet);
+			}
+		}
+		IWorkingSet[] sets = getAllWorkingSets();
+		for (int i = 0; i < sets.length; i++) {
+			((AbstractWorkingSet) sets[i]).connect(this);
+		}
+		for (int i = 0; i < sets.length; i++) {
+			addToUpdater(sets[i]);
+		}
+		for (int i = 0; i < sets.length; i++) {
+			firePropertyChange(CHANGE_WORKING_SET_ADD, null, sets[i]);
+		}
+	}
     
     /**
      * Recreates a working set from the persistence store.
@@ -909,4 +914,27 @@
 				}});
 		}
 	}
+
+	public void setRecentWorkingSetsLength(int length) {
+		if (length < 1 || length > 99)
+			throw new IllegalArgumentException("Invalid recent working sets length: " + length); //$NON-NLS-1$
+		IPreferenceStore store = PrefUtil.getAPIPreferenceStore();
+		store.setValue(IWorkbenchPreferenceConstants.RECENTLY_USED_WORKINGSETS_SIZE, length);
+		// adjust length
+		sizeRecentWorkingSets();
+	}
+	
+	private void sizeRecentWorkingSets() {
+		int maxLength = getRecentWorkingSetsLength();
+		while (recentWorkingSets.size() > maxLength) {
+			int lastPosition = recentWorkingSets.size() - 1;
+			recentWorkingSets.remove(lastPosition);
+		}
+	}
+
+	public int getRecentWorkingSetsLength() {
+		IPreferenceStore store = PrefUtil.getAPIPreferenceStore();
+		return store.getInt(IWorkbenchPreferenceConstants.RECENTLY_USED_WORKINGSETS_SIZE);
+	}
+
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActiveEditorAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActiveEditorAction.java
deleted file mode 100644
index 64e138e..0000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActiveEditorAction.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal;
-
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-
-/**
- * The abstract superclass for actions that depend on the active editor.
- * This implementation tracks the active editor (see <code>getActiveEditor</code>)
- * and updates the availability of the action when an editor becomes
- * active.
- * <p>
- * Subclasses must implement the following <code>IAction</code> method:
- * <ul>
- *   <li><code>run</code> - to do the action's work</li>
- * </ul>
- * </p>
- * <p>
- * Subclasses may extend any of the <code>IPartListener</code> methods if the
- * action availablity needs to be recalculated:
- * <ul>
- *   <li><code>partActivated</code></li> 
- *   <li><code>partDeactivated</code></li>
- *   <li><code>partOpened</code></li>
- *   <li><code>partClosed</code></li>
- *   <li><code>partBroughtToTop</code></li>
- * </ul>
- * </p>
- * <p>
- * Subclasses may extend any of the <code>IPageListener</code> methods if the
- * action availablity needs to be recalculated:
- * <ul>
- *   <li><code>pageActivated</code></li> 
- *   <li><code>pageClosed</code></li>
- *   <li><code>pageOpened</code></li>
- * </ul>
- * </p>
- * <p>
- * This method implements the <code>IPartListener</code> and
- * <code>IPageListener</code>interfaces, and automatically registers listeners
- * so that it can keep its enablement state up to date. Ordinarily, the
- * window's references to these listeners will be dropped automatically when
- * the window closes. However, if the client needs to get rid of an action
- * while the window is still open, the client must call 
- * {@link IWorkbenchAction#dispose dispose} to give the action an
- * opportunity to deregister its listeners and to perform any other cleanup.
- * </p>
- */
-public abstract class ActiveEditorAction extends PageEventAction {
-
-    private IEditorPart activeEditor;
-
-    /**
-     * Creates a new action with the given text.
-     *
-     * @param text the string used as the text for the action, 
-     *   or <code>null</code> if there is no text
-     * @param window the workbench window this action is
-     *   registered with.
-     */
-    protected ActiveEditorAction(String text, IWorkbenchWindow window) {
-        super(text, window);
-        updateState();
-    }
-
-    /**
-     * Notification that the active editor tracked
-     * by the action is being activated.
-     *
-     * Subclasses may override.
-     */
-    protected void editorActivated(IEditorPart part) {
-    }
-
-    /**
-     * Notification that the active editor tracked
-     * by the action is being deactivated.
-     *
-     * Subclasses may override.
-     */
-    protected void editorDeactivated(IEditorPart part) {
-    }
-
-    /**
-     * Return the active editor
-     *
-     * @return the page's active editor, and <code>null</code>
-     *		if no active editor or no active page.
-     */
-    public final IEditorPart getActiveEditor() {
-        return activeEditor;
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PageEventAction.
-     */
-    public void pageActivated(IWorkbenchPage page) {
-        super.pageActivated(page);
-        updateActiveEditor();
-        updateState();
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PageEventAction.
-     */
-    public void pageClosed(IWorkbenchPage page) {
-        super.pageClosed(page);
-        updateActiveEditor();
-        updateState();
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PartEventAction.
-     */
-    public void partActivated(IWorkbenchPart part) {
-        super.partActivated(part);
-        if (part instanceof IEditorPart) {
-            updateActiveEditor();
-            updateState();
-        }
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PartEventAction.
-     */
-    public void partBroughtToTop(IWorkbenchPart part) {
-        super.partBroughtToTop(part);
-        if (part instanceof IEditorPart) {
-            updateActiveEditor();
-            updateState();
-        }
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PartEventAction.
-     */
-    public void partClosed(IWorkbenchPart part) {
-        super.partClosed(part);
-        if (part instanceof IEditorPart) {
-            updateActiveEditor();
-            updateState();
-        }
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PartEventAction.
-     */
-    public void partDeactivated(IWorkbenchPart part) {
-        super.partDeactivated(part);
-        if (part instanceof IEditorPart) {
-            updateActiveEditor();
-            updateState();
-        }
-    }
-
-    /**
-     * Set the active editor
-     */
-    private void setActiveEditor(IEditorPart part) {
-        if (activeEditor == part) {
-            return;
-        }
-        if (activeEditor != null) {
-            editorDeactivated(activeEditor);
-        }
-        activeEditor = part;
-        if (activeEditor != null) {
-            editorActivated(activeEditor);
-        }
-    }
-
-    /**
-     * Update the active editor based on the current
-     * active page.
-     */
-    private void updateActiveEditor() {
-        if (getActivePage() == null) {
-            setActiveEditor(null);
-        } else {
-            setActiveEditor(getActivePage().getActiveEditor());
-        }
-    }
-
-    /**
-     * Update the state of the action. By default, the action
-     * is enabled if there is an active editor.
-     *
-     * Subclasses may override or extend this method.
-     */
-    protected void updateState() {
-        setEnabled(getActiveEditor() != null);
-    }
-
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AnimationEngine.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AnimationEngine.java
index a02e603..f3d8263 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AnimationEngine.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AnimationEngine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,7 +43,6 @@
 	private long prevTime;
 	private int timingStyle = TICK_TIMER;
 	private long frameCount;
-	private long stepCount;
 	private boolean animationCanceled = false;
 	private long sleepAmount;
 
@@ -96,7 +95,6 @@
 		feedbackRenderer.initialize(this);
 
 		// Set the animation's initial state
-		stepCount = 0;
 		curTime = startTime = System.currentTimeMillis();
 
 	}
@@ -122,7 +120,6 @@
 				updateDisplay();
 				frameCount++;
 			}
-			stepCount++;
 		}
 
 	};
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ApplicationMenuManager.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ApplicationMenuManager.java
new file mode 100644
index 0000000..2aa0a03
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ApplicationMenuManager.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal;
+
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.swt.widgets.Decorations;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.Menu;
+
+/**
+ * @since 3.7
+ * 
+ */
+class ApplicationMenuManager extends MenuManager{
+	
+	private final Menu appMenu;
+	private boolean disposing;
+	
+	public ApplicationMenuManager(Menu appMenu) {
+		this.appMenu = appMenu;
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.MenuManager#createMenuBar(org.eclipse.swt.widgets.Decorations)
+	 */
+	public Menu createMenuBar(Decorations parent) {
+		return appMenu;
+	}
+	
+	protected boolean menuExist() {
+		// our menu always exist, 
+		// except disposing - if not dispose will be called on this menu
+		return !disposing; 
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.MenuManager#getMenuItemCount()
+	 */
+	protected int getMenuItemCount() {
+		return appMenu.getItemCount();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.MenuManager#getMenuItem(int)
+	 */
+	protected Item getMenuItem(int index) {
+		return appMenu.getItem(index);
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.MenuManager#getMenuItems()
+	 */
+	protected Item[] getMenuItems() {
+		return appMenu.getItems();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.MenuManager#doItemFill(org.eclipse.jface.action.IContributionItem, int)
+	 */
+	protected void doItemFill(IContributionItem ci, int index) {
+        ci.fill(appMenu, index);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.MenuManager#dispose()
+	 */
+	public void dispose() {
+		disposing = true;
+		super.dispose();
+		disposing = false;
+	}
+}
+
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/BaseSaveAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/BaseSaveAction.java
deleted file mode 100644
index a6968f3..0000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/BaseSaveAction.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.internal;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IPropertyListener;
-import org.eclipse.ui.ISaveablePart;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.internal.util.Util;
-
-/**
- * The abstract superclass for save actions that depend on the active editor.
- */
-public abstract class BaseSaveAction extends ActiveEditorAction {
-    /*
-     * The view-related code below was added to track the view with focus
-     * in order to support save actions from a view (see bug 10234). 
-     */
-	
-    /**
-     * List of parts (element type: <code>IWorkbenchPart</code>)
-     * against which this class has outstanding property listeners registered.
-     */
-    private List partsWithListeners = new ArrayList(1);
-
-    private final IPropertyListener propListener = new IPropertyListener() {
-        public void propertyChanged(Object source, int propId) {
-            if (source == getActiveEditor()) {
-                if (propId == IEditorPart.PROP_DIRTY) {
-					updateState();
-				}
-            }
-        }
-    };
-
-    /**
-     * Creates a new action with the given text.
-     *
-     * @param text the string used as the text for the action, 
-     *   or <code>null</code> if there is no text
-     * @param window the workbench window this action is
-     *   registered with.
-     */
-    protected BaseSaveAction(String text, IWorkbenchWindow window) {
-        super(text, window);
-    }
-
-    /* (non-Javadoc)
-     * Method declared on ActiveEditorAction.
-     */
-    protected void editorActivated(IEditorPart part) {
-        if (part != null) {
-            part.addPropertyListener(propListener);
-            partsWithListeners.add(part);
-        }
-    }
-
-    /* (non-Javadoc)
-     * Method declared on ActiveEditorAction.
-     */
-    protected void editorDeactivated(IEditorPart part) {
-        if (part != null) {
-            part.removePropertyListener(propListener);
-            partsWithListeners.remove(part);
-        }
-    }
-
-    private IViewPart activeView;
-
-    private final IPropertyListener propListener2 = new IPropertyListener() {
-        public void propertyChanged(Object source, int propId) {
-            if (source == activeView) {
-                if (propId == IEditorPart.PROP_DIRTY) {
-					updateState();
-				}
-            }
-        }
-    };
-
-    /** the active saveable part is tracked in order to listen to its dirty events */ 
-    private ISaveablePart activeSaveablePart;
-    
-    private final IPropertyListener propListener3 = new IPropertyListener() {
-    	public void propertyChanged(Object source, int propId) {
-    		if (source == activeSaveablePart) {
-    			if (propId == IEditorPart.PROP_DIRTY) {
-    				updateState();
-    			}
-    		}
-    	}
-    };
-    
-    /* (non-Javadoc)
-     * Method declared on PageEventAction.
-     */
-    public void pageActivated(IWorkbenchPage page) {
-        super.pageActivated(page);
-        updateActiveView();
-        updateState();
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PageEventAction.
-     */
-    public void pageClosed(IWorkbenchPage page) {
-        super.pageClosed(page);
-        updateActiveView();
-        updateState();
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PartEventAction.
-     */
-    public void partActivated(IWorkbenchPart part) {
-        super.partActivated(part);
-        if (part instanceof IViewPart) {
-            updateActiveView();
-            updateState();
-        }
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PartEventAction.
-     */
-    public void partClosed(IWorkbenchPart part) {
-        super.partClosed(part);
-        if (part instanceof IViewPart) {
-            updateActiveView();
-            updateState();
-        }
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PartEventAction.
-     */
-    public void partDeactivated(IWorkbenchPart part) {
-        super.partDeactivated(part);
-        if (part instanceof IViewPart) {
-            updateActiveView();
-            updateState();
-        }
-    }
-
-    /**
-     * Update the active view based on the current
-     * active page.
-     */
-    private void updateActiveView() {
-        if (getActivePage() == null) {
-			setActiveView(null);
-		} else {
-			setActiveView(getActivePage().getActivePart());
-		}
-    }
-
-    /**
-	 * 
-	 */
-	private void updateActiveSaveablePart() {
-		if (activeSaveablePart instanceof IWorkbenchPart) {
-			((IWorkbenchPart)activeSaveablePart).removePropertyListener(propListener3);
-			partsWithListeners.remove(activeSaveablePart);
-		}
-		activeSaveablePart = getSaveableView();
-		if (activeSaveablePart == activeView) {
-			// no need to listen to the same part twice
-			activeSaveablePart = null;
-		}
-		if (activeSaveablePart instanceof IWorkbenchPart) {
-			((IWorkbenchPart)activeSaveablePart).addPropertyListener(propListener3);
-			partsWithListeners.add(activeSaveablePart);
-		}
-	}
-
-	/**
-     * Set the active editor
-     */
-    private void setActiveView(IWorkbenchPart part) {
-        if (activeView == part) {
-            return;
-        }
-        if (activeView != null) {
-            activeView.removePropertyListener(propListener2);
-            partsWithListeners.remove(activeView);
-        }
-        if (part instanceof IViewPart) {
-            activeView = (IViewPart) part;
-        } else {
-            activeView = null;
-        }
-        if (activeView != null) {
-            activeView.addPropertyListener(propListener2);
-            partsWithListeners.add(activeView);
-        }
-        updateActiveSaveablePart();
-    }
-
-    protected final ISaveablePart getSaveableView() {
-        if (activeView == null) {
-            return null;
-        }
-
-        return (ISaveablePart) Util.getAdapter(activeView, ISaveablePart.class);
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PageEventAction.
-     */
-    public void dispose() {
-        super.dispose();
-        for (Iterator it = partsWithListeners.iterator(); it.hasNext();) {
-            IWorkbenchPart part = (IWorkbenchPart) it.next();
-            part.removePropertyListener(propListener);
-            part.removePropertyListener(propListener2);
-            part.removePropertyListener(propListener3);
-        }
-        partsWithListeners.clear();
-    }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleBaseHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleBaseHandler.java
index 1766873..e7ba6b0 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleBaseHandler.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleBaseHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,8 +31,10 @@
 import org.eclipse.swt.events.KeyListener;
 import org.eclipse.swt.events.MouseEvent;
 import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.MouseMoveListener;
 import org.eclipse.swt.events.TraverseEvent;
 import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Display;
@@ -189,6 +191,28 @@
 			}
 		});
 
+		table.addMouseMoveListener(new MouseMoveListener() {
+			TableItem lastItem = null;
+
+			public void mouseMove(MouseEvent e) {
+				if (table.equals(e.getSource())) {
+					Object o = table.getItem(new Point(e.x, e.y));
+					if (lastItem == null ^ o == null) {
+						table.setCursor(o == null ? null : table.getDisplay().getSystemCursor(
+								SWT.CURSOR_HAND));
+					}
+					if (o instanceof TableItem) {
+						if (!o.equals(lastItem)) {
+							lastItem = (TableItem) o;
+							table.setSelection(new TableItem[] { lastItem });
+						}
+					} else if (o == null) {
+						lastItem = null;
+					}
+				}
+			}
+		});
+
 		setDialogLocation(dialog, activePart);
 
 		final IContextService contextService = (IContextService) window
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java
index 95d0456..9fdd5f8 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,9 +8,11 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Nikolay Botev - bug 240651
+ *     Markus Schorn - Bug 341327
  *******************************************************************************/
 package org.eclipse.ui.internal;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -19,7 +21,6 @@
 import java.util.List;
 import java.util.ListIterator;
 import java.util.Map;
-
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.IHandler;
@@ -36,7 +37,9 @@
 import org.eclipse.core.runtime.SubProgressMonitor;
 import org.eclipse.core.runtime.dynamichelpers.IExtensionChangeHandler;
 import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker;
+import org.eclipse.jface.dialogs.DialogSettings;
 import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.internal.provisional.action.ICoolBarManager2;
 import org.eclipse.jface.operation.IRunnableContext;
@@ -50,6 +53,7 @@
 import org.eclipse.jface.util.SafeRunnable;
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.jface.window.Window;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.BusyIndicator;
@@ -85,6 +89,7 @@
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.Saveable;
+import org.eclipse.ui.dialogs.EditorSelectionDialog;
 import org.eclipse.ui.dialogs.ListSelectionDialog;
 import org.eclipse.ui.handlers.IHandlerActivation;
 import org.eclipse.ui.handlers.IHandlerService;
@@ -95,10 +100,12 @@
 import org.eclipse.ui.internal.misc.StatusUtil;
 import org.eclipse.ui.internal.misc.UIStats;
 import org.eclipse.ui.internal.part.NullEditorInput;
+import org.eclipse.ui.internal.progress.ProgressManagerUtil;
 import org.eclipse.ui.internal.registry.EditorDescriptor;
 import org.eclipse.ui.internal.registry.EditorRegistry;
 import org.eclipse.ui.internal.tweaklets.TabBehaviour;
 import org.eclipse.ui.internal.tweaklets.Tweaklets;
+import org.eclipse.ui.internal.util.PrefUtil;
 import org.eclipse.ui.internal.util.Util;
 import org.eclipse.ui.model.WorkbenchPartLabelProvider;
 import org.eclipse.ui.part.AbstractMultiEditor;
@@ -141,6 +148,10 @@
 	// Handler for the pin editor keyboard shortcut
 	private IHandlerActivation pinEditorHandlerActivation = null;
 
+	// determines if a prompt is shown when opening large files
+	private long maxFileSize = 0;
+	private boolean checkDocumentSize;
+
 	static final String RESOURCES_TO_SAVE_MESSAGE = WorkbenchMessages.EditorManager_saveResourcesMessage;
 
 	static final String SAVE_RESOURCES_TITLE = WorkbenchMessages.EditorManager_saveResourcesTitle;
@@ -157,9 +168,16 @@
 		this.page = workbenchPage;
 		this.editorPresentation = pres;
 
+		initMaxFileSize();
 		page.getExtensionTracker().registerHandler(this, null);
 	}
 
+	private void initMaxFileSize() {
+		IPreferenceStore preferenceStore = PrefUtil.getInternalPreferenceStore();
+		maxFileSize = preferenceStore.getLong(IPreferenceConstants.LARGE_DOC_SIZE_FOR_EDITORS);
+		checkDocumentSize = maxFileSize != 0;
+	}
+
 	/**
 	 * Check to determine if the editor resources are no longer needed removes
 	 * property change listener for editors removes pin editor keyboard shortcut
@@ -359,7 +377,10 @@
 		actionBars.removeRef();
 		if (actionBars.getRef() <= 0) {
 			String type = actionBars.getEditorType();
-			actionCache.remove(type);
+			Object obj = actionCache.get(type);
+			if (actionBars == obj) {
+				actionCache.remove(type);
+			}
 			// refresh the cool bar manager before disposing of a cool item
 			ICoolBarManager2 coolBar = (ICoolBarManager2) window.getCoolBarManager2();
             if (coolBar != null) {
@@ -627,15 +648,24 @@
 			throw new IllegalArgumentException();
 		}
 
-		IEditorRegistry reg = getEditorRegistry();
-		EditorDescriptor desc = (EditorDescriptor) reg.findEditor(editorId);
+		IEditorDescriptor desc = getEditorRegistry().findEditor(editorId);
+		if (desc != null && !desc.isOpenExternal() && isLargeDocument(input)) {
+			desc = getAlternateEditor();
+			if (desc == null) {
+				// the user pressed cancel in the editor selection dialog
+				return null;
+			}
+		}
+
 		if (desc == null) {
 			throw new PartInitException(NLS.bind(
 					WorkbenchMessages.EditorManager_unknownEditorIDMessage,
 					editorId));
 		}
 
-		IEditorReference result = openEditorFromDescriptor(desc, input, editorState);
+		IEditorReference result = openEditorFromDescriptor((EditorDescriptor) desc, input,
+				editorState);
+
 		return result;
 	}
 
@@ -1437,7 +1467,11 @@
 		return (IPathEditorInput) Util.getAdapter(input, IPathEditorInput.class);
 	}
 
-	private class InnerEditor extends EditorReference {
+	/**
+	 * An editor reference that is actually contained within another editor
+	 * reference.
+	 */
+	class InnerEditor extends EditorReference {
 
 		private IEditorReference outerEditor;
 
@@ -1451,6 +1485,14 @@
 			this.outerEditorPart = outerEditorPart;
 		}
 
+		/**
+		 * @return Returns the parent editor reference that this reference is a
+		 *         child of.
+		 */
+		public IEditorReference getOuterEditor() {
+			return outerEditor;
+		}
+
 		protected void doDisposePart() {
 			this.outerEditorPart = null;
 			super.doDisposePart();
@@ -1690,4 +1732,38 @@
 				.getPreferenceStore();
 		return store.getBoolean(IPreferenceConstants.USE_IPERSISTABLE_EDITORS);
 	}
+
+	private static IEditorDescriptor getAlternateEditor() {
+		Shell shell = ProgressManagerUtil.getDefaultParent();
+		EditorSelectionDialog dialog = new EditorSelectionDialog(shell) {
+			protected IDialogSettings getDialogSettings() {
+				IDialogSettings result = new DialogSettings("EditorSelectionDialog"); //$NON-NLS-1$
+				result.put(EditorSelectionDialog.STORE_ID_INTERNAL_EXTERNAL, true);
+				return result;
+			}
+		};
+		dialog.setMessage(WorkbenchMessages.EditorManager_largeDocumentWarning);
+
+		if (dialog.open() == Window.OK)
+			return dialog.getSelectedEditor();
+		return null;
+	}
+
+	boolean isLargeDocument(IEditorInput editorInput) {
+
+		if (!checkDocumentSize)
+			return false;
+
+		if (!(editorInput instanceof IPathEditorInput))
+			return false; // we know nothing about it
+
+		try {
+			IPath path = ((IPathEditorInput) editorInput).getPath();
+			File file = new File(path.toOSString());
+			return file.length() > maxFileSize;
+		} catch (Exception e) {
+			// ignore exceptions
+			return false;
+		}
+	}
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java
index 662e95e..9b3538a 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -746,11 +746,21 @@
      * 
      * @return true if it has inner editor reference or the input is
      * MultiEditorInput.
+     * @see #getChildren()
      */
     public boolean isMultiReference() {
     	return multiEditorChildren!=null || restoredInput instanceof MultiEditorInput;
     }
 
+    /**
+	 * @return Returns the child editor references. May be <code>null</code> if
+	 *         this is not a multi reference.
+	 * @see #isMultiReference()
+     */
+	public IEditorReference[] getChildren() {
+		return multiEditorChildren;
+	}
+
 	/**
 	 * Creates and returns an empty editor (<code>ErrorEditorPart</code>).
 	 * 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorStack.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorStack.java
index 94d510f..934b283 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorStack.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorStack.java
@@ -344,7 +344,7 @@
 			return;
 		
 		//isMinimized = getState() == IStackPresentationSite.STATE_MINIMIZED;
-		super.setMinimized(newState == IStackPresentationSite.STATE_MINIMIZED);
+		setMinimized(newState == IStackPresentationSite.STATE_MINIMIZED);
 		presentationSite.setPresentationState(newState);
 	}
 	
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ErrorEditorPart.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ErrorEditorPart.java
index 7b601af..543a3c5 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ErrorEditorPart.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ErrorEditorPart.java
@@ -10,11 +10,9 @@
  *******************************************************************************/
 package org.eclipse.ui.internal;
 
-import org.eclipse.swt.widgets.Composite;
-
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-
+import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorSite;
 import org.eclipse.ui.internal.part.StatusPart;
@@ -28,6 +26,7 @@
 public class ErrorEditorPart extends EditorPart {
 
 	private IStatus error;
+	private Composite parentControl;
 
 	/**
 	 * Creates instance of the class
@@ -66,6 +65,7 @@
 	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
 	 */
 	public void createPartControl(Composite parent) {
+		this.parentControl = parent;
 		if (error != null) {
 			new StatusPart(parent, error);
 		}
@@ -107,7 +107,7 @@
 	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
 	 */
 	public void setFocus() {
-
+		parentControl.setFocus();
 	}
 
 	/*
@@ -118,4 +118,14 @@
 	public void setPartName(String newName) {
 		super.setPartName(newName);
 	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.part.WorkbenchPart#dispose()
+	 */
+	public void dispose() {
+		super.dispose();
+		parentControl = null;
+	}
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ErrorViewPart.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ErrorViewPart.java
index e07c3e5..e18d5d4 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ErrorViewPart.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ErrorViewPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@
 public class ErrorViewPart extends ViewPart {
 
 	private IStatus error;
+	private Composite parentControl;
 
 	/**
 	 * Creates instance of the class
@@ -47,6 +48,7 @@
 	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
 	 */
 	public void createPartControl(Composite parent) {
+		parentControl = parent;
 		if (error != null) {
 			new StatusPart(parent, error);
 		}
@@ -67,6 +69,17 @@
 	 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
 	 */
 	public void setFocus() {
+		parentControl.setFocus();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.part.WorkbenchPart#dispose()
+	 */
+	public void dispose() {
+		super.dispose();
+		parentControl = null;
 	}
 
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandler.java
index c316b20..f49f27c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandler.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ExtensionEventHandler.java
@@ -16,7 +16,6 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtension;
 import org.eclipse.core.runtime.IExtensionDelta;
@@ -55,12 +54,7 @@
                     .getExtensionDeltas(WorkbenchPlugin.PI_WORKBENCH);
             IExtension ext;
             IExtensionPoint extPt;
-            IWorkbenchWindow[] win = PlatformUI.getWorkbench()
-                    .getWorkbenchWindows();
-            if (win.length == 0) {
-				return;
-			}
-            Display display = win[0].getShell().getDisplay();
+            Display display =  PlatformUI.getWorkbench().getDisplay();
             if (display == null) {
 				return;
 			}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewBar.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewBar.java
index b9a3e10..cebe308 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewBar.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewBar.java
@@ -16,7 +16,6 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
@@ -136,8 +135,11 @@
         ToolItem position;
 
         /**
-         * @param panesToDrop the list of ViewPanes to drop at the given position
-         */
+		 * @param panesToDrop
+		 *            the list of ViewPanes to drop at the given position
+		 * @param position
+		 *            the tool item denoting the position
+		 */
         public ViewDropTarget(List panesToDrop, ToolItem position) {
             setTarget(panesToDrop, position);
         }
@@ -526,7 +528,7 @@
             }
         }
 
-        if (page.isZoomed()) {
+        if (page != null && page.isZoomed()) {
             page.zoomOut();
         }
 
@@ -799,9 +801,6 @@
         return horizontal;
     }
 
-    /**
-     * @param ref
-     */
     public int getViewSide(IViewReference ref) {
         boolean horizontal = isHorizontal(ref);
 
@@ -829,9 +828,11 @@
     }
 
     /**
-     * Returns the approximate location where the next fastview icon
-     * will be drawn (display coordinates)
-     */
+	 * Returns the approximate location where the next fast view icon will be
+	 * drawn (display coordinates)
+	 * 
+	 * @return the rectangle
+	 */
     public Rectangle getLocationOfNextIcon() {
         ToolBar control = getToolBar();
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewDnDHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewDnDHandler.java
index f5e609b..dd4113a 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewDnDHandler.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewDnDHandler.java
@@ -14,7 +14,6 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
-
 import org.eclipse.jface.action.ToolBarManager;
 import org.eclipse.jface.util.Geometry;
 import org.eclipse.swt.SWT;
@@ -81,6 +80,9 @@
          * @see org.eclipse.ui.internal.dnd.IDropTarget#drop()
          */
         public void drop() {
+			if (curItem == null)
+				return;
+
             Perspective persp = wbw.getActiveWorkbenchPage().getActivePerspective();
             FastViewManager fvm = persp.getFastViewManager();
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/HeapStatus.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/HeapStatus.java
index f5ef8f0..4778926 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/HeapStatus.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/HeapStatus.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,6 @@
 package org.eclipse.ui.internal;
 
 import java.lang.reflect.Method;
-
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuListener;
@@ -27,7 +26,6 @@
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.Image;
@@ -49,6 +47,7 @@
 
 	private boolean armed;
 	private Image gcImage;
+	private Image disabledGcImage;
 	private Color bgCol, usedMemCol, lowMemCol, freeMemCol, topLeftCol, bottomRightCol, sepCol, textCol, markCol, armCol;  
     private Canvas button;
 	private IPreferenceStore prefStore;
@@ -67,7 +66,9 @@
 	private float lowMemThreshold = 0.05f;
 	private boolean showLowMemThreshold = true;
 	private boolean updateTooltip = false;
-	
+
+	protected volatile boolean isInGC = false;
+
     private final Runnable timer = new Runnable() {
         public void run() {
             if (!isDisposed()) {
@@ -119,11 +120,12 @@
         button.setToolTipText(WorkbenchMessages.HeapStatus_buttonToolTip);
         
 		ImageDescriptor imageDesc = WorkbenchImages.getWorkbenchImageDescriptor("elcl16/trash.gif"); //$NON-NLS-1$
+		Display display = getDisplay();
 		gcImage = imageDesc.createImage();
 		if (gcImage != null) {
 			imgBounds = gcImage.getBounds();
+			disabledGcImage = new Image(display, gcImage, SWT.IMAGE_DISABLE);
 		}
-		Display display = getDisplay();
 		usedMemCol = display.getSystemColor(SWT.COLOR_INFO_BACKGROUND);
 		lowMemCol = new Color(display, 255, 70, 70);  // medium red 
 		freeMemCol = new Color(display, 255, 190, 125);  // light orange
@@ -155,8 +157,10 @@
                     break;
                 case SWT.MouseUp:
                     if (event.button == 1) {
-                        gc();
-                        arm(false);
+						if (!isInGC) {
+							arm(false);
+							gc(); 
+						}
                     }
                     break;
                 case SWT.MouseDown:
@@ -164,7 +168,8 @@
 	                    if (event.widget == HeapStatus.this) {
 							setMark();
 						} else if (event.widget == button) {
-							arm(true);
+							if (!isInGC)
+								arm(true);
 						}
                     }
                     break;
@@ -234,6 +239,9 @@
     	if (gcImage != null) {
 			gcImage.dispose();
 		}
+		if (disabledGcImage != null) {
+			disabledGcImage.dispose();
+		}
        
         if (lowMemCol != null) {
 			lowMemCol.dispose();
@@ -269,6 +277,15 @@
         button.update();
     }
 
+	private void gcRunning(boolean isInGC) {
+		if (this.isInGC == isInGC) {
+			return;
+		}
+		this.isInGC = isInGC;
+		 button.redraw();
+		 button.update();
+	}
+
     /**
      * Creates the context menu
      */
@@ -314,26 +331,20 @@
     }
     
     private void gc() {
-    	BusyIndicator.showWhile(getDisplay(), new Runnable() {
+		gcRunning(true);
+		Thread t = new Thread() {
 			public void run() {
-				Thread t = new Thread() {
+				busyGC();
+				getDisplay().asyncExec(new Runnable() {
 					public void run() {
-						busyGC();
-					}};
-				t.start();
-				while(t.isAlive()) {
-					try {
-						Display d = getDisplay();
-						while(d != null && !d.isDisposed() && d.readAndDispatch()) {
-							// loop
+						if (!isDisposed()) {
+							gcRunning(false);
 						}
-						t.join(10);
-					} catch (InterruptedException e) {
-						Thread.currentThread().interrupt();
 					}
-				}
+				});
 			}
-		});
+		};
+		t.start();
     }
 
     private void busyGC() {
@@ -345,7 +356,13 @@
     
     private void paintButton(GC gc) {
         Rectangle rect = button.getClientArea();
-        
+		if (isInGC) {
+			if (disabledGcImage != null) {
+				int buttonY = (rect.height - imgBounds.height) / 2 + rect.y;
+				gc.drawImage(disabledGcImage, rect.x, buttonY);
+			}
+			return;
+		}
         if (armed) {
             gc.setBackground(armCol);
             gc.fillRectangle(rect.x, rect.y, rect.width, rect.height);
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java
index b23d975..115a97a 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -234,4 +234,17 @@
 	 */
 	public static final String USE_32_THREADING = "use32Threading"; //$NON-NLS-1$
 
+	/**
+	 * This preference is the threshold value to determine whether a document is
+	 * large or not. When the user tries to open a file larger than the
+	 * threshold, then EditorSelectionDialog will be opened, suggesting the user
+	 * to open with an external editor.
+	 * <p>
+	 * This preference is a <code>long</code> value that represents the
+	 * threshold in bytes. The default value is <code>0</code> meaning no
+	 * prompting on editor opening.
+	 * </p>
+	 * @since 3.7
+	 */
+	public static final String LARGE_DOC_SIZE_FOR_EDITORS = "LARGE_DOC_SIZE_FOR_EDITORS"; //$NON-NLS-1$
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IntroAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IntroAction.java
deleted file mode 100644
index ae1af1a..0000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IntroAction.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Sebastian Davids <sdavids@gmx.de> - Fix for bug 95292 - [Intro] 
- *     		Help > Welcome missing F1 context
- *******************************************************************************/
-package org.eclipse.ui.internal;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IPageListener;
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.internal.intro.IntroDescriptor;
-import org.eclipse.ui.internal.intro.IntroMessages;
-
-/**
- * Action that will launch the intro in the given window.
- * 
- * @since 3.0
- */
-public class IntroAction extends Action implements
-        ActionFactory.IWorkbenchAction {
-
-    private IWorkbenchWindow workbenchWindow;
-
-    private IPageListener pageListener = new IPageListener() {
-
-        public void pageActivated(IWorkbenchPage page) {
-            //no-op
-        }
-
-        public void pageClosed(IWorkbenchPage page) {
-            setEnabled(workbenchWindow.getPages().length > 0);
-        }
-
-        public void pageOpened(IWorkbenchPage page) {
-            setEnabled(true);
-        }
-    };
-
-    /**
-     * @param window the window to bind the action to. 
-     */
-    public IntroAction(IWorkbenchWindow window) {
-        super(IntroMessages.Intro_action_text); 
-        if (window == null) {
-            throw new IllegalArgumentException();
-        }
-        this.workbenchWindow = window;
-        window.getWorkbench().getHelpSystem().setHelp(this,
-				IWorkbenchHelpContextIds.INTRO_ACTION);
-        
-        IntroDescriptor introDescriptor = ((Workbench) workbenchWindow
-                .getWorkbench()).getIntroDescriptor();
-        String labelOverride = introDescriptor.getLabelOverride();
-        if (labelOverride != null)
-        	setText(labelOverride);
-        
-        setActionDefinitionId(IWorkbenchCommandConstants.HELP_WELCOME);
-        
-        window.addPageListener(pageListener);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
-     */
-    public void dispose() {
-        workbenchWindow.removePageListener(pageListener);
-        workbenchWindow = null;
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event)
-     */
-    public void runWithEvent(Event event) {        
-        IntroDescriptor introDescriptor = ((Workbench) workbenchWindow
-                .getWorkbench()).getIntroDescriptor();
-        if (introDescriptor == null) {
-            MessageDialog.openWarning(workbenchWindow.getShell(),
-                    IntroMessages.Intro_missing_product_title,
-                    IntroMessages.Intro_missing_product_message);
-        } else {
-			workbenchWindow.getWorkbench().getIntroManager().showIntro(
-                    workbenchWindow, false);
-		}
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.action.IAction#getImageDescriptor()
-     */
-    public ImageDescriptor getImageDescriptor() {
-        IntroDescriptor introDescriptor = ((Workbench) workbenchWindow
-                .getWorkbench()).getIntroDescriptor();
-        if (introDescriptor == null) {
-			return null;
-		}
-        return introDescriptor.getImageDescriptor();
-    }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/JFaceUtil.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/JFaceUtil.java
index 6c6c15d..acdae9a 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/JFaceUtil.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/JFaceUtil.java
@@ -16,8 +16,8 @@
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences.NodeChangeEvent;
+import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.jface.internal.InternalPolicy;
 import org.eclipse.jface.preference.JFacePreferences;
 import org.eclipse.jface.util.ILogger;
@@ -72,11 +72,12 @@
 		});
 
 		// Get all debug options from Platform
-		if ("true".equalsIgnoreCase(Platform.getDebugOption("/debug"))) { //$NON-NLS-1$ //$NON-NLS-2$
+		if ("true".equalsIgnoreCase(Platform.getDebugOption(Policy.JFACE + "/debug"))) { //$NON-NLS-1$ //$NON-NLS-2$
 			Policy.DEBUG_DIALOG_NO_PARENT = "true".equalsIgnoreCase(Platform.getDebugOption(Policy.JFACE + "/debug/dialog/noparent")); //$NON-NLS-1$ //$NON-NLS-2$
 			Policy.TRACE_ACTIONS = "true".equalsIgnoreCase(Platform.getDebugOption(Policy.JFACE + "/trace/actions")); //$NON-NLS-1$ //$NON-NLS-2$
 			Policy.TRACE_TOOLBAR = "true".equalsIgnoreCase(Platform.getDebugOption(Policy.JFACE + "/trace/toolbarDisposal")); //$NON-NLS-1$ //$NON-NLS-2$
 			InternalPolicy.DEBUG_LOG_REENTRANT_VIEWER_CALLS = "true".equalsIgnoreCase(Platform.getDebugOption(Policy.JFACE + "/debug/viewers/reentrantViewerCalls")); //$NON-NLS-1$ //$NON-NLS-2$
+			InternalPolicy.DEBUG_LOG_EQUAL_VIEWER_ELEMENTS = "true".equalsIgnoreCase(Platform.getDebugOption(Policy.JFACE + "/debug/viewers/equalElements")); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 	}
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LockToolBarAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LockToolBarAction.java
deleted file mode 100644
index a5be50d..0000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LockToolBarAction.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-
-/**
- * The <code>LockToolBarAction</code> is used to lock the toolbars for the
- * workbench.  The toolbar for all perspectives is locked.
- */
-public class LockToolBarAction extends Action implements
-        ActionFactory.IWorkbenchAction {
-
-    /**
-     * The workbench window; or <code>null</code> if this
-     * action has been <code>dispose</code>d.
-     */
-    private IWorkbenchWindow workbenchWindow;
-
-    /**
-     * Create a new instance of <code>LockToolBarAction</code>
-     * 
-     * @param window the workbench window this action applies to
-     */
-    public LockToolBarAction(IWorkbenchWindow window) {
-        super(WorkbenchMessages.LockToolBarAction_text);
-        if (window == null) {
-            throw new IllegalArgumentException();
-        }
-        this.workbenchWindow = window;
-        setActionDefinitionId("org.eclipse.ui.window.lockToolBar"); //$NON-NLS-1$
-        // @issue missing action id
-        setToolTipText(WorkbenchMessages.LockToolBarAction_toolTip);
-        setEnabled(true);
-        // queue the update for the checked state since this action is created 
-        // before the coolbar
-        window.getWorkbench().getDisplay().asyncExec(new Runnable() {
-            public void run() {
-				if (workbenchWindow instanceof WorkbenchWindow) {
-                    setChecked(((WorkbenchWindow) workbenchWindow)
-                            .isCoolBarLocked());
-                }
-            }
-        });
-        window.getWorkbench().getHelpSystem().setHelp(this,
-				IWorkbenchHelpContextIds.LOCK_TOOLBAR_ACTION);
-    }
-
-    /* (non-Javadoc)
-     * Method declared on IAction.
-     */
-    public void run() {
-        if (workbenchWindow == null) {
-            // action has been disposed
-            return;
-        }
-        boolean locked = isChecked();
-        ((WorkbenchWindow) workbenchWindow).lockCoolBar(locked);
-    }
-
-    /* (non-Javadoc)
-     * Method declared on ActionFactory.IWorkbenchAction.
-     */
-    public void dispose() {
-        workbenchWindow = null;
-    }
-
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/OpenPreferencesAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/OpenPreferencesAction.java
deleted file mode 100644
index d976a6c..0000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/OpenPreferencesAction.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-
-/**
- * Open the preferences dialog
- */
-public class OpenPreferencesAction extends Action implements ActionFactory.IWorkbenchAction {
-
-	/**
-	 * The workbench window; or <code>null</code> if this
-	 * action has been <code>dispose</code>d.
-	 */
-	private IWorkbenchWindow workbenchWindow;
-
-	/**
-	 * Create a new <code>OpenPreferenceAction</code>
-	 * This default constructor allows the the action to be called from the welcome page.
-	 */
-	public OpenPreferencesAction() {
-		this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
-	}
-
-	/**
-	 * Create a new <code>OpenPreferenceAction</code> and initialize it 
-	 * from the given resource bundle.
-	 * @param window
-	 */
-	public OpenPreferencesAction(IWorkbenchWindow window) {
-		super(WorkbenchMessages.OpenPreferences_text); 
-		if (window == null) {
-			throw new IllegalArgumentException();
-		}
-		this.workbenchWindow = window;
-		// @issue action id not set
-		setToolTipText(WorkbenchMessages.OpenPreferences_toolTip); 
-		window.getWorkbench().getHelpSystem().setHelp(this,
-				IWorkbenchHelpContextIds.OPEN_PREFERENCES_ACTION);
-	}
-
-	/* (non-Javadoc)
-	 * Method declared on Action.
-	 */
-	public void run() {
-		if (workbenchWindow == null) {
-			// action has been dispose
-			return;
-		}
-		PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(null, null, null, null);
-		dialog.open();
-	}
-
-	/* (non-Javadoc)
-	 * Method declared on ActionFactory.IWorkbenchAction.
-	 */
-	public void dispose() {
-		workbenchWindow = null;
-	}
-
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PageLayout.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PageLayout.java
index 62471b7..8ce5282 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PageLayout.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PageLayout.java
@@ -22,7 +22,6 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.ui.IFolderLayout;
@@ -36,6 +35,7 @@
 import org.eclipse.ui.internal.presentations.PresentationFactoryUtil;
 import org.eclipse.ui.internal.registry.ActionSetRegistry;
 import org.eclipse.ui.internal.registry.IActionSetDescriptor;
+import org.eclipse.ui.internal.registry.ViewRegistry;
 import org.eclipse.ui.views.IViewDescriptor;
 import org.eclipse.ui.views.IViewRegistry;
 
@@ -535,8 +535,19 @@
         if (partID.equals(ID_EDITOR_AREA)) {
             return editorFolder;
         }
-		IViewDescriptor viewDescriptor = viewFactory.getViewRegistry()
-		        .find(ViewFactory.extractPrimaryId(partID));
+		IViewDescriptor viewDescriptor = null;
+
+		IViewRegistry viewRegistry = viewFactory.getViewRegistry();
+		String primaryId = ViewFactory.extractPrimaryId(partID);
+
+		if (viewRegistry instanceof ViewRegistry) {
+			viewDescriptor = ((ViewRegistry) viewRegistry).findInternal(primaryId);
+			if (viewDescriptor != null && WorkbenchActivityHelper.restrictUseOf(viewDescriptor)) {
+				return null;
+			}
+		} else {
+			viewDescriptor = viewRegistry.find(primaryId);
+		}
 		if (WorkbenchActivityHelper.filterItem(viewDescriptor)) {
 			return null;
 		}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartStack.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartStack.java
index 76fbb84..972da4f 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartStack.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartStack.java
@@ -453,8 +453,6 @@
 
         LayoutPart[] children = ((ILayoutContainer) this).getChildren();
 
-        int visibleChildren = 0;
-
         for (int idx = 0; idx < children.length; idx++) {
 
             LayoutPart next = children[idx];
@@ -468,8 +466,6 @@
                 }
 
                 next.describeLayout(buf);
-
-                visibleChildren++;
             }
         }
 
@@ -834,16 +830,11 @@
         // This method should only be called on objects that are already in the layout
         Assert.isNotNull(newPart);
 
-        if (newPart == requestedCurrent) {
-            return;
-        }
+		if (newPart != requestedCurrent) {
+			setSelection(newPart);
+		}
 
-        setSelection(newPart);
-
-        if (newPart != null) {
-            newPart.setFocus();
-        }
-
+		newPart.setFocus();
     }
 
     /**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveHelper.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveHelper.java
index 5e442be..3c5d25e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveHelper.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveHelper.java
@@ -20,7 +20,6 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Vector;
-
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.swt.SWT;
@@ -39,6 +38,7 @@
 import org.eclipse.ui.internal.dnd.DragUtil;
 import org.eclipse.ui.internal.dnd.IDragOverListener;
 import org.eclipse.ui.internal.dnd.IDropTarget;
+import org.eclipse.ui.internal.misc.Policy;
 import org.eclipse.ui.internal.misc.StringMatcher;
 import org.eclipse.ui.presentations.IStackPresentationSite;
 
@@ -298,6 +298,9 @@
         active = true;
     }
 
+	private String tmpViewId = null;
+	private Exception tmpStackTrace = null;
+
 	/**
      * Adds a part to the presentation. If a placeholder exists for the part
      * then swap the part in. Otherwise, add the part in the bottom right
@@ -371,6 +374,26 @@
                         ContainerPlaceholder containerPlaceholder = (ContainerPlaceholder) container;                        
                         ILayoutContainer parentContainer = containerPlaceholder
                                 .getContainer();
+						if (parentContainer == null) {
+							if (Policy.DEBUG_PERSPECTIVES) {
+								WorkbenchPlugin.log(
+										"Previous ContainerPlaceholder for " + tmpViewId, //$NON-NLS-1$
+										tmpStackTrace);
+								tmpViewId = null;
+								tmpStackTrace = new Exception();
+								tmpStackTrace.fillInStackTrace();
+								WorkbenchPlugin.log(
+										"Current ContainerPlaceholder with null parent for " //$NON-NLS-1$
+												+ primaryId + ":" + secondaryId, tmpStackTrace); //$NON-NLS-1$
+								tmpStackTrace = null;
+							}
+							return;
+						}
+						if (Policy.DEBUG_PERSPECTIVES) {
+							tmpViewId = primaryId + ":" + secondaryId; //$NON-NLS-1$
+							tmpStackTrace = new Exception();
+							tmpStackTrace.fillInStackTrace();
+						}
                         container = (ILayoutContainer) containerPlaceholder
                                 .getRealContainer();
                         if (container instanceof LayoutPart) {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java
index 38c1291..316acdd 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java
@@ -16,7 +16,6 @@
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.StringTokenizer;
-
 import org.eclipse.core.commands.Command;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.NotEnabledException;
@@ -24,6 +23,8 @@
 import org.eclipse.core.commands.ParameterizedCommand;
 import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.action.IContributionItem;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.util.IPropertyChangeListener;
@@ -60,6 +61,7 @@
 import org.eclipse.ui.IWorkbenchPreferenceConstants;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PerspectiveAdapter;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.commands.ICommandService;
 import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.internal.StartupThreading.StartupRunnable;
@@ -75,6 +77,7 @@
 import org.eclipse.ui.internal.layout.Row;
 import org.eclipse.ui.internal.util.PrefUtil;
 import org.eclipse.ui.presentations.PresentationUtil;
+import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
  * A utility class to manage the perspective switcher.  At some point, it might be nice to
@@ -1158,14 +1161,27 @@
         window.getWorkbench().getHelpSystem().setHelp(saveasMenuItem,
         		IWorkbenchHelpContextIds.SAVE_PERSPECTIVE_ACTION);
         saveasMenuItem.addSelectionListener(new SelectionAdapter() {
-            public void widgetSelected(SelectionEvent e) {
-                if (perspectiveBar == null) {
+			public void widgetSelected(SelectionEvent event) {
+				if (perspectiveBar == null) {
 					return;
 				}
-                SavePerspectiveAction saveAction=new SavePerspectiveAction(window);
-                saveAction.setEnabled(true);
-                saveAction.run();
-            }
+				IHandlerService handlerService = (IHandlerService) window
+						.getService(IHandlerService.class);
+				IStatus status = Status.OK_STATUS;
+				try {
+					handlerService.executeCommand(
+							IWorkbenchCommandConstants.WINDOW_SAVE_PERSPECTIVE_AS, null);
+				} catch (ExecutionException e) {
+					status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e);
+				} catch (NotDefinedException e) {
+					status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e);
+				} catch (NotEnabledException e) {
+					status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e);
+				} catch (NotHandledException e) {
+				}
+				if(!status.isOK())
+					StatusManager.getManager().handle(status, StatusManager.SHOW | StatusManager.LOG);
+			}
         });
     }
     
@@ -1175,14 +1191,28 @@
         window.getWorkbench().getHelpSystem().setHelp(resetMenuItem,
         		IWorkbenchHelpContextIds.RESET_PERSPECTIVE_ACTION);
         resetMenuItem.addSelectionListener(new SelectionAdapter() {
-            public void widgetSelected(SelectionEvent e) {
-                if (perspectiveBar == null) {
+			public void widgetSelected(SelectionEvent event) {
+				if (perspectiveBar == null) {
 					return;
 				}
-                ResetPerspectiveAction resetAction=new ResetPerspectiveAction(window);
-                resetAction.setEnabled(true);
-                resetAction.run();
-             }
+				IHandlerService handlerService = (IHandlerService) window
+						.getService(IHandlerService.class);
+				IStatus status = Status.OK_STATUS;
+				try {
+					handlerService.executeCommand(
+							IWorkbenchCommandConstants.WINDOW_RESET_PERSPECTIVE, null);
+				} catch (ExecutionException e) {
+					status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e);
+				} catch (NotDefinedException e) {
+					status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e);
+				} catch (NotEnabledException e) {
+					status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e);
+				} catch (NotHandledException e) {
+				}
+				if (!status.isOK())
+					StatusManager.getManager().handle(status,
+							StatusManager.SHOW | StatusManager.LOG);
+			}
         });
     }
     
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductProperties.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductProperties.java
index f728401..c326e10 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductProperties.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductProperties.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.ui.internal;
 
+import com.ibm.icu.text.MessageFormat;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
@@ -17,7 +18,6 @@
 import java.util.HashMap;
 import java.util.MissingResourceException;
 import java.util.PropertyResourceBundle;
-
 import org.eclipse.core.runtime.IProduct;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
@@ -25,8 +25,6 @@
 import org.eclipse.ui.branding.IProductConstants;
 import org.osgi.framework.Bundle;
 
-import com.ibm.icu.text.MessageFormat;
-
 /**
  * A class that converts the strings returned by
  * <code>org.eclipse.core.runtime.IProduct.getProperty</code> to the
@@ -264,12 +262,19 @@
         if (property.indexOf('{') == -1) {
 			return property;
 		}
-        String[] tempMappings = getMappings(product.getDefiningBundle());
-                /*
-    	 * Check if the mapping value is a system property, specified
-    	 * by '$' at the beginning and end of the string.  If so, update
-    	 * the mappings array with the system property value.  
-    	 */
+
+		/*
+		 * Check if the mapping value is a system property, specified by '$' at
+		 * the beginning and end of the string. If so, update the temp mappings
+		 * array with the system property value. Note that we use a clone (copy)
+		 * of the mappings so that the cached system property value is not
+		 * stored in the per-bundle mappings for this class. This allows changes
+		 * in system property values to be reflected each time this method is
+		 * called. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=302184
+		 */
+
+		String[] tempMappings = (String[]) getMappings(product.getDefiningBundle()).clone();
+
         for (int i=0; i<tempMappings.length; i++) {
         	String nextString = tempMappings[i];
         	int length = nextString.length();
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/RectangleAnimation.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/RectangleAnimation.java
index e063e77..fdd26bf 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/RectangleAnimation.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/RectangleAnimation.java
@@ -50,7 +50,6 @@
     
     // Control State
     private DefaultAnimationFeedback feedbackRenderer;
-    private long stepCount;
     private long frameCount;
     private long startTime;
     private long curTime;
@@ -88,8 +87,6 @@
 	            updateDisplay();
 	            frameCount++;
             }
-            
-            stepCount++;
         }
 
     };
@@ -135,7 +132,6 @@
         feedbackRenderer.initialize(parentShell, start, end);
         
         // Set the animation's initial state
-        stepCount = 0;
         //long totalFrames = (long) ((duration / 1000.0) * framesPerSec);       
         curTime = startTime = System.currentTimeMillis();
     }
@@ -244,7 +240,6 @@
             Thread.yield();
         }
 
-        //System.out.println("Done: " + (curTime-startTime) + " steps: " + stepCount + " frames:" + frameCount);   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
         // We're done, clean up
         display.syncExec(new Runnable() {
             public void run() {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java
deleted file mode 100644
index 851a921..0000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ResetPerspectiveAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IPerspectiveDescriptor;
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Reset the layout within the active perspective.
- */
-public class ResetPerspectiveAction extends PerspectiveAction {
-
-    /**
-     * This default constructor allows the the action to be called from the welcome page.
-     */
-    public ResetPerspectiveAction() {
-        this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
-    }
-
-    /**
-     * Create an instance of this class
-     * @param window the window
-     */
-    public ResetPerspectiveAction(IWorkbenchWindow window) {
-        super(window);
-        setText(WorkbenchMessages.ResetPerspective_text);
-        setActionDefinitionId(IWorkbenchCommandConstants.WINDOW_RESET_PERSPECTIVE);
-        // @issue missing action id
-        setToolTipText(WorkbenchMessages.ResetPerspective_toolTip); 
-        window.getWorkbench().getHelpSystem().setHelp(this,
-				IWorkbenchHelpContextIds.RESET_PERSPECTIVE_ACTION);
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PerspectiveAction.
-     */
-    protected void run(IWorkbenchPage page, IPerspectiveDescriptor persp) {
-        String message = NLS.bind(WorkbenchMessages.ResetPerspective_message, persp.getLabel() );
-        String[] buttons = new String[] { IDialogConstants.OK_LABEL,
-                IDialogConstants.CANCEL_LABEL };
-        MessageDialog d = new MessageDialog(getWindow().getShell(),
-                WorkbenchMessages.ResetPerspective_title,
-                null, message, MessageDialog.QUESTION, buttons, 0);
-        if (d.open() == 0) {
-			page.resetPerspective();
-		}
-    }
-
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAction.java
deleted file mode 100644
index 6e6ce41..0000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAction.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal;
-
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.ISaveablePart;
-import org.eclipse.ui.ISaveablesSource;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Workbench common <code>Save</code> action.
- */
-public class SaveAction extends BaseSaveAction implements IBackgroundSaveListener {
-
-    /**
-     * Create an instance of this class
-     * 
-     * @param window the window
-     */
-    public SaveAction(IWorkbenchWindow window) {
-        super(WorkbenchMessages.SaveAction_text, window); 
-        setText(WorkbenchMessages.SaveAction_text); 
-        setToolTipText(WorkbenchMessages.SaveAction_toolTip);
-        setId("save"); //$NON-NLS-1$
-        window.getWorkbench().getHelpSystem().setHelp(this,
-				IWorkbenchHelpContextIds.SAVE_ACTION);
-        setImageDescriptor(WorkbenchImages
-                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT));
-        setDisabledImageDescriptor(WorkbenchImages
-                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT_DISABLED));
-        setActionDefinitionId(IWorkbenchCommandConstants.FILE_SAVE); 
-        ((WorkbenchWindow)window).addBackgroundSaveListener(this);
-    }
-    
-    public void dispose() {
-    	((WorkbenchWindow)getWorkbenchWindow()).removeBackgroundSaveListener(this);
-    	super.dispose();
-    }
-
-    /* (non-Javadoc)
-     * Method declared on IAction.
-     * Performs the <code>Save</code> action by calling the
-     * <code>IEditorPart.doSave</code> method on the active editor.
-     */
-    public void run() {
-        if (getWorkbenchWindow() == null) {
-            // action has been disposed
-            return;
-        }
-        /* **********************************************************************************
-         * The code below was added to track the view with focus
-         * in order to support save actions from a view (see bug 10234). 
-         */
-        ISaveablePart saveView = getSaveableView();
-        if (saveView != null) {
-            ((WorkbenchPage) getActivePart().getSite().getPage()).savePart(
-                    saveView, getActivePart(), false);
-            return;
-        }
-
-        IEditorPart part = getActiveEditor();
-        if (part != null) {
-            IWorkbenchPage page = part.getSite().getPage();
-            page.saveEditor(part, false);
-        }
-    }
-
-	/* (non-Javadoc)
-     * Method declared on ActiveEditorAction.
-     */
-    protected void updateState() {
-        /* **********************************************************************************
-         * The code below was added to track the view with focus
-         * in order to support save actions from a view (see bug 10234). 
-         */
-        ISaveablePart saveable = getSaveableView();
-        if (saveable == null) {
-        	saveable = getActiveEditor();
-        }
-        /* **********************************************************************************/
-        if (saveable instanceof ISaveablesSource) {
-			ISaveablesSource modelSource = (ISaveablesSource) saveable;
-			setEnabled(SaveableHelper.needsSave(modelSource));
-			return;
-        }
-        setEnabled(saveable != null && saveable.isDirty());
-    }
-
-	public void handleBackgroundSaveStarted() {
-		updateState();
-	}
-
-	public void setEnabled(boolean enabled) {
-		super.setEnabled(enabled);
-		IWorkbenchWindow window = getWorkbenchWindow();
-		if (window != null) {
-			Shell shell = window.getShell();
-			if (shell != null && !shell.isDisposed()) {
-				shell.setModified(enabled);
-			}
-		}
-	}
-
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java
deleted file mode 100644
index b0fc821..0000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAllAction.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.ui.IPropertyListener;
-import org.eclipse.ui.ISaveablePart;
-import org.eclipse.ui.ISaveablesLifecycleListener;
-import org.eclipse.ui.ISaveablesSource;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.Saveable;
-
-/**
- * Global action that saves all targets in the
- * workbench that implement ISaveTarget interface.
- * The action keeps track of opened save targets
- * and their 'save' state. If none of the currently
- * opened targets needs saving, it will disable.
- * This action is somewhat different from all
- * other global actions in that it works on
- * multiple targets at the same time i.e. it
- * does not disconnect from the target when it
- * becomes deactivated.
- */
-public class SaveAllAction extends PageEventAction implements IPropertyListener {
-    /**
-     * List of parts (element type: <code>IWorkbenchPart</code>)
-     * against which this class has outstanding property listeners registered.
-     */
-    private List partsWithListeners = new ArrayList(1);
-	private IWorkbenchPart openPart;
-
-    /**
-     * The default constructor.
-     * 
-     * @param window the window
-     */
-    public SaveAllAction(IWorkbenchWindow window) {
-        super(WorkbenchMessages.SaveAll_text, window);
-        setToolTipText(WorkbenchMessages.SaveAll_toolTip);
-        setId("saveAll"); //$NON-NLS-1$
-        setEnabled(false);
-        window.getWorkbench().getHelpSystem().setHelp(this,
-				IWorkbenchHelpContextIds.SAVE_ALL_ACTION);
-        setImageDescriptor(WorkbenchImages
-                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVEALL_EDIT));
-        setDisabledImageDescriptor(WorkbenchImages
-                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVEALL_EDIT_DISABLED));
-        setActionDefinitionId(IWorkbenchCommandConstants.FILE_SAVE_ALL);
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PageEventAction.
-     */
-    public void pageActivated(IWorkbenchPage page) {
-        super.pageActivated(page);
-        updateState();
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PageEventAction.
-     */
-    public void pageClosed(IWorkbenchPage page) {
-        super.pageClosed(page);
-        updateState();
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PartEventAction.
-     */
-    public void partClosed(IWorkbenchPart part) {
-        super.partClosed(part);
-        if (part instanceof ISaveablePart) {
-            part.removePropertyListener(this);
-            partsWithListeners.remove(part);
-            updateState();
-        }
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PartEventAction.
-     */
-    public void partOpened(IWorkbenchPart part) {
-        super.partOpened(part);
-        if (part instanceof ISaveablePart) {
-            part.addPropertyListener(this);
-            partsWithListeners.add(part);
-			// We need to temporarily cache the opened part 
-			// because saveable views are not registered 
-			// with a perspective until after this method 
-			// is called.  We can't pass it through to
-			// update because it's protected. An async
-			// call to update may be a better approach.
-            // See bug 93784 [WorkbenchParts] View not yet added to perspective when partOpened sent
-			openPart = part;
-            updateState();
-			openPart = null;
-        }
-    }
-
-    /* (non-Javadoc)
-     * Method declared on IPropertyListener.
-     */
-    public void propertyChanged(Object source, int propID) {
-        if (source instanceof ISaveablePart) {
-            if (propID == ISaveablePart.PROP_DIRTY) {
-                updateState();
-            }
-        }
-    }
-
-    /* (non-Javadoc)
-     * Method declared on Action.
-     */
-    public void run() {
-        if (getWorkbenchWindow() == null) {
-            // action has been disposed
-            return;
-        }
-        WorkbenchPage page = (WorkbenchPage) getActivePage();
-        if (page != null) {
-        	// The second parameter is true to also save saveables from non-part
-			// sources, see bug 139004.
-            page.saveAllEditors(false, true);
-            updateState();
-        }
-    }
-
-    /**
-     * Updates availability depending on number of
-     * targets that need saving.
-     */
-    protected void updateState() {
-        // Workaround for bug 93784 [WorkbenchParts] View not yet added to perspective when partOpened sent
-		if (openPart != null && openPart.getSite().getPage().equals(getActivePage()) && ((ISaveablePart) openPart).isDirty()) {
-			setEnabled(true);
-		}
-		else {
-			WorkbenchPage page = (WorkbenchPage) getActivePage();
-			if (page == null) {
-				setEnabled(false);
-			} else {
-				if (page.getDirtyParts().length > 0) {
-					setEnabled(true);
-				} else {
-					// Since Save All also saves saveables from non-part sources,
-					// look if any such saveables exist and are dirty.
-					SaveablesList saveablesList = (SaveablesList) page
-							.getWorkbenchWindow().getWorkbench().getService(
-									ISaveablesLifecycleListener.class);
-					ISaveablesSource[] nonPartSources = saveablesList.getNonPartSources();
-					for (int i = 0; i < nonPartSources.length; i++) {
-						Saveable[] saveables = nonPartSources[i].getSaveables();
-						for (int j = 0; j < saveables.length; j++) {
-							if (saveables[j].isDirty()) {
-								setEnabled(true);
-								return;
-							}
-						}
-					}
-					setEnabled(false);
-				}
-			}
-		}
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PageEventAction.
-     */
-    public void dispose() {
-        super.dispose();
-        for (Iterator it = partsWithListeners.iterator(); it.hasNext();) {
-            IWorkbenchPart part = (IWorkbenchPart) it.next();
-            part.removePropertyListener(this);
-        }
-        partsWithListeners.clear();
-    }
-
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java
deleted file mode 100644
index b9693cc..0000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveAsAction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal;
-
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.ISaveablePart;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Workbench common <code>Save As</code> action.
- */
-public class SaveAsAction extends BaseSaveAction {
-
-    /**
-     * Create an instance of this class
-     * 
-     * @param window the window
-     */
-    public SaveAsAction(IWorkbenchWindow window) {
-        super(WorkbenchMessages.SaveAs_text, window); 
-        setActionDefinitionId(IWorkbenchCommandConstants.FILE_SAVE_AS);
-        setText(WorkbenchMessages.SaveAs_text); 
-        setToolTipText(WorkbenchMessages.SaveAs_toolTip); 
-        setId("saveAs"); //$NON-NLS-1$
-        window.getWorkbench().getHelpSystem().setHelp(this,
-				IWorkbenchHelpContextIds.SAVE_AS_ACTION);
-        setImageDescriptor(WorkbenchImages
-                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVEAS_EDIT));
-        setDisabledImageDescriptor(WorkbenchImages
-                .getImageDescriptor(ISharedImages.IMG_ETOOL_SAVEAS_EDIT_DISABLED));
-    }
-
-    /* (non-Javadoc)
-     * Method declared on Action.
-     */
-    public void run() {
-        if (getWorkbenchWindow() == null) {
-            // action has been disposed
-            return;
-        }
-        /* **********************************************************************************
-         * The code below was added to track the view with focus
-         * in order to support save actions from a view (see bug 10234). 
-         */
-        ISaveablePart saveView = getSaveableView();
-        if (saveView != null) {
-            saveView.doSaveAs();
-            return;
-        }
-        /* **********************************************************************************/
-
-        IEditorPart editor = getActiveEditor();
-        if (editor != null) {
-            editor.doSaveAs();
-        }
-    }
-
-    /* (non-Javadoc)
-     * Method declared on ActiveEditorAction.
-     */
-    protected void updateState() {
-        /* **********************************************************************************
-         * The code below was added to track the view with focus
-         * in order to support save actions from a view (see bug 10234). 
-         */
-        ISaveablePart saveView = getSaveableView();
-        if (saveView != null) {
-            setEnabled(saveView.isSaveAsAllowed());
-            return;
-        }
-        /* **********************************************************************************/
-
-        IEditorPart editor = getActiveEditor();
-        setEnabled(editor != null && editor.isSaveAsAllowed());
-    }
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java
deleted file mode 100644
index ea9e58c..0000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SavePerspectiveAction.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IPerspectiveDescriptor;
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.internal.dialogs.SavePerspectiveDialog;
-import org.eclipse.ui.internal.registry.PerspectiveDescriptor;
-import org.eclipse.ui.internal.registry.PerspectiveRegistry;
-
-/**
- * Action to save the layout of the active perspective.
- */
-public class SavePerspectiveAction extends PerspectiveAction {
-
-    /**
-     * Creates an instance of this class.
-     *
-     * @param window the workbench window in which this action appears
-     */
-    public SavePerspectiveAction(IWorkbenchWindow window) {
-        super(window);
-        setText(WorkbenchMessages.SavePerspective_text);
-        setActionDefinitionId(IWorkbenchCommandConstants.WINDOW_SAVE_PERSPECTIVE_AS);
-        // @issue missing action id
-        setToolTipText(WorkbenchMessages.SavePerspective_toolTip); 
-        window.getWorkbench().getHelpSystem().setHelp(this,
-				IWorkbenchHelpContextIds.SAVE_PERSPECTIVE_ACTION);
-    }
-
-    /* (non-Javadoc)
-     * Method declared on PerspectiveAction.
-     */
-    protected void run(IWorkbenchPage page, IPerspectiveDescriptor persp) {
-        PerspectiveDescriptor desc = (PerspectiveDescriptor) persp;
-        if (desc != null) {
-            if (desc.isSingleton()) {
-                saveSingleton(page);
-            } else {
-                saveNonSingleton(page, desc);
-            }
-        }
-    }
-
-    /** 
-     * Save a singleton over itself.
-     */
-    private void saveSingleton(IWorkbenchPage page) {
-        String[] buttons = new String[] { IDialogConstants.OK_LABEL,
-                IDialogConstants.CANCEL_LABEL };
-        MessageDialog d = new MessageDialog(page.getWorkbenchWindow().getShell(),
-                WorkbenchMessages.SavePerspective_overwriteTitle,
-                null, WorkbenchMessages.SavePerspective_singletonQuestion,
-                MessageDialog.QUESTION, buttons, 0);
-        if (d.open() == 0) {
-            page.savePerspective();
-        }
-    }
-
-    /**
-     * Save a singleton over the user selection.
-     */
-    private void saveNonSingleton(IWorkbenchPage page, PerspectiveDescriptor oldDesc) {
-        // Get reg.
-        PerspectiveRegistry reg = (PerspectiveRegistry) WorkbenchPlugin
-                .getDefault().getPerspectiveRegistry();
-
-        // Get persp name.
-        SavePerspectiveDialog dlg = new SavePerspectiveDialog(page.getWorkbenchWindow()
-                .getShell(), reg);
-        // Look up the descriptor by id again to ensure it is still valid.
-        IPerspectiveDescriptor description = reg.findPerspectiveWithId(oldDesc.getId());
-        dlg.setInitialSelection(description);
-        if (dlg.open() != IDialogConstants.OK_ID) {
-            return;
-        }
-
-        // Create descriptor.
-        PerspectiveDescriptor newDesc = (PerspectiveDescriptor) dlg.getPersp();
-        if (newDesc == null) {
-            String name = dlg.getPerspName();
-            newDesc = reg.createPerspective(name,
-                    (PerspectiveDescriptor) description);
-            if (newDesc == null) {
-                MessageDialog.openError(dlg.getShell(), WorkbenchMessages.SavePerspective_errorTitle,
-                        WorkbenchMessages.SavePerspective_errorMessage); 
-                return;
-            }
-        }
-
-        // Save state.
-        page.savePerspectiveAs(newDesc);
-    }
-
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveablesList.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveablesList.java
index 4a95828..42d2e15 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveablesList.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveablesList.java
@@ -344,6 +344,11 @@
 	 */
 	public Object preCloseParts(List partsToClose, boolean save,
 			final IWorkbenchWindow window) {
+		return preCloseParts(partsToClose, save, window, window);
+	}
+
+	public Object preCloseParts(List partsToClose, boolean save, IShellProvider shellProvider,
+			final IWorkbenchWindow window) {
 		// reference count (how many occurrences of a model will go away?)
 		PostCloseInfo postCloseInfo = new PostCloseInfo();
 		for (Iterator it = partsToClose.iterator(); it.hasNext();) {
@@ -380,7 +385,7 @@
 		fillModelsClosing(postCloseInfo.modelsClosing,
 				postCloseInfo.modelsDecrementing);
 		if (save) {
-			boolean canceled = promptForSavingIfNecessary(window,
+			boolean canceled = promptForSavingIfNecessary(shellProvider, window,
 					postCloseInfo.modelsClosing, postCloseInfo.modelsDecrementing, true);
 			if (canceled) {
 				return null;
@@ -397,6 +402,12 @@
 	 */
 	private boolean promptForSavingIfNecessary(final IWorkbenchWindow window,
 			Set modelsClosing, Map modelsDecrementing, boolean canCancel) {
+		return promptForSavingIfNecessary(window, window, modelsClosing, modelsDecrementing,
+				canCancel);
+	}
+
+	private boolean promptForSavingIfNecessary(IShellProvider shellProvider,
+			IWorkbenchWindow window, Set modelsClosing, Map modelsDecrementing, boolean canCancel) {
 		List modelsToOptionallySave = new ArrayList();
 		for (Iterator it = modelsDecrementing.keySet().iterator(); it.hasNext();) {
 			Saveable modelDecrementing = (Saveable) it.next();
@@ -405,8 +416,8 @@
 			}
 		}
 		
-		boolean shouldCancel = modelsToOptionallySave.isEmpty() ? false : promptForSaving(modelsToOptionallySave,
-				window, window, canCancel, true);
+		boolean shouldCancel = modelsToOptionallySave.isEmpty() ? false : promptForSaving(
+				modelsToOptionallySave, shellProvider, window, canCancel, true);
 		
 		if (shouldCancel) {
 			return true;
@@ -419,8 +430,8 @@
 				modelsToSave.add(modelClosing);
 			}
 		}
-		return modelsToSave.isEmpty() ? false : promptForSaving(modelsToSave,
-				window, window, canCancel, false);
+		return modelsToSave.isEmpty() ? false : promptForSaving(modelsToSave, shellProvider,
+				window, canCancel, false);
 	}
 
 	/**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java
index ddd01ab..8ab67f7 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java
@@ -11,15 +11,14 @@
 
 package org.eclipse.ui.internal;
 
+import com.ibm.icu.text.Collator;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.commands.Command;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.IParameter;
@@ -39,6 +38,7 @@
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.ui.IPluginContribution;
+import org.eclipse.ui.IViewReference;
 import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
@@ -53,23 +53,69 @@
 import org.eclipse.ui.views.IViewDescriptor;
 import org.eclipse.ui.views.IViewRegistry;
 
-import com.ibm.icu.text.Collator;
-
 /**
  * A <code>ShowViewMenu</code> is used to populate a menu manager with Show
  * View actions. The visible views are determined by user preference from the
  * Perspective Customize dialog.
  */
 public class ShowViewMenu extends ContributionItem {
-	/**
-	 * @deprecated As of 3.5, replaced by {@link IWorkbenchCommandConstants#VIEWS_SHOW_VIEW}
-	 */
-	public static final String SHOW_VIEW_ID= IWorkbenchCommandConstants.VIEWS_SHOW_VIEW;
-	/**
-	 * @deprecated As of 3.6, replaced by
-	 *             {@link IWorkbenchCommandConstants#VIEWS_SHOW_VIEW_PARM_ID}
-	 */
-	public static final String VIEW_ID_PARM = IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_ID;
+
+	static class Pair {
+		public final Object a;
+		public final Object b;
+		int hashCode = -1;
+
+		/**
+		 * @param a
+		 *            must not be <code>null</code>
+		 * @param b
+		 *            can be <code>null</code>
+		 */
+		public Pair(Object a, Object b) {
+			this.a = a;
+			this.b = b;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see java.lang.Object#hashCode()
+		 */
+		public int hashCode() {
+			if (hashCode == -1) {
+				final int prime = 31;
+				hashCode = 1;
+				hashCode = prime * hashCode + ((a == null) ? 0 : a.hashCode());
+				hashCode = prime * hashCode + ((b == null) ? 0 : b.hashCode());
+				if (hashCode == -1) {
+					hashCode = a.hashCode();
+				}
+			}
+			return hashCode;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see java.lang.Object#equals(java.lang.Object)
+		 */
+		public boolean equals(Object obj) {
+			if (this == obj) {
+				return true;
+			}
+			Pair p = (Pair) obj;
+			if (!a.equals(p.a)) {
+				return false;
+			}
+			if (b == p.b) {
+				return true;
+			}
+			if (b == null || p.b == null) {
+				return false;
+			}
+			return b.equals(p.b);
+		}
+	}
 
 	private IWorkbenchWindow window;
 
@@ -90,9 +136,6 @@
 
 	private Map actions = new HashMap(21);
 
-	// Maps pages to a list of opened views
-	private Map openedViews = new HashMap();
-
 	protected boolean dirty = true;
 
 	private IMenuListener menuListener = new IMenuListener() {
@@ -196,18 +239,18 @@
 		}
 
 		// Get visible actions.
-		List viewIds = Arrays.asList(page.getShowViewShortcuts());
+		List viewIds = getShortcuts(page);
 
 		// add all open views
 		viewIds = addOpenedViews(page, viewIds);
 
 		List actions = new ArrayList(viewIds.size());
 		for (Iterator i = viewIds.iterator(); i.hasNext();) {
-			String id = (String) i.next();
-			if (id.equals(IIntroConstants.INTRO_VIEW_ID)) {
+			Pair id = (Pair) i.next();
+			if (id.a.equals(IIntroConstants.INTRO_VIEW_ID)) {
 				continue;
 			}
-			CommandContributionItemParameter item = getItem(id);
+			CommandContributionItemParameter item = getItem((String) id.a, (String) id.b);
 			if (item != null) {
 				actions.add(item);
 			}
@@ -233,6 +276,15 @@
 		innerMgr.add(showDlgAction);
 	}
 
+	private List getShortcuts(IWorkbenchPage page) {
+		ArrayList list = new ArrayList();
+		String[] shortcuts = page.getShowViewShortcuts();
+		for (int i = 0; i < shortcuts.length; i++) {
+			list.add(new Pair(shortcuts[i], null));
+		}
+		return list;
+	}
+
 	static class PluginCCIP extends CommandContributionItemParameter implements
 			IPluginContribution {
 
@@ -266,7 +318,7 @@
 
 	}
 
-	private CommandContributionItemParameter getItem(String viewId) {
+	private CommandContributionItemParameter getItem(String viewId, String secondaryId) {
 		IViewRegistry reg = WorkbenchPlugin.getDefault().getViewRegistry();
 		IViewDescriptor desc = reg.find(viewId);
 		if (desc==null) {
@@ -281,12 +333,16 @@
 		parms.icon = desc.getImageDescriptor();
 		parms.parameters = new HashMap();
 
-		parms.parameters.put(VIEW_ID_PARM, viewId);
+		parms.parameters.put(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_ID, viewId);
 		if (makeFast) {
 			parms.parameters.put(
 					IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_FASTVIEW,
 					"true"); //$NON-NLS-1$
 		}
+		if (secondaryId != null) {
+			parms.parameters.put(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_SECONDARY_ID,
+					secondaryId);
+		}
 		return parms;
 	}
 
@@ -310,10 +366,10 @@
 	}
 
 	private ArrayList getParts(IWorkbenchPage page) {
-		ArrayList parts = (ArrayList) openedViews.get(page);
-		if (parts == null) {
-			parts = new ArrayList();
-			openedViews.put(page, parts);
+		ArrayList parts = new ArrayList();
+		IViewReference[] refs = page.getViewReferences();
+		for (int i = 0; i < refs.length; i++) {
+			parts.add(new Pair(refs[i].getId(), refs[i].getSecondaryId()));
 		}
 		return parts;
 	}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewPane.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewPane.java
index df01139..99f88c2 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewPane.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewPane.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@
 package org.eclipse.ui.internal;
 
 
+import org.eclipse.jface.action.IContributionItem;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.internal.provisional.action.IToolBarManager2;
 import org.eclipse.jface.util.IPropertyChangeListener;
@@ -96,7 +97,16 @@
         protected void update(boolean force, boolean recursive) {
             super.update(force, recursive);
 
-            boolean hasMenu = !isEmpty();
+			boolean hasMenu = false;
+			IContributionItem[] items = getItems();
+			for (int i = 0; i < items.length; i++) {
+				if (items[i].isVisible() && !items[i].isSeparator() && !items[i].isGroupMarker()) {
+		            // only show the menu if we have visible items that aren't separators or group markers
+					hasMenu = true;
+					break;
+				}
+			}
+
             if (hasMenu != hadViewMenu) {
                 hadViewMenu = hasMenu;
                 firePropertyChange(IPresentablePart.PROP_PANE_MENU);
@@ -170,6 +180,7 @@
         // ISV toolbar.
         //			// 1GD0ISU: ITPUI:ALL - Dbl click on view tool cause zoom
         final Control isvToolBar = isvToolBarMgr.createControl2(parentControl.getParent());
+		isvToolBar.setVisible(false);
         
         isvToolBarMgr.addPropertyChangeListener(new ISVPropListener(isvToolBar));
         
@@ -401,19 +412,13 @@
         return !page.isFixedLayout();
     }
 
-    /**
-     * Return if there should be a view menu at all.
-     * There is no view menu if there is no menu manager,
-     * no pull down button or if the receiver is an
-     * inactive fast view.
-     */
+	/**
+	 * Returns whether there should be a view menu or not. There should not be a
+	 * view menu if there is no menu manager or the manager itself has no
+	 * visible items that are not separators or group markers.
+	 */
     public boolean hasViewMenu() {
-
-        if (isvMenuMgr != null) {
-            return !isvMenuMgr.isEmpty();
-        }
-
-        return false;
+		return isvMenuMgr != null && hadViewMenu;
     }
 
     public void showViewMenu(Point location) {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinPartService.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinPartService.java
index fd9121a..a5bfea3 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinPartService.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinPartService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -131,8 +131,8 @@
             activeRef = activePage.getActivePartReference();
         }
         
+		partService.setActivePart(activeRef);
 		selectionService.setActivePart(activePart);
-        partService.setActivePart(activeRef);
     }
 
     /*
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
index f50710b..7479de7 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -95,6 +95,7 @@
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.TaskBar;
 import org.eclipse.swt.widgets.TaskItem;
@@ -131,6 +132,7 @@
 import org.eclipse.ui.commands.ICommandImageService;
 import org.eclipse.ui.commands.ICommandService;
 import org.eclipse.ui.commands.IWorkbenchCommandSupport;
+import org.eclipse.ui.contexts.IContextActivation;
 import org.eclipse.ui.contexts.IContextService;
 import org.eclipse.ui.contexts.IWorkbenchContextSupport;
 import org.eclipse.ui.handlers.IHandlerService;
@@ -171,6 +173,7 @@
 import org.eclipse.ui.internal.services.ServiceLocatorCreator;
 import org.eclipse.ui.internal.services.SourceProviderService;
 import org.eclipse.ui.internal.services.WorkbenchLocationService;
+import org.eclipse.ui.internal.services.WorkbenchServiceRegistry;
 import org.eclipse.ui.internal.splash.EclipseSplashHandler;
 import org.eclipse.ui.internal.splash.SplashHandlerFactory;
 import org.eclipse.ui.internal.testing.ContributionInfoMessages;
@@ -188,6 +191,7 @@
 import org.eclipse.ui.intro.IIntroManager;
 import org.eclipse.ui.keys.IBindingService;
 import org.eclipse.ui.menus.IMenuService;
+import org.eclipse.ui.menus.MenuUtil;
 import org.eclipse.ui.model.IContributionService;
 import org.eclipse.ui.operations.IWorkbenchOperationSupport;
 import org.eclipse.ui.progress.IProgressService;
@@ -1435,6 +1439,9 @@
 	 * (non-Javadoc) Method declared on IWorkbench.
 	 */
 	public int getWorkbenchWindowCount() {
+		if (windowManager == null) {
+			return 0;
+		}
 		return windowManager.getWindowCount();
 	}
 
@@ -1442,6 +1449,9 @@
 	 * (non-Javadoc) Method declared on IWorkbench.
 	 */
 	public IWorkbenchWindow[] getWorkbenchWindows() {
+		if (windowManager == null) {
+			return new IWorkbenchWindow[0];
+		}
 		Window[] windows = windowManager.getWindows();
 		IWorkbenchWindow[] dwindows = new IWorkbenchWindow[windows.length];
 		System.arraycopy(windows, 0, dwindows, 0, windows.length);
@@ -1553,6 +1563,25 @@
 			}
 		});
 
+		StartupThreading.runWithoutExceptions(new StartupRunnable() {
+
+			public void runWithException() {
+
+				activateWorkbenchContext();
+
+			}
+		});
+
+		StartupThreading.runWithoutExceptions(new StartupRunnable() {
+
+			public void runWithException() {
+
+				createApplicationMenu();
+			}
+		});
+
+
+
 		// attempt to restore a previous workbench state
 		try {
 			UIStats.start(UIStats.RESTORE_WORKBENCH, "Workbench"); //$NON-NLS-1$
@@ -1750,6 +1779,14 @@
 						new SaveablesList());
 			}});
 		
+		StartupThreading.runWithoutExceptions(new StartupRunnable() {
+
+			public void runWithException() {
+				// side effect of getter is initializing
+				getProgressService();
+			}
+		});
+
 		/*
 		 * Phase 1 of the initialization of commands. When this phase completes,
 		 * all the services and managers will exist, and be accessible via the
@@ -1805,6 +1842,9 @@
 		
 		bindingService[0].readRegistryAndPreferences(commandService[0]);
 		serviceLocator.registerService(IBindingService.class, bindingService[0]);
+		// there is a thin window where the filter is set but the service is not
+		// yet available
+		((BindingService) bindingService[0]).getKeyboard().getKeyDownFilter().setEnabled(true);
 
 		final CommandImageManager commandImageManager = new CommandImageManager();
 		final CommandImageService commandImageService = new CommandImageService(
@@ -1826,7 +1866,13 @@
 			}});
 
 
-		// the source providers are now initialized in phase 3
+		// the source providers are now initialized in phase 3, but source
+		// priorities have to be set before handler initialization
+		StartupThreading.runWithoutExceptions(new StartupRunnable() {
+			public void runWithException() {
+				initializeSourcePriorities();
+			}
+		});
 		
 		/*
 		 * Phase 2 of the initialization of commands. This handles the creation
@@ -2121,8 +2167,8 @@
 				super.handleException(e);
 			}
 		});
-		// ensure at least one window was opened
-		if (result[0].isOK() && windowManager.getWindows().length == 0) {
+		// ensure at least one window was opened, only when appMenu isn't there
+		if (shouldReturnNoWindowError(result[0])) {
 			String msg = WorkbenchMessages.Workbench_noWindowsRestored;
 			result[0] = new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH,
 					IWorkbenchConfigurer.RESTORE_CODE_RESET, msg, null);
@@ -2130,6 +2176,23 @@
 		return result[0];
 	}
 
+	private boolean shouldReturnNoWindowError(final IStatus result) {
+		
+		final boolean[] shouldReturn = new boolean[1];
+		// first check for the result & no of windows
+		shouldReturn[0] = result.isOK() && windowManager.getWindows().length == 0;
+		if (shouldReturn[0]) {
+			// if result is ok and there is no window, check for appMenu
+			display.syncExec(new Runnable() {
+				public void run() {
+					// return error if there is no appMenu
+					shouldReturn[0] = !hasAppMenu();
+				}
+			});
+		}
+		return shouldReturn[0];
+	}
+
 	/*
 	 * (non-Javadoc) Method declared on IWorkbench.
 	 */
@@ -2307,6 +2370,10 @@
 		return Util.getArrayFromList(pref, ";"); //$NON-NLS-1$
 	}
 
+	private void initializeSourcePriorities() {
+		WorkbenchServiceRegistry.getRegistry().initializeSourcePriorities();
+	}
+
 	private void startSourceProviders() {
 		/*
 		 * Phase 3 of the initialization of commands. The source providers that
@@ -2977,6 +3044,10 @@
 
 		((GrabFocus) Tweaklets.get(GrabFocus.KEY)).dispose();
 		
+		deactivateWorkbenchContext();
+
+		disposeApplicationMenu();
+
 		// Bring down all of the services.
 		serviceLocator.dispose();
 
@@ -2998,6 +3069,7 @@
 		}
 	}
 
+
 	/**
 	 * Cancels the early startup job, if it's still running.
 	 */
@@ -3226,8 +3298,9 @@
 
 	private void updateActiveWorkbenchWindowMenuManager(boolean textOnly) {
 		if (activeWorkbenchWindow != null) {
-			activeWorkbenchWindow
-					.removeActionSetsListener(actionSetSourceProvider);
+			if (actionSetSourceProvider != null) {
+				activeWorkbenchWindow.removeActionSetsListener(actionSetSourceProvider);
+			}
 			activeWorkbenchWindow = null;
 		}
 		boolean actionSetsUpdated = false;
@@ -3244,17 +3317,14 @@
 			final Shell windowShell = activeWorkbenchWindow.getShell();
 			final Shell activeShell = getDisplay().getActiveShell();
 			final IContextService service = (IContextService) getService(IContextService.class);
-			if (Util.equals(windowShell, activeShell)
-					|| service.getShellType(activeShell) == IContextService.TYPE_WINDOW) {
-				activeWorkbenchWindow
-						.addActionSetsListener(actionSetSourceProvider);
-				final WorkbenchPage page = activeWorkbenchWindow
-						.getActiveWorkbenchPage();
+			if ((Util.equals(windowShell, activeShell) || service.getShellType(activeShell) == IContextService.TYPE_WINDOW)
+					&& actionSetSourceProvider != null) {
+				activeWorkbenchWindow.addActionSetsListener(actionSetSourceProvider);
+				final WorkbenchPage page = activeWorkbenchWindow.getActiveWorkbenchPage();
 				final IActionSetDescriptor[] newActionSets;
 				if (page != null) {
 					newActionSets = page.getActionSets();
-					final ActionSetsEvent event = new ActionSetsEvent(
-							newActionSets);
+					final ActionSetsEvent event = new ActionSetsEvent(newActionSets);
 					actionSetSourceProvider.actionSetsChanged(event);
 					actionSetsUpdated = true;
 				}
@@ -3270,7 +3340,7 @@
 			}
 		}
 
-		if (!actionSetsUpdated) {
+		if (!actionSetsUpdated && actionSetSourceProvider != null) {
 			final ActionSetsEvent event = new ActionSetsEvent(null);
 			actionSetSourceProvider.actionSetsChanged(event);
 		}
@@ -3700,6 +3770,9 @@
 	 */
 	private MenuSourceProvider menuSourceProvider;
 
+	private IContextActivation workbenchContext;
+
+	private ApplicationMenuManager applicationMenuMgr;
 
 
 	/**
@@ -3807,4 +3880,47 @@
 		};
 	}
 
+	private void createApplicationMenu() {
+
+		if (!hasAppMenu())
+			return;
+
+		applicationMenuMgr = new ApplicationMenuManager(getAppMenu());
+		IMenuService menuService = (IMenuService) serviceLocator.getService(IMenuService.class);
+		menuService.populateContributionManager(applicationMenuMgr, MenuUtil.WORKBENCH_MENU);
+		applicationMenuMgr.update(true);
+	}
+
+	private void disposeApplicationMenu() {
+
+		if (applicationMenuMgr == null)
+			return;
+		IMenuService menuService = (IMenuService) serviceLocator.getService(IMenuService.class);
+		menuService.releaseContributions(applicationMenuMgr);
+		applicationMenuMgr.dispose();
+	}
+
+	private void activateWorkbenchContext() {
+		IContextService contextService = (IContextService) serviceLocator
+				.getService(IContextService.class);
+		workbenchContext = contextService.activateContext(IContextService.CONTEXT_ID_WORKBENCH_MENU);
+	}
+
+	private void deactivateWorkbenchContext() {
+		if(workbenchContext == null)
+			return;
+		workbenchContext.getContextService().deactivateContext(workbenchContext);
+	}
+
+
+	public boolean hasAppMenu() {
+		if (getAppMenu() == null)
+			return false;
+		return !getWorkbenchConfigurer().getExitOnLastWindowClose();
+	}
+
+	private Menu getAppMenu() {
+		return getDisplay().getMenuBar();
+	}
+
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java
index 076b00b..4bec539 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -246,6 +246,10 @@
 	public static String ResetPerspective_title;
 	public static String RevertPerspective_note;
 
+	public static String RevertPerspective_title;
+	public static String RevertPerspective_message;
+	public static String RevertPerspective_option;
+
 	public static String ClosePerspectiveAction_text;
 	public static String ClosePerspectiveAction_toolTip;
 	public static String CloseAllPerspectivesAction_text;
@@ -488,6 +492,7 @@
 
 	public static String FilteredPreferenceDialog_PreferenceSaveFailed;
 	public static String FilteredPreferenceDialog_Resize;
+	public static String FilteredPreferenceDialog_FilterToolTip;
 	
 	public static String FileExtension_fileTypeMessage;
 	public static String FileExtension_fileTypeLabel;
@@ -622,6 +627,7 @@
     public static String EditorManager_create_element_returned_null;
     public static String EditorManager_wrong_createElement_result;
     public static String EditorManager_backgroundSaveJobName;
+	public static String EditorManager_largeDocumentWarning;
     
 	public static String EditorPane_pinEditor;
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
index f649781..0791edf 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -53,6 +53,8 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IActionBars;
 import org.eclipse.ui.IEditorDescriptor;
@@ -285,6 +287,78 @@
 		return Platform.getExtensionRegistry().getExtensionPoint(PlatformUI.PLUGIN_ID, IWorkbenchRegistryConstants.PL_PERSPECTIVE_EXTENSIONS);
 	}
 
+	class MnemonicDisabler implements Listener {
+		private final Composite root;
+		private boolean enabled = false;
+
+		public MnemonicDisabler(Composite root) {
+			this.root = root;
+			root.getShell().addListener(SWT.Activate, this);
+			root.getShell().addListener(SWT.Deactivate, this);
+			root.addListener(SWT.Dispose, this);
+			root.getDisplay().addFilter(SWT.Traverse, this);
+		}
+
+		public void handleEvent(Event event) {
+			switch (event.type) {
+			case SWT.Activate:
+				enabled = true;
+				break;
+
+			case SWT.Dispose:
+				root.getDisplay().removeFilter(SWT.Traverse, this);
+				root.getShell().removeListener(SWT.Activate, this);
+				root.getShell().removeListener(SWT.Deactivate, this);
+			case SWT.Deactivate:
+				enabled = false;
+				break;
+
+			case SWT.Traverse:
+				if (!enabled) {
+					return;
+				}
+				handleTraverse(event);
+				break;
+			}
+		}
+
+		private void handleTraverse(Event event) {
+			if (event.detail != SWT.TRAVERSE_MNEMONIC || event.doit != true)
+				return;
+			Control candidate = (Control) event.widget;
+
+			// List of Controls which define the active part's "context".
+			List activeContexts = new ArrayList();
+			activeContexts.add(((PartSite) getActivePart().getSite()).getPane().getControl());
+			// $TODO need to also add the parts toolbar to the list
+
+			IWorkbenchPartReference allParts[] = getSortedParts();
+			List otherContexts = new ArrayList();
+			for (int i = 0; i < allParts.length; i++) {
+				IWorkbenchPartReference partReference = allParts[i];
+				IWorkbenchPart part = partReference.getPart(false);
+				if (part != null && isPartVisible(part))
+					otherContexts.add(((PartSite) part.getSite()).getPane().getControl());
+				// $TODO need to also add the toolbar's control for the part
+			}
+			otherContexts.removeAll(activeContexts);
+
+			// walk up the candidate's parent chain
+			while (candidate != null) {
+				if (activeContexts.contains(candidate))
+					return;
+				else if (otherContexts.contains(candidate)) {
+					event.doit = false;
+					return;
+				}
+				candidate = candidate.getParent();
+			}
+			// Candidate was not inside any context, so it is some global
+			// Control.
+		}
+
+	}
+
     /**
      * Manages editor contributions and action set part associations.
      */
@@ -1163,7 +1237,7 @@
      */
     public boolean closeAllSavedEditors() {
         // get the Saved editors
-        IEditorReference editors[] = getEditorReferences();
+		IEditorReference editors[] = getAllEditorReferences();
         IEditorReference savedEditors[] = new IEditorReference[editors.length];
         int j = 0;
         for (int i = 0; i < editors.length; i++) {
@@ -1185,7 +1259,7 @@
      * See IWorkbenchPage
      */
     public boolean closeAllEditors(boolean save) {
-        return closeEditors(getEditorReferences(), save);
+		return closeEditors(getAllEditorReferences(), save);
     }
 
     private void updateActivePart() {
@@ -1376,6 +1450,7 @@
 	            IEditorReference ref = editorRefs[i];
 	            
 	            // Remove editor from the presentation
+				removedEditors.remove(ref);
                 editorPresentation.closeEditor(ref);
 	            
                 partRemoved((WorkbenchPartReference)ref);                
@@ -1650,6 +1725,7 @@
 
 			public void runWithException() {
 				composite = new Composite(parent, SWT.NONE);
+				new MnemonicDisabler(composite);
 				composite.setVisible(false); // Make visible on activate.
 				// force the client composite to be layed out
 				parent.layout();
@@ -2116,6 +2192,12 @@
         return editorPresentation.getEditors();
     }
 
+	public IEditorReference[] getAllEditorReferences() {
+		ArrayList allRefs = new ArrayList(removedEditors);
+		allRefs.addAll(Arrays.asList(editorPresentation.getEditors()));
+		return (IEditorReference[]) allRefs.toArray(new IEditorReference[allRefs.size()]);
+	}
+
     /**
      * Returns the docked views.
      */
@@ -3327,7 +3409,7 @@
     /*
      * Saves the workbench part.
      */
-    protected boolean savePart(ISaveablePart saveable, IWorkbenchPart part,
+	public boolean savePart(ISaveablePart saveable, IWorkbenchPart part,
             boolean confirm) {
         // Do not certify part do allow editors inside a multipageeditor to
         // call this.
@@ -3484,6 +3566,23 @@
         
         if (partBeingActivated != null) {
             if (partBeingActivated.getPart(false) != newPart) {
+            	// check if we're a nested editor reference
+				if (partBeingActivated instanceof EditorManager.InnerEditor) {
+					EditorReference outerEditor = (EditorReference) ((EditorManager.InnerEditor) partBeingActivated)
+							.getOuterEditor();
+					// get all the sibling references
+					IEditorReference[] children = outerEditor.getChildren();
+					if (children != null) {
+						for (int i = 0; i < children.length; i++) {
+							// there's a recursive activation request for a
+							// sibling reference, ignore it
+							if (children[i].getPart(false) == newPart) {
+								return;
+							}
+						}
+					}
+				}
+
                 WorkbenchPlugin.log(new RuntimeException(NLS.bind(
                         "WARNING: Prevented recursive attempt to activate part {0} while still in the middle of activating part {1}", //$NON-NLS-1$
                         getId(newPart), getId(partBeingActivated))));
@@ -4822,7 +4921,7 @@
 	IWorkbenchPartReference[] getAllParts() {
 		ArrayList allParts = new ArrayList();
 		IViewReference[] views = viewFactory.getViews();
-		IEditorReference[] editors = getEditorReferences();
+		IEditorReference[] editors = getAllEditorReferences();
 
 		if (views.length > 0) {
 			allParts.addAll(Arrays.asList(views));
@@ -4830,9 +4929,6 @@
 		if (editors.length > 0) {
 			allParts.addAll(Arrays.asList(editors));
 		}
-		if (removedEditors.size() > 0) {
-			allParts.addAll(removedEditors);
-		}
 
 		return (IWorkbenchPartReference[]) allParts
 				.toArray(new IWorkbenchPartReference[allParts.size()]);
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java
index f92f262..c751ad3 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java
@@ -16,7 +16,6 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
@@ -167,9 +166,10 @@
 
     private boolean queueEvents = false;
 
-    private static DisposeListener prematureDisposeListener = new DisposeListener() {
+	private DisposeListener prematureDisposeListener = new DisposeListener() {
         public void widgetDisposed(DisposeEvent e) {
-            WorkbenchPlugin.log(new RuntimeException("Widget disposed too early!")); //$NON-NLS-1$
+			WorkbenchPlugin.log(new RuntimeException("Widget disposed too early for part " //$NON-NLS-1$
+					+ getId()));
         }    
     };
     
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java
index 6085404..0c25a0a 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Dina Sayed, dsayed@eg.ibm.com, IBM -  bug 303889
  *******************************************************************************/
 
 package org.eclipse.ui.internal;
@@ -936,6 +937,29 @@
 		return checkCommandLineLocale(); //Use the default value if there is nothing specified
 	}
 	
+    /**
+	 * Check whether the workbench messages are in a Bidi language. This method
+	 * will return <code>null</code> if it is unable to determine message
+	 * properties.
+	 */
+	private Boolean isBidiMessageText() {
+		// Check if the user installed the NLS packs for bidi
+		String message = WorkbenchMessages.Startup_Loading_Workbench;
+		if (message == null)
+			return null;
+
+		try {
+			// use qualified class name to avoid import statement
+			// and premature attempt to resolve class reference
+			boolean isBidi = com.ibm.icu.text.Bidi.requiresBidi(message.toCharArray(), 0,
+					message.length());
+			return new Boolean(isBidi);
+		} catch (NoClassDefFoundError e) {
+			// the ICU Base bundle used in place of ICU?
+			return null;
+		}
+	}
+
 	/**
 	 * Check to see if the command line parameter for -nl
 	 * has been set. If so imply the orientation from this 
@@ -953,21 +977,23 @@
 	 * @see SWT#RIGHT_TO_LEFT
 	 */
 	private int checkCommandLineLocale() {
-		
-		//Check if the user property is set. If not do not
-		//rely on the vm.
-		if(System.getProperty(NL_USER_PROPERTY) == null) {
-			return SWT.NONE;
+		// Check if the user property is set. If not, do not rely on the VM.
+		if (System.getProperty(NL_USER_PROPERTY) == null) {
+			Boolean needRTL = isBidiMessageText();
+			if (needRTL != null && needRTL.booleanValue())
+				return SWT.RIGHT_TO_LEFT;
+		} else {
+			String lang = Locale.getDefault().getLanguage();
+			boolean bidiLangauage = "iw".equals(lang) || "he".equals(lang) || "ar".equals(lang) || //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+					"fa".equals(lang) || "ur".equals(lang); //$NON-NLS-1$ //$NON-NLS-2$
+			if (bidiLangauage) {
+				Boolean needRTL = isBidiMessageText();
+				if (needRTL == null)
+					return SWT.RIGHT_TO_LEFT;
+				if (needRTL.booleanValue())
+					return SWT.RIGHT_TO_LEFT;
+			}
 		}
-		
-		Locale locale = Locale.getDefault();
-		String lang = locale.getLanguage();
-
-		if ("iw".equals(lang) || "he".equals(lang) || "ar".equals(lang) ||  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-				"fa".equals(lang) || "ur".equals(lang)) { //$NON-NLS-1$ //$NON-NLS-2$ 
-			return SWT.RIGHT_TO_LEFT;
-		}
-			
 		return SWT.NONE;
 	}
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
index d2dfaa1..56b91d2 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
@@ -20,7 +20,9 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import org.eclipse.core.commands.Command;
 import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.commands.State;
 import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.expressions.IEvaluationContext;
 import org.eclipse.core.runtime.Assert;
@@ -93,6 +95,7 @@
 import org.eclipse.ui.ISelectionService;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchPartReference;
@@ -103,10 +106,12 @@
 import org.eclipse.ui.application.ActionBarAdvisor;
 import org.eclipse.ui.application.WorkbenchAdvisor;
 import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+import org.eclipse.ui.commands.ICommandService;
 import org.eclipse.ui.contexts.IContextService;
 import org.eclipse.ui.contexts.IWorkbenchContextSupport;
 import org.eclipse.ui.handlers.IHandlerActivation;
 import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.handlers.RegistryToggleState;
 import org.eclipse.ui.internal.StartupThreading.StartupRunnable;
 import org.eclipse.ui.internal.actions.CommandAction;
 import org.eclipse.ui.internal.dialogs.CustomizePerspectiveDialog;
@@ -717,17 +722,8 @@
 		updateDisabled = true;
 
 		try {
-			// Only do the check if it is OK to close if we are not closing
-			// via the workbench as the workbench will check this itself.
 			Workbench workbench = getWorkbenchImpl();
-			int count = workbench.getWorkbenchWindowCount();
-			// also check for starting - if the first window dies on startup
-			// then we'll need to open a default window.
-			if (!workbench.isStarting()
-					&& !workbench.isClosing()
-					&& count <= 1
-					&& workbench.getWorkbenchConfigurer()
-							.getExitOnLastWindowClose()) {
+			if (shouldCloseWorkbench(workbench)) {
 				windowClosed = workbench.close();
 			} else {
 				if (okToClose()) {
@@ -750,6 +746,38 @@
 	}
 
 	/**
+	 * 
+	 * Checks and returns whether we should close the workbench when closing
+	 * this window
+	 * 
+	 * @param workbench
+	 * @return <code>true</code>, if the workbench needs to be closed,
+	 *         <code>false</code> otherwise
+	 */
+	private boolean shouldCloseWorkbench(Workbench workbench) {
+
+		// also check for starting - if the first window dies on startup
+		// then we'll need to open a default window.
+
+		if (workbench.isStarting())
+			return false;
+
+		// Only do the check if it is OK to close if we are not closing
+		// via the workbench as the workbench will check this itself.
+		if (workbench.isClosing())
+			return false;
+		
+		int count = workbench.getWorkbenchWindowCount();
+
+		// we have more windows apart from this. Dont' close workbench
+		if(count >1 ) 
+			return false;
+
+		// now do whatever the workbenchconfigurer says ...
+		return workbench.getWorkbenchConfigurer().getExitOnLastWindowClose();
+	}
+
+	/**
 	 * Opens a new page. Assumes that busy cursor is active.
 	 * <p>
 	 * <b>Note:</b> Since release 2.0, a window is limited to contain at most
@@ -811,6 +839,12 @@
 		if (!super.canHandleShellCloseEvent()) {
 			return false;
 		}
+
+		// Ensure that any pending 'Close' event are flushed
+		// before opening any dialogs
+		while (Display.getCurrent().readAndDispatch())
+			;
+
 		// let the advisor or other interested parties
 		// veto the user's explicit request to close the window
 		return fireWindowShellClosing();
@@ -834,14 +868,6 @@
 	}
 
 	/**
-	 * Return whether or not the coolbar layout is locked.
-	 */
-	protected boolean isCoolBarLocked() {
-        ICoolBarManager cbm = getCoolBarManager2(); 
-		return cbm != null && cbm.getLockLayout();
-	}
-
-	/**
 	 * Close all of the pages.
 	 */
 	private void closeAllPages() {
@@ -1764,17 +1790,6 @@
 	}
 
 	/**
-	 * Locks/unlocks the CoolBar for the workbench.
-	 * 
-	 * @param lock
-	 *            whether the CoolBar should be locked or unlocked
-	 */
-	/* package */
-	void lockCoolBar(boolean lock) {
-        getCoolBarManager2().setLockLayout(lock);
-	}
-
-	/**
 	 * Makes the window visible and frontmost.
 	 */
 	void makeVisible() {
@@ -1968,20 +1983,11 @@
         if (coolBarMgr != null) {
 			IMemento coolBarMem = memento
 					.getChild(IWorkbenchConstants.TAG_COOLBAR_LAYOUT);
-			if (coolBarMem != null) {
-				// Check if the layout is locked
-				final Integer lockedInt = coolBarMem
-						.getInteger(IWorkbenchConstants.TAG_LOCKED);
-				StartupThreading.runWithoutExceptions(new StartupRunnable(){
 
-					public void runWithException() {
-						if ((lockedInt != null) && (lockedInt.intValue() == 1)) {
-							coolBarMgr.setLockLayout(true);
-						} else {
-							coolBarMgr.setLockLayout(false);
-						}
-					}});
-				
+			if (coolBarMem != null) {
+
+				restoreCoolBarLocked(coolBarMgr, coolBarMem);
+
 				// The new layout of the cool bar manager
 				ArrayList coolBarLayout = new ArrayList();
 				// Traverse through all the cool item in the memento
@@ -2316,6 +2322,42 @@
 	}
 
 	/**
+	 * Restores the locked state of coolbar.
+	 * 
+	 * The state is first looked in the memento. If its not available in there,
+	 * then its taken from the command's state
+	 * 
+	 * @param coolBarMgr
+	 * @param memento
+	 */
+	private void restoreCoolBarLocked(final ICoolBarManager2 coolBarMgr, IMemento memento) {
+
+		// Check if the layout is locked
+		final boolean locked[] = new boolean[] { false };
+
+		Integer lockedInt = memento.getInteger(IWorkbenchConstants.TAG_LOCKED);
+		
+		if (lockedInt != null) {
+			// saved by 3.6 or earlier
+			locked[0] = lockedInt.intValue() == 1;
+		} else {
+			// saved by 3.7 or later, get it from command state
+			ICommandService service = (ICommandService) getService(ICommandService.class);
+			Command command = service.getCommand(IWorkbenchCommandConstants.WINDOW_LOCK_TOOLBAR);
+			State state = command.getState(RegistryToggleState.STATE_ID);
+			if (state != null && state.getValue() instanceof Boolean) {
+				locked[0] = ((Boolean) state.getValue()).booleanValue();
+			}
+		}
+		StartupThreading.runWithoutExceptions(new StartupRunnable(){
+
+			public void runWithException() {
+				coolBarMgr.setLockLayout(locked[0]);
+			}
+		});
+	}
+
+	/**
 	 * Restores cool item order from an old workbench.
 	 */
 	private boolean restoreOldCoolBar(IMemento coolbarMem) {
@@ -2685,11 +2727,6 @@
         	coolBarMgr.refresh();
 			IMemento coolBarMem = memento
 					.createChild(IWorkbenchConstants.TAG_COOLBAR_LAYOUT);
-            if (coolBarMgr.getLockLayout() == true) {
-				coolBarMem.putInteger(IWorkbenchConstants.TAG_LOCKED, 1);
-			} else {
-				coolBarMem.putInteger(IWorkbenchConstants.TAG_LOCKED, 0);
-			}
             IContributionItem[] items = coolBarMgr.getItems();
 			for (int i = 0; i < items.length; i++) {
 				IMemento coolItemMem = coolBarMem
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetManager.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetManager.java
index bfe2f3c..214b5e8 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetManager.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Tasktop Technologies - fix for bug 327396
  *******************************************************************************/
 package org.eclipse.ui.internal;
 
@@ -43,6 +44,10 @@
 	// Working set persistence
 	public static final String WORKING_SET_STATE_FILENAME = "workingsets.xml"; //$NON-NLS-1$
 
+	private boolean restoreInProgress;
+
+	private boolean savePending;
+
 	public WorkingSetManager(BundleContext context) {
 		super(context);
 	}
@@ -101,6 +106,8 @@
 
 		if (stateFile != null && stateFile.exists()) {
 			try {
+				restoreInProgress = true;
+
 				FileInputStream input = new FileInputStream(stateFile);
 				BufferedReader reader = new BufferedReader(
 						new InputStreamReader(input, "utf-8")); //$NON-NLS-1$
@@ -119,6 +126,13 @@
 						e,
 						WorkbenchMessages.ProblemRestoringWorkingSetState_title,
 						WorkbenchMessages.ProblemRestoringWorkingSetState_message);
+			} finally {
+				restoreInProgress = false;
+			}
+
+			if (savePending) {
+				saveState();
+				savePending = false;
 			}
 		}
 	}
@@ -127,6 +141,11 @@
 	 * Saves the working sets in the persistence store
 	 */
 	private void saveState() {
+		if (restoreInProgress) {
+			// bug 327396: avoid saving partial state
+			savePending = true;
+			return;
+		}
 
 		File stateFile = getWorkingSetStateFile();
 		if (stateFile == null) {
@@ -167,7 +186,6 @@
 				message, exp);
 		StatusAdapter sa = new StatusAdapter(status);
 		sa.setProperty(IStatusAdapterConstants.TITLE_PROPERTY, title);
-		StatusManager.getManager().handle(sa,
-				StatusManager.SHOW | StatusManager.LOG);
+		StatusManager.getManager().handle(sa, StatusManager.LOG);
 	}
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java
deleted file mode 100644
index 5ba231d..0000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/DynamicHelpAction.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.IWorkbenchPreferenceConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.ui.internal.util.PrefUtil;
-
-/**
- * Action to open the dynamic help.
- * 
- * @since 3.1
- */
-public class DynamicHelpAction extends Action implements IWorkbenchAction {
-	/**
-	 * The workbench window; or <code>null</code> if this action has been
-	 * <code>dispose</code>d.
-	 */
-	private IWorkbenchWindow workbenchWindow;
-
-	/**
-	 * Zero-arg constructor to allow cheat sheets to reuse this action.
-	 */
-	public DynamicHelpAction() {
-		this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
-	}
-
-	/**
-	 * Constructor for use by ActionFactory.
-	 * 
-	 * @param window
-	 *            the window
-	 */
-	public DynamicHelpAction(IWorkbenchWindow window) {
-		if (window == null) {
-			throw new IllegalArgumentException();
-		}
-		this.workbenchWindow = window;
-		setActionDefinitionId(IWorkbenchCommandConstants.HELP_DYNAMIC_HELP);
-
-		// support for allowing a product to override the text for the action
-		String overrideText = PrefUtil.getAPIPreferenceStore().getString(
-				IWorkbenchPreferenceConstants.DYNAMIC_HELP_ACTION_TEXT);
-		if ("".equals(overrideText)) { //$NON-NLS-1$
-			setText(appendAccelerator(WorkbenchMessages.DynamicHelpAction_text));
-			setToolTipText(WorkbenchMessages.DynamicHelpAction_toolTip);
-		} else {
-			setText(appendAccelerator(overrideText));
-			setToolTipText(Action.removeMnemonics(overrideText));
-		}
-		window.getWorkbench().getHelpSystem().setHelp(this,
-				IWorkbenchHelpContextIds.DYNAMIC_HELP_ACTION);
-	}
-
-	private String appendAccelerator(String text) {
-		// We know that on Windows context help key is F1
-		// and cannot be changed by the user.
-		//
-		// Commented out due to the problem described in
-		// Bugzilla bug #95057
-	
-		//if (Platform.getWS().equals(Platform.WS_WIN32))
-		//	return text + "\t" + KeyStroke.getInstance(SWT.F1).format(); //$NON-NLS-1$
-		return text;
-	}
-
-	/*
-	 * (non-Javadoc) Method declared on IAction.
-	 */
-	public void run() {
-		if (workbenchWindow == null) {
-			// action has been disposed
-			return;
-		}
-		// This may take a while, so use the busy indicator
-		BusyIndicator.showWhile(null, new Runnable() {
-			public void run() {
-				workbenchWindow.getWorkbench().getHelpSystem()
-						.displayDynamicHelp();
-			}
-		});
-	}
-
-	/*
-	 * (non-Javadoc) Method declared on ActionFactory.IWorkbenchAction.
-	 */
-	public void dispose() {
-		workbenchWindow = null;
-	}
-
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java
deleted file mode 100644
index 6f07081..0000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpContentsAction.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.IWorkbenchPreferenceConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
-import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
-import org.eclipse.ui.internal.WorkbenchImages;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.ui.internal.util.PrefUtil;
-
-/**
- * Action to open the help contents.
- * 
- * @since 3.0
- */
-public class HelpContentsAction extends Action implements IWorkbenchAction {
-    /**
-     * The workbench window; or <code>null</code> if this
-     * action has been <code>dispose</code>d.
-     */
-    private IWorkbenchWindow workbenchWindow;
-
-    /**
-     * Zero-arg constructor to allow cheat sheets to reuse this action.
-     */
-    public HelpContentsAction() {
-        this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
-    }
-
-    /**
-     * Constructor for use by ActionFactory.
-     * 
-     * @param window the window
-     */
-    public HelpContentsAction(IWorkbenchWindow window) {
-        if (window == null) {
-            throw new IllegalArgumentException();
-        }
-        this.workbenchWindow = window;
-        setActionDefinitionId(IWorkbenchCommandConstants.HELP_HELP_CONTENTS);
-
-        // support for allowing a product to override the text for the action
-        String overrideText = PrefUtil.getAPIPreferenceStore().getString(
-                IWorkbenchPreferenceConstants.HELP_CONTENTS_ACTION_TEXT);
-        if ("".equals(overrideText)) { //$NON-NLS-1$
-            setText(WorkbenchMessages.HelpContentsAction_text);
-            setToolTipText(WorkbenchMessages.HelpContentsAction_toolTip);
-        } else {
-            setText(overrideText);
-            setToolTipText(Action.removeMnemonics(overrideText));
-        }
-        setImageDescriptor(WorkbenchImages
-                .getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_HELP_CONTENTS));
-        window.getWorkbench().getHelpSystem().setHelp(this,
-				IWorkbenchHelpContextIds.HELP_CONTENTS_ACTION);
-    }
-
-    /* (non-Javadoc)
-     * Method declared on IAction.
-     */
-    public void run() {
-        if (workbenchWindow == null) {
-            // action has been disposed
-            return;
-        }
-        //This may take a while, so use the busy indicator
-        BusyIndicator.showWhile(null, new Runnable() {
-            public void run() {
-            	workbenchWindow.getWorkbench().getHelpSystem().displayHelp();
-            }
-        });
-    }
-
-    /* (non-Javadoc)
-     * Method declared on ActionFactory.IWorkbenchAction.
-     */
-    public void dispose() {
-        workbenchWindow = null;
-    }
-
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java
deleted file mode 100644
index 7b4f77c..0000000
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/actions/HelpSearchAction.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.IWorkbenchPreferenceConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
-import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
-import org.eclipse.ui.internal.WorkbenchImages;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.ui.internal.util.PrefUtil;
-
-/**
- * Action to open the help search.
- * 
- * @since 3.1
- */
-public class HelpSearchAction extends Action implements IWorkbenchAction {
-    /**
-     * The workbench window; or <code>null</code> if this
-     * action has been <code>dispose</code>d.
-     */
-    private IWorkbenchWindow workbenchWindow;
-
-    /**
-     * Zero-arg constructor to allow cheat sheets to reuse this action.
-     */
-    public HelpSearchAction() {
-        this(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
-    }
-
-    /**
-     * Constructor for use by ActionFactory.
-     * 
-     * @param window the window
-     */
-    public HelpSearchAction(IWorkbenchWindow window) {
-        if (window == null) {
-            throw new IllegalArgumentException();
-        }
-        this.workbenchWindow = window;
-        setActionDefinitionId(IWorkbenchCommandConstants.HELP_HELP_SEARCH);
-
-        // support for allowing a product to override the text for the action
-        String overrideText = PrefUtil.getAPIPreferenceStore().getString(
-                IWorkbenchPreferenceConstants.HELP_SEARCH_ACTION_TEXT);
-        if ("".equals(overrideText)) { //$NON-NLS-1$
-            setText(WorkbenchMessages.HelpSearchAction_text); 
-            setToolTipText(WorkbenchMessages.HelpSearchAction_toolTip);
-        } else {
-            setText(overrideText);
-            setToolTipText(Action.removeMnemonics(overrideText));
-        }
-        setImageDescriptor(WorkbenchImages
-                .getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_HELP_SEARCH));
-        window.getWorkbench().getHelpSystem().setHelp(this,
-				IWorkbenchHelpContextIds.HELP_SEARCH_ACTION);
-    }
-
-    /* (non-Javadoc)
-     * Method declared on IAction.
-     */
-    public void run() {
-        if (workbenchWindow == null) {
-            // action has been disposed
-            return;
-        }
-        //This may take a while, so use the busy indicator
-        BusyIndicator.showWhile(null, new Runnable() {
-            public void run() {
-            	workbenchWindow.getWorkbench().getHelpSystem().displaySearch();
-            }
-        });
-    }
-
-    /* (non-Javadoc)
-     * Method declared on ActionFactory.IWorkbenchAction.
-     */
-    public void dispose() {
-        workbenchWindow = null;
-    }
-
-}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ExtensionActivityRegistry.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ExtensionActivityRegistry.java
index 03e9cdb..4cb554c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ExtensionActivityRegistry.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ExtensionActivityRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,6 @@
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-
 import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.expressions.ExpressionConverter;
 import org.eclipse.core.runtime.CoreException;
@@ -28,6 +27,7 @@
 import org.eclipse.core.runtime.IRegistryChangeListener;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
@@ -35,6 +35,12 @@
 import org.eclipse.ui.statushandlers.StatusManager;
 
 final class ExtensionActivityRegistry extends AbstractActivityRegistry {
+
+	/**
+	 * Prefix for all activity preferences
+	 */
+	private final static String PREFIX = "UIActivities."; //$NON-NLS-1$    
+
     private List activityRequirementBindingDefinitions;
 
     private List activityDefinitions;
@@ -170,6 +176,22 @@
 			}
         }
                 
+		// merge enablement overrides from plugin_customization.ini
+		IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore();
+		for (Iterator i = activityDefinitions.iterator(); i.hasNext();) {
+			ActivityDefinition activityDef = (ActivityDefinition) i.next();
+			String id = activityDef.getId();
+			String preferenceKey = createPreferenceKey(id);
+			if ("".equals(store.getDefaultString(preferenceKey))) //$NON-NLS-1$
+				continue;
+			if (store.getDefaultBoolean(preferenceKey)) {
+				if (!defaultEnabledActivities.contains(id) && activityDef.getEnabledWhen() == null)
+					defaultEnabledActivities.add(id);
+			} else {
+				defaultEnabledActivities.remove(id);
+			}
+		}
+
         // Removal of all defaultEnabledActivites which target to expression
         // controlled activities.
 		for (int i = 0; i < defaultEnabledActivities.size();) {
@@ -267,6 +289,17 @@
 		}
     }
 
+	/**
+	 * Create the preference key for the activity.
+	 * 
+	 * @param activityId
+	 *            the activity id.
+	 * @return String a preference key representing the activity.
+	 */
+	private String createPreferenceKey(String activityId) {
+		return PREFIX + activityId;
+	}
+
     private void readDefaultEnablement(
             IConfigurationElement configurationElement) {
         String enabledActivity = Persistence
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/MutableActivityManager.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/MutableActivityManager.java
index bf92ebc..f306dd5 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/MutableActivityManager.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/MutableActivityManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,7 +22,6 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
-
 import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -56,7 +55,7 @@
  */
 public final class MutableActivityManager extends AbstractActivityManager
         implements IMutableActivityManager, Cloneable {
-
+	
     private Map activitiesById = new HashMap();
 
     private Map activityRequirementBindingsByActivityId = new HashMap();
@@ -133,7 +132,7 @@
         readRegistry(true);
     }
 
-    public IActivity getActivity(String activityId) {
+	synchronized public IActivity getActivity(String activityId) {
         if (activityId == null) {
 			throw new NullPointerException();
 		}
@@ -149,7 +148,7 @@
         return activity;
     }
 
-    public ICategory getCategory(String categoryId) {
+	synchronized public ICategory getCategory(String categoryId) {
         if (categoryId == null) {
 			throw new NullPointerException();
 		}
@@ -165,19 +164,19 @@
         return category;
     }
 
-    public Set getDefinedActivityIds() {
+	synchronized public Set getDefinedActivityIds() {
         return Collections.unmodifiableSet(definedActivityIds);
     }
 
-    public Set getDefinedCategoryIds() {
+	synchronized public Set getDefinedCategoryIds() {
         return Collections.unmodifiableSet(definedCategoryIds);
     }
 
-    public Set getEnabledActivityIds() {
+	synchronized public Set getEnabledActivityIds() {
         return Collections.unmodifiableSet(enabledActivityIds);
     }
 
-    public IIdentifier getIdentifier(String identifierId) {
+	synchronized public IIdentifier getIdentifier(String identifierId) {
         if (identifierId == null) {
 			throw new NullPointerException();
 		}
@@ -523,7 +522,7 @@
 		}
 	}
 
-	public void setEnabledActivityIds(Set enabledActivityIds) {
+	synchronized public void setEnabledActivityIds(Set enabledActivityIds) {
         enabledActivityIds = new HashSet(enabledActivityIds);
         Set requiredActivityIds = new HashSet(enabledActivityIds);
         getRequiredActivityIds(enabledActivityIds, requiredActivityIds);
@@ -906,7 +905,7 @@
     /* (non-Javadoc)
      * @see java.lang.Object#clone()
      */
-    public Object clone() {
+	synchronized public Object clone() {
         MutableActivityManager clone = new MutableActivityManager(advisor, activityRegistry);
         clone.setEnabledActivityIds(getEnabledActivityIds());
         return clone;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/WorkbenchCommandSupport.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/WorkbenchCommandSupport.java
index c8265a3..27f147c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/WorkbenchCommandSupport.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/WorkbenchCommandSupport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,16 +14,13 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-
 import org.eclipse.core.commands.CommandManager;
 import org.eclipse.core.commands.contexts.ContextManager;
 import org.eclipse.jface.bindings.BindingManager;
-import org.eclipse.ui.ISources;
 import org.eclipse.ui.LegacyHandlerSubmissionExpression;
 import org.eclipse.ui.commands.HandlerSubmission;
 import org.eclipse.ui.commands.ICommandManager;
 import org.eclipse.ui.commands.IWorkbenchCommandSupport;
-import org.eclipse.ui.commands.Priority;
 import org.eclipse.ui.handlers.IHandlerActivation;
 import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.internal.handlers.LegacyHandlerWrapper;
@@ -89,30 +86,7 @@
 						.getKeyFormatterForPlatform());
 	}
 
-	public final void addHandlerSubmission(
-			final HandlerSubmission handlerSubmission) {
-		/*
-		 * Create the source priorities based on the conditions mentioned in the
-		 * submission.
-		 */
-		int sourcePriorities = 0;
-		if (handlerSubmission.getActivePartId() != null) {
-			sourcePriorities |= ISources.ACTIVE_PART_ID;
-		}
-		if (handlerSubmission.getActiveShell() != null) {
-			sourcePriorities |= (ISources.ACTIVE_SHELL | ISources.ACTIVE_WORKBENCH_WINDOW);
-		}
-		if (handlerSubmission.getActiveWorkbenchPartSite() != null) {
-			sourcePriorities |= ISources.ACTIVE_SITE;
-		}
-		if (handlerSubmission.getPriority() == Priority.LEGACY) {
-			sourcePriorities |= ISources.LEGACY_LEGACY;
-		} else if (handlerSubmission.getPriority() == Priority.LOW) {
-			sourcePriorities |= ISources.LEGACY_LOW;
-		} else if (handlerSubmission.getPriority() == Priority.MEDIUM) {
-			sourcePriorities |= ISources.LEGACY_MEDIUM;
-		}
-
+	public final void addHandlerSubmission(final HandlerSubmission handlerSubmission) {
 		final IHandlerActivation activation = handlerService.activateHandler(
 				handlerSubmission.getCommandId(), new LegacyHandlerWrapper(
 						handlerSubmission.getHandler()),
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/WorkbenchContextSupport.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/WorkbenchContextSupport.java
index 219fa3a..b38cecf 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/WorkbenchContextSupport.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/WorkbenchContextSupport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,10 +14,8 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-
 import org.eclipse.core.commands.contexts.ContextManager;
 import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISources;
 import org.eclipse.ui.LegacyHandlerSubmissionExpression;
 import org.eclipse.ui.contexts.EnabledSubmission;
 import org.eclipse.ui.contexts.IContextActivation;
@@ -86,23 +84,7 @@
 				.getContextManagerWrapper(contextManager);
 	}
 
-	public final void addEnabledSubmission(
-			final EnabledSubmission enabledSubmission) {
-		/*
-		 * Create the source priorities based on the conditions mentioned in the
-		 * submission.
-		 */
-		int sourcePriorities = 0;
-		if (enabledSubmission.getActivePartId() != null) {
-			sourcePriorities |= ISources.ACTIVE_PART_ID;
-		}
-		if (enabledSubmission.getActiveShell() != null) {
-			sourcePriorities |= (ISources.ACTIVE_SHELL | ISources.ACTIVE_WORKBENCH_WINDOW);
-		}
-		if (enabledSubmission.getActiveWorkbenchPartSite() != null) {
-			sourcePriorities |= ISources.ACTIVE_SITE;
-		}
-
+	public final void addEnabledSubmission(final EnabledSubmission enabledSubmission) {
 		final IContextActivation activation = contextService.activateContext(
 				enabledSubmission.getContextId(),
 				new LegacyHandlerSubmissionExpression(enabledSubmission
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecorationScheduler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecorationScheduler.java
index 0c28413..7f4606a 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecorationScheduler.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecorationScheduler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,6 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -191,10 +190,10 @@
 	 * decoration and return <code>null</code>.
 	 * 
 	 * @param element
-	 *            The element to be decorated. If it is <code>null</code>
-	 *            return <code>null</code>.
+	 *            The element to be decorated. If it is <code>null</code> return
+	 *            <code>null</code>.
 	 * @param adaptedElement
-	 *            It's adapted value.
+	 *            Its adapted value.
 	 * @param context
 	 *            The deocration context
 	 * @return DecorationResult or <code>null</code>
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutDialog.java
index 5fed814..fc1bc1c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutDialog.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,7 +26,6 @@
 import org.eclipse.swt.accessibility.AccessibleAdapter;
 import org.eclipse.swt.accessibility.AccessibleEvent;
 import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.custom.ScrolledComposite;
 import org.eclipse.swt.custom.StyledText;
 import org.eclipse.swt.events.ControlAdapter;
 import org.eclipse.swt.events.ControlEvent;
@@ -38,6 +37,7 @@
 import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.layout.RowLayout;
@@ -65,6 +65,7 @@
  */
 public class AboutDialog extends TrayDialog {
     private final static int MAX_IMAGE_WIDTH_FOR_TEXT = 250;
+	private final static int TEXT_MARGIN = 5;
 
     private final static int DETAILS_ID = IDialogConstants.CLIENT_ID + 1;
 
@@ -82,6 +83,8 @@
     
     private AboutTextManager aboutTextManager;
 
+	private AboutItem item;
+
     /**
      * Create an instance of the AboutDialog for the given window.
      * @param parentShell The parent of the dialog.
@@ -189,7 +192,7 @@
     protected Control createDialogArea(Composite parent) {
          // brand the about box if there is product info
         Image aboutImage = null;
-        AboutItem item = null;
+		item = null;
         if (product != null) {
             ImageDescriptor imageDescriptor = ProductProperties
                     .getAboutImage(product);
@@ -277,91 +280,44 @@
             topContainerHeightHint = Math.max(topContainerHeightHint, aboutImage.getBounds().height);
         }
         
-        GridData data = new GridData();
-        data.horizontalAlignment = GridData.FILL;
-        data.verticalAlignment = GridData.FILL;
-        data.grabExcessHorizontalSpace = true;
-        data.grabExcessVerticalSpace = true;
-        data.heightHint = topContainerHeightHint;
+		GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
         topContainer.setLayoutData(data);
+		// used only to drive initial size so that there are no hints in the
+		// layout data
+		topContainer.setSize(432, topContainerHeightHint);
         
         if (item != null) {
-			final int minWidth = 432;
-			// This value should really be calculated
-        	// from the computeSize(SWT.DEFAULT,
-        	// SWT.DEFAULT) of all the
-        	// children in infoArea excluding the
-        	// wrapped styled text
-        	// There is no easy way to do this.
+			text = new StyledText(topContainer, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
+			configureText(topContainer);
 
-			// A scrolled composite is used instead of a vertical scroll bar on
-			// the styled text, because styled text does not automatically
-			// remove the vertical bar when not needed.
-        	final ScrolledComposite scroller = new ScrolledComposite(topContainer,
-    				SWT.V_SCROLL | SWT.H_SCROLL);
-        	data = new GridData(GridData.FILL_BOTH);
-        	data.widthHint = minWidth;
-    		scroller.setLayoutData(data);
+			// computing trim for later
+			Rectangle rect = text.computeTrim(0, 0, 100, 100);
+			final int xTrim = rect.width - 100;
+			final int yTrim = rect.height - 100;
 
-    		final Composite textComposite = new Composite(scroller, SWT.NONE);
-    		textComposite.setBackground(background);
-    		
-    		layout = new GridLayout();
-    		textComposite.setLayout(layout);
-
-    		text = new StyledText(textComposite, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
-
-    		// Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263.
-//    		text.setCaret(null);
-
-            text.setFont(parent.getFont());
-            text.setText(item.getText());
-            text.setCursor(null);
-            text.setBackground(background);
-            text.setForeground(foreground);
-            
-            aboutTextManager = new AboutTextManager(text);
-            aboutTextManager.setItem(item);
-            
-            createTextMenu();
-            
-    		GridData gd = new GridData();
-    		gd.verticalAlignment = GridData.BEGINNING;
-    		gd.horizontalAlignment = GridData.FILL;
-    		gd.grabExcessHorizontalSpace = true;
-    		text.setLayoutData(gd);
-
-    		// Adjust the scrollbar increments
-    		scroller.getHorizontalBar().setIncrement(20);
-    		scroller.getVerticalBar().setIncrement(20);
-
-    		final boolean[] inresize = new boolean[1]; // flag to stop unneccesary
-    		// recursion
-    		textComposite.addControlListener(new ControlAdapter() {
-    			public void controlResized(ControlEvent e) {
-    				if (inresize[0])
-    					return;
-    				inresize[0] = true;
-    				// required because of bugzilla report 4579
-    				textComposite.layout(true);
-    				// required because you want to change the height that the
-    				// scrollbar will scroll over when the width changes.
-    				int width = textComposite.getClientArea().width;
-    				Point p = textComposite.computeSize(width, SWT.DEFAULT);
-    				scroller.setMinSize(minWidth, p.y);
-    				inresize[0] = false;
-    			}
-    		});
-
-    		scroller.setExpandHorizontal(true);
-    		scroller.setExpandVertical(true);
-    		Point p = textComposite.computeSize(minWidth, SWT.DEFAULT);
-    		textComposite.setSize(p.x, p.y);
-    		scroller.setMinWidth(minWidth);
-    		scroller.setMinHeight(p.y);
-
-    		scroller.setContent(textComposite);
-        }
+			topContainer.addControlListener(new ControlAdapter() {
+				public void controlResized(ControlEvent e) {
+					text.setSize(SWT.DEFAULT, SWT.DEFAULT);
+					topContainer.layout(true);
+					// do we need a scroll bar?
+					Point size = text.getSize();
+					int availableHeight = size.y - yTrim;
+					int availableWidth = size.x - xTrim - (2 * TEXT_MARGIN);
+					Point newSize = text.computeSize(availableWidth, SWT.DEFAULT, true);
+					int style = text.getStyle();
+					if (newSize.y > availableHeight) {
+						if ((style & SWT.V_SCROLL) == 0) {
+							recreateWrappedText(topContainer, true);
+						}
+					} else {
+						if ((style & SWT.V_SCROLL) != 0) {
+							recreateWrappedText(topContainer, false);
+						}
+					}
+					topContainer.layout(true);
+				}
+			});
+		}
 
         // horizontal bar
         Label bar = new Label(workArea, SWT.HORIZONTAL | SWT.SEPARATOR);
@@ -392,6 +348,47 @@
         return workArea;
     }
 
+	void recreateWrappedText(Composite parent, boolean withScrolling) {
+		int style = text.getStyle();
+		if (withScrolling) {
+			style |= SWT.V_SCROLL;
+		} else {
+			style ^= SWT.V_SCROLL;
+		}
+		boolean hasFocus = text.isFocusControl();
+		Point selection = text.getSelection();
+		text.dispose();
+		text = new StyledText(parent, style);
+		configureText(parent);
+		if (hasFocus) {
+			text.setFocus();
+		}
+		text.setSelection(selection);
+	}
+
+	void configureText(final Composite parent) {
+		// Don't set caret to 'null' as this causes
+		// https://bugs.eclipse.org/293263.
+		// text.setCaret(null);
+		Color background = JFaceColors.getBannerBackground(parent.getDisplay());
+		Color foreground = JFaceColors.getBannerForeground(parent.getDisplay());
+
+		text.setFont(parent.getFont());
+		text.setText(item.getText());
+		text.setCursor(null);
+		text.setBackground(background);
+		text.setForeground(foreground);
+		text.setMargins(TEXT_MARGIN, TEXT_MARGIN, TEXT_MARGIN, 0);
+
+		aboutTextManager = new AboutTextManager(text);
+		aboutTextManager.setItem(item);
+
+		createTextMenu();
+
+		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+		text.setLayoutData(gd);
+	}
+
     /**
 	 * Create the context menu for the text widget.
 	 * 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java
index 58ac7e8..2ae24c7 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java
@@ -128,7 +128,6 @@
 import org.eclipse.ui.internal.PluginActionCoolBarContributionItem;
 import org.eclipse.ui.internal.PluginActionSet;
 import org.eclipse.ui.internal.PluginActionSetBuilder;
-import org.eclipse.ui.internal.ShowViewMenu;
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.WorkbenchPage;
 import org.eclipse.ui.internal.WorkbenchPlugin;
@@ -1023,7 +1022,7 @@
 												getParamID(item));
 							} else if (isShowView(item)) {
 								parameters.put(
-										ShowViewMenu.VIEW_ID_PARM,
+										IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_ID,
 										getParamID(item));
 							}
 						}
@@ -2365,7 +2364,7 @@
 					if (isNewWizard(item)) {
 						key = IWorkbenchCommandConstants.FILE_NEW_PARM_WIZARDID;
 					} else if (isShowView(item)) {
-						key = ShowViewMenu.VIEW_ID_PARM;
+						key = IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_ID;
 					} else if (isShowPerspective(item)) {
 						key = IWorkbenchCommandConstants.PERSPECTIVES_SHOW_PERSPECTIVE_PARM_ID;
 					}
@@ -3206,7 +3205,7 @@
 		perspective.turnOnActionSets((IActionSetDescriptor[]) toAdd
 				.toArray(new IActionSetDescriptor[toAdd.size()]));
 		perspective.turnOffActionSets((IActionSetDescriptor[]) toRemove
-				.toArray(new IActionSetDescriptor[toAdd.size()]));
+				.toArray(new IActionSetDescriptor[toRemove.size()]));
 
 		// Menu  and Toolbar Items
 		requiresUpdate |= updateHiddenElements(menuItems, perspective.getHiddenMenuItems());
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EditorsPreferencePage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EditorsPreferencePage.java
index 701eabc..f7a360e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EditorsPreferencePage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/EditorsPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,7 +47,7 @@
  */
 public class EditorsPreferencePage extends PreferencePage implements
         IWorkbenchPreferencePage {
-    private static final int REUSE_INDENT = 10;
+	private static final int REUSE_INDENT = 20;
 
     protected Composite editorReuseGroup;
 
@@ -280,14 +280,14 @@
         editorReuseIndentGroup = new Composite(editorReuseGroup, SWT.LEFT);
         GridLayout indentLayout = new GridLayout();
         indentLayout.marginLeft = REUSE_INDENT;
-        indentLayout.marginRight = 0;
+        indentLayout.marginWidth = 0;
         editorReuseIndentGroup.setLayout(indentLayout);
         editorReuseIndentGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
 
         editorReuseThresholdGroup = new Composite(editorReuseIndentGroup,
                 SWT.LEFT);
         layout = new GridLayout();
-        layout.marginWidth = 0;
+		layout.marginWidth = 0;
         editorReuseThresholdGroup.setLayout(layout);
         editorReuseThresholdGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FileEditorsPreferencePage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FileEditorsPreferencePage.java
index 0e7eb89..7efcee2 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FileEditorsPreferencePage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FileEditorsPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,6 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.content.IContentType;
@@ -186,7 +185,7 @@
         data.horizontalSpan = 2;
         label.setLayoutData(data);
 
-        resourceTypeTable = new Table(pageComponent, SWT.SINGLE | SWT.BORDER
+        resourceTypeTable = new Table(pageComponent, SWT.MULTI | SWT.BORDER
                 | SWT.FULL_SELECTION);
         resourceTypeTable.addListener(SWT.Selection, this);
         resourceTypeTable.addListener(SWT.DefaultSelection, this);
@@ -211,7 +210,6 @@
         addResourceTypeButton = new Button(groupComponent, SWT.PUSH);
         addResourceTypeButton.setText(WorkbenchMessages.FileEditorPreference_add); 
         addResourceTypeButton.addListener(SWT.Selection, this);
-        addResourceTypeButton.setLayoutData(data);
         setButtonLayoutData(addResourceTypeButton);
 
         removeResourceTypeButton = new Button(groupComponent, SWT.PUSH);
@@ -234,7 +232,7 @@
         data.horizontalSpan = 2;
         editorLabel.setLayoutData(data);
 
-        editorTable = new Table(pageComponent, SWT.SINGLE | SWT.BORDER);
+        editorTable = new Table(pageComponent, SWT.MULTI | SWT.BORDER);
         editorTable.addListener(SWT.Selection, this);
         editorTable.addListener(SWT.DefaultSelection, this);
         data = new GridData(GridData.FILL_BOTH);
@@ -412,8 +410,8 @@
 
     protected FileEditorMapping getSelectedResourceType() {
         TableItem[] items = resourceTypeTable.getSelection();
-        if (items.length > 0) {
-            return (FileEditorMapping) items[0].getData(); //Table is single select
+        if (items.length == 1) {
+            return (FileEditorMapping) items[0].getData();
         }
         return null;        
     }
@@ -566,21 +564,19 @@
         TableItem[] items = editorTable.getSelection();
         boolean defaultEditor = editorTable.getSelectionIndex() == 0;
         if (items.length > 0) {
-            getSelectedResourceType().removeEditor(
-                    (EditorDescriptor) items[0].getData(DATA_EDITOR));
-            items[0].dispose(); //Table is single selection
+        	for (int i = 0; i < items.length; i++) {
+                getSelectedResourceType().removeEditor(
+                        (EditorDescriptor) items[i].getData(DATA_EDITOR));
+                items[i].dispose();	
+        	}
         }
         if (defaultEditor && editorTable.getItemCount() > 0) {
             TableItem item = editorTable.getItem(0);
-            // explicitly set the new editor first editor to default
+            // explicitly set the first editor as the default
             getSelectedResourceType().setDefaultEditor(
 					(EditorDescriptor) item.getData(DATA_EDITOR));
-            if (item != null) {
-				item
-                        .setText(((EditorDescriptor) (item.getData(DATA_EDITOR)))
-                                .getLabel()
-                                + " " + WorkbenchMessages.FileEditorPreference_defaultLabel); //$NON-NLS-1$
-			}
+			item.setText(((EditorDescriptor) (item.getData(DATA_EDITOR))).getLabel()
+					+ " " + WorkbenchMessages.FileEditorPreference_defaultLabel); //$NON-NLS-1$
 			if (!isEditorRemovable(item)) {
 				setLockedItemText(item, item.getText());
 			}
@@ -593,8 +589,8 @@
      */
     public void removeSelectedResourceType() {
         TableItem[] items = resourceTypeTable.getSelection();
-        if (items.length > 0) {
-            items[0].dispose(); //Table is single selection
+        for (int i = 0; i < items.length; i++) {
+        	items[i].dispose();
         }
         //Clear out the editors too
         editorTable.removeAll();
@@ -641,29 +637,35 @@
      */
     public void updateEnabledState() {
         //Update enabled state
-        boolean resourceTypeSelected = resourceTypeTable.getSelectionIndex() != -1;
-        boolean editorSelected = editorTable.getSelectionIndex() != -1;
+    	int selectedResources = resourceTypeTable.getSelectionCount();
+        int selectedEditors = editorTable.getSelectionCount();
 
-        removeResourceTypeButton.setEnabled(resourceTypeSelected);
-        editorLabel.setEnabled(resourceTypeSelected);
-        addEditorButton.setEnabled(resourceTypeSelected);
-        removeEditorButton.setEnabled(editorSelected && isEditorRemovable());
-        defaultEditorButton.setEnabled(editorSelected);
+        removeResourceTypeButton.setEnabled(selectedResources != 0);
+		editorLabel.setEnabled(selectedResources == 1);
+        addEditorButton.setEnabled(selectedResources == 1);
+		removeEditorButton.setEnabled(areEditorsRemovable());
+        defaultEditorButton.setEnabled(selectedEditors == 1);
     }
     
     /**
-	 * Return whether the selected editor is removable. An editor is removable
-	 * if it is not submitted via a content-type binding.
+	 * Return whether the selected editors are removable. An editor is removable
+	 * if it was not submitted via a content-type binding.
 	 * 
-	 * @return whether the selected editor is removable
+	 * @return whether all the selected editors are removable or not
 	 * @since 3.1
 	 */
-    private boolean isEditorRemovable() {
+	private boolean areEditorsRemovable() {
 		TableItem[] items = editorTable.getSelection();
-		if (items.length > 0) {
-			return isEditorRemovable(items[0]);
+		if (items.length == 0) {
+			return false;
 		}
-		return false;
+
+		for (int i = 0; i < items.length; i++) {
+			if (!isEditorRemovable(items[i])) {
+				return false;
+			}
+		}
+		return true;
 	}
     
     /**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java
index 123d300..83f8abe 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java
@@ -573,6 +573,7 @@
 				menu.setVisible(true);
 			}
 		};
+		popupMenuAction.setToolTipText(WorkbenchMessages.FilteredPreferenceDialog_FilterToolTip);
 		historyManager.add(popupMenuAction);
 		IHandlerService service = (IHandlerService) PlatformUI.getWorkbench()
 				.getService(IHandlerService.class);
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardNewPage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardNewPage.java
index f744929..841d3ce 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardNewPage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardNewPage.java
@@ -30,6 +30,7 @@
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.wizard.IWizard;
 import org.eclipse.jface.wizard.IWizardContainer;
 import org.eclipse.jface.wizard.IWizardContainer2;
 import org.eclipse.swt.SWT;
@@ -50,6 +51,7 @@
 import org.eclipse.ui.activities.WorkbenchActivityHelper;
 import org.eclipse.ui.dialogs.FilteredTree;
 import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.internal.registry.WizardsRegistryReader;
 import org.eclipse.ui.model.AdaptableList;
 import org.eclipse.ui.model.WorkbenchLabelProvider;
 import org.eclipse.ui.wizards.IWizardCategory;
@@ -132,6 +134,14 @@
         } else {
             needShowAll = !allActivityEnabled(wizardCategories);
         }
+
+		IWizard wizard = mainPage.getWizard();
+		if (wizard instanceof NewWizard) {
+			if (WizardsRegistryReader.FULL_EXAMPLES_WIZARD_CATEGORY.equals(((NewWizard) wizard)
+					.getCategoryId())) {
+				filter.setFilterPrimaryWizards(true);
+			}
+		}
     }
 
     /**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java
index eae0e1b..721f9e9 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java
@@ -48,6 +48,7 @@
 import org.eclipse.ui.internal.FastViewManager;
 import org.eclipse.ui.internal.IPreferenceConstants;
 import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.Perspective;
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.WorkbenchPage;
 import org.eclipse.ui.internal.WorkbenchPlugin;
@@ -600,12 +601,18 @@
 		if (isFVBConfigured) {
 			store.setValue(IPreferenceConstants.FVB_HIDE, fvbHideButton
 					.getSelection());
-			WorkbenchPage page = (WorkbenchPage) workbench
-					.getActiveWorkbenchWindow().getActivePage();
-			FastViewManager fvm = page.getActivePerspective()
-					.getFastViewManager();
-			if (fvm != null)
-				fvm.updateTrim(FastViewBar.FASTVIEWBAR_ID);
+			IWorkbenchWindow activeWindow = workbench.getActiveWorkbenchWindow();
+			if (activeWindow != null) {
+				WorkbenchPage page = (WorkbenchPage) activeWindow.getActivePage();
+				if (page != null) {
+					Perspective activePerspective = page.getActivePerspective();
+					if (activePerspective != null) {
+						FastViewManager fvm = activePerspective.getFastViewManager();
+						if (fvm != null)
+							fvm.updateTrim(FastViewBar.FASTVIEWBAR_ID);
+					}
+				}
+			}
 		}
 
 		// store the open perspective mode setting
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java
index f4760e3..a2b2dda 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,14 +7,15 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     James Blackburn (Broadcom Corp.) - Bug 294628 multiple selection
  *******************************************************************************/
 package org.eclipse.ui.internal.dialogs;
 
 import java.util.Iterator;
-
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.preference.PreferenceManager;
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.widgets.Shell;
@@ -91,18 +92,35 @@
 	}
 
 	/**
-	 * Returns the name of the given element.
+	 * Returns the name of the given element(s). Prints at most 3 names.
 	 * 
 	 * @param element
-	 *            the element
+	 *            the element / IStructuredSelection
 	 * @return the name of the element
 	 */
 	private static String getName(Object element) {
-		IWorkbenchAdapter adapter = (IWorkbenchAdapter)Util.getAdapter(element, IWorkbenchAdapter.class);
-		if (adapter != null) {
-			return adapter.getLabel(element);
+		Object[] elements;
+		if (element instanceof IStructuredSelection)
+			elements = ((IStructuredSelection) element).toArray();
+		else
+			elements = new Object[] { element };
+		StringBuffer sb = new StringBuffer();
+		// Print at most 3 entries...
+		for (int i = 0; i < elements.length; i++) {
+			element = elements[i];
+			if (i > 2) {
+				sb.append(" ..."); //$NON-NLS-1$
+				break;
+			}
+			IWorkbenchAdapter adapter = (IWorkbenchAdapter) Util.getAdapter(element,
+					IWorkbenchAdapter.class);
+			if (adapter != null) {
+				if (sb.length() > 0)
+					sb.append(", "); //$NON-NLS-1$
+				sb.append(adapter.getLabel(element));
+			}
 		}
-		return "";//$NON-NLS-1$
+		return sb.toString();
 	}
 
 	/**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyPageContributorManager.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyPageContributorManager.java
index 2ef7574..cb25119 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyPageContributorManager.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyPageContributorManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Oakland Software (Francis Upton) <francisu@ieee.org> - bug 219273 
+ *     James Blackburn (Broadcom Corp.) - Bug 294628 multiple selection
  *******************************************************************************/
 package org.eclipse.ui.internal.dialogs;
 
@@ -16,14 +17,15 @@
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Iterator;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtension;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker;
 import org.eclipse.jface.preference.PreferenceNode;
+import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.internal.ObjectContributorManager;
 import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
 import org.eclipse.ui.internal.registry.PropertyPagesRegistryReader;
@@ -66,13 +68,28 @@
 	 * contributors and sequentially invoke them to contribute to the property
 	 * page manager. Matching algorithm will also check subclasses and
 	 * implemented interfaces.
+	 * 
+	 * If object is an IStructuredSelection then attempt to match all the
+	 * contained objects.
+	 * 
 	 * @param manager
 	 * @param object
 	 * @return true if contribution took place, false otherwise.
 	 */
 	public boolean contribute(PropertyPageManager manager, Object object) {
 
-		List result = getContributors(object);
+		Collection result = null;
+		if (object instanceof IStructuredSelection) {
+			Object[] objs = ((IStructuredSelection) object).toArray();
+			for (int i = 0; i < objs.length; i++) {
+				List contribs = getContributors(objs[i]);
+				if (result == null)
+					result = new LinkedHashSet(contribs);
+				else
+					result.retainAll(contribs);
+			}
+		} else
+			result = getContributors(object);
 
 		if (result == null || result.size() == 0) {
 			return false;
@@ -129,7 +146,7 @@
 	 * @param nodes
 	 * @return List of CategorizedPageNode
 	 */
-	private List buildNodeList(List nodes) {
+	private List buildNodeList(Collection nodes) {
 		Hashtable mapping = new Hashtable();
 		
 		Iterator nodesIterator = nodes.iterator();
@@ -192,6 +209,8 @@
 	 * @return Collection of PropertyPageContribution
 	 */
 	public Collection getApplicableContributors(Object element) {
+		if (element instanceof IStructuredSelection)
+			return getApplicableContributors((IStructuredSelection) element);
 		Collection contributors = getContributors(element);
 		Collection result = new ArrayList();
 		for (Iterator iter = contributors.iterator(); iter.hasNext();) {
@@ -203,6 +222,37 @@
 		return result;
 	}
 
+	/**
+	 * Get applicable contributors for multiple selection
+	 * 
+	 * @param selection
+	 * @return Collection of applicable property page contributors
+	 * @since 3.7
+	 */
+	public Collection getApplicableContributors(IStructuredSelection selection) {
+		Iterator it = selection.iterator();
+		Collection result = null;
+		while (it.hasNext()) {
+			Object element = it.next();
+			Collection collection = getApplicableContributors(element);
+			if (result == null)
+				result = new LinkedHashSet(collection);
+			else
+				result.retainAll(collection);
+		}
+		if (result != null && !result.isEmpty() && selection.size() > 1) {
+			// only add contributors which can handle multi selection
+			it = result.iterator();
+			while (it.hasNext()) {
+				RegistryPageContributor contrib = (RegistryPageContributor) it
+						.next();
+				if (!contrib.supportsMultipleSelection())
+					it.remove();
+			}
+		}
+		return result;
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.ui.internal.ObjectContributorManager#getExtensionPointFilter()
 	 */
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyPageNode.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyPageNode.java
index b22bc77..4606bda 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyPageNode.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyPageNode.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,9 +12,9 @@
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.preference.IPreferencePage;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IWorkbenchPropertyPage;
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.misc.StatusUtil;
 import org.eclipse.ui.internal.preferences.WorkbenchPreferenceExtensionNode;
@@ -28,7 +28,7 @@
 public class PropertyPageNode extends WorkbenchPreferenceExtensionNode {
     private RegistryPageContributor contributor;
 
-    private IWorkbenchPropertyPage page;
+	private IPreferencePage page;
 
     private Image icon;
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/RegistryPageContributor.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/RegistryPageContributor.java
index e69760c..da32597 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/RegistryPageContributor.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/RegistryPageContributor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,16 +9,17 @@
  *     IBM Corporation - initial API and implementation
  *     Jan-Hendrik Diederich, Bredex GmbH - bug 201052
  *     Oakland Software (Francis Upton) <francisu@ieee.org> - bug 223808 
+ *     James Blackburn (Broadcom Corp.) - Bug 294628 multiple selection
  *******************************************************************************/
 package org.eclipse.ui.internal.dialogs;
 
 import java.lang.ref.SoftReference;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-
 import org.eclipse.core.expressions.EvaluationContext;
 import org.eclipse.core.expressions.EvaluationResult;
 import org.eclipse.core.expressions.Expression;
@@ -28,11 +29,14 @@
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.preference.IPreferencePage;
 import org.eclipse.jface.preference.PreferenceNode;
 import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IActionFilter;
 import org.eclipse.ui.IPluginContribution;
 import org.eclipse.ui.IWorkbenchPropertyPage;
+import org.eclipse.ui.IWorkbenchPropertyPageMulti;
 import org.eclipse.ui.SelectionEnabler;
 import org.eclipse.ui.internal.IWorkbenchConstants;
 import org.eclipse.ui.internal.LegacyResourceSupport;
@@ -66,6 +70,11 @@
 
 	private boolean adaptable = false;
 
+	/**
+	 * Flag which indicates if this property page supports multiple selection
+	 */
+	private final boolean supportsMultiSelect;
+
 	private IConfigurationElement pageElement;
 
 	private SoftReference filterProperties;
@@ -88,6 +97,8 @@
 						pageElement
 								.getAttribute(PropertyPagesRegistryReader.ATT_ADAPTABLE))
 				.booleanValue();
+		supportsMultiSelect = PropertyPagesRegistryReader.ATT_SELECTION_FILTER_MULTI
+				.equals(pageElement.getAttribute(PropertyPagesRegistryReader.ATT_SELECTION_FILTER));
 		initializeEnablement(element);
 	}
 
@@ -114,29 +125,45 @@
 	 * @throws CoreException
 	 *             thrown if there is a problem creating the apge
 	 */
-	public IWorkbenchPropertyPage createPage(Object element)
+	public IPreferencePage createPage(Object element)
 			throws CoreException {
-		IWorkbenchPropertyPage ppage = null;
-		ppage = (IWorkbenchPropertyPage) WorkbenchPlugin.createExtension(
+		IPreferencePage ppage = null;
+		ppage = (IPreferencePage) WorkbenchPlugin.createExtension(
 				pageElement, IWorkbenchRegistryConstants.ATT_CLASS);
 
 		ppage.setTitle(getPageName());
 
-		Object adapted = element;
-		if (adaptable) {
-			adapted = getAdaptedElement(element);
-			if (adapted == null) {
-				String message = "Error adapting selection to Property page " + pageId + " is being ignored"; //$NON-NLS-1$ //$NON-NLS-2$            	
-				throw new CoreException(new Status(IStatus.ERROR,
-						WorkbenchPlugin.PI_WORKBENCH, IStatus.ERROR, message,
-						null));
+		Object[] elements = getObjects(element);
+		IAdaptable[] adapt = new IAdaptable[elements.length];
+
+		for (int i = 0; i < elements.length; i++) {
+			Object adapted = elements[i];
+			if (adaptable) {
+				adapted = getAdaptedElement(adapted);
+				if (adapted == null) {
+					String message = "Error adapting selection to Property page " + pageId + " is being ignored"; //$NON-NLS-1$ //$NON-NLS-2$            	
+					throw new CoreException(new Status(IStatus.ERROR,
+							WorkbenchPlugin.PI_WORKBENCH, IStatus.ERROR,
+							message, null));
+				}
 			}
+			adapt[i] = (IAdaptable) ((adapted instanceof IAdaptable) ? adapted
+					: new AdaptableForwarder(adapted));
 		}
 
-		if (adapted instanceof IAdaptable)
-			ppage.setElement((IAdaptable) adapted);
-		else
-			ppage.setElement(new AdaptableForwarder(adapted));
+		if (supportsMultiSelect) {
+			if ((ppage instanceof IWorkbenchPropertyPageMulti))
+				((IWorkbenchPropertyPageMulti) ppage).setElements(adapt);
+			else
+				throw new CoreException(
+						new Status(
+								IStatus.ERROR,
+								WorkbenchPlugin.PI_WORKBENCH,
+								IStatus.ERROR,
+								"Property page must implement IWorkbenchPropertyPageMulti: " + getPageName(), //$NON-NLS-1$
+								null));
+		} else
+			((IWorkbenchPropertyPage) ppage).setElement(adapt[0]);
 
 		return ppage;
 	}
@@ -201,60 +228,84 @@
 	}
 
 	/**
-	 * Return true if name filter is not defined in the registry for this page,
-	 * or if name of the selected object matches the name filter.
+	 * Calculate whether the Property page is applicable to the current
+	 * selection. Checks:
+	 * <ul>
+	 * <li>multiSelect</li>
+	 * <li>enabledWhen enablement expression/li>
+	 * <li>nameFilter</li>
+	 * <li>custom Filter</li>
+	 * <li>checks legacy resource support</li>
+	 * </ul>
+	 * <p>
+	 * For multipleSelection pages, considers all elements in the selection for
+	 * enablement.
 	 */
 	public boolean isApplicableTo(Object object) {
+		Object[] objs = getObjects(object);
 
-		if (failsEnablement(object))
+		// If not a multi-select page not applicable to multiple selection
+		if (objs.length > 1 && !supportsMultiSelect)
+			return false;
+
+		if (failsEnablement(objs))
 			return false;
 
 		// Test name filter
 		String nameFilter = pageElement
 				.getAttribute(PropertyPagesRegistryReader.ATT_NAME_FILTER);
-		if (nameFilter != null) {
-			String objectName = object.toString();
-			IWorkbenchAdapter adapter = (IWorkbenchAdapter) Util.getAdapter(object, 
-                    IWorkbenchAdapter.class);
-			if (adapter != null) {
-				String elementName = adapter.getLabel(object);
-				if (elementName != null) {
-					objectName = elementName;
+
+		for (int i = 0; i < objs.length; i++) {
+			object = objs[i];
+			// Name filter
+			if (nameFilter != null) {
+				String objectName = object.toString();
+				IWorkbenchAdapter adapter = (IWorkbenchAdapter) Util
+						.getAdapter(object, IWorkbenchAdapter.class);
+				if (adapter != null) {
+					String elementName = adapter.getLabel(object);
+					if (elementName != null) {
+						objectName = elementName;
+					}
 				}
+				if (!SelectionEnabler.verifyNameMatch(objectName, nameFilter))
+					return false;
 			}
-			if (!SelectionEnabler.verifyNameMatch(objectName, nameFilter))
+
+			// Test custom filter
+			if (getFilterProperties() == null)
+				return true;
+			IActionFilter filter = null;
+
+			// Do the free IResource adapting
+			Object adaptedObject = LegacyResourceSupport
+					.getAdaptedResource(object);
+			if (adaptedObject != null) {
+				object = adaptedObject;
+			}
+
+			filter = (IActionFilter) Util.getAdapter(object,
+					IActionFilter.class);
+
+			if (filter != null && !testCustom(object, filter))
 				return false;
 		}
 
-		// Test custom filter
-		if (getFilterProperties() == null)
-			return true;
-		IActionFilter filter = null;
-
-		// Do the free IResource adapting
-		Object adaptedObject = LegacyResourceSupport.getAdaptedResource(object);
-		if (adaptedObject != null) {
-			object = adaptedObject;
-		}
-
-        filter = (IActionFilter)Util.getAdapter(object, IActionFilter.class);
-
-		if (filter != null)
-			return testCustom(object, filter);
-
 		return true;
 	}
 
 	/**
-	 * Return whether or not object fails the enablement criterea.
-	 * 
-	 * @param object
+	 * Return whether or not object fails the enabledWhen enablement criterea.
+	 * For multi-select pages, evaluate the enabledWhen expression using the
+	 * structured selection as a Collection (which should be iterated over).
 	 * @return boolean <code>true</code> if it fails the enablement test
 	 */
-	private boolean failsEnablement(Object object) {
+	private boolean failsEnablement(Object[] objs) {
 		if (enablementExpression == null)
 			return false;
 		try {
+			// If multi-select property page, always pass a collection for iteration
+			Object object = (supportsMultiSelect) ? Arrays.asList(objs) : objs[0];
 			EvaluationContext context = new EvaluationContext(null, object);
 			context.setAllowPluginActivation(true);
 			return enablementExpression.evaluate(
@@ -267,6 +318,20 @@
 	}
 
 	/**
+	 * Returns an object array for the passed in object. If the object is an
+	 * IStructuredSelection, then return its array otherwise return a 1 element
+	 * Object[] containing the passed in object
+	 * 
+	 * @param obj
+	 * @return an object array representing the passed in object
+	 */
+	private Object[] getObjects(Object obj) {
+		if (obj instanceof IStructuredSelection)
+			return ((IStructuredSelection) obj).toArray();
+		return new Object[] { obj };
+	}
+
+	/**
 	 * Initialize the enablement expression for this decorator
 	 */
 	protected void initializeEnablement(IConfigurationElement definingElement) {
@@ -404,6 +469,14 @@
 	}
 
 	/**
+	 * @return boolean indicating if this page supports multiple selection
+	 * @since 3.7
+	 */
+	boolean supportsMultipleSelection() {
+		return supportsMultiSelect;
+	}
+
+	/**
 	 * @return the configuration element
 	 * @since 3.1
 	 */
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java
index 730914e..063c968 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,8 @@
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -95,9 +97,24 @@
 		});
 		viewer.setContentProvider(ArrayContentProvider.getInstance());
 		viewer.setInput(workbench.getEarlyActivatedPlugins());
+		// Workbench plugin should not be disabled. Don't show it
+		viewer.setFilters(new ViewerFilter[] { createPlatformUIFilter() });
 		updateCheckState();
     }
 
+	private ViewerFilter createPlatformUIFilter() {
+		return new ViewerFilter() {
+
+			public boolean select(Viewer viewer, Object parentElement, Object element) {
+				if (element instanceof ContributionInfo) {
+					ContributionInfo info = (ContributionInfo) element;
+					return !PlatformUI.PLUGIN_ID.equals(info.getBundleId());
+				}
+				return true;
+			}
+		};
+	}
+
 	private void updateCheckState() {
         HashSet disabledPlugins = new HashSet(Arrays.asList(workbench.getDisabledEarlyActivatedPlugins()));
 		for (int i = 0; i < pluginsList.getItemCount(); i++) {
@@ -118,10 +135,9 @@
      * @see PreferencePage
      */
     protected void performDefaults() {
-        TableItem items[] = pluginsList.getItems();
-        for (int i = 0; i < items.length; i++) {
-            items[i].setChecked(true);
-        }
+		IPreferenceStore store = PrefUtil.getInternalPreferenceStore();
+		store.setToDefault(IPreferenceConstants.PLUGINS_NOT_ACTIVATED_ON_STARTUP);
+		updateCheckState();
     }
 
     /**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardActivityFilter.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardActivityFilter.java
index 7b30a81..2006f8a 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardActivityFilter.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardActivityFilter.java
@@ -24,6 +24,11 @@
  * @since 3.0
  */
 public class WizardActivityFilter extends ViewerFilter {
+	private boolean filterPrimaryWizards = false;
+
+	public void setFilterPrimaryWizards(boolean filter) {
+		filterPrimaryWizards = filter;
+	}
 
     /* (non-Javadoc)
      * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
@@ -35,7 +40,7 @@
 			return filter(viewer, element, children).length > 0;
 		}
 
-        if (parentElement.getClass().equals(AdaptableList.class)) {
+		if (parentElement.getClass().equals(AdaptableList.class) && !filterPrimaryWizards) {
 			return true; //top-level ("primary") wizards should always be returned
 		}
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java
index 5d0ea1f..6baeb97 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,11 +15,8 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.osgi.util.TextProcessor;
 import org.eclipse.swt.SWT;
@@ -48,12 +45,16 @@
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorReference;
 import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.ISaveablesLifecycleListener;
 import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.SelectionDialog;
+import org.eclipse.ui.internal.EditorManager;
 import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.SaveablesList;
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.WorkbenchPage;
 import org.eclipse.ui.internal.WorkbenchPartReference;
@@ -61,7 +62,6 @@
 import org.eclipse.ui.internal.layout.CellData;
 import org.eclipse.ui.internal.layout.CellLayout;
 import org.eclipse.ui.internal.layout.Row;
-import org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog;
 
 import com.ibm.icu.text.Collator;
 
@@ -435,11 +435,31 @@
         if (items.length == 0) {
 			return;
 		}
+        
+        // collect all instantiated editors that have been selected
+		List selectedEditors = new ArrayList();
         for (int i = 0; i < items.length; i++) {
             Adapter e = (Adapter) items[i].getData();
-            e.close();
+			if (e.editorRef != null) {
+				IWorkbenchPart part = e.editorRef.getPart(false);
+				if (part != null) {
+					selectedEditors.add(part);
+				}
+			}
+		}
+
+		SaveablesList saveablesList = (SaveablesList) window
+				.getService(ISaveablesLifecycleListener.class);
+		// prompt for save
+		if (saveablesList.preCloseParts(selectedEditors, true, this, window) != null) {
+			// close all editors
+			for (int i = 0; i < items.length; i++) {
+				Adapter e = (Adapter) items[i].getData();
+				e.close();
+			}
+			// update the list
+			updateItems();
         }
-        updateItems();
     }
 
     /**
@@ -449,15 +469,21 @@
         if (items.length == 0) {
 			return;
 		}
-        ProgressMonitorDialog pmd = new ProgressMonitorJobsDialog(getShell());
-        pmd.open();
-        for (int i = 0; i < items.length; i++) {
-            Adapter editor = (Adapter) items[i].getData();
-            editor.save(pmd.getProgressMonitor());
-            updateItem(items[i], editor);
-        }
-        pmd.close();
-        updateItems();
+
+		// collect all instantiated editors that have been selected
+		List selectedEditors = new ArrayList();
+		for (int i = 0; i < items.length; i++) {
+			Adapter e = (Adapter) items[i].getData();
+			if (e.editorRef != null) {
+				IWorkbenchPart part = e.editorRef.getPart(false);
+				if (part != null) {
+					selectedEditors.add(part);
+				}
+			}
+		}
+
+		EditorManager.saveAll(selectedEditors, false, false, false, window);
+		updateItems();
     }
 
     /**
@@ -600,8 +626,6 @@
             return;
         }
 
-        saveDialogSettings();
-
         Adapter selection = (Adapter) items[0].getData();
         //It would be better to activate before closing the
         //dialog but it does not work when the editor is in other
@@ -610,6 +634,11 @@
         selection.activate();
     }
 
+	public boolean close() {
+		saveDialogSettings();
+		return super.close();
+	}
+
     /**
      * Saves the dialog settings.
      */
@@ -677,17 +706,8 @@
 			}
             WorkbenchPage p = ((WorkbenchPartReference) editorRef).getPane()
                     .getPage();
-            p.closeEditor(editorRef, true);
-        }
-
-        void save(IProgressMonitor monitor) {
-            if (editorRef == null) {
-				return;
-			}
-            IEditorPart editor = (IEditorPart) editorRef.getPart(true);
-            if (editor != null) {
-				editor.doSave(monitor);
-			}
+            // already saved when the i
+            p.closeEditor(editorRef, false);
         }
 
         String[] getText() {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferenceDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferenceDialog.java
index 793963e..047c911 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferenceDialog.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchPreferenceDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@
 import org.eclipse.jface.preference.IPreferenceNode;
 import org.eclipse.jface.preference.IPreferencePage;
 import org.eclipse.jface.preference.PreferenceManager;
+import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchWindow;
@@ -22,6 +23,7 @@
 import org.eclipse.ui.activities.WorkbenchActivityHelper;
 import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
 import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.dnd.SwtUtil;
 
 /**
  * Prefence dialog for the workbench including the ability to load/save
@@ -205,7 +207,9 @@
 			Shell shell = getShell();
 			if ((shell != null) && (!shell.isDisposed())) {
 				shell.open(); // make the dialog visible to properly set the focus
-				selectedPage.getControl().setFocus();
+				Control control = selectedPage.getControl();
+				if (!SwtUtil.isFocusAncestor(control))
+					control.setFocus();
 			}
 		}
 		return super.open();
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchWizardElement.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchWizardElement.java
index c9d882e..e807241 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchWizardElement.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchWizardElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Fair Isaac Corporation <Hemant.Singh@Gmail.com> - http://bugs.eclipse.org/326695
  *******************************************************************************/
 package org.eclipse.ui.internal.dialogs;
 
@@ -28,6 +29,7 @@
 import org.eclipse.ui.internal.registry.RegistryReader;
 import org.eclipse.ui.model.IWorkbenchAdapter;
 import org.eclipse.ui.model.IWorkbenchAdapter2;
+import org.eclipse.ui.model.IWorkbenchAdapter3;
 import org.eclipse.ui.model.WorkbenchAdapter;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.eclipse.ui.wizards.IWizardCategory;
@@ -128,7 +130,8 @@
      */
     public Object getAdapter(Class adapter) {
         if (adapter == IWorkbenchAdapter.class
-                || adapter == IWorkbenchAdapter2.class) {
+                || adapter == IWorkbenchAdapter2.class
+                || adapter == IWorkbenchAdapter3.class) {
             return this;
         }
         else if (adapter == IPluginContribution.class) {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java
index f2b55d2..684bee7 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java
@@ -357,11 +357,11 @@
 				IWorkingSetManager workingSetManager = workbenchWindow.getWorkbench()
 						.getWorkingSetManager();
 				IWorkingSet aggregate = workingSetManager.getWorkingSet(setId);
-				if (aggregate == null) {
-					aggregate = workingSetManager.createAggregateWorkingSet(setId,
-							WorkbenchMessages.WorkbenchPage_workingSet_multi_label, typedResult);
-					workingSetManager.addWorkingSet(aggregate);
-				}
+				if (aggregate != null)
+					workingSetManager.removeWorkingSet(aggregate);
+				aggregate = workingSetManager.createAggregateWorkingSet(setId,
+						WorkbenchMessages.WorkbenchPage_workingSet_multi_label, typedResult);
+				workingSetManager.addWorkingSet(aggregate);
 				setSelection(new IWorkingSet[] { aggregate });
 				setResult(Collections.singletonList(aggregate));
 			}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/SwtUtil.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/SwtUtil.java
index aca9126..56d6e35 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/SwtUtil.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/SwtUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,6 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.dnd;
 
-import org.eclipse.core.runtime.Assert;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.widgets.Composite;
@@ -80,13 +79,13 @@
     }
     
     /**
-     * Determines if one control is a child of another. Returns true iff the second
-     * argument is a child of the first (or the same object).
-     * 
-     * @param potentialParent
-     * @param childToTest
-     * @return
-     */
+	 * Determines if one control is a child of another.
+	 * 
+	 * @param potentialParent
+	 * @param childToTest
+	 * @return <code>true</code> if the second argument is a child of the first
+	 *         or the same object, <code>false</code> otherwise
+	 */
     public static boolean isChild(Control potentialParent, Control childToTest) {
         if (childToTest == null) {
             return false;
@@ -100,7 +99,8 @@
     }
     
     public static boolean isFocusAncestor(Control potentialParent) {
-        Assert.isNotNull(potentialParent);
+		if (potentialParent == null)
+			return false;
         Control focusControl = Display.getCurrent().getFocusControl();
         if (focusControl == null) {
             return false;
@@ -109,13 +109,13 @@
     }
 
     /**
-     * Finds and returns the most specific SWT control at the given location. 
-     * (Note: this does a DFS on the SWT widget hierarchy, which is slow).
-     * 
-     * @param displayToSearch
-     * @param locationToFind
-     * @return
-     */
+	 * Finds and returns the most specific SWT control at the given location.
+	 * (Note: this does a DFS on the SWT widget hierarchy, which is slow).
+	 * 
+	 * @param displayToSearch
+	 * @param locationToFind
+	 * @return the most specific SWT control at the given location
+	 */
     public static Control findControl(Display displayToSearch,
             Point locationToFind) {
         Shell[] shells = displayToSearch.getShells();
@@ -195,12 +195,13 @@
     }
     
     /**
-     * Finds the control in the given location
-     * 
-     * @param toSearch
-     * @param locationToFind location (in display coordinates) 
-     * @return
-     */
+	 * Finds the control at the given location.
+	 * 
+	 * @param toSearch
+	 * @param locationToFind
+	 *            location (in display coordinates)
+	 * @return the control at the given location
+	 */
     public static Control findControl(Composite toSearch, Point locationToFind) {
         Control[] children = toSearch.getChildren();
 
@@ -208,13 +209,16 @@
     }
 
     /**
-     * 
-     * Returns true iff the given rectangle is located in the client area of any
-     * monitor.
-     * 
-     * @param someRectangle a rectangle in display coordinates (not null)
-     * @return true iff the given point can be seen on any monitor
-     */
+	 * 
+	 * Returns true iff the given rectangle is located in the client area of any
+	 * monitor.
+	 * 
+	 * @param display
+	 *            the display
+	 * @param someRectangle
+	 *            a rectangle in display coordinates (not null)
+	 * @return true iff the given point can be seen on any monitor
+	 */
     public static boolean intersectsAnyMonitor(Display display,
             Rectangle someRectangle) {
         Monitor[] monitors = display.getMonitors();
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/AbstractSaveHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/AbstractSaveHandler.java
new file mode 100644
index 0000000..61d3e50
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/AbstractSaveHandler.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.ExpressionInfo;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.ui.ISaveablePart;
+import org.eclipse.ui.ISources;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.AbstractEvaluationHandler;
+import org.eclipse.ui.internal.InternalHandlerUtil;
+import org.eclipse.ui.internal.util.Util;
+
+/**
+ * @since 3.7
+ *
+ */
+public abstract class AbstractSaveHandler extends AbstractEvaluationHandler {
+
+	protected static DirtyStateTracker dirtyStateTracker;
+	private Expression enabledWhen;
+
+	public AbstractSaveHandler() {
+		if (dirtyStateTracker == null)
+			dirtyStateTracker = new DirtyStateTracker();
+	}
+
+	protected Expression getEnabledWhenExpression() {
+		if (enabledWhen == null) {
+			enabledWhen = new Expression() {
+				public EvaluationResult evaluate(IEvaluationContext context) {
+					return AbstractSaveHandler.this.evaluate(context);
+				}
+	
+				/*
+				 * (non-Javadoc)
+				 * 
+				 * @see org.eclipse.core.expressions.Expression#collectExpressionInfo(org.eclipse.core.expressions.ExpressionInfo)
+				 */
+				public void collectExpressionInfo(ExpressionInfo info) {
+					info.addVariableNameAccess(ISources.ACTIVE_PART_NAME);
+				}
+			};
+		}
+		return enabledWhen;
+	}
+	
+	protected abstract EvaluationResult evaluate(IEvaluationContext context);
+	
+	protected ISaveablePart getSaveablePart(IEvaluationContext context) {
+		IWorkbenchPart activePart = InternalHandlerUtil.getActivePart(context);
+
+		if (activePart instanceof ISaveablePart)
+			return (ISaveablePart) activePart;
+
+		return InternalHandlerUtil.getActiveEditor(context);
+	}
+	
+	protected ISaveablePart getSaveablePart(ExecutionEvent event) {
+
+		IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
+		if (activePart instanceof ISaveablePart) {
+			return (ISaveablePart) activePart;
+		}
+
+		ISaveablePart part = (ISaveablePart) Util.getAdapter(activePart, ISaveablePart.class);
+		if (part != null)
+			return part;
+
+		return HandlerUtil.getActiveEditor(event);
+	}
+
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/CloseAllSavedHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/CloseAllSavedHandler.java
new file mode 100644
index 0000000..f7637bd
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/CloseAllSavedHandler.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.ExpressionInfo;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.ISources;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.internal.AbstractEvaluationHandler;
+import org.eclipse.ui.internal.InternalHandlerUtil;
+import org.eclipse.ui.internal.WorkbenchPage;
+import org.eclipse.ui.internal.util.Util;
+
+
+/**
+ * 
+ * @author Prakash G.R.
+ * @since 3.7
+ * 
+ */
+public class CloseAllSavedHandler extends AbstractEvaluationHandler {
+
+	private Expression enabledWhen;
+	private IWorkbenchPage page;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.AbstractEvaluationHandler#getEnabledWhenExpression
+	 * ()
+	 */
+	protected Expression getEnabledWhenExpression() {
+		if (enabledWhen == null) {
+			enabledWhen = new Expression() {
+				public EvaluationResult evaluate(IEvaluationContext context) {
+					return CloseAllSavedHandler.this.evaluate(context);
+				}
+
+				/*
+				 * (non-Javadoc)
+				 * 
+				 * @see
+				 * org.eclipse.core.expressions.Expression#collectExpressionInfo
+				 * (org.eclipse.core.expressions.ExpressionInfo)
+				 */
+				public void collectExpressionInfo(ExpressionInfo info) {
+					// We use active part, so that we get evaluated for the part
+					// events
+					info.addVariableNameAccess(ISources.ACTIVE_PART_NAME);
+				}
+			};
+		}
+		return enabledWhen;
+	}
+
+	private EvaluationResult evaluate(IEvaluationContext context) {
+
+		IWorkbenchWindow window = InternalHandlerUtil.getActiveWorkbenchWindow(context);
+
+		setWindow(window);
+
+		return window != null && window.getActivePage() != null ? EvaluationResult.TRUE
+				: EvaluationResult.FALSE;
+	}
+
+	/**
+	 * @param window
+	 */
+	private void setWindow(IWorkbenchWindow window) {
+
+		if (Util.equals(page, window.getActivePage()))
+			return;
+
+		page = window.getActivePage();
+
+		update();
+	}
+
+	/**
+	 * @return Returns the page.
+	 */
+	public IWorkbenchPage getActivePage() {
+		return page;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
+	 * ExecutionEvent)
+	 */
+	public Object execute(ExecutionEvent event) {
+		IWorkbenchPage page = getActivePage();
+		if (page != null) {
+			((WorkbenchPage) page).closeAllSavedEditors();
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.handlers.AbstractPageEventHandler#update()
+	 */
+	protected void update() {
+		IWorkbenchPage page = getActivePage();
+		if (page == null) {
+			setEnabled(false);
+			return;
+		}
+		IEditorReference editors[] = page.getEditorReferences();
+		for (int i = 0; i < editors.length; i++) {
+			if (!editors[i].isDirty()) {
+				setEnabled(true);
+				return;
+			}
+		}
+		setEnabled(false);
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/DirtyStateTracker.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/DirtyStateTracker.java
new file mode 100644
index 0000000..6d68da6
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/DirtyStateTracker.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.ISaveablePart;
+import org.eclipse.ui.ISources;
+import org.eclipse.ui.IWindowListener;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.internal.Workbench;
+import org.eclipse.ui.services.IEvaluationService;
+
+/**
+ * @since 3.7
+ * 
+ */
+public class DirtyStateTracker implements IPartListener, IWindowListener,
+		IPropertyListener {
+
+	private final IWorkbench workbench;
+
+	public DirtyStateTracker() {
+
+		workbench = Workbench.getInstance();
+		workbench.addWindowListener(this);
+		IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+		register(window);
+	}
+
+	public void update() {
+		IEvaluationService service = (IEvaluationService) workbench
+				.getService(IEvaluationService.class);
+		service.requestEvaluation(ISources.ACTIVE_PART_NAME);
+	}
+
+	/**
+	 * @param window
+	 */
+	private void register(IWorkbenchWindow window) {
+		if (window == null)
+			return;
+		window.getPartService().addPartListener(this);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IPartListener#partActivated(org.eclipse.ui.IWorkbenchPart)
+	 */
+	public void partActivated(IWorkbenchPart part) {
+		if (part instanceof ISaveablePart) {
+			part.addPropertyListener(this);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IPartListener#partBroughtToTop(org.eclipse.ui.IWorkbenchPart
+	 * )
+	 */
+	public void partBroughtToTop(IWorkbenchPart part) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart)
+	 */
+	public void partClosed(IWorkbenchPart part) {
+		if (part instanceof ISaveablePart) {
+			part.removePropertyListener(this);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IPartListener#partDeactivated(org.eclipse.ui.IWorkbenchPart
+	 * )
+	 */
+	public void partDeactivated(IWorkbenchPart part) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IPartListener#partOpened(org.eclipse.ui.IWorkbenchPart)
+	 */
+	public void partOpened(IWorkbenchPart part) {
+		if (part instanceof ISaveablePart) {
+			part.addPropertyListener(this);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IWindowListener#windowActivated(org.eclipse.ui.
+	 * IWorkbenchWindow)
+	 */
+	public void windowActivated(IWorkbenchWindow window) {
+		register(window);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IWindowListener#windowDeactivated(org.eclipse.ui.
+	 * IWorkbenchWindow)
+	 */
+	public void windowDeactivated(IWorkbenchWindow window) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IWindowListener#windowClosed(org.eclipse.ui.IWorkbenchWindow
+	 * )
+	 */
+	public void windowClosed(IWorkbenchWindow window) {
+		window.getPartService().removePartListener(this);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IWindowListener#windowOpened(org.eclipse.ui.IWorkbenchWindow
+	 * )
+	 */
+	public void windowOpened(IWorkbenchWindow window) {
+		register(window);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IPropertyListener#propertyChanged(java.lang.Object,
+	 * int)
+	 */
+	public void propertyChanged(Object source, int propID) {
+		if (source instanceof ISaveablePart && propID == ISaveablePart.PROP_DIRTY) {
+			update();
+		}
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/DynamicHelpHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/DynamicHelpHandler.java
new file mode 100644
index 0000000..9be51d4
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/DynamicHelpHandler.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author Prakash G.R.
+ * @since 3.7
+ * 
+ */
+public class DynamicHelpHandler extends AbstractHandler {
+
+	public Object execute(ExecutionEvent event) {
+
+		BusyIndicator.showWhile(null, new Runnable() {
+			public void run() {
+				PlatformUI.getWorkbench().getHelpSystem().displayDynamicHelp();
+			}
+		});
+		return null;
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HelpContentsHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HelpContentsHandler.java
new file mode 100644
index 0000000..ef3fa08
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HelpContentsHandler.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author Prakash G.R.
+ * @since 3.7
+ * 
+ */
+public class HelpContentsHandler extends AbstractHandler {
+
+	public Object execute(ExecutionEvent event) {
+
+		BusyIndicator.showWhile(null, new Runnable() {
+			public void run() {
+				PlatformUI.getWorkbench().getHelpSystem().displayHelp();
+			}
+		});
+		return null;
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HelpSearchHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HelpSearchHandler.java
new file mode 100644
index 0000000..6975a74
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HelpSearchHandler.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author Prakash G.R.
+ * @since 3.7
+ * 
+ */
+public class HelpSearchHandler extends AbstractHandler {
+
+	public Object execute(ExecutionEvent event) {
+
+		BusyIndicator.showWhile(null, new Runnable() {
+			public void run() {
+				PlatformUI.getWorkbench().getHelpSystem().displaySearch();
+			}
+		});
+		return null;
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/IntroHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/IntroHandler.java
new file mode 100644
index 0000000..f9421b4
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/IntroHandler.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.Workbench;
+import org.eclipse.ui.internal.intro.IntroDescriptor;
+import org.eclipse.ui.internal.intro.IntroMessages;
+
+/**
+ * 
+ * @author Prakash G.R.
+ * 
+ * @since 3.7
+ * 
+ */
+public class IntroHandler extends AbstractHandler {
+
+	private Workbench workbench;
+	private IntroDescriptor introDescriptor;
+
+	public IntroHandler() {
+		workbench = (Workbench) PlatformUI.getWorkbench();
+		introDescriptor = workbench.getIntroDescriptor();
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
+	 * ExecutionEvent)
+	 */
+	public Object execute(ExecutionEvent event) {
+
+		if (introDescriptor == null) {
+				MessageDialog.openWarning(HandlerUtil.getActiveShell(event),
+						IntroMessages.Intro_missing_product_title,
+						IntroMessages.Intro_missing_product_message);
+		} else {
+				IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
+				workbench.getIntroManager().showIntro(window, false);
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+	 */
+	public boolean isEnabled() {
+
+		boolean enabled = false;
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		if (window != null) {
+			enabled = window.getPages().length > 0;
+		}
+		return enabled;
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LockToolBarHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LockToolBarHandler.java
new file mode 100644
index 0000000..4fcb5d2
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LockToolBarHandler.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.action.ICoolBarManager;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.WorkbenchWindow;
+
+/**
+ * 
+ * @author Prakash G.R.
+ * 
+ * @since 3.7
+ * 
+ */
+public class LockToolBarHandler extends AbstractHandler {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
+	 * ExecutionEvent)
+	 */
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		WorkbenchWindow workbenchWindow = (WorkbenchWindow) HandlerUtil
+				.getActiveWorkbenchWindow(event);
+		if (workbenchWindow != null) {
+			ICoolBarManager coolBarManager = workbenchWindow.getCoolBarManager2();
+			if (coolBarManager != null) {
+				boolean oldValue = HandlerUtil.toggleCommandState(event.getCommand());
+				coolBarManager.setLockLayout(!oldValue);
+			}
+		}
+		return null;
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ResetPerspectiveHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ResetPerspectiveHandler.java
new file mode 100644
index 0000000..9b5a063
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ResetPerspectiveHandler.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.internal.WorkbenchPage;
+import org.eclipse.ui.internal.registry.PerspectiveDescriptor;
+import org.eclipse.ui.internal.registry.PerspectiveRegistry;
+
+/**
+ * 
+ * @author Prakash G.R.
+ * 
+ * @since 3.7
+ * 
+ */
+public class ResetPerspectiveHandler extends AbstractHandler {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
+	 * ExecutionEvent)
+	 */
+	public Object execute(ExecutionEvent event) {
+
+		IWorkbenchWindow activeWorkbenchWindow = HandlerUtil.getActiveWorkbenchWindow(event);
+		if (activeWorkbenchWindow != null) {
+			WorkbenchPage page = (WorkbenchPage) activeWorkbenchWindow.getActivePage();
+			if (page != null) {
+				IPerspectiveDescriptor descriptor = page.getPerspective();
+				if (descriptor != null) {
+					boolean offerRevertToBase = false;
+					if (descriptor instanceof PerspectiveDescriptor) {
+						PerspectiveDescriptor desc = (PerspectiveDescriptor) descriptor;
+						offerRevertToBase = desc.isPredefined() && desc.hasCustomDefinition();
+					}
+
+					if (offerRevertToBase) {
+						String message = NLS.bind(WorkbenchMessages.RevertPerspective_message,
+								descriptor.getLabel());
+						boolean toggleState = false;
+						MessageDialogWithToggle dialog = MessageDialogWithToggle.open(
+								MessageDialog.QUESTION, activeWorkbenchWindow.getShell(),
+								WorkbenchMessages.RevertPerspective_title, message,
+								WorkbenchMessages.RevertPerspective_option,
+								toggleState, null, null, SWT.SHEET);
+						if (dialog.getReturnCode() == IDialogConstants.YES_ID) {
+							if (dialog.getToggleState()) {
+								PerspectiveRegistry reg = (PerspectiveRegistry) PlatformUI
+										.getWorkbench().getPerspectiveRegistry();
+								reg.revertPerspective(descriptor);
+							}
+							page.resetPerspective();
+						}
+					} else {
+						String message = NLS.bind(WorkbenchMessages.ResetPerspective_message,
+								descriptor.getLabel());
+						boolean result = MessageDialog.open(MessageDialog.QUESTION,
+								activeWorkbenchWindow.getShell(),
+								WorkbenchMessages.ResetPerspective_title, message, SWT.SHEET);
+						if (result) {
+							page.resetPerspective();
+						}
+					}
+				}
+			}
+		}
+
+		return null;
+	}
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SaveAllHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SaveAllHandler.java
new file mode 100644
index 0000000..06deb1d
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SaveAllHandler.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.ui.ISaveablesLifecycleListener;
+import org.eclipse.ui.ISaveablesSource;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.Saveable;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.InternalHandlerUtil;
+import org.eclipse.ui.internal.SaveablesList;
+import org.eclipse.ui.internal.WorkbenchPage;
+
+/**
+ * Saves all active editors
+ * <p>
+ * Replacement for SaveAllAction
+ * </p>
+ * 
+ * @since 3.7
+ * 
+ */
+public class SaveAllHandler extends AbstractSaveHandler {
+
+	public SaveAllHandler() {
+		registerEnablement();
+	}
+
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IWorkbenchWindow window = HandlerUtil
+				.getActiveWorkbenchWindowChecked(event);
+		IWorkbenchPage page = window.getActivePage();
+		if (page != null) {
+			((WorkbenchPage) page).saveAllEditors(false, true);
+		}
+
+		return null;
+	}
+
+	protected EvaluationResult evaluate(IEvaluationContext context) {
+
+		IWorkbenchWindow window = InternalHandlerUtil.getActiveWorkbenchWindow(context);
+		// no window? not active
+		if (window == null)
+			return EvaluationResult.FALSE;
+		WorkbenchPage page = (WorkbenchPage) window.getActivePage();
+
+		// no page? not active
+		if (page == null)
+			return EvaluationResult.FALSE;
+
+		// if at least one dirty part, then we are active
+		if (page.getDirtyParts().length > 0)
+			return EvaluationResult.TRUE;
+
+		// Since Save All also saves saveables from non-part sources,
+		// look if any such saveables exist and are dirty.
+		SaveablesList saveablesList = (SaveablesList) window.getWorkbench().getService(
+				ISaveablesLifecycleListener.class);
+		ISaveablesSource[] nonPartSources = saveablesList.getNonPartSources();
+		for (int i = 0; i < nonPartSources.length; i++) {
+			Saveable[] saveables = nonPartSources[i].getSaveables();
+			for (int j = 0; j < saveables.length; j++) {
+				if (saveables[j].isDirty()) {
+					return EvaluationResult.TRUE;
+				}
+			}
+		}
+
+		// if nothing, then we are not active
+		return EvaluationResult.FALSE;
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SaveAsHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SaveAsHandler.java
new file mode 100644
index 0000000..38cdff2
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SaveAsHandler.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.ui.ISaveablePart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.internal.InternalHandlerUtil;
+import org.eclipse.ui.internal.WorkbenchPage;
+
+/**
+ * <p>
+ * Replacement for SaveAsAction
+ * </p>
+ * 
+ * @since 3.7
+ * 
+ */
+public class SaveAsHandler extends AbstractSaveHandler {
+
+	public SaveAsHandler() {
+		registerEnablement();
+	}
+
+	public Object execute(ExecutionEvent event) {
+
+		ISaveablePart saveablePart = getSaveablePart(event);
+
+		if (saveablePart != null)
+			saveablePart.doSaveAs();
+		
+		return null;
+	}
+
+	protected EvaluationResult evaluate(IEvaluationContext context) {
+
+		IWorkbenchWindow window = InternalHandlerUtil.getActiveWorkbenchWindow(context);
+		// no window? not active
+		if (window == null)
+			return EvaluationResult.FALSE;
+		WorkbenchPage page = (WorkbenchPage) window.getActivePage();
+
+		// no page? not active
+		if (page == null)
+			return EvaluationResult.FALSE;
+
+		// get saveable part
+		ISaveablePart saveablePart = getSaveablePart(context);
+		if (saveablePart == null)
+			return EvaluationResult.FALSE;
+
+		// if its availble, return whatever it says
+		return saveablePart.isSaveAsAllowed() ? EvaluationResult.TRUE : EvaluationResult.FALSE;
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SaveHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SaveHandler.java
new file mode 100644
index 0000000..0214be7
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SaveHandler.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.ISaveablePart;
+import org.eclipse.ui.ISaveablesSource;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.InternalHandlerUtil;
+import org.eclipse.ui.internal.SaveableHelper;
+import org.eclipse.ui.internal.WorkbenchPage;
+
+/**
+ * <p>
+ * Replacement for SaveAction
+ * </p>
+ * 
+ * @since 3.7
+ * 
+ */
+public class SaveHandler extends AbstractSaveHandler {
+
+	public SaveHandler() {
+		registerEnablement();
+	}
+
+	public Object execute(ExecutionEvent event) {
+
+		ISaveablePart saveablePart = getSaveablePart(event);
+
+		// no saveable
+		if (saveablePart == null)
+			return null;
+
+		// if editor
+		if (saveablePart instanceof IEditorPart) {
+			IEditorPart editorPart = (IEditorPart) saveablePart;
+			IWorkbenchPage page = editorPart.getSite().getPage();
+			page.saveEditor(editorPart, false);
+			return null;
+		}
+
+		// if view
+		IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
+		WorkbenchPage page = (WorkbenchPage) activePart.getSite().getPage();
+		page.savePart(saveablePart, activePart, false);
+
+		return null;
+
+	}
+
+	protected EvaluationResult evaluate(IEvaluationContext context) {
+
+		IWorkbenchWindow window = InternalHandlerUtil.getActiveWorkbenchWindow(context);
+		// no window? not active
+		if (window == null)
+			return EvaluationResult.FALSE;
+		WorkbenchPage page = (WorkbenchPage) window.getActivePage();
+
+		// no page? not active
+		if (page == null)
+			return EvaluationResult.FALSE;
+
+		// get saveable part
+		ISaveablePart saveablePart = getSaveablePart(context);
+		if (saveablePart == null)
+			return EvaluationResult.FALSE;
+
+		if (saveablePart instanceof ISaveablesSource) {
+			ISaveablesSource modelSource = (ISaveablesSource) saveablePart;
+			if (SaveableHelper.needsSave(modelSource))
+				return EvaluationResult.TRUE;
+			return EvaluationResult.FALSE;
+		}
+
+		if (saveablePart != null && saveablePart.isDirty())
+			return EvaluationResult.TRUE;
+
+		return EvaluationResult.FALSE;
+	}
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SavePerspectiveHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SavePerspectiveHandler.java
new file mode 100644
index 0000000..e35d6b1
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SavePerspectiveHandler.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.internal.WorkbenchPage;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.dialogs.SavePerspectiveDialog;
+import org.eclipse.ui.internal.registry.PerspectiveDescriptor;
+import org.eclipse.ui.internal.registry.PerspectiveRegistry;
+
+/**
+ * 
+ * @author Prakash G.R.
+ * 
+ * @since 3.7
+ * 
+ */
+public class SavePerspectiveHandler extends AbstractHandler {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
+	 * ExecutionEvent)
+	 */
+	public Object execute(ExecutionEvent event) {
+
+		IWorkbenchWindow activeWorkbenchWindow = HandlerUtil.getActiveWorkbenchWindow(event);
+		if (activeWorkbenchWindow != null) {
+			WorkbenchPage page = (WorkbenchPage) activeWorkbenchWindow.getActivePage();
+			if (page != null) {
+				PerspectiveDescriptor descriptor = (PerspectiveDescriptor) page.getPerspective();
+				if (descriptor != null) {
+					if (descriptor.isSingleton()) {
+						saveSingleton(page);
+					} else {
+						saveNonSingleton(page, descriptor);
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Save a singleton over itself.
+	 */
+	private void saveSingleton(IWorkbenchPage page) {
+		String[] buttons = new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL };
+		MessageDialog d = new MessageDialog(page.getWorkbenchWindow().getShell(),
+				WorkbenchMessages.SavePerspective_overwriteTitle, null,
+				WorkbenchMessages.SavePerspective_singletonQuestion, MessageDialog.QUESTION,
+				buttons, 0);
+		if (d.open() == 0) {
+			page.savePerspective();
+		}
+	}
+
+	/**
+	 * Save a singleton over the user selection.
+	 */
+	private void saveNonSingleton(IWorkbenchPage page, PerspectiveDescriptor oldDesc) {
+		// Get reg.
+		PerspectiveRegistry reg = (PerspectiveRegistry) WorkbenchPlugin.getDefault()
+				.getPerspectiveRegistry();
+
+		// Get persp name.
+		SavePerspectiveDialog dlg = new SavePerspectiveDialog(page.getWorkbenchWindow().getShell(),
+				reg);
+		// Look up the descriptor by id again to ensure it is still valid.
+		IPerspectiveDescriptor description = reg.findPerspectiveWithId(oldDesc.getId());
+		dlg.setInitialSelection(description);
+		if (dlg.open() != IDialogConstants.OK_ID) {
+			return;
+		}
+
+		// Create descriptor.
+		PerspectiveDescriptor newDesc = (PerspectiveDescriptor) dlg.getPersp();
+		if (newDesc == null) {
+			String name = dlg.getPerspName();
+			newDesc = reg.createPerspective(name, (PerspectiveDescriptor) description);
+			if (newDesc == null) {
+				MessageDialog.openError(dlg.getShell(),
+						WorkbenchMessages.SavePerspective_errorTitle,
+						WorkbenchMessages.SavePerspective_errorMessage);
+				return;
+			}
+		}
+
+		// Save state.
+		page.savePerspectiveAs(newDesc);
+	}
+
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java
index 85a921a..4152547 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java
@@ -11,6 +11,7 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.handlers;
 
+import java.util.Map;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -28,6 +29,7 @@
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.IWorkbenchWizard;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.IElementUpdater;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
 import org.eclipse.ui.internal.LegacyResourceSupport;
@@ -35,6 +37,7 @@
 import org.eclipse.ui.internal.dialogs.ImportExportWizard;
 import org.eclipse.ui.internal.dialogs.NewWizard;
 import org.eclipse.ui.internal.util.Util;
+import org.eclipse.ui.menus.UIElement;
 import org.eclipse.ui.wizards.IWizardDescriptor;
 import org.eclipse.ui.wizards.IWizardRegistry;
 
@@ -47,7 +50,7 @@
  * 
  * @since 3.2
  */
-public abstract class WizardHandler extends AbstractHandler {
+public abstract class WizardHandler extends AbstractHandler implements IElementUpdater {
 
 	/**
 	 * Default handler for launching export wizards.
@@ -318,6 +321,19 @@
 		return StructuredSelection.EMPTY;
 	}
 
+	public void updateElement(UIElement element, Map parameters) {
+
+		String wizardId = (String) parameters.get(getWizardIdParameterId());
+		if (wizardId == null)
+			return;
+		IWizardDescriptor wizard = getWizardRegistry().findWizard(wizardId);
+		if (wizard != null) {
+			element.setText(wizard.getLabel());
+			element.setTooltip(wizard.getDescription());
+			element.setIcon(wizard.getImageDescriptor());
+		}
+	}
+
 	/**
 	 * Returns the id of the parameter used to indicate which wizard this
 	 * command should launch.
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java
index 1870d6b..f280a4c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java
@@ -421,6 +421,9 @@
 	private AbstractHelpUI getHelpUI() {
 		if (!isInitialized) {
 			isInitialized = initializePluggableHelpUI();
+			if (!isInitialized)
+				WorkbenchPlugin.log("Unable to instantiate help UI");//$NON-NLS-1$
+
 		}
 		return pluggableHelpUI;
 	}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingPersistence.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingPersistence.java
index a8cf0db..d499a23 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingPersistence.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingPersistence.java
@@ -56,7 +56,6 @@
 import org.eclipse.ui.WorkbenchException;
 import org.eclipse.ui.XMLMemento;
 import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.internal.ShowViewMenu;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.misc.Policy;
 import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
@@ -579,7 +578,7 @@
 					parameterizedCommand = null;
 				} else if (viewParameter != null) { 
 					HashMap parms = new HashMap();
-					parms.put(ShowViewMenu.VIEW_ID_PARM, viewParameter);
+					parms.put(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_ID, viewParameter);
 					parameterizedCommand = ParameterizedCommand.generateCommand(command, parms);
 				} else {
 					parameterizedCommand = readParameters(memento,
@@ -942,7 +941,7 @@
 			parameterizedCommand = null;
 		} else if (viewParameter != null) { 
 			HashMap parms = new HashMap();
-			parms.put(ShowViewMenu.VIEW_ID_PARM, viewParameter);
+			parms.put(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_ID, viewParameter);
 			parameterizedCommand = ParameterizedCommand.generateCommand(command, parms);
 		} else {
 			parameterizedCommand = readParameters(configurationElement,
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java
index e3a5561..ca97c8d 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,9 @@
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Map;
-
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.NotEnabledException;
+import org.eclipse.core.commands.NotHandledException;
 import org.eclipse.core.commands.ParameterizedCommand;
 import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.jface.bindings.Binding;
@@ -25,11 +27,17 @@
 import org.eclipse.jface.bindings.keys.formatting.KeyFormatterFactory;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.keys.WorkbenchKeyboard.KeyDownFilter;
+import org.eclipse.ui.internal.misc.StatusUtil;
 import org.eclipse.ui.keys.IBindingService;
+import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
  * <p>
@@ -62,6 +70,8 @@
 
 	private IWorkbench workbench;
 
+	private Listener backForwardListener;
+
 	/**
 	 * Constructs a new instance of <code>BindingService</code> using a JFace
 	 * binding manager.
@@ -93,13 +103,50 @@
 		// Hook up the key binding support.
 		keyboard = new WorkbenchKeyboard(workbench);
 		final Display display = workbench.getDisplay();
-		final Listener listener = keyboard.getKeyDownFilter();
+		final KeyDownFilter listener = keyboard.getKeyDownFilter();
+		listener.setEnabled(false);
 		display.addFilter(SWT.KeyDown, listener);
 		display.addFilter(SWT.Traverse, listener);
 
 		// Initialize the key formatter.
 		KeyFormatterFactory.setDefault(SWTKeySupport
 				.getKeyFormatterForPlatform());
+
+		// Hook up the back/forward mouse buttons / special keys.
+		backForwardListener = new Listener() {
+			public void handleEvent(Event event) {
+				String commandId;
+				switch (event.button) {
+				case 4:
+				case 8:
+					commandId = IWorkbenchCommandConstants.NAVIGATE_BACKWARD_HISTORY;
+					break;
+				case 5:
+				case 9:
+					commandId = IWorkbenchCommandConstants.NAVIGATE_FORWARD_HISTORY;
+					break;
+				default:
+					return;
+				}
+
+				final IHandlerService handlerService = (IHandlerService) workbench
+						.getService(IHandlerService.class);
+
+				try {
+					handlerService.executeCommand(commandId, event);
+					event.doit = false;
+				} catch (NotDefinedException e) {
+					// regular condition; do nothing
+				} catch (NotEnabledException e) {
+					// regular condition; do nothing
+				} catch (NotHandledException e) {
+					// regular condition; do nothing
+				} catch (ExecutionException ex) {
+					StatusUtil.handleStatus(ex, StatusManager.SHOW | StatusManager.LOG);
+				}
+			}
+		};
+		display.addFilter(SWT.MouseDown, backForwardListener);
 	}
 
 	/**
@@ -126,10 +173,12 @@
 		if (display != null) {
 			display.removeFilter(SWT.KeyDown, listener);
 			display.removeFilter(SWT.Traverse, listener);
+			display.removeFilter(SWT.MouseDown, backForwardListener);
 		}
 		workbench = null;
 		keyboard = null;
 		bindingPersistence.dispose();
+		backForwardListener = null;
 	}
 
 	public final TriggerSequence[] getActiveBindingsFor(
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeysPreferenceFiltersDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeysPreferenceFiltersDialog.java
index 47e151d..df9765e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeysPreferenceFiltersDialog.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeysPreferenceFiltersDialog.java
@@ -18,6 +18,7 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.internal.Workbench;
 import org.eclipse.ui.preferences.ViewSettingsDialog;
 
 /**
@@ -32,10 +33,12 @@
 	private Button actionSetFilterCheckBox;
 	private Button internalFilterCheckBox;
 	private Button uncategorizedFilterCheckBox;
+	private Button workbenchMenuFilterCheckBox;
 
 	private boolean filterActionSet;
 	private boolean filterInternal;
 	private boolean filterUncategorized;
+	private boolean filterWorkbenchMenu;
 	private boolean filterShowUnboundCommands;
 
 	void setFilterActionSet(boolean b) {
@@ -46,6 +49,10 @@
 		filterInternal = b;
 	}
 	
+	void setFilterWorkbenchMenu(boolean b) {
+		filterWorkbenchMenu = b;
+	}
+
 	void setFilterUncategorized(boolean b) {
 		filterUncategorized = b;
 	}
@@ -62,6 +69,10 @@
 		return filterUncategorized;
 	}
 
+	boolean getFilterWorkbenchMenu() {
+		return filterWorkbenchMenu;
+	}
+
 	/**
 	 * @param parentShell
 	 */
@@ -78,6 +89,7 @@
 		actionSetFilterCheckBox.setSelection(true);
 		internalFilterCheckBox.setSelection(true);
 		uncategorizedFilterCheckBox.setSelection(true);
+		workbenchMenuFilterCheckBox.setSelection(!Workbench.getInstance().hasAppMenu());
 		super.performDefaults();
 	}
 
@@ -101,9 +113,15 @@
 		uncategorizedFilterCheckBox
 				.setText(NewKeysPreferenceMessages.UncategorizedFilterCheckBox_Text);
 
+		workbenchMenuFilterCheckBox = new Button(topComposite, SWT.CHECK);
+		workbenchMenuFilterCheckBox
+				.setText(NewKeysPreferenceMessages.WorkbenchMenuFilterCheckBox_Text);
+
 		actionSetFilterCheckBox.setSelection(filterActionSet);
 		internalFilterCheckBox.setSelection(filterInternal);
 		uncategorizedFilterCheckBox.setSelection(filterUncategorized);
+		workbenchMenuFilterCheckBox.setSelection(filterWorkbenchMenu);
+
 		applyDialogFont(topComposite);
 
 		return topComposite;
@@ -118,6 +136,7 @@
 		filterActionSet = actionSetFilterCheckBox.getSelection();
 		filterInternal = internalFilterCheckBox.getSelection();
 		filterUncategorized = uncategorizedFilterCheckBox.getSelection();
+		filterWorkbenchMenu = workbenchMenuFilterCheckBox.getSelection();
 		super.okPressed();
 	}
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferenceMessages.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferenceMessages.java
index cdda389..29dd7d1 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferenceMessages.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferenceMessages.java
@@ -62,6 +62,7 @@
 	public static String ActionSetFilterCheckBox_Text;
 	public static String InternalFilterCheckBox_Text;
 	public static String UncategorizedFilterCheckBox_Text;
+	public static String WorkbenchMenuFilterCheckBox_Text;
 	
 	static {
 		// load message values from bundle file
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferencePage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferencePage.java
index 562d660..2b1a389 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferencePage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferencePage.java
@@ -92,6 +92,7 @@
 import org.eclipse.ui.commands.ICommandService;
 import org.eclipse.ui.dialogs.FilteredTree;
 import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.Workbench;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.keys.model.BindingElement;
 import org.eclipse.ui.internal.keys.model.BindingModel;
@@ -168,6 +169,8 @@
 
 	private boolean fFilterInternalContexts = true;
 
+	private boolean fFilterWorkbenchMenuContext = !Workbench.getInstance().hasAppMenu();
+
 	private KeyController keyController;
 
 	private Category fDefaultCategory;
@@ -569,17 +572,20 @@
 						getShell());
 				dialog.setFilterActionSet(fFilterActionSetContexts);
 				dialog.setFilterInternal(fFilterInternalContexts);
+				dialog.setFilterWorkbenchMenu(fFilterWorkbenchMenuContext);
+
 				dialog.setFilterUncategorized(fFilteredTree
 						.isFilteringCategories());
 				if (dialog.open() == Window.OK) {
 					fFilterActionSetContexts = dialog.getFilterActionSet();
 					fFilterInternalContexts = dialog.getFilterInternal();
+					fFilterWorkbenchMenuContext = dialog.getFilterWorkbenchMenu();
 					fFilteredTree.filterCategories(dialog
 							.getFilterUncategorized());
 
 					// Apply context filters
-					keyController.filterContexts(fFilterActionSetContexts,
-							fFilterInternalContexts);
+					keyController.filterContexts(fFilterActionSetContexts, fFilterInternalContexts,
+							fFilterWorkbenchMenuContext);
 
 					ISelection currentContextSelection = fWhenCombo
 							.getSelection();
@@ -1166,8 +1172,8 @@
 				.getSchemeModel().getSelectedElement()));
 
 		// Apply context filters
-		keyController.filterContexts(fFilterActionSetContexts,
-				fFilterInternalContexts);
+		keyController.filterContexts(fFilterActionSetContexts, fFilterInternalContexts,
+				fFilterWorkbenchMenuContext);
 		fWhenCombo.setInput(keyController.getContextModel());
 
 		fFilteredTree.filterCategories(fPatternFilter.isFilteringCategories());
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferencePage.properties b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferencePage.properties
index 3e53da3..4884d9e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferencePage.properties
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NewKeysPreferencePage.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2008 IBM Corporation and others.
+# Copyright (c) 2005, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@
 BindingLabel_Text = &Binding:
 CommandNameColumn_Text = Command
 CommandNameLabel_Text = &Name:
-CommandDescriptionLabel_Text = &Description:
+CommandDescriptionLabel_Text = D&escription:
 CategoryColumn_Text= Category
 UserColumn_Text= User
 DeleteSchemeButton_Text = D&elete
@@ -49,5 +49,6 @@
 ActionSetFilterCheckBox_Text= Filter &action set contexts
 InternalFilterCheckBox_Text = Filter &internal contexts
 UncategorizedFilterCheckBox_Text = Filter &uncategorized commands
+WorkbenchMenuFilterCheckBox_Text = Filter &Workbench Menu Context
 KeysPreferenceFilterDialog_Title= When Context Filters
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/model/ContextModel.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/model/ContextModel.java
index ec0842a..7adcb8d 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/model/ContextModel.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/model/ContextModel.java
@@ -16,7 +16,6 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.core.commands.contexts.Context;
 import org.eclipse.ui.contexts.IContextService;
@@ -104,8 +103,10 @@
 	 *            <code>true</code> to filter action set contexts.
 	 * @param internal
 	 *            <code>true</code> to filter internal contexts
+	 * @param workbenchMenu
+	 *            <code>true</code> to filter Workbench Menu Context
 	 */
-	public void filterContexts(boolean actionSets, boolean internal) {
+	public void filterContexts(boolean actionSets, boolean internal, boolean workbenchMenu) {
 		// Remove undesired contexts
 		for (int i = 0; i < contexts.size(); i++) {
 			boolean removeContext = false;
@@ -137,6 +138,11 @@
 				removeContext = true;
 			}
 
+			if (workbenchMenu == true
+					&& contextElement.getId().equals(IContextService.CONTEXT_ID_WORKBENCH_MENU)) {
+				removeContext = true;
+			}
+
 			if (removeContext) {
 				contextIdToFilteredContexts.put(contextElement.getId(),
 						contextElement);
@@ -154,12 +160,15 @@
 					.get(iterator.next());
 
 			try {
-				if (actionSets == false
-						&& (contextElement.getId().equalsIgnoreCase(
-								CONTEXT_ID_ACTION_SETS) || ((Context) contextElement
-								.getModelObject()).getParentId()
-								.equalsIgnoreCase(CONTEXT_ID_ACTION_SETS))) {
-					restoreContext = true;
+				if (actionSets == false) {
+					if (contextElement.getId().equalsIgnoreCase(CONTEXT_ID_ACTION_SETS)) {
+						restoreContext = true;
+					} else {
+						String parentId = ((Context) contextElement.getModelObject()).getParentId();
+						if (parentId != null && parentId.equalsIgnoreCase(CONTEXT_ID_ACTION_SETS)) {
+							restoreContext = true;
+						}
+					}
 				}
 			} catch (NotDefinedException e) {
 				// No parentId to check
@@ -169,6 +178,11 @@
 				restoreContext = true;
 			}
 
+			if (workbenchMenu == false
+					&& contextElement.getId().equals(IContextService.CONTEXT_ID_WORKBENCH_MENU)) {
+				restoreContext = true;
+			}
+
 			if (restoreContext) {
 				contexts.add(contextElement);
 				contextIdToElement.put(contextElement.getId(), contextElement);
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/model/KeyController.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/model/KeyController.java
index dd71efc..8954b1c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/model/KeyController.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/model/KeyController.java
@@ -466,11 +466,12 @@
 	 * @param actionSets
 	 *            <code>true</code> to filter action set contexts
 	 * @param internal
-	 *            <code>false</code> to filter internal contexts
-	 * 
+	 *            <code>true</code> to filter internal contexts
+	 * @param workbenchMenu
+	 *            <code>true</code> to filter Workbench Menu Context
 	 */
-	public void filterContexts(boolean actionSets, boolean internal) {
-		contextModel.filterContexts(actionSets, internal);
+	public void filterContexts(boolean actionSets, boolean internal, boolean workbenchMenu) {
+		contextModel.filterContexts(actionSets, internal, workbenchMenu);
 	}
 
 	/**
@@ -523,7 +524,9 @@
 					for (int i = 0; i < bindingElements.length; i++) {
 						final BindingElement be = (BindingElement) bindingElements[i];
 						if (be.getTrigger() == null
-								|| be.getTrigger().isEmpty()) {
+								|| be.getTrigger().isEmpty()
+								|| be.getContext() == null
+								|| be.getContext().getName() == null) {
 							continue;
 						}
 						StringBuffer buffer = new StringBuffer();
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/IWindowTrim.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/IWindowTrim.java
index 7c43d6b..89aee0f 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/IWindowTrim.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/layout/IWindowTrim.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,9 +19,9 @@
  * <p>
  * <b>Note:</b> This interface is highly experimental, and will probably change
  * between M4 and M5. For example, it will support a "lifecycle" that allows the
- * {@link ITrimManager} to update its modifiers (like SWT.TOP or SWT.LEFT) so the
- * IWindowTrim can dispose and re-create its control. This will likely effect
- * methods like {@link #dock(int) }, {@link #getControl() },
+ * {@link ITrimManager} to update its modifiers (like SWT.TOP or SWT.LEFT) so
+ * the IWindowTrim can dispose and re-create its control. This will likely
+ * affect methods like {@link #dock(int) }, {@link #getControl() },
  * {@link #getValidSides() }, etc.
  * </p>
  * 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/DynamicMenuContributionItem.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/DynamicMenuContributionItem.java
index 8aa2746..e14822c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/DynamicMenuContributionItem.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/DynamicMenuContributionItem.java
@@ -89,6 +89,78 @@
 	/*
 	 * (non-Javadoc)
 	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#isEnabled()
+	 */
+	public boolean isEnabled() {
+		if (loadedDynamicContribution != null) {
+			return loadedDynamicContribution.isEnabled();
+		}
+		return super.isEnabled();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#isGroupMarker()
+	 */
+	public boolean isGroupMarker() {
+		if (loadedDynamicContribution != null) {
+			return loadedDynamicContribution.isGroupMarker();
+		}
+		return super.isGroupMarker();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#isSeparator()
+	 */
+	public boolean isSeparator() {
+		if (loadedDynamicContribution != null) {
+			return loadedDynamicContribution.isSeparator();
+		}
+		return super.isSeparator();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#isVisible()
+	 */
+	public boolean isVisible() {
+		if (loadedDynamicContribution != null) {
+			return loadedDynamicContribution.isVisible();
+		}
+		return super.isVisible();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#saveWidgetState()
+	 */
+	public void saveWidgetState() {
+		if (loadedDynamicContribution != null) {
+			loadedDynamicContribution.saveWidgetState();
+		}
+		super.saveWidgetState();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#setVisible(boolean)
+	 */
+	public void setVisible(boolean visible) {
+		if (loadedDynamicContribution != null) {
+			loadedDynamicContribution.setVisible(visible);
+		}
+		super.setVisible(visible);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see
 	 * org.eclipse.jface.action.ContributionItem#fill(org.eclipse.swt.widgets
 	 * .Composite)
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/DynamicToolBarContributionItem.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/DynamicToolBarContributionItem.java
index cac3a91..b0cb4b9 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/DynamicToolBarContributionItem.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/DynamicToolBarContributionItem.java
@@ -89,6 +89,78 @@
 	/*
 	 * (non-Javadoc)
 	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#isEnabled()
+	 */
+	public boolean isEnabled() {
+		if (loadedDynamicContribution != null) {
+			return loadedDynamicContribution.isEnabled();
+		}
+		return super.isEnabled();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#isGroupMarker()
+	 */
+	public boolean isGroupMarker() {
+		if (loadedDynamicContribution != null) {
+			return loadedDynamicContribution.isGroupMarker();
+		}
+		return super.isGroupMarker();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#isSeparator()
+	 */
+	public boolean isSeparator() {
+		if (loadedDynamicContribution != null) {
+			return loadedDynamicContribution.isSeparator();
+		}
+		return super.isSeparator();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#saveWidgetState()
+	 */
+	public void saveWidgetState() {
+		if (loadedDynamicContribution != null) {
+			loadedDynamicContribution.saveWidgetState();
+		}
+		super.saveWidgetState();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#setVisible(boolean)
+	 */
+	public void setVisible(boolean visible) {
+		if (loadedDynamicContribution != null) {
+			loadedDynamicContribution.setVisible(visible);
+		}
+		super.setVisible(visible);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#isVisible()
+	 */
+	public boolean isVisible() {
+		if (loadedDynamicContribution != null) {
+			return loadedDynamicContribution.isVisible();
+		}
+		return super.isVisible();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see
 	 * org.eclipse.jface.action.ContributionItem#fill(org.eclipse.swt.widgets
 	 * .CoolBar, int)
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties
index 997fe6c..8d6d63f 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2010 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -200,7 +200,11 @@
 ResetPerspective_toolTip = Reset Perspective
 ResetPerspective_message = Do you want to reset the current {0} perspective to its defaults?
 ResetPerspective_title = Reset Perspective
-RevertPerspective_note=Reset takes effect the next time the perspective is opened
+RevertPerspective_note='Revert' removes the customization from the selected perspective.\nThis only applies to newly opened perspectives.
+
+RevertPerspective_title = Reset Perspective
+RevertPerspective_message = Do you want to reset the current {0} perspective to its saved state?
+RevertPerspective_option = &Also discard perspective's customization
 
 ClosePerspectiveAction_text = &Close Perspective
 ClosePerspectiveAction_toolTip = Close Perspective
@@ -417,7 +421,7 @@
 ViewsPreference_override=O&verride presentation settings
 ViewsPreference_currentThemeFormat = {0} (current)
 ViewsPreference_enableAnimations = Enable a&nimations
-ViewsPreference_useColoredLabels = Use mixe&d fonts and colors for labels
+ViewsPreference_useColoredLabels = &Use mixed fonts and colors for labels
 ViewsPreference_restartRequestJobName = Restart Request
 
 # --- File Editors ---
@@ -439,6 +443,7 @@
 FilteredPreferenceDialog_Key_Scrolling=Key &Scrolling
 FilteredPreferenceDialog_PreferenceSaveFailed=Preferences save failed.
 FilteredPreferenceDialog_Resize = &Resize tree
+FilteredPreferenceDialog_FilterToolTip = Additional Dialog Actions
 
 
 FileExtension_fileTypeMessage =  Enter file type to add: (*.doc or report.doc for example)
@@ -467,8 +472,8 @@
 
 PerspectivesPreference_MakeDefault = Ma&ke Default
 PerspectivesPreference_MakeDefaultTip = Make the Current Selection the Default Perspective
-PerspectivesPreference_Reset = &Reset
-PerspectivesPreference_ResetTip = Reset the Current Selection to its Original Value
+PerspectivesPreference_Reset = &Revert
+PerspectivesPreference_ResetTip = Reverts the Current Selection to its Original Value
 PerspectivesPreference_Delete = D&elete
 PerspectivesPreference_DeleteTip = Delete a User Defined Perspective
 PerspectivesPreference_available = Available &perspectives:
@@ -491,7 +496,7 @@
 WorkbenchPreference_singleClick=&Single click
 WorkbenchPreference_singleClick_SelectOnHover=Select on &hover
 WorkbenchPreference_singleClick_OpenAfterDelay=Open when using arrow &keys
-WorkbenchPreference_noEffectOnAllViews=This preference may not take effect on all views
+WorkbenchPreference_noEffectOnAllViews=This preference may not take effect on all views.
 
 # --- Fonts ---
 FontsPreference_useSystemFont=&Use System Font
@@ -581,7 +586,7 @@
 EditorManager_problemsSavingEditors=Problems occurred saving editors.
 EditorManager_unableToSaveEditor=Unable to save editor: {0}.
 EditorManager_backgroundSaveJobName=Saving {0}
-
+EditorManager_largeDocumentWarning= The document you are trying to open is large. This may affect the stability of the application. Opening with an external program is recommended.
 EditorPane_pinEditor=&Pin Editor
 
 ExternalEditor_errorMessage = Error opening external editor ({0}).
@@ -887,7 +892,7 @@
 FastViewBar_horizontal=&Horizontal
 FastViewBar_vertical=&Vertical
 FastViewBar_show_view=&New Fast View
-FastViewBar_0=Show View as a fast view
+FastViewBar_0=Show View as a Fast View
 
 WorkbenchPlugin_extension=Cannot create extension
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/Policy.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/Policy.java
index 7bc745b..e2c574d 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/Policy.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/Policy.java
@@ -24,6 +24,8 @@
 public class Policy {
     public static boolean DEFAULT = false;
 
+	public static boolean DEBUG_UI_GLOBAL = DEFAULT;
+
     public static boolean DEBUG_SWT_GRAPHICS = DEFAULT;
 
     public static boolean DEBUG_SWT_DEBUG = DEFAULT;
@@ -32,6 +34,8 @@
 
     public static boolean DEBUG_DRAG_DROP = DEFAULT;
 
+	public static boolean DEBUG_PERSPECTIVES = DEFAULT;
+
     /**
      * Flag to log stale jobs
      */
@@ -161,7 +165,9 @@
 
     static {
         if (getDebugOption("/debug")) { //$NON-NLS-1$
+			DEBUG_UI_GLOBAL = true;
             DEBUG_SWT_GRAPHICS = getDebugOption("/trace/graphics"); //$NON-NLS-1$
+			DEBUG_PERSPECTIVES = getDebugOption("/trace/perspectives"); //$NON-NLS-1$
             DEBUG_SWT_DEBUG = getDebugOption("/debug/swtdebug"); //$NON-NLS-1$
             DEBUG_SWT_DEBUG_GLOBAL = getDebugOption("/debug/swtdebugglobal"); //$NON-NLS-1$
             DEBUG_DRAG_DROP = getDebugOption("/trace/dragDrop"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/StatusPart.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/StatusPart.java
index 3edea87..0c6347f 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/StatusPart.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/StatusPart.java
@@ -12,11 +12,12 @@
 
 import java.io.PrintWriter;
 import java.io.StringWriter;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.graphics.Color;
@@ -206,8 +207,13 @@
 				}
 			}
 		});
-		button.setImage(descriptor.getImageDescriptor().createImage());
-		button
-				.setToolTipText(WorkbenchMessages.ErrorLogUtil_ShowErrorLogTooltip);
+		final Image image = descriptor.getImageDescriptor().createImage();
+		button.setImage(image);
+		button.setToolTipText(WorkbenchMessages.ErrorLogUtil_ShowErrorLogTooltip);
+		button.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				image.dispose();
+			}
+		});
     }
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/AbstractTableInformationControl.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/AbstractTableInformationControl.java
index 99f64d6..73be4e8 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/AbstractTableInformationControl.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/AbstractTableInformationControl.java
@@ -11,7 +11,12 @@
 package org.eclipse.ui.internal.presentations;
 
 import org.eclipse.core.runtime.Platform;
-
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.events.FocusListener;
@@ -46,14 +51,6 @@
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.swt.widgets.Text;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.misc.StringMatcher;
 import org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabItem;
@@ -284,6 +281,10 @@
 				}
                 if (table.equals(e.getSource()) & ++divCount == ignoreEventCount) {
                     Object o = table.getItem(new Point(e.x, e.y));
+                    if (fLastItem == null ^ o == null) {
+						table.setCursor(o == null ? null : table.getDisplay().getSystemCursor(
+								SWT.CURSOR_HAND));
+                    }
                     if (o instanceof TableItem && lastY != e.y) {
                         lastY = e.y;
                         if (!o.equals(fLastItem)) {
@@ -304,6 +305,8 @@
                                 table.setSelection(new TableItem[] { fLastItem });
                             }
                         }
+                    } else if (o == null) {
+                        fLastItem = null;
                     }
                 }
             }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuMove.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuMove.java
index a98308f..5a1e653 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuMove.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/SystemMenuMove.java
@@ -60,4 +60,7 @@
         super.update(force, recursive);
     }
 
+	public void update() {
+		update(false, false);
+	}
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultPartList.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultPartList.java
index 02954a5..997d6e7 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultPartList.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultPartList.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -66,7 +66,7 @@
                 SWT.Deactivate, new Listener() {
 
                     public void handleEvent(Event event) {
-                        editorList.setVisible(false);
+						editorList.setVisible(false);
                     }
                 }
         	);
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/FinishedJobs.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/FinishedJobs.java
index bcd8343..f3dc4dc 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/FinishedJobs.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/FinishedJobs.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -109,19 +109,8 @@
 	static boolean keep(JobInfo info) {
 		Job job = info.getJob();
 		if (job != null) {
-			Object prop = job.getProperty(ProgressManagerUtil.KEEP_PROPERTY);
-			if (prop instanceof Boolean) {
-				if (((Boolean) prop).booleanValue()) {
-					return true;
-				}
-			}
-
-			prop = job.getProperty(ProgressManagerUtil.KEEPONE_PROPERTY);
-			if (prop instanceof Boolean) {
-				if (((Boolean) prop).booleanValue()) {
-					return true;
-				}
-			}
+			if (hasKeepFlag(job))
+				return true;
 
 			IStatus status = job.getResult();
 			if (status != null && status.getSeverity() == IStatus.ERROR) {
@@ -132,6 +121,26 @@
 	}
 
 	/**
+	 * Returns true if job has one of keep flags set.
+	 */
+	static boolean hasKeepFlag(Job job) {
+		Object prop = job.getProperty(ProgressManagerUtil.KEEP_PROPERTY);
+		if (prop instanceof Boolean) {
+			if (((Boolean) prop).booleanValue()) {
+				return true;
+			}
+		}
+
+		prop = job.getProperty(ProgressManagerUtil.KEEPONE_PROPERTY);
+		if (prop instanceof Boolean) {
+			if (((Boolean) prop).booleanValue()) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
 	 * Register for notification.
 	 */
 	void addListener(KeptJobsListener l) {
@@ -288,6 +297,22 @@
 				JobInfo info1 = (JobInfo) infos[i];
 				Job job = info1.getJob();
 				if (job != null) {
+
+					// do not remove error jobs that have keep flag set
+					if (hasKeepFlag(job)){
+						// but mark the job as reported to prevent displaying
+						// the same job error many times
+						info1.setReported(true);
+						// notify listeners to force refresh
+						Object l[] = getListeners();
+						for (int j = 0; j < l.length; j++) {
+							KeptJobsListener jv = (KeptJobsListener) l[j];
+							jv.removed(null);
+						}
+						//proceed with next entry
+						continue;
+					}
+
 					IStatus status = job.getResult();
 					if (status != null && status.getSeverity() == IStatus.ERROR) {
 						JobTreeElement topElement = (JobTreeElement) info1
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobInfo.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobInfo.java
index 4c114d0..5a59787 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobInfo.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobInfo.java
@@ -30,6 +30,13 @@
     private IStatus blockedStatus;
 
     private volatile boolean canceled = false;
+
+	/**
+	 * This flag controls whether the job result was passed to status handling in
+	 * order to display it.
+	 */
+	private volatile boolean reported = false;
+
     private List children = Collections.synchronizedList(new ArrayList());
 
     private Job job;
@@ -382,6 +389,14 @@
         return getJob().getState() != Job.NONE;
     }
 
+	boolean isReported() {
+		return reported;
+	}
+
+	void setReported(boolean errorReported) {
+		this.reported = errorReported;
+	}
+
     /**
      * Return whether or not the receiver is blocked.
      * 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java
index 6e1b98b..7f11608 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java
@@ -103,6 +103,10 @@
 		for (int i = jobTreeElements.length - 1; i >= 0; i--) {
 			if (jobTreeElements[i] instanceof JobInfo) {
 				JobInfo ji = (JobInfo) jobTreeElements[i];
+				if (ji.isReported()) {
+					// the error was already reported, so do nothing.
+					continue;
+				}
 				Job job = ji.getJob();
 				if (job != null) {
 
@@ -117,10 +121,19 @@
 						StatusManager.getManager().handle(statusAdapter,
 								StatusManager.SHOW);
 
-						removeTopElement(ji);
+						if (FinishedJobs.keep(ji)) {
+							ji.setReported(true);
+						} else {
+							removeTopElement(ji);
+						}
 					}
 
-					execute(ji, job);
+					// To fix a bug (335543) introduced in 3.6.1.
+					// doAction() should return if progress region button was
+					// selected to open a job result action or command.
+					if (execute(ji, job)) {
+						return;
+					}
 				}
 			}
 		}
@@ -132,14 +145,16 @@
 	/**
 	 * @param ji
 	 * @param job
+	 * @return <code>true</code> if Action or Command is executed
 	 */
-	private void execute(JobInfo ji, Job job) {
+	private boolean execute(JobInfo ji, Job job) {
 
 		Object prop = job.getProperty(IProgressConstants2.ACTION_PROPERTY);
 		if (prop instanceof IAction && ((IAction) prop).isEnabled()) {
 			IAction action = (IAction) prop;
 			action.run();
 			removeTopElement(ji);
+			return true;
 		}
 
 		prop = job.getProperty(IProgressConstants2.COMMAND_PROPERTY);
@@ -168,8 +183,9 @@
 				StatusManager.getManager().handle(status,
 						StatusManager.LOG | StatusManager.SHOW);
 			}
-
+			return true;
 		}
+		return false;
 	}
 
 	/**
@@ -209,7 +225,7 @@
 			if (jobTreeElements[i] instanceof JobInfo) {
 				JobInfo ji = (JobInfo) jobTreeElements[i];
 				Job job = ji.getJob();
-				if (job != null) {
+				if ((job != null) && (!ji.isReported())) {
 					IStatus status = job.getResult();
 					if (status != null && status.getSeverity() == IStatus.ERROR) {
 						// green arrow with error overlay
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressMonitorFocusJobDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressMonitorFocusJobDialog.java
index d87cc2e..a507fe1 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressMonitorFocusJobDialog.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressMonitorFocusJobDialog.java
@@ -1,12 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- * IBM - Initial API and implementation
+ *    IBM - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
  *******************************************************************************/
 package org.eclipse.ui.internal.progress;
 
@@ -413,20 +414,35 @@
 
 		setOpenOnRun(false);
 		aboutToRun();
-		// start with a quick busy indicator. Lock the UI as we
+
+		final Object jobIsDone = new Object();
+		final JobChangeAdapter jobListener = new JobChangeAdapter() {
+			public void done(IJobChangeEvent event) {
+				synchronized (jobIsDone) {
+					jobIsDone.notify();
+				}
+			}
+		};
+		job.addJobChangeListener(jobListener);
+
+		// Start with a quick busy indicator. Lock the UI as we
 		// want to preserve modality
 		BusyIndicator.showWhile(PlatformUI.getWorkbench().getDisplay(),
 				new Runnable() {
 					public void run() {
 						try {
-							Thread
-									.sleep(ProgressManagerUtil.SHORT_OPERATION_TIME);
+							synchronized (jobIsDone) {
+								if (job.getState() != Job.NONE) {
+									jobIsDone.wait(ProgressManagerUtil.SHORT_OPERATION_TIME);
+								}
+							}
 						} catch (InterruptedException e) {
 							// Do not log as this is a common operation from the
 							// lock listener
 						}
 					}
 				});
+		job.removeJobChangeListener(jobListener);
 
 		WorkbenchJob openJob = new WorkbenchJob(
 				ProgressMessages.ProgressMonitorFocusJobDialog_UserDialogJob) {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/TaskBarProgressManager.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/TaskBarProgressManager.java
index c90bf9a..f4fe663 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/TaskBarProgressManager.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/TaskBarProgressManager.java
@@ -21,10 +21,13 @@
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.TaskItem;
+import org.eclipse.ui.progress.IProgressConstants;
 import org.eclipse.ui.progress.IProgressConstants2;
 import org.eclipse.ui.progress.WorkbenchJob;
 
@@ -49,6 +52,10 @@
 
 	private final TaskItem taskItem;
 
+	private ImageDescriptor overlayDescriptor;
+
+	private Image overlayImage;
+
 	public TaskBarProgressManager(TaskItem taskItem) {
 		Assert.isNotNull(taskItem);
 		this.taskItem = taskItem;
@@ -73,6 +80,7 @@
 	public void dispose() {
 		ProgressManager.getInstance().removeListener(listener);
 		setAnimated(false);
+		disposeOverlay();
 	}
 
 	private WorkbenchJob getAnimationUpdateJob() {
@@ -86,6 +94,7 @@
 			 * runtime .IProgressMonitor)
 			 */
 			public IStatus runInUIThread(IProgressMonitor monitor) {
+
 				if (isAnimated) {
 					if (!taskItem.isDisposed() && !jobs.isEmpty()) {
 						Job job = (Job) jobs.get(0);
@@ -104,9 +113,13 @@
 						} else {
 							setProgressState(SWT.DEFAULT);
 						}
+						updateImage(job);
+					} else {
+						updateImage(null);
 					}
 				} else {
 					setProgressState(SWT.DEFAULT);
+					updateImage(null);
 				}
 
 				if (isAnimated && taskItem != null && !taskItem.isDisposed()) {
@@ -142,6 +155,53 @@
 		};
 	}
 
+	private void updateImage(Job job) {
+
+		if (taskItem == null || taskItem.isDisposed())
+			return;
+
+		if (job == null) {
+			disposeOverlay();
+			taskItem.setOverlayImage(null);
+			return;
+		}
+
+		// first check whether the job specifies image property
+		// if not check with progress manager for its family
+		ImageDescriptor descriptor = (ImageDescriptor) job
+				.getProperty(IProgressConstants.ICON_PROPERTY);
+		if (descriptor != null) {
+
+			// if the description is same, do nothing.
+			// Else dispose old one and store this
+			if (!descriptor.equals(overlayDescriptor)) {
+				disposeOverlay();
+				setOverlay(descriptor);
+			}
+		} else if (ProgressManager.getInstance().getIconFor(job) != null) {
+			disposeOverlay();
+			Image newImage = ProgressManager.getInstance().getIconFor(job);
+			taskItem.setOverlayImage(newImage);
+		} else {
+			disposeOverlay();
+			taskItem.setOverlayImage(null);
+		}
+	}
+
+	private void setOverlay(ImageDescriptor descriptor) {
+		overlayDescriptor = descriptor;
+		overlayImage = descriptor.createImage();
+		taskItem.setOverlayImage(overlayImage);
+	}
+
+	private void disposeOverlay() {
+		overlayDescriptor = null;
+		if (overlayImage != null) {
+			overlayImage.dispose();
+			overlayImage = null;
+		}
+	}
+
 	private IJobProgressManagerListener getProgressListener() {
 		return new IJobProgressManagerListener() {
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/PerspectiveProvider.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/PerspectiveProvider.java
index 64db59c..1c69419 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/PerspectiveProvider.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/PerspectiveProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@
 import org.eclipse.ui.IPerspectiveDescriptor;
 import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.activities.WorkbenchActivityHelper;
 import org.eclipse.ui.internal.WorkbenchImages;
 
 /**
@@ -42,13 +43,15 @@
 		if (cachedElements == null) {
 			IPerspectiveDescriptor[] perspectives = PlatformUI.getWorkbench()
 					.getPerspectiveRegistry().getPerspectives();
-			cachedElements = new QuickAccessElement[perspectives.length];
 			for (int i = 0; i < perspectives.length; i++) {
-				PerspectiveElement perspectiveElement = new PerspectiveElement(
-						perspectives[i], this);
-				cachedElements[i] = perspectiveElement;
-				idToElement.put(perspectiveElement.getId(), perspectiveElement);
+				if (!WorkbenchActivityHelper.filterItem(perspectives[i])) {
+					PerspectiveElement perspectiveElement = new PerspectiveElement(perspectives[i],
+							this);
+					idToElement.put(perspectiveElement.getId(), perspectiveElement);
+				}
 			}
+			cachedElements = (QuickAccessElement[]) idToElement.values().toArray(
+					new QuickAccessElement[idToElement.size()]);
 		}
 		return cachedElements;
 	}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/PreferenceProvider.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/PreferenceProvider.java
index 68dc070..bf92624 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/PreferenceProvider.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/PreferenceProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@
 import org.eclipse.jface.preference.IPreferenceNode;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.activities.WorkbenchActivityHelper;
 import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
 import org.eclipse.ui.internal.WorkbenchImages;
 
@@ -60,11 +61,14 @@
 	 */
 	private void collectElements(String prefix, IPreferenceNode[] subNodes, List result) {
 		for (int i = 0; i < subNodes.length; i++) {
-			PreferenceElement preferenceElement = new PreferenceElement(
-					subNodes[i], prefix, this);
-			result.add(preferenceElement);
-			String nestedPrefix = prefix.length() == 0 ? subNodes[i].getLabelText() : (prefix + "/" + subNodes[i].getLabelText());  //$NON-NLS-1$
-			collectElements(nestedPrefix, subNodes[i].getSubNodes(), result);
+			if (!WorkbenchActivityHelper.filterItem(subNodes[i])) {
+				PreferenceElement preferenceElement = new PreferenceElement(subNodes[i], prefix,
+						this);
+				result.add(preferenceElement);
+				String nestedPrefix = prefix.length() == 0 ? subNodes[i].getLabelText() : (prefix
+						+ "/" + subNodes[i].getLabelText()); //$NON-NLS-1$
+				collectElements(nestedPrefix, subNodes[i].getSubNodes(), result);
+			}
 		}
 	}
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessDialog.java
index 372a614..8f854c8 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessDialog.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,12 +16,12 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.commands.Command;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.jface.bindings.TriggerSequence;
 import org.eclipse.jface.bindings.keys.KeySequence;
 import org.eclipse.jface.bindings.keys.SWTKeySupport;
+import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.PopupDialog;
 import org.eclipse.jface.layout.GridDataFactory;
@@ -45,10 +45,13 @@
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.MouseAdapter;
 import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseMoveListener;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.graphics.TextLayout;
@@ -296,6 +299,27 @@
 				}
 			}
 		});
+		table.addMouseMoveListener(new MouseMoveListener() {
+			TableItem lastItem = null;
+
+			public void mouseMove(MouseEvent e) {
+				if (table.equals(e.getSource())) {
+					Object o = table.getItem(new Point(e.x, e.y));
+					if (lastItem == null ^ o == null) {
+						table.setCursor(o == null ? null : table.getDisplay().getSystemCursor(
+								SWT.CURSOR_HAND));
+					}
+					if (o instanceof TableItem) {
+						if (!o.equals(lastItem)) {
+							lastItem = (TableItem) o;
+							table.setSelection(new TableItem[] { lastItem });
+						}
+					} else if (o == null) {
+						lastItem = null;
+					}
+				}
+			}
+		});
 
 		table.addSelectionListener(new SelectionListener() {
 			public void widgetSelected(SelectionEvent e) {
@@ -391,13 +415,17 @@
 			setInfoText(QuickAccessMessages.QuickAccess_StartTypingToFindMatches);
 		} else {
 			TriggerSequence[] sequences = getInvokingCommandKeySequences();
-			if (showAllMatches || sequences == null || sequences.length == 0) {
-				setInfoText(""); //$NON-NLS-1$
+			if (sequences != null && sequences.length != 0) {
+				if (showAllMatches) {
+					setInfoText(NLS.bind(
+							QuickAccessMessages.QuickAccess_PressKeyToShowInitialMatches,
+							sequences[0].format()));
+				} else {
+					setInfoText(NLS.bind(QuickAccessMessages.QuickAccess_PressKeyToShowAllMatches,
+							sequences[0].format()));
+				}
 			} else {
-				setInfoText(NLS
-						.bind(
-								QuickAccessMessages.QuickAccess_PressKeyToShowAllMatches,
-								sequences[0].format()));
+				setInfoText(""); //$NON-NLS-1$
 			}
 		}
 	}
@@ -589,7 +617,16 @@
 	}
 
 	protected Point getDefaultSize() {
-		return new Point(350, 420);
+		GC gc = new GC(table);
+		FontMetrics fontMetrics = gc.getFontMetrics();
+		gc.dispose();
+		int x = Dialog.convertHorizontalDLUsToPixels(fontMetrics, 300);
+		if (x < 350)
+			x = 350;
+		int y = Dialog.convertVerticalDLUsToPixels(fontMetrics, 270);
+		if (y < 420)
+			y = 420;
+		return new Point(x, y);
 	}
 
 	protected Point getDefaultLocation(Point initialSize) {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessMessages.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessMessages.java
index f8b730f..60201f3 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessMessages.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,6 +29,7 @@
 	public static String QuickAccess_Previous;
 	public static String QuickAccess_Views;
 	public static String QuickAccess_PressKeyToShowAllMatches;
+	public static String QuickAccess_PressKeyToShowInitialMatches;
 	public static String QuickAccess_StartTypingToFindMatches;
 	public static String QuickAccess_AvailableCategories;
 	static {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewElement.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewElement.java
index a0e322f..223bda4 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewElement.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewElement.java
@@ -25,6 +25,9 @@
 public class ViewElement extends QuickAccessElement {
 
 	private final IViewDescriptor viewDescriptor;
+	private String secondaryId;
+	private boolean multiInstance;
+	private String contentDescription;
 
 	private String category;
 
@@ -44,19 +47,61 @@
 		}
 	}
 
+	/**
+	 * @return The primary id of the view
+	 */
+	public String getPrimaryId() {
+
+		return viewDescriptor.getId();
+	}
+
+	/**
+	 * @param secondaryId
+	 *            The secondaryId to set.
+	 */
+	public void setSecondaryId(String secondaryId) {
+		this.secondaryId = secondaryId;
+	}
+
+	/**
+	 * @param multiInstance
+	 *            The multiInstance to set.
+	 */
+	public void setMultiInstance(boolean multiInstance) {
+		this.multiInstance = multiInstance;
+	}
+
+	/**
+	 * @param contentDescription
+	 *            The contentDescription to set.
+	 */
+	public void setContentDescription(String contentDescription) {
+		this.contentDescription = contentDescription;
+	}
+
+	/**
+	 * @return Returns the multiInstance.
+	 */
+	public boolean isMultiInstance() {
+		return multiInstance;
+	}
+
 	public void execute() {
 		IWorkbenchPage activePage = PlatformUI.getWorkbench()
 				.getActiveWorkbenchWindow().getActivePage();
 		if (activePage != null) {
 			try {
-				activePage.showView(viewDescriptor.getId());
+				activePage.showView(viewDescriptor.getId(), secondaryId,
+						IWorkbenchPage.VIEW_ACTIVATE);
 			} catch (PartInitException e) {
 			}
 		}
 	}
 
 	public String getId() {
-		return viewDescriptor.getId();
+		if(secondaryId ==null)
+			return viewDescriptor.getId();
+		return viewDescriptor.getId() + ':' + secondaryId;
 	}
 
 	public ImageDescriptor getImageDescriptor() {
@@ -64,20 +109,35 @@
 	}
 
 	public String getLabel() {
-		if (category == null) {
-			return viewDescriptor.getLabel();
+		String label = viewDescriptor.getLabel();
+
+		if (isMultiInstance() && contentDescription != null)
+			label = label + " (" + contentDescription + ')'; //$NON-NLS-1$
+
+		if (category != null) {
+			label = label + separator + category;
 		}
-		return viewDescriptor.getLabel() + separator + category;
+		return label;
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
 	public int hashCode() {
 		final int prime = 31;
 		int result = 1;
-		result = prime * result
-				+ ((viewDescriptor == null) ? 0 : viewDescriptor.hashCode());
+		result = prime * result + ((secondaryId == null) ? 0 : secondaryId.hashCode());
+		result = prime * result + ((viewDescriptor == null) ? 0 : viewDescriptor.hashCode());
 		return result;
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
 	public boolean equals(Object obj) {
 		if (this == obj)
 			return true;
@@ -85,7 +145,12 @@
 			return false;
 		if (getClass() != obj.getClass())
 			return false;
-		final ViewElement other = (ViewElement) obj;
+		ViewElement other = (ViewElement) obj;
+		if (secondaryId == null) {
+			if (other.secondaryId != null)
+				return false;
+		} else if (!secondaryId.equals(other.secondaryId))
+			return false;
 		if (viewDescriptor == null) {
 			if (other.viewDescriptor != null)
 				return false;
@@ -93,4 +158,5 @@
 			return false;
 		return true;
 	}
+
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewProvider.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewProvider.java
index b1aa686..5147d1c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewProvider.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,14 +11,20 @@
 
 package org.eclipse.ui.internal.quickaccess;
 
+import java.util.Collection;
 import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
 import java.util.Map;
-
 import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.activities.WorkbenchActivityHelper;
 import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
 import org.eclipse.ui.internal.WorkbenchImages;
 import org.eclipse.ui.views.IViewDescriptor;
+import org.eclipse.ui.views.IViewRegistry;
 
 /**
  * @since 3.3
@@ -28,6 +34,7 @@
 
 	private QuickAccessElement[] cachedElements;
 	private Map idToElement = new HashMap();
+	private Collection multiInstanceViewIds = new HashSet(0);
 
 	public String getId() {
 		return "org.eclipse.ui.views"; //$NON-NLS-1$
@@ -47,16 +54,72 @@
 		if (cachedElements == null) {
 			IViewDescriptor[] views = PlatformUI.getWorkbench()
 					.getViewRegistry().getViews();
-			cachedElements = new QuickAccessElement[views.length];
+			Collection elements = new HashSet(views.length);
 			for (int i = 0; i < views.length; i++) {
-				ViewElement viewElement = new ViewElement(views[i], this);
-				cachedElements[i] = viewElement;
-				idToElement.put(viewElement.getId(), viewElement);
+				if (!WorkbenchActivityHelper.filterItem(views[i])) {
+					addElement(views[i], elements, null, null);
+				}
 			}
+
+			addOpenViews(elements);
+
+			markMultiInstance(elements);
+
+
+			cachedElements = (QuickAccessElement[]) elements
+					.toArray(new QuickAccessElement[elements.size()]);
+
 		}
 		return cachedElements;
 	}
 
+	private void addElement(IViewDescriptor viewDesc, Collection elements, String secondaryId,
+			String desc) {
+		ViewElement viewElement = new ViewElement(viewDesc, this);
+		viewElement.setSecondaryId(secondaryId);
+		viewElement.setContentDescription(desc);
+		boolean added = elements.add(viewElement);
+		if (added) {
+			idToElement.put(viewElement.getId(), viewElement);
+		} else {
+			// *could* be multinstance
+			multiInstanceViewIds.add(viewDesc.getId());
+		}
+	}
+
+	public void addOpenViews(Collection elements) {
+
+		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		IViewRegistry viewRegistry = PlatformUI.getWorkbench().getViewRegistry();
+		IViewReference[] refs = page.getViewReferences();
+		for (int i = 0; i < refs.length; i++) {
+			IViewDescriptor viewDescriptor = viewRegistry.find(refs[i].getId());
+			addElement(viewDescriptor, elements, refs[i].getSecondaryId(),
+					refs[i].getContentDescription());
+		}
+	}
+
+	/**
+	 * @param elements
+	 */
+	protected void markMultiInstance(Collection elements) {
+		for (Iterator i = multiInstanceViewIds.iterator(); i.hasNext();) {
+			String viewId = (String) i.next();
+			ViewElement firstInstance = null;
+			for (Iterator j = elements.iterator(); j.hasNext();) {
+				ViewElement viewElement = (ViewElement) j.next();
+				if (viewElement.getPrimaryId().equals(viewId)) {
+					if (firstInstance == null)
+						firstInstance = viewElement;
+					else {
+						firstInstance.setMultiInstance(true);
+						viewElement.setMultiInstance(true);
+					}
+				}
+			}
+		}
+	}
+
 	public ImageDescriptor getImageDescriptor() {
 		return WorkbenchImages
 				.getImageDescriptor(IWorkbenchGraphicConstants.IMG_VIEW_DEFAULTVIEW_MISC);
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/WizardProvider.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/WizardProvider.java
index 1d6e8ff..0f09ca9 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/WizardProvider.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/WizardProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@
 import java.util.Map;
 
 import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.activities.WorkbenchActivityHelper;
 import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
 import org.eclipse.ui.internal.WorkbenchImages;
 import org.eclipse.ui.internal.WorkbenchPlugin;
@@ -46,12 +47,14 @@
 			collectWizards(rootCategory, result);
 			IWizardDescriptor[] wizards = (IWizardDescriptor[]) result
 					.toArray(new IWizardDescriptor[result.size()]);
-			cachedElements = new QuickAccessElement[wizards.length];
 			for (int i = 0; i < wizards.length; i++) {
-				WizardElement wizardElement = new WizardElement(wizards[i], this);
-				cachedElements[i] = wizardElement;
-				idToElement.put(wizardElement.getId(), wizardElement);
+				if (!WorkbenchActivityHelper.filterItem(wizards[i])) {
+					WizardElement wizardElement = new WizardElement(wizards[i], this);
+					idToElement.put(wizardElement.getId(), wizardElement);
+				}
 			}
+			cachedElements = (QuickAccessElement[]) idToElement.values().toArray(
+					new QuickAccessElement[idToElement.size()]);
 		}
 		return cachedElements;
 	}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/messages.properties b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/messages.properties
index 43da045..7c5ad53 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/messages.properties
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
+# Copyright (c) 2005, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -18,5 +18,6 @@
 QuickAccess_Previous=Previous Choices
 QuickAccess_Properties=Properties
 QuickAccess_PressKeyToShowAllMatches=Press ''{0}'' to show all matches.
+QuickAccess_PressKeyToShowInitialMatches=Press ''{0}'' to show initial matches.
 QuickAccess_StartTypingToFindMatches=Start typing to find matches.
 QuickAccess_AvailableCategories=Available categories:
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java
index ed0db10..19b881a 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.registry;
 
+import com.ibm.icu.text.Collator;
 import java.io.BufferedReader;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -29,9 +30,8 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.StringTokenizer;
 import java.util.Map.Entry;
-
+import java.util.StringTokenizer;
 import org.eclipse.core.commands.common.EventManager;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtension;
@@ -70,7 +70,6 @@
 import org.eclipse.ui.internal.misc.ProgramImageDescriptor;
 import org.eclipse.ui.internal.util.Util;
 
-import com.ibm.icu.text.Collator;
 
 /**
  * Provides access to the collection of defined editors for resource types.
@@ -647,11 +646,12 @@
         IPreferenceStore store = WorkbenchPlugin.getDefault()
                 .getPreferenceStore();
         Reader reader = null;
+        FileInputStream stream = null;
         try {
             // Get the editors defined in the preferences store
             String xmlString = store.getString(IPreferenceConstants.EDITORS);
             if (xmlString == null || xmlString.length() == 0) {
-                FileInputStream stream = new FileInputStream(workbenchStatePath
+                stream = new FileInputStream(workbenchStatePath
                         .append(IWorkbenchConstants.EDITOR_FILE_NAME)
                         .toOSString());
                 reader = new BufferedReader(new InputStreamReader(stream,
@@ -699,13 +699,6 @@
                 }
             }
         } catch (IOException e) {
-            try {
-                if (reader != null) {
-					reader.close();
-				}
-            } catch (IOException ex) {
-                e.printStackTrace();
-            }
             //Ignore this as the workbench may not yet have saved any state
             return false;
         } catch (WorkbenchException e) {
@@ -713,6 +706,15 @@
                     WorkbenchMessages.EditorRegistry_errorMessage, 
                     e.getStatus());
             return false;
+		} finally {
+			try {
+				if (reader != null) {
+					reader.close();
+				} else if (stream != null)
+					stream.close();
+			} catch (IOException ex) {
+				WorkbenchPlugin.log("Error reading editors: Could not close steam", ex); //$NON-NLS-1$
+			}
         }
 
         return true;
@@ -872,11 +874,12 @@
         IPreferenceStore store = WorkbenchPlugin.getDefault()
                 .getPreferenceStore();
         Reader reader = null;
+        FileInputStream stream = null;
         try {
             // Get the resource types
             String xmlString = store.getString(IPreferenceConstants.RESOURCES);
             if (xmlString == null || xmlString.length() == 0) {
-                FileInputStream stream = new FileInputStream(workbenchStatePath
+                stream = new FileInputStream(workbenchStatePath
                         .append(IWorkbenchConstants.RESOURCE_TYPE_FILE_NAME)
                         .toOSString());
                 reader = new BufferedReader(new InputStreamReader(stream,
@@ -887,13 +890,6 @@
             // Read the defined resources into the table
             readResources(editorTable, reader);
         } catch (IOException e) {
-            try {
-                if (reader != null) {
-					reader.close();
-				}
-            } catch (IOException ex) {
-                ex.printStackTrace();
-            }
             MessageDialog.openError((Shell) null, WorkbenchMessages.EditorRegistry_errorTitle,
                     WorkbenchMessages.EditorRegistry_errorMessage);
             return false;
@@ -902,6 +898,16 @@
                     WorkbenchMessages.EditorRegistry_errorMessage,
                     e.getStatus());
             return false;
+        } finally {
+            try {
+                if (reader != null) {
+					reader.close();
+				} else if (stream != null) {
+                	stream.close();
+				}
+            } catch (IOException ex) {
+				WorkbenchPlugin.log("Error reading resources: Could not close steam", ex); //$NON-NLS-1$
+            }
         }
         return true;
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PropertyPagesRegistryReader.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PropertyPagesRegistryReader.java
index eccaed8..c347567 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PropertyPagesRegistryReader.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PropertyPagesRegistryReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     James Blackburn (Broadcom Corp.) - Bug 294628 multiple selection
  *******************************************************************************/
 package org.eclipse.ui.internal.registry;
 
@@ -14,7 +15,6 @@
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
-
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionRegistry;
 import org.eclipse.ui.PlatformUI;
@@ -41,6 +41,19 @@
 	 */
 	public static final String ATT_FILTER_VALUE = "value";//$NON-NLS-1$
 
+	/**
+	 * Value "<code>selectionFilter</code>". Is an enum allowing propertyPages to 
+	 * support multiple selection when enum value is <code>ATT_SELECTION_FILTER_MULTI</code>
+	 * @since 3.7
+	 */
+	public static final String ATT_SELECTION_FILTER = "selectionFilter";//$NON-NLS-1$
+
+	/**
+	 * Selection filter attribute value indicating support for multiple selection.
+	 * @since 3.7
+	 */
+	public static final String ATT_SELECTION_FILTER_MULTI = "multi";//$NON-NLS-1$
+
 	private static final String TAG_PAGE = "page";//$NON-NLS-1$
 
 	/**
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/UIExtensionTracker.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/UIExtensionTracker.java
index 5154f71..6bf7569 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/UIExtensionTracker.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/UIExtensionTracker.java
@@ -39,7 +39,10 @@
 	}
 
 	protected void applyRemove(final IExtensionChangeHandler handler, final IExtension removedExtension, final Object[] objects) {
-        display.syncExec(new Runnable() {
+		if (display.isDisposed())
+			return;
+
+		display.syncExec(new Runnable() {
 
             public void run() {
                 try {
@@ -52,6 +55,9 @@
     }
 
     protected void applyAdd(final IExtensionChangeHandler handler, final IExtension addedExtension) {
+		if (display.isDisposed())
+			return;
+
         display.syncExec(new Runnable() {
             public void run() {
                 try {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java
index fc55b01..6346c5e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewRegistry.java
@@ -11,6 +11,7 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.registry;
 
+import com.ibm.icu.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Comparator;
@@ -18,7 +19,6 @@
 import java.util.List;
 import java.util.SortedSet;
 import java.util.TreeSet;
-
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtension;
 import org.eclipse.core.runtime.IExtensionPoint;
@@ -38,8 +38,6 @@
 import org.eclipse.ui.views.IViewDescriptor;
 import org.eclipse.ui.views.IViewRegistry;
 
-import com.ibm.icu.text.MessageFormat;
-
 /**
  * The central manager for view descriptors.
  */
@@ -254,13 +252,27 @@
      * 		   <code>null</code> if the descriptor fails the Expressions check. 
      */
     public IViewDescriptor find(String id) {
-        Iterator itr = views.iterator();
+		IViewDescriptor desc = findInternal(id);
+		if (WorkbenchActivityHelper.restrictUseOf(desc)) {
+			return null;
+		}
+		return desc;
+	}
+
+	/**
+	 * Finds the view descriptor without worrying about activities.
+	 * 
+	 * @param id
+	 *            the ID to search for
+	 * @return the view descriptor, or <code>null</code>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public IViewDescriptor findInternal(String id) {
+		Iterator itr = views.iterator();
         while (itr.hasNext()) {
             IViewDescriptor desc = (IViewDescriptor) itr.next();
             if (id.equals(desc.getId())) {
-                if (WorkbenchActivityHelper.restrictUseOf(desc)) {
-                    return null;
-                }
                 return desc;
             }
         }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchServiceRegistry.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchServiceRegistry.java
index 0aa0143..25cd1c1 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchServiceRegistry.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchServiceRegistry.java
@@ -19,7 +19,6 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.WeakHashMap;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtension;
@@ -185,8 +184,6 @@
 						continue;
 					}
 					providers.add(sourceProvider);
-					processVariables(elements[i]
-							.getChildren(IWorkbenchRegistryConstants.TAG_VARIABLE));
 				} catch (CoreException e) {
 					StatusManager.getManager().handle(e.getStatus());
 				}
@@ -196,6 +193,16 @@
 				.toArray(new AbstractSourceProvider[providers.size()]);
 	}
 
+	public void initializeSourcePriorities() {
+		IExtensionPoint ep = getExtensionPoint();
+		IConfigurationElement[] elements = ep.getConfigurationElements();
+		for (int i = 0; i < elements.length; i++) {
+			if (elements[i].getName().equals(IWorkbenchRegistryConstants.TAG_SOURCE_PROVIDER)) {
+				processVariables(elements[i].getChildren(IWorkbenchRegistryConstants.TAG_VARIABLE));
+			}
+		}
+	}
+
 	private static final String[] supportedLevels = { ISources.ACTIVE_CONTEXT_NAME,
 			ISources.ACTIVE_SHELL_NAME, 
 			ISources.ACTIVE_WORKBENCH_WINDOW_NAME, 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchSourceProvider.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchSourceProvider.java
index 88c3ff9..07be4fa 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchSourceProvider.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchSourceProvider.java
@@ -632,13 +632,10 @@
 				return;
 			}
 
-			HashMap currentState = new HashMap();
-			int sources = updateSelection(currentState);
-			sources |= ISources.ACTIVE_WORKBENCH_WINDOW_SUBORDINATE;
-			currentState.put(
+			fireSourceChanged(ISources.ACTIVE_WORKBENCH_WINDOW_SUBORDINATE,
 					ISources.ACTIVE_WORKBENCH_WINDOW_ACTIVE_PERSPECTIVE_NAME,
 					id);
-			fireSourceChanged(sources, currentState);
+
 			lastPerspectiveId = id;
 		}
 
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/DefaultDetailsArea.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/DefaultDetailsArea.java
index 872025d..d5f7f48 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/DefaultDetailsArea.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/DefaultDetailsArea.java
@@ -37,6 +37,7 @@
 import org.eclipse.swt.events.KeyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
@@ -77,6 +78,8 @@
 
 	private Map dialogState;
 
+	private MenuItem copyAction;
+
 	/**
 	 * @param dialogState
 	 */
@@ -170,6 +173,25 @@
 				// no op
 			}
 		});
+		text.addSelectionListener(new SelectionListener() {
+
+			public void widgetSelected(SelectionEvent e) {
+				if (text.getSelectionText().length() == 0) {
+					if (copyAction != null && !copyAction.isDisposed()) {
+						copyAction.setEnabled(false);
+					}
+				} else {
+					if (copyAction != null && !copyAction.isDisposed()) {
+						copyAction.setEnabled(true);
+					}
+				}
+			}
+
+			public void widgetDefaultSelected(SelectionEvent e) {
+				widgetSelected(e);
+			}
+
+		});
 		createDNDSource();
 		createCopyAction(parent);
 		Dialog.applyDialogFont(parent);
@@ -233,7 +255,7 @@
 
 			public void dragSetData(DragSourceEvent event) {
 				if (TextTransfer.getInstance().isSupportedType(event.dataType)) {
-					event.data = prepareCopyString();
+					event.data = text.getSelectionText();
 				}
 			}
 
@@ -244,7 +266,7 @@
 
 	private void createCopyAction(final Composite parent) {
 		Menu menu = new Menu(parent.getShell(), SWT.POP_UP);
-		MenuItem copyAction = new MenuItem(menu, SWT.PUSH);
+		copyAction = new MenuItem(menu, SWT.PUSH);
 		copyAction.setText(JFaceResources.getString("copy")); //$NON-NLS-1$
 		copyAction.addSelectionListener(new SelectionAdapter() {
 
@@ -262,13 +284,9 @@
 
 		});
 		text.setMenu(menu);
-	}
-
-	private String prepareCopyString() {
-		if (text == null || text.isDisposed()) {
-			return ""; //$NON-NLS-1$
+		if (text.getSelectionText().length() == 0) {
+			copyAction.setEnabled(false);
 		}
-		return text.getSelectionText();
 	}
 
 	private void populateList(StyledText text, IStatus status, int nesting,
@@ -317,7 +335,7 @@
 		Clipboard clipboard = null;
 		try {
 			clipboard = new Clipboard(text.getDisplay());
-			clipboard.setContents(new Object[] { prepareCopyString() },
+			clipboard.setContents(new Object[] { text.getSelectionText() },
 					new Transfer[] { TextTransfer.getInstance() });
 		} finally {
 			if (clipboard != null) {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/CascadingTheme.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/CascadingTheme.java
index 057ef0e..14d58f0 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/CascadingTheme.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/CascadingTheme.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.ui.internal.themes;
 
 import java.util.Set;
-
 import org.eclipse.core.commands.common.EventManager;
 import org.eclipse.jface.resource.ColorRegistry;
 import org.eclipse.jface.resource.FontRegistry;
@@ -37,10 +36,6 @@
         }
     };
 
-    /**
-     * @param colorRegistry
-     * @param fontRegistry
-     */
     public CascadingTheme(ITheme currentTheme,
             CascadingColorRegistry colorRegistry,
             CascadingFontRegistry fontRegistry) {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java
index 1a1cee6..4d37b47 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.themes;
 
+import com.ibm.icu.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -19,7 +20,6 @@
 import java.util.Map;
 import java.util.ResourceBundle;
 import java.util.Set;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.preference.PreferenceConverter;
@@ -28,7 +28,6 @@
 import org.eclipse.jface.resource.StringConverter;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
 import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.IFontProvider;
@@ -89,7 +88,6 @@
 import org.eclipse.ui.themes.IThemeManager;
 import org.eclipse.ui.themes.IThemePreview;
 
-import com.ibm.icu.text.MessageFormat;
 
 /**
  * Preference page for management of system colors, gradients and fonts.
@@ -254,7 +252,32 @@
          * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
          */
         public Object getParent(Object element) {
-            return null;
+			if (element instanceof ThemeElementCategory)
+				return registry;
+
+			if (element instanceof ColorDefinition) {
+				String defaultId = ((IHierarchalThemeElementDefinition) element).getDefaultsTo();
+				if (defaultId != null) {
+					ColorDefinition defaultElement = registry.findColor(defaultId);
+					if (parentIsInSameCategory(defaultElement))
+						return defaultElement;
+				}
+				String categoryId = ((ColorDefinition) element).getCategoryId();
+				return registry.findCategory(categoryId);
+			}
+
+			if (element instanceof FontDefinition) {
+				String defaultId = ((FontDefinition) element).getDefaultsTo();
+				if (defaultId != null) {
+					FontDefinition defaultElement = registry.findFont(defaultId);
+					if (parentIsInSameCategory(defaultElement))
+						return defaultElement;
+				}
+				String categoryId = ((FontDefinition) element).getCategoryId();
+				return registry.findCategory(categoryId);
+			}
+
+			return null;
         }
 
         /* (non-Javadoc)
@@ -510,10 +533,22 @@
          * @since 3.2
          */
 		private boolean isDefault(IThemeElementDefinition def) {
-			if (def instanceof FontDefinition)
-				return ColorsAndFontsPreferencePage.this.isDefault((FontDefinition)def);
-			if (def instanceof ColorDefinition)
-				return ColorsAndFontsPreferencePage.this.isDefault((ColorDefinition)def);
+			if (def instanceof FontDefinition) {
+				FontDefinition fontDef = (FontDefinition) def;
+				String defaultFontID = fontDef.getDefaultsTo();
+				return defaultFontID != null
+						&& Arrays.equals(fontRegistry.getFontData(def.getId()),
+								fontRegistry.getFontData(defaultFontID));
+			}
+			if (def instanceof ColorDefinition) {
+				ColorDefinition colorDef = (ColorDefinition) def;
+				String defaultColorID = colorDef.getDefaultsTo();
+				if (defaultColorID == null)
+					return false;
+				RGB defaultRGB = colorRegistry.getRGB(defaultColorID);
+				return defaultRGB != null
+						&& defaultRGB.equals(colorRegistry.getRGB(colorDef.getId()));
+			}
 			return false;
 		}
     }
@@ -532,18 +567,17 @@
     private Font appliedDialogFont;
 
     /**
-     * Map of definition id->RGB objects that map to changes expressed in this
-     * UI session.  These changes should be made in preferences and the
-     * registry.
-     */
+	 * Map of definition id->RGB capturing the explicit changes made by
+	 * the user. These changes need to be stored into the preference store.
+	 */
     private Map colorPreferencesToSet = new HashMap(7);
 
     private CascadingColorRegistry colorRegistry;
 
     /**
-     * Map of definition id->RGB objects that map to changes expressed in this
-     * UI session.  These changes should be made in the registry.
-     */
+	 * Map of definition id->RGB capturing the temporary changes caused by a
+	 * 'defaultsTo' color change.
+	 */
     private Map colorValuesToSet = new HashMap(7);
 
     /**
@@ -587,6 +621,23 @@
 
     private Button fontChangeButton;
 
+    /**
+     * The button to edit the default of the selected element.
+     * @since 3.7
+     */
+	private Button editDefaultButton;
+
+	/**
+	 * The button to go to the default of the selected element.
+	 * 
+	 * @since 3.7
+	 */
+	private Button goToDefaultButton;
+
+	/**
+	 * Map of definition id->FontData[] capturing the changes explicitly made by
+	 * the user. These changes need to be stored into the preference store.
+	 */
     private Map fontPreferencesToSet = new HashMap(7);
 
     private CascadingFontRegistry fontRegistry;
@@ -595,11 +646,10 @@
 
     private Button fontSystemButton;
 
-    /**
-     * Map of definition id->FontData[] objects that map to changes expressed in
-     * this UI session.  These changes should be made in preferences and the
-     * registry.
-     */
+	/**
+	 * Map of definition id->FontData[] capturing the temporary changes caused
+	 * by a 'defaultsTo' font change.
+	 */
     private Map fontValuesToSet = new HashMap(7);
 
     /**
@@ -646,6 +696,63 @@
         //no-op
     }
 
+	/**
+	 * {@inheritDoc}
+	 * <p>
+	 * Everything else except the following string patterns is ignored:
+	 * <ul>
+	 * <li><strong>selectCategory:</strong>ID - selects and expands the category
+	 * with the given ID</li>
+	 * <li><strong>selectFont:</strong>ID - selects the font with the given ID</li>
+	 * <li><strong>selectColor:</strong>ID - selects the color with the given ID
+	 * </li>
+	 * </p>
+	 * 
+	 * @param data
+	 *            the data to be applied
+	 */
+	public void applyData(Object data) {
+		if (tree == null || !(data instanceof String))
+			return;
+
+		ThemeRegistry themeRegistry = (ThemeRegistry) tree.getViewer().getInput();
+		String command = (String) data;
+		if (command.startsWith("selectCategory:")) { //$NON-NLS-1$
+			String categoryId = command.substring(15);
+			ThemeElementCategory category = themeRegistry.findCategory(categoryId);
+			if (category != null) {
+				selectAndReveal(category);
+				tree.getViewer().expandToLevel(category, 1);
+			}
+		} else if (command.startsWith("selectFont:")) { //$NON-NLS-1$
+			String id = command.substring(11);
+			FontDefinition fontDef = themeRegistry.findFont(id);
+			if (fontDef != null) {
+				selectAndReveal(fontDef);
+			}
+		} else if (command.startsWith("selectColor:")) { //$NON-NLS-1$
+			String id = command.substring(12);
+			ColorDefinition colorDef = themeRegistry.findColor(id);
+			if (colorDef != null) {
+				selectAndReveal(colorDef);
+			}
+		}
+	}
+
+	/**
+	 * Selects and reveals the given element.
+	 * 
+	 * @param selection
+	 *            the object to select and reveal
+	 * @since 3.7
+	 */
+	private void selectAndReveal(Object selection) {
+		TreeViewer viewer = tree.getViewer();
+		viewer.setSelection(new StructuredSelection(selection), false);
+		viewer.reveal(selection);
+		viewer.getTree().setFocus();
+	}
+
     private static boolean equals(String string, String string2) {
         if ((string == null && string2 == null))
 			return true;
@@ -670,6 +777,19 @@
         return button;
     }
 
+	private Label createSeparator(Composite parent) {
+		Label separator = new Label(parent, SWT.NONE);
+		separator.setFont(parent.getFont());
+		separator.setVisible(false);
+		GridData gd = new GridData();
+		gd.horizontalAlignment = GridData.FILL;
+		gd.verticalAlignment = GridData.BEGINNING;
+		gd.heightHint = 4;
+		separator.setLayoutData(gd);
+		return separator;
+	}
+
+
     /* (non-Javadoc)
      * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
      */
@@ -722,6 +842,9 @@
 		fontChangeButton = createButton(controlColumn, RESOURCE_BUNDLE.getString("openChange")); //$NON-NLS-1$
         fontSystemButton = createButton(controlColumn, WorkbenchMessages.FontsPreference_useSystemFont);
         fontResetButton = createButton(controlColumn, RESOURCE_BUNDLE.getString("reset")); //$NON-NLS-1$
+		createSeparator(controlColumn);
+		editDefaultButton = createButton(controlColumn, RESOURCE_BUNDLE.getString("editDefault")); //$NON-NLS-1$
+		goToDefaultButton = createButton(controlColumn, RESOURCE_BUNDLE.getString("goToDefault")); //$NON-NLS-1$
         // --- end of buttons
 
 		createDescriptionControl(mainColumn);
@@ -769,66 +892,78 @@
         return advancedComposite;
     }
 
-    /**
-     * Create the <code>ListViewer</code> that will contain all color
-     * definitions as defined in the extension point.
-     * 
-     * @param parent the parent <code>Composite</code>.
-     */
-    private void createTree(Composite parent) {
-        labelProvider = new PresentationLabelProvider();
-        // create a new tree with a custom pattern matcher that will allow
-        // non-category elements to be returned in the event that their children
-        // do not
-        tree = new FilteredTree(parent, SWT.SINGLE | SWT.H_SCROLL
-                | SWT.V_SCROLL | SWT.BORDER, new PatternFilter() {
-            
-            protected boolean isParentMatch(Viewer viewer, Object element) {
-                Object[] children = ((ITreeContentProvider) ((AbstractTreeViewer) viewer)
-                        .getContentProvider()).getChildren(element);
-                if (children.length > 0 && element instanceof ThemeElementCategory)
-					return filter(viewer, element, children).length > 0;
-                return false;
-            }
-		}, true);
+	/**
+	 * Create the <code>ListViewer</code> that will contain all color
+	 * definitions as defined in the extension point.
+	 * 
+	 * @param parent
+	 *            the parent <code>Composite</code>.
+	 */
+	private void createTree(Composite parent) {
+		labelProvider = new PresentationLabelProvider();
 
-        GridData data = new GridData(GridData.FILL_BOTH | GridData.VERTICAL_ALIGN_FILL);
+		// Create a custom pattern matcher that will allow
+		// non-category elements to be returned in the event that their children
+		// do not and also search the descriptions.
+		PatternFilter filter = new PatternFilter() {
+			/*
+			 * (non-Javadoc)
+			 * @see org.eclipse.ui.dialogs.PatternFilter#isLeafMatch(org.eclipse.jface.viewers.Viewer, java.lang.Object)
+			 * @since 3.7
+			 */
+			protected boolean isLeafMatch(Viewer viewer, Object element) {
+				if (super.isLeafMatch(viewer, element))
+					return true;
+
+				String text = null;
+				if (element instanceof ICategorizedThemeElementDefinition)
+					text = ((ICategorizedThemeElementDefinition) element).getDescription();
+
+				return text != null ? wordMatches(text) : false;
+			}
+		};
+		filter.setIncludeLeadingWildcard(true);
+
+		tree = new FilteredTree(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER,
+				filter, true);
+		GridData data = new GridData(GridData.FILL_BOTH | GridData.VERTICAL_ALIGN_FILL);
 		data.widthHint = Math.max(285, convertWidthInCharsToPixels(30));
-        data.heightHint = Math.max(175, convertHeightInCharsToPixels(10));
-        tree.setLayoutData(data);
-        myApplyDialogFont(tree.getViewer().getControl());
-        Text filterText = tree.getFilterControl();
-        if (filterText != null)
+		data.heightHint = Math.max(175, convertHeightInCharsToPixels(10));
+		tree.setLayoutData(data);
+		myApplyDialogFont(tree.getViewer().getControl());
+		Text filterText = tree.getFilterControl();
+		if (filterText != null)
 			myApplyDialogFont(filterText);
 
-        tree.getViewer().setLabelProvider(labelProvider);
-        tree.getViewer().setContentProvider(new ThemeContentProvider());
-        tree.getViewer().setComparator(new ViewerComparator() {
-            public int category(Object element) {
-                if (element instanceof ThemeElementCategory)
+		tree.getViewer().setLabelProvider(labelProvider);
+		tree.getViewer().setContentProvider(new ThemeContentProvider());
+		tree.getViewer().setComparator(new ViewerComparator() {
+			public int category(Object element) {
+				if (element instanceof ThemeElementCategory)
 					return 0;
-                return 1;
-            }
-        });
-        tree.getViewer().setInput(WorkbenchPlugin.getDefault().getThemeRegistry());
-        tree.getViewer().addDoubleClickListener(new IDoubleClickListener() {
-            public void doubleClick(DoubleClickEvent event) {
-                IStructuredSelection s = (IStructuredSelection) event.getSelection();
-                Object element = s.getFirstElement();
-                if (tree.getViewer().isExpandable(element))
-                    tree.getViewer().setExpandedState(element, !tree.getViewer().getExpandedState(element));
-                
-                if (element instanceof FontDefinition)
-                	editFont(tree.getDisplay());
-                else if (element instanceof ColorDefinition)
-                	editColor(tree.getDisplay());
-                updateControls();
-            }
-        });
+				return 1;
+			}
+		});
+		tree.getViewer().setInput(WorkbenchPlugin.getDefault().getThemeRegistry());
+		tree.getViewer().addDoubleClickListener(new IDoubleClickListener() {
+			public void doubleClick(DoubleClickEvent event) {
+				IStructuredSelection s = (IStructuredSelection) event.getSelection();
+				Object element = s.getFirstElement();
+				if (tree.getViewer().isExpandable(element))
+					tree.getViewer().setExpandedState(element,
+							!tree.getViewer().getExpandedState(element));
 
-        restoreTreeExpansion();
-        restoreTreeSelection();
-    }
+				if (element instanceof FontDefinition)
+					editFont(tree.getDisplay());
+				else if (element instanceof ColorDefinition)
+					editColor(tree.getDisplay());
+				updateControls();
+			}
+		});
+
+		restoreTreeExpansion();
+		restoreTreeSelection();
+	}
 
     /* (non-Javadoc)
      * @see org.eclipse.jface.dialogs.IDialogPage#dispose()
@@ -838,15 +973,6 @@
         
         workbench.getThemeManager().removePropertyChangeListener(themeChangeListener);
         clearPreviews();
-        // also dispose elements used by default previewers
-		if (currentFont != null && !currentFont.isDisposed()) {
-			currentFont.dispose();
-			currentFont = null;
-		}
-		if (currentColor != null && !currentColor.isDisposed()) {
-			currentColor.dispose();
-			currentColor = null;
-		}
         colorRegistry.dispose();
         fontRegistry.dispose();
     }
@@ -1033,9 +1159,9 @@
 
             public void widgetSelected(SelectionEvent e) {
             	if (isFontSelected())
-                    resetFont(getSelectedFontDefinition());
+					resetFont(getSelectedFontDefinition(), false);
             	else if (isColorSelected())
-                  resetColor(getSelectedColorDefinition());
+					resetColor(getSelectedColorDefinition(), false);
             	updateControls();
             }
         });
@@ -1047,10 +1173,51 @@
                 	return;
                 FontData[] defaultFontData = JFaceResources.getDefaultFont().getFontData();
                 setFontPreferenceValue(definition, defaultFontData);
-                setRegistryValue(definition, defaultFontData);
                 updateControls();
             }
         });
+
+		editDefaultButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent event) {
+				Display display = event.display;
+				FontDefinition fontDefinition = getSelectedFontDefinition();
+				if (fontDefinition != null) {
+					String defaultFontId = fontDefinition.getDefaultsTo();
+					FontDefinition defaultFontDefinition = themeRegistry.findFont(defaultFontId);
+					editFont(defaultFontDefinition, display);
+				} else {
+					ColorDefinition colorDefinition = getSelectedColorDefinition();
+					if (colorDefinition != null) {
+						String defaultColorId = colorDefinition.getDefaultsTo();
+						ColorDefinition defaultColorDefinition = themeRegistry
+								.findColor(defaultColorId);
+						editColor(defaultColorDefinition, display);
+					}
+				}
+				updateControls();
+			}
+		});
+
+		goToDefaultButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent event) {
+				FontDefinition fontDefinition = getSelectedFontDefinition();
+				if (fontDefinition != null) {
+					String defaultFontId = fontDefinition.getDefaultsTo();
+					FontDefinition defaultFontDefinition = themeRegistry.findFont(defaultFontId);
+					selectAndReveal(defaultFontDefinition);
+				} else {
+					ColorDefinition colorDefinition = getSelectedColorDefinition();
+					if (colorDefinition != null) {
+						String defaultColorId = colorDefinition.getDefaultsTo();
+						ColorDefinition defaultColorDefinition = themeRegistry
+								.findColor(defaultColorId);
+						selectAndReveal(defaultColorDefinition);
+					}
+				}
+				updateControls();
+			}
+		});
+
     }
 
     /* (non-Javadoc)
@@ -1061,7 +1228,6 @@
         setPreferenceStore(PrefUtil.getInternalPreferenceStore());
 
         final IThemeManager themeManager = aWorkbench.getThemeManager();
-
         themeChangeListener = new IPropertyChangeListener() {
             public void propertyChange(PropertyChangeEvent event) {
                 if (event.getProperty().equals(
@@ -1084,8 +1250,6 @@
         if (labelProvider != null)
 			labelProvider.dispose(); // nuke the old cache
 
-        currentTheme = manager.getCurrentTheme();
-
         if (colorRegistry != null)
 			colorRegistry.dispose();
         if (fontRegistry != null)
@@ -1125,6 +1289,14 @@
                 if (colorPreferencesToSet.get(id).equals(getColorAncestorValue(definition)))
 					return true;
             }
+		} else if (colorValuesToSet.containsKey(id)) {
+			if (definition.getValue() != null) { // value-based color
+				if (colorValuesToSet.get(id).equals(definition.getValue()))
+					return true;
+			} else {
+				if (colorValuesToSet.get(id).equals(getColorAncestorValue(definition)))
+					return true;
+			}
         } else {
             if (definition.getValue() != null) { // value-based color
                 if (getPreferenceStore().isDefault(ThemeElementHelper.createPreferenceKey(currentTheme, id)))
@@ -1150,6 +1322,16 @@
                 if (Arrays.equals((FontData[]) fontPreferencesToSet.get(id), ancestor))
 					return true;
             }
+		} else if (fontValuesToSet.containsKey(id)) {
+			if (definition.getValue() != null) { // value-based font
+				if (Arrays.equals((FontData[]) fontValuesToSet.get(id), definition.getValue()))
+					return true;
+			} else {
+				FontData[] ancestor = getFontAncestorValue(definition);
+				if (Arrays.equals((FontData[]) fontValuesToSet.get(id), ancestor))
+					return true;
+			}
+
         } else {
             if (definition.getValue() != null) { // value-based font
                 if (getPreferenceStore().isDefault(ThemeElementHelper.createPreferenceKey(currentTheme, id)))
@@ -1210,7 +1392,7 @@
         Arrays.sort(definitionsCopy, new IThemeRegistry.HierarchyComparator(definitions));
 
         for (int i = 0; i < definitionsCopy.length; i++) {
-			resetColor(definitionsCopy[i]);
+			resetColor(definitionsCopy[i], true);
 		}
     }
 
@@ -1237,7 +1419,8 @@
     protected void performDefaults() {
         performColorDefaults();
         performFontDefaults();
-        updateControls();
+		updateControls();
+		tree.getViewer().refresh();
     }
 
     private void performFontDefaults() {
@@ -1250,11 +1433,12 @@
         Arrays.sort(definitionsCopy, new IThemeRegistry.HierarchyComparator(definitions));
 
         for (int i = 0; i < definitionsCopy.length; i++) {
-			resetFont(definitionsCopy[i]);
+			resetFont(definitionsCopy[i], true);
 		}
     }
 
     private boolean performFontOk() {
+
         for (Iterator i = fontPreferencesToSet.keySet().iterator(); i.hasNext();) {
             String id = (String) i.next();
             String key = ThemeElementHelper.createPreferenceKey(currentTheme, id);
@@ -1297,8 +1481,8 @@
      * @param definition the <code>ColorDefinition</code> to reset.
      * @return whether any change was made.
      */
-    private boolean resetColor(ColorDefinition definition) {
-        if (!isDefault(definition)) {
+	private boolean resetColor(ColorDefinition definition, boolean force) {
+		if (force || !isDefault(definition)) {
             RGB newRGB;
             if (definition.getValue() != null)
                 newRGB = definition.getValue();
@@ -1314,10 +1498,10 @@
         return false;
     }
 
-    protected boolean resetFont(FontDefinition definition) {
-        if (!isDefault(definition)) {
+	protected boolean resetFont(FontDefinition definition, boolean force) {
+		if (force || !isDefault(definition)) {
             FontData[] newFD;
-            if (definition.getDefaultsTo() != null)
+			if (!force && definition.getDefaultsTo() != null)
                 newFD = getFontAncestorValue(definition);
             else
                 newFD = PreferenceConverter.getDefaultFontDataArray(getPreferenceStore(), ThemeElementHelper
@@ -1325,7 +1509,6 @@
 
             if (newFD != null) {
                 setFontPreferenceValue(definition, newFD);
-                setRegistryValue(definition, newFD);
                 return true;
             }
         }
@@ -1372,6 +1555,7 @@
                 setDescendantRegistryValues(children[i], datas);
                 setRegistryValue(children[i], datas);
                 fontValuesToSet.put(children[i].getId(), datas);
+				fontPreferencesToSet.remove(children[i].getId());
             }
         }
     }
@@ -1379,6 +1563,7 @@
     protected void setFontPreferenceValue(FontDefinition definition, FontData[] datas) {
         setDescendantRegistryValues(definition, datas);
         fontPreferencesToSet.put(definition.getId(), datas);
+		setRegistryValue(definition, datas);
     }
 
     /**
@@ -1607,24 +1792,40 @@
 
 	/**
 	 * Edit the currently selected font.
-	 * @param display the display to open the dialog on
+	 * 
+	 * @param display
+	 *            the display to open the dialog on
 	 * @since 3.2
 	 */
 	private void editFont(Display display) {
-		final FontDefinition definition = getSelectedFontDefinition();
+		editFont(getSelectedFontDefinition(), display);
+	}
+
+	/**
+	 * Edit the given font.
+	 * 
+	 * @param definition
+	 *            the font definition
+	 * @param display
+	 *            the display to open the dialog on
+	 * @since 3.7
+	 */
+	private void editFont(FontDefinition definition, Display display) {
 		if (definition != null) {
-			final FontDialog fontDialog = new FontDialog(fontChangeButton.getShell());
+			final FontDialog fontDialog = new FontDialog(getShell());
 			fontDialog.setFontList(getFontValue(definition));
 			final FontData data = fontDialog.open();
 			if (data != null) {
 				setFontPreferenceValue(definition, fontDialog.getFontList());
-				setRegistryValue(definition, fontDialog.getFontList());
 			}
 		}
 	}
 	
 	private void editColor(Display display) {
-		ColorDefinition definition = getSelectedColorDefinition();
+		editColor(getSelectedColorDefinition(), display);
+	}
+
+	private void editColor(ColorDefinition definition, Display display) {
 		if (definition == null)
 			return; 
 		RGB currentColor = colorRegistry.getRGB(definition.getId());
@@ -1642,17 +1843,25 @@
 	protected void updateControls() {
 		FontDefinition fontDefinition = getSelectedFontDefinition();
         if (fontDefinition != null) {
+			boolean isDefault = isDefault(fontDefinition);
+			boolean hasDefault = fontDefinition.getDefaultsTo() != null;
             fontChangeButton.setEnabled(true);
             fontSystemButton.setEnabled(true);
-            fontResetButton.setEnabled(!isDefault(fontDefinition));
+			fontResetButton.setEnabled(!isDefault);
+			editDefaultButton.setEnabled(hasDefault && isDefault);
+			goToDefaultButton.setEnabled(hasDefault);
             setCurrentFont(fontDefinition);
             return;
         }
         ColorDefinition colorDefinition = getSelectedColorDefinition();
         if (colorDefinition != null) {
+			boolean isDefault = isDefault(getSelectedColorDefinition());
+			boolean hasDefault = colorDefinition.getDefaultsTo() != null;
             fontChangeButton.setEnabled(true);
             fontSystemButton.setEnabled(false);
-            fontResetButton.setEnabled(!isDefault(getSelectedColorDefinition()));
+			fontResetButton.setEnabled(!isDefault);
+			editDefaultButton.setEnabled(hasDefault && isDefault);
+			goToDefaultButton.setEnabled(hasDefault);
             setCurrentColor(colorDefinition);
             return;
         }
@@ -1660,6 +1869,8 @@
         fontChangeButton.setEnabled(false);
         fontSystemButton.setEnabled(false);
         fontResetButton.setEnabled(false);
+		editDefaultButton.setEnabled(false);
+		goToDefaultButton.setEnabled(false);
 		descriptionText.setText(""); //$NON-NLS-1$
 	}
 	
@@ -1676,10 +1887,8 @@
 	}
 	
 	private void setCurrentFont(FontDefinition fontDefinition) {
-		FontData[] fontData = getFontValue(fontDefinition);
-		if (currentFont != null && !currentFont.isDisposed())
-			currentFont.dispose();
-		currentFont = new Font(previewComposite.getDisplay(), fontData);
+		currentFont = fontRegistry.get(fontDefinition.getId());
+		FontData[] fontData = currentFont.getFontData();
 
 		// recalculate sample text
 		StringBuffer tmp = new StringBuffer();
@@ -1707,10 +1916,7 @@
 	}
 	
 	public void setCurrentColor(ColorDefinition colorDefinition) {
-		RGB color = getColorValue(colorDefinition);
-		if (currentColor != null && !currentColor.isDisposed())
-			currentColor.dispose();
-		currentColor = new Color(previewComposite.getDisplay(), color);
+		currentColor = colorRegistry.get(colorDefinition.getId());
 		colorSampler.redraw();
 
 		String description = colorDefinition.getDescription();
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.properties b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.properties
index aedcb95..aa63b6d 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.properties
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2003, 2009 IBM Corporation and others.
+# Copyright (c) 2003, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -11,6 +11,8 @@
 
 openChange=&Edit...
 reset=&Reset
+editDefault=Ed&it Default...
+goToDefault=&Go to Default
 value=&Value
 colorsAndFonts=Colors and &Fonts (? = any character, * = any string):
 description=Descriptio&n:
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeRegistry.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeRegistry.java
index 7761de6..a2b468c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeRegistry.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,6 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import org.eclipse.ui.themes.IThemeManager;
 
 /**
@@ -94,11 +93,6 @@
         return (IThemeDescriptor) findDescriptor(getThemes(), id);
     }
 
-    /**
-     * @param descriptors
-     * @param id
-     * @return
-     */
     private IThemeElementDefinition findDescriptor(
             IThemeElementDefinition[] descriptors, String id) {
         int idx = Arrays.binarySearch(descriptors, id, ID_COMPARATOR);
@@ -198,12 +192,12 @@
     }
 
     /**
-     * Overlay the override onto the base definition.
-     * 
-     * @param defs the base definition
-     * @param overrides the override
-     * @return the overlayed element
-     */
+	 * Overlay the override onto the base definition.
+	 * 
+	 * @param original
+	 *            the base definition
+	 * @return the overlaid element
+	 */
     private IThemeElementDefinition overlay(IThemeElementDefinition original,
             IThemeElementDefinition overlay) {
         if (original instanceof ColorDefinition) {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/DummyTitlePathUpdater.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/DummyTitlePathUpdater.java
new file mode 100644
index 0000000..8314103
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/DummyTitlePathUpdater.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.tweaklets;
+
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * @since 3.7
+ * 
+ */
+public class DummyTitlePathUpdater extends TitlePathUpdater {
+
+	public void updateTitlePath(Shell window, String path) {
+		// do nothing
+	}
+
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/TabBehaviourMRU.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/TabBehaviourMRU.java
index 927144f..24d1c2c 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/TabBehaviourMRU.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/TabBehaviourMRU.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@
 
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.ui.IEditorInput;
@@ -29,7 +28,6 @@
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.WorkbenchPage;
 import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog;
 import org.eclipse.ui.internal.registry.EditorDescriptor;
 
 /**
@@ -98,11 +96,10 @@
 		};
 		int result = dialog.open();
 		if (result == 0) { // YES
-			ProgressMonitorDialog pmd = new ProgressMonitorJobsDialog(dialog
-					.getShell());
-			pmd.open();
-			dirtyEditor.getEditor(true).doSave(pmd.getProgressMonitor());
-			pmd.close();
+			IEditorPart editor = dirtyEditor.getEditor(true);
+			if (!page.getEditorManager().savePart(editor, editor, false)) {
+				return null;
+			}
 		} else if ((result == 2) || (result == -1)) {
 			return null;
 		}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/TitlePathUpdater.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/TitlePathUpdater.java
new file mode 100644
index 0000000..14d7da8
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/TitlePathUpdater.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.tweaklets;
+
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.ui.internal.tweaklets.Tweaklets.TweakKey;
+
+/**
+ * 
+ * Tweaklet to update the Shell when the active editor is changed
+ * 
+ * @since 3.7
+ * 
+ */
+public abstract class TitlePathUpdater {
+
+	public static TweakKey KEY = new Tweaklets.TweakKey(TitlePathUpdater.class);
+
+	static {
+		Tweaklets.setDefault(KEY, new DummyTitlePathUpdater());
+	}
+
+	public abstract void updateTitlePath(Shell window, String path);
+
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/PrefUtil.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/PrefUtil.java
index 28d2bc1..c1333cd 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/PrefUtil.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/PrefUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,8 +11,11 @@
 package org.eclipse.ui.internal.util;
 
 import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.osgi.service.prefs.BackingStoreException;
+
 
 /**
  * Internal utility class to help with getting/setting preferences.
@@ -47,8 +50,11 @@
     private static IPreferenceStore uiPreferenceStore;
 
     /**
-     * Sets the callback used to obtain and save the UI preference store.
-     */
+	 * Sets the callback used to obtain and save the UI preference store.
+	 * 
+	 * @param callback
+	 *            the callback
+	 */
     public static final void setUICallback(ICallback callback) {
         Assert.isTrue(uiCallback == null);
         uiCallback = callback;
@@ -96,6 +102,10 @@
      * Saves the internal preference store, if needed.
      */
     public static void saveInternalPrefs() {
-        WorkbenchPlugin.getDefault().savePluginPreferences();
+		try {
+			InstanceScope.INSTANCE.getNode(WorkbenchPlugin.PI_WORKBENCH).flush();
+		} catch (BackingStoreException e) {
+			WorkbenchPlugin.log(e);
+		}
     }
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesPage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesPage.java
index aa9ea05..edfbc17 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesPage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesPage.java
@@ -363,9 +363,10 @@
 		buttonComposite.setLayoutData(data);
 		buttonComposite.setFont(parentFont);
 		
-		selectAllButton = createButton(buttonComposite,
-				IDialogConstants.SELECT_ALL_ID,
-				PreferencesMessages.SelectionDialog_selectLabel, false);
+		selectAllButton = new Button(buttonComposite, SWT.PUSH);
+		selectAllButton.setText(PreferencesMessages.SelectionDialog_selectLabel);
+		selectAllButton.setData(new Integer(IDialogConstants.SELECT_ALL_ID));
+		setButtonLayoutData(selectAllButton);
 
 		SelectionListener listener = new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
@@ -376,9 +377,10 @@
 		selectAllButton.addSelectionListener(listener);
 		selectAllButton.setFont(parentFont);
 		
-		deselectAllButton = createButton(buttonComposite,
-				IDialogConstants.DESELECT_ALL_ID,
-				PreferencesMessages.SelectionDialog_deselectLabel, false);
+		deselectAllButton = new Button(buttonComposite, SWT.PUSH);
+		deselectAllButton.setText(PreferencesMessages.SelectionDialog_deselectLabel);
+		deselectAllButton.setData(new Integer(IDialogConstants.DESELECT_ALL_ID));
+		setButtonLayoutData(deselectAllButton);
 
 		listener = new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/intro/IIntroPart.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/intro/IIntroPart.java
index 89e87b6..9ebe0b4 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/intro/IIntroPart.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/intro/IIntroPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -195,7 +195,7 @@
 
     /**
      * Removes the given property listener from this intro part.
-     * Has no affect if an identical listener is not registered.
+     * Has no effect if an identical listener is not registered.
      *
      * @param listener a property listener
      */
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SWTKeySupport.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SWTKeySupport.java
index 28d3f6c..fe40a52 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SWTKeySupport.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SWTKeySupport.java
@@ -14,7 +14,6 @@
 import java.util.Iterator;
 import java.util.SortedSet;
 import java.util.TreeSet;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.KeyEvent;
 import org.eclipse.swt.widgets.Event;
@@ -23,7 +22,7 @@
 /**
  * A utility class for converting SWT events into key strokes.
  * 
- * @deprecated Please use org.eclipse.jface.bindings.keys.SWTKeySupport
+ * @deprecated Please use {@link org.eclipse.jface.bindings.keys.SWTKeySupport}
  * @since 3.0
  */
 public final class SWTKeySupport {
@@ -38,7 +37,7 @@
      */
     public static KeyStroke convertAcceleratorToKeyStroke(int accelerator) {
         final SortedSet modifierKeys = new TreeSet();
-        NaturalKey naturalKey = null;
+		NaturalKey naturalKey;
 
         if ((accelerator & SWT.ALT) != 0) {
 			modifierKeys.add(ModifierKey.ALT);
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java
index 30a201a..6d23bb1 100755
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -170,6 +170,8 @@
 
 	private ImageDescriptor contributedHoverIcon;
 
+	private IServiceLocator serviceLocator;
+
 	/**
 	 * Create a CommandContributionItem to place in a ContributionManager.
 	 * 
@@ -196,14 +198,15 @@
 		this.helpContextId = contributionParameters.helpContextId;
 		this.visibleEnabled = contributionParameters.visibleEnabled;
 		this.mode = contributionParameters.mode;
+		this.serviceLocator = contributionParameters.serviceLocator;
 
-		menuService = (IMenuService) contributionParameters.serviceLocator
+		menuService = (IMenuService) serviceLocator
 				.getService(IMenuService.class);
-		commandService = (ICommandService) contributionParameters.serviceLocator
+		commandService = (ICommandService) serviceLocator
 				.getService(ICommandService.class);
-		handlerService = (IHandlerService) contributionParameters.serviceLocator
+		handlerService = (IHandlerService) serviceLocator
 				.getService(IHandlerService.class);
-		bindingService = (IBindingService) contributionParameters.serviceLocator
+		bindingService = (IBindingService) serviceLocator
 				.getService(IBindingService.class);
 		IWorkbenchLocationService workbenchLocationService = (IWorkbenchLocationService) contributionParameters.serviceLocator.getService(IWorkbenchLocationService.class);
 		display = workbenchLocationService.getWorkbench().getDisplay();
@@ -258,7 +261,7 @@
 						// it's OK to not have a helpContextId
 					}
 				}
-				IWorkbenchLocationService wls = (IWorkbenchLocationService) contributionParameters.serviceLocator
+				IWorkbenchLocationService wls = (IWorkbenchLocationService) serviceLocator
 						.getService(IWorkbenchLocationService.class);
 				final IWorkbench workbench = wls.getWorkbench();
 				if (workbench != null && helpContextId != null) {
@@ -418,7 +421,8 @@
 	 * state.
 	 * </p>
 	 * 
-	 * @return The parameterized command for this contribution.
+	 * @return The parameterized command for this contribution. May be
+	 *         <code>null</code>.
 	 * 
 	 * @since 3.5
 	 */
@@ -632,10 +636,15 @@
 		ToolItem item = (ToolItem) widget;
 
 		String text = label;
+		String tooltip = label;
 		if (text == null) {
 			if (command != null) {
 				try {
 					text = command.getCommand().getName();
+					tooltip = command.getCommand().getDescription();
+					if (tooltip == null || tooltip.trim().length() == 0) {
+						tooltip = text;
+					}
 				} catch (NotDefinedException e) {
 					StatusManager.getManager().handle(
 							StatusUtil.newStatus(IStatus.ERROR,
@@ -650,7 +659,7 @@
 			item.setText(text);
 		}
 
-		String toolTipText = getToolTipText(text);
+		String toolTipText = getToolTipText(tooltip);
 		item.setToolTipText(toolTipText);
 
 		if (item.getSelection() != checkedState) {
@@ -992,4 +1001,27 @@
 		}
 
 	};
+
+	/**
+	 * Provide info on the rendering data contained in this item.
+	 * 
+	 * @return a {@link CommandContributionItemParameter}. Valid fields are
+	 *         serviceLocator, id, style, icon, disabledIcon, hoverIcon, label,
+	 *         helpContextId, mnemonic, tooltip. The Object will never be
+	 *         <code>null</code>, although any of the fields may be
+	 *         <code>null</code>.
+	 * @since 3.7
+	 */
+	public CommandContributionItemParameter getData() {
+		CommandContributionItemParameter data = new CommandContributionItemParameter(
+				serviceLocator, getId(), null, style);
+		data.icon = contributedIcon;
+		data.disabledIcon = contributedDisabledIcon;
+		data.hoverIcon = contributedHoverIcon;
+		data.label = contributedLabel;
+		data.helpContextId = helpContextId;
+		data.mnemonic = mnemonic;
+		data.tooltip = tooltip;
+		return data;
+	}
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/MenuUtil.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/MenuUtil.java
index bd9d9a7..c231d29 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/MenuUtil.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/MenuUtil.java
@@ -19,6 +19,15 @@
  * @noinstantiate This class is not intended to be instantiated by clients.
  */
 public class MenuUtil {
+	/**
+	 * 
+	 * Workbench Menu. On supported platforms, this menu is shown when no
+	 * workbench windows are active
+	 * 
+	 * @since 3.7
+	 * 
+	 * */
+	public final static String WORKBENCH_MENU = "menu:org.eclipse.ui.workbench.menu"; //$NON-NLS-1$
 	/** Main Menu */
 	public final static String MAIN_MENU = "menu:org.eclipse.ui.main.menu"; //$NON-NLS-1$
 	/** Main ToolBar (CoolBar) */
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/IWorkbenchAdapter3.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/IWorkbenchAdapter3.java
new file mode 100644
index 0000000..15bb096
--- /dev/null
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/IWorkbenchAdapter3.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Fair Isaac Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Fair Isaac Corporation <Hemant.Singh@Gmail.com> - Initial API and implementation - http://bugs.eclipse.org/326695
+ ******************************************************************************/
+
+package org.eclipse.ui.model;
+
+import org.eclipse.jface.viewers.StyledString;
+
+/**
+ * Extension interface for <code>IWorkbenchAdapter</code> that allows for
+ * StyledString support.
+ * 
+ * @see IWorkbenchAdapter
+ * @see WorkbenchLabelProvider
+ * @see BaseWorkbenchContentProvider
+ * @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider
+ * 
+ * @since 3.7
+ */
+public interface IWorkbenchAdapter3 {
+
+	/**
+	 * Returns the styled text label for the given element.
+	 * 
+	 * @param element
+	 *            the element to evaluate the styled string for
+	 * @return the styled string.
+	 */
+	public StyledString getStyledText(Object element);
+}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchAdapter.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchAdapter.java
index 235384e..af1c8c9 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchAdapter.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,10 +7,12 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Fair Isaac Corporation <Hemant.Singh@Gmail.com> - http://bugs.eclipse.org/333590
  *******************************************************************************/
 package org.eclipse.ui.model;
 
 import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.StyledString;
 import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.graphics.RGB;
 
@@ -21,7 +23,7 @@
  * @since 3.0
  */
 public abstract class WorkbenchAdapter implements IWorkbenchAdapter,
-        IWorkbenchAdapter2 {
+        IWorkbenchAdapter2, IWorkbenchAdapter3 {
     /**
      * The empty list of children.
      */
@@ -83,4 +85,17 @@
     public FontData getFont(Object element) {
         return null;
     }
-}
+
+    /**
+     * The default implementation of this <code>IWorkbenchAdapter3</code> method
+     * returns the {@link StyledString} which wraps the label of the element.
+     * Subclasses may override.
+     * 
+     * @return Return the {@link StyledString} which wraps the label of the
+     *         element.
+     * @since 3.7
+     */
+    public StyledString getStyledText(Object object) {
+        return new StyledString(getLabel(object));
+    }
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchLabelProvider.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchLabelProvider.java
index 57f8831..1d459f1 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchLabelProvider.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Fair Isaac Corporation <Hemant.Singh@Gmail.com> - http://bugs.eclipse.org/326695
  *******************************************************************************/
 package org.eclipse.ui.model;
 
@@ -17,11 +18,15 @@
 import org.eclipse.jface.resource.LocalResourceManager;
 import org.eclipse.jface.resource.ResourceManager;
 import org.eclipse.jface.viewers.DecoratingLabelProvider;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
 import org.eclipse.jface.viewers.IColorProvider;
 import org.eclipse.jface.viewers.IFontProvider;
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.LabelProviderChangedEvent;
+import org.eclipse.jface.viewers.StyledCellLabelProvider;
+import org.eclipse.jface.viewers.StyledString;
+import org.eclipse.jface.viewers.StyledString.Styler;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.FontData;
@@ -40,7 +45,7 @@
  * on the labels and icons of adaptable objects.
  */
 public class WorkbenchLabelProvider extends LabelProvider implements
-        IColorProvider, IFontProvider {
+        IColorProvider, IFontProvider, IStyledLabelProvider {
 
     /**
      * Returns a workbench label provider that is hooked up to the decorator
@@ -143,6 +148,19 @@
     }
 
 	/**
+	 * Returns the implementation of IWorkbenchAdapter3 for the given object.
+	 * 
+	 * @param o
+	 *            the object to look up.
+	 * @return IWorkbenchAdapter3 or<code>null</code> if the adapter is not
+	 *         defined or the object is not adaptable.
+	 * @since 3.7
+	 */
+	protected final IWorkbenchAdapter3 getAdapter3(Object o) {
+		return (IWorkbenchAdapter3) Util.getAdapter(o, IWorkbenchAdapter3.class);
+	}
+
+	/**
 	 * Lazy load the resource manager
 	 * 
 	 * @return The resource manager, create one if necessary
@@ -176,6 +194,51 @@
 		return (Image) getResourceManager().get(descriptor);
     }
 
+	/**
+	 * The default implementation of this returns the styled text label for the
+	 * given element.
+	 * 
+	 * @param element
+	 *            the element to evaluate the styled string for
+	 * 
+	 * @return the styled string.
+	 * 
+	 * @since 3.7
+	 */
+    public StyledString getStyledText(Object element) {
+        IWorkbenchAdapter3 adapter = getAdapter3(element);
+		if (adapter == null) {
+			// If adapter class doesn't implement IWorkbenchAdapter3 than use
+			// StyledString with text of element. Since the output of getText is
+			// already decorated, so we don't need to call decorateText again
+			// here.
+			return new StyledString(getText(element));
+		}
+		StyledString styledString = adapter.getStyledText(element);
+		// Now, re-use any existing decorateText implementation, to decorate
+		// this styledString.
+		String decorated = decorateText(styledString.getString(), element);
+		Styler styler = getDecorationStyle(element);
+		return StyledCellLabelProvider.styleDecoratedString(decorated, styler, styledString);
+    }
+
+	/**
+	 * Sets the {@link org.eclipse.jface.viewers.StyledString.Styler} to be used
+	 * for string decorations. By default the
+	 * {@link StyledString#DECORATIONS_STYLER decoration style}. Clients can
+	 * override.
+	 * 
+	 * @param element
+	 *            the element that has been decorated
+	 * 
+	 * @return return the decoration style
+	 * 
+	 * @since 3.7
+	 */
+	protected Styler getDecorationStyle(Object element) {
+		return StyledString.DECORATIONS_STYLER;
+	}
+
     /* (non-Javadoc)
      * Method declared on ILabelProvider
      */
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorSite.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorSite.java
index d3811ce..4aec47a 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorSite.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorSite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -532,6 +532,9 @@
 			if (oldSelectionProvider instanceof IPostSelectionProvider) {
 				((IPostSelectionProvider) oldSelectionProvider)
 						.removePostSelectionChangedListener(getPostSelectionChangedListener());
+			} else {
+				oldSelectionProvider
+						.removeSelectionChangedListener(getPostSelectionChangedListener());
 			}
 		}
 		if (selectionProvider != null) {
@@ -540,6 +543,8 @@
 			if (selectionProvider instanceof IPostSelectionProvider) {
 				((IPostSelectionProvider) selectionProvider)
 						.addPostSelectionChangedListener(getPostSelectionChangedListener());
+			} else {
+				selectionProvider.addSelectionChangedListener(getPostSelectionChangedListener());
 			}
 		}
 	}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBook.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBook.java
index 7a764bd..5f57aab 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBook.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBook.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -92,30 +92,24 @@
      * @param page the page to show
      */
     public void showPage(Control page) {
-
-        if (page == currentPage) {
-			return;
-		}
-        if (page.getParent() != this) {
+		if (page.isDisposed() || page.getParent() != this) {
 			return;
 		}
 
-        Control oldPage = currentPage;
-        currentPage = page;
+		currentPage = page;
 
         // show new page
-        if (page != null) {
-            if (!page.isDisposed()) {
-                page.setVisible(true);
-                layout(true);
-                //				if (fRequestFocusOnShowPage)
-                //					page.setFocus();
-            }
-        }
+		page.setVisible(true);
+		layout(true);
 
-        // hide old *after* new page has been made visible in order to avoid flashing
-        if (oldPage != null && !oldPage.isDisposed()) {
-			oldPage.setVisible(false);
+		// hide old (and all others) *after* new page has been made visible in
+		// order to avoid flashing
+		Control[] children = getChildren();
+		for (int i = 0; i < children.length; i++) {
+			Control child = children[i];
+			if (child != page && !child.isDisposed()) {
+				child.setVisible(false);
+			}
 		}
     }
 }
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBookView.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBookView.java
index 2c83875..77958f0 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBookView.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBookView.java
@@ -962,6 +962,8 @@
 				if (provider instanceof IPostSelectionProvider) {
 					((IPostSelectionProvider) provider)
 							.removePostSelectionChangedListener(postSelectionListener);
+				} else {
+					provider.removeSelectionChangedListener(postSelectionListener);
 				}
 			}
 		}
@@ -988,6 +990,8 @@
 				if (provider instanceof IPostSelectionProvider) {
 					((IPostSelectionProvider) provider)
 							.addPostSelectionChangedListener(postSelectionListener);
+				} else {
+					provider.addSelectionChangedListener(postSelectionListener);
 				}
 			}
 			// Update action bars.
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/AbstractStatusAreaProvider.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/AbstractStatusAreaProvider.java
index 90f89f1..c3e950e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/AbstractStatusAreaProvider.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/AbstractStatusAreaProvider.java
@@ -59,13 +59,9 @@
 
 	/**
 	 * This method is called before
-	 * {@link #createSupportArea(Composite, StatusAdapter)} to check if it will
-	 * display any significant implementation.
-	 * <p>
-	 * <b>Important</b>: This API is a part of work in progress and therefore is
-	 * suitable only for support area providers (which are presented in the
-	 * status dialog tray).
-	 * </p>
+	 * {@link #createSupportArea(Composite, StatusAdapter)} to check if the
+	 * {@link AbstractStatusAreaProvider} will display any significant
+	 * informations. If not, then it will not be presented at all.
 	 * 
 	 * @param statusAdapter
 	 *            - {@link StatusAdapter} for which status are will be
@@ -77,4 +73,22 @@
 	public boolean validFor(StatusAdapter statusAdapter) {
 		return true;
 	}
+
+	/**
+	 * This method is called before
+	 * {@link #createSupportArea(Composite, IStatus)} to check if the
+	 * {@link AbstractStatusAreaProvider} will display any significant
+	 * informations. If not, then it will not be presented at all.
+	 * 
+	 * This implementation wraps the {@link IStatus} into {@link StatusAdapter}
+	 * and calls {@link #validFor(StatusAdapter)}.
+	 * 
+	 * @param status
+	 *            - {@link IStatus} for which status are will be requested.
+	 * @return true if provider is able to process particular {@link IStatus}
+	 * @since 3.7
+	 */
+	public final boolean validFor(IStatus status) {
+		return validFor(new StatusAdapter(status));
+	}
 }
diff --git a/bundles/org.eclipse.ui.workbench/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.workbench/META-INF/MANIFEST.MF
index 6e4835d..0251f76 100644
--- a/bundles/org.eclipse.ui.workbench/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.workbench/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ui.workbench; singleton:=true
-Bundle-Version: 3.6.0.qualifier
+Bundle-Version: 3.8.0.qualifier
 Bundle-ClassPath: e4-workbench.jar,
  compatibility.jar,
  .
@@ -50,7 +50,7 @@
  org.eclipse.ui.internal.keys.model;x-internal:=true,
  org.eclipse.ui.internal.layout;x-friends:="org.eclipse.ui.presentations.r21,org.eclipse.ui.intro",
  org.eclipse.ui.internal.menus;x-friends:="org.eclipse.ui",
- org.eclipse.ui.internal.misc;x-internal:=true,
+ org.eclipse.ui.internal.misc;x-friends:="org.eclipse.ui",
  org.eclipse.ui.internal.model;x-internal:=true,
  org.eclipse.ui.internal.operations;x-internal:=true,
  org.eclipse.ui.internal.part;x-internal:=true,
@@ -69,7 +69,7 @@
  org.eclipse.ui.internal.statushandlers;x-internal:=true,
  org.eclipse.ui.internal.testing;x-internal:=true,
  org.eclipse.ui.internal.themes;x-friends:="org.eclipse.ui",
- org.eclipse.ui.internal.tweaklets;x-internal:=true,
+ org.eclipse.ui.internal.tweaklets;x-friends:="org.eclipse.ui.ide.application,org.eclipse.ui",
  org.eclipse.ui.internal.util;x-friends:="org.eclipse.ui,org.eclipse.ui.presentations.r21,org.eclipse.ui.ide",
  org.eclipse.ui.internal.wizards;x-internal:=true,
  org.eclipse.ui.internal.wizards.preferences;x-internal:=true,
diff --git a/bundles/org.eclipse.ui/.options b/bundles/org.eclipse.ui/.options
index 8822dc0..7812b81 100644
--- a/bundles/org.eclipse.ui/.options
+++ b/bundles/org.eclipse.ui/.options
@@ -6,10 +6,10 @@
 # Show all jobs in dialogs and the progress view including the support jobs
 org.eclipse.ui/debug/showAllJobs=false
 
-#Report if a stale job was found
+# Report if a stale job was found
 org.eclipse.ui/debug/job.stale=false
 
-#Report if an image cannot be resolved when it is declared
+# Report if an image cannot be resolved when it is declared
 org.eclipse.ui/debug/declaredImages=false
 
 # Enable extended SWT debugging of the Device.
@@ -27,6 +27,10 @@
 # Enable the trace of SWT graphics.
 org.eclipse.ui/trace/graphics=false
 
+# Enable tracing of perspective debugging code
+org.eclipse.ui/trace/perspectives=false
+
+
 ## Note that logging of all performance events are controlled by a central flag
 ## Turn this flag on to enable tracking of performance events
 ## org.eclipse.core.runtime/perf=true
diff --git a/bundles/org.eclipse.ui/.settings/.api_filters b/bundles/org.eclipse.ui/.settings/.api_filters
new file mode 100644
index 0000000..02ffa0a
--- /dev/null
+++ b/bundles/org.eclipse.ui/.settings/.api_filters
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?><component id="org.eclipse.ui" version="2">
+    <resource path="META-INF/MANIFEST.MF">
+        <filter id="0"/>
+        <filter id="923795461">
+            <message_arguments>
+                <message_argument value="3.7.0.qualifier"/>
+                <message_argument value="3.6.0.I20100603-1100"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="META-INF/MANIFEST.MF" type="org.eclipse.swt.browser.WebKit">
+        <filter id="305426566">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.browser.WebKit"/>
+                <message_argument value="org.eclipse.ui_3.6.0"/>
+            </message_arguments>
+        </filter>
+    </resource>
+</component>
\ No newline at end of file
diff --git a/bundles/org.eclipse.ui/buildnotes_workbench.html b/bundles/org.eclipse.ui/buildnotes_workbench.html
index ec42904..394ee69 100644
--- a/bundles/org.eclipse.ui/buildnotes_workbench.html
+++ b/bundles/org.eclipse.ui/buildnotes_workbench.html
@@ -4,14 +4,614 @@
 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="Build" content="Build">
-   <title>Eclipse Platform Release Notes (3.5) - JFace and Workbench</title>
+   <title>Eclipse Platform Release Notes (3.7) - JFace and Workbench</title>
 </head>
 
 <body>
 
-<h1>Eclipse Platform Build Notes (3.5)<br>
+<h1>Eclipse Platform Build Notes (3.7)<br>
 JFace and Workbench</h1>
 
+<p>Integration Build (June 27, 2011, 3:18 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=203950">Bug 203950</a>. [Viewers] TreeViewer and ViewFilter do not handle expand '+' correctly (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=345769">Bug 345769</a>. [Accessibility] The button in the top right hand corner of the Preferences Dialog does not have a tooltip/MSAA name (FIXED)<br>
+  </p>
+
+<p>Integration Build (June 01, 2011, 11:30 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=347491">Bug 347491</a>. Virtual tree test failures on Mac OS 10.6.7 (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 25, 2011, 11:42 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=345127">Bug 345127</a>. mac tests are failing due to os upgrade (REOPENED)<br>
+  </p>
+
+<p>Integration Build (May 22, 2011, 2:47 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=346543">Bug 346543</a>. [Contributions] [JFace] MenuManager should identify its widgets (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 18, 2011, 4:19 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=321564">Bug 321564</a>. [Dialogs] '<' in Open Resource not working as expected (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=344654">Bug 344654</a>. [EditorMgmt] Editors should be able to treat large files specially (e.g. deny opening huge files) (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 09, 2011, 10:25 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334362">Bug 334362</a>. Properties dialog: properties for closed project are sometimes wrong (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 06, 2011, 4:18 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=88788">Bug 88788</a>. [KeyBindings] request: Back/Forward keys and mouse buttons don't work with Eclipse (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=344883">Bug 344883</a>. EditorSelectionDialog#promptForExternalEditor() leaks an image (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 04, 2011, 7:39 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=191834">Bug 191834</a>. [JFace] class PopupDialog cannot be loaded in a non-UI thread (FIXED)<br>
+  </p>
+
+<p>Integration Build (April 26, 2011, 4:35 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=224703">Bug 224703</a>. [WorkingSets] Project explorer doesn't show recreated working set (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306352">Bug 306352</a>. [Preferences] PreferenceConverter does not store black color in preference store (ASSIGNED)<br>
+  </p>
+
+<p>Integration Build (April 25, 2011, 3:57 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=224703">Bug 224703</a>. [WorkingSets] Project explorer doesn't show recreated working set (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=343141">Bug 343141</a>. [Markers] Problems view: State lost after checking "Show all items" and clicking OK (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=343261">Bug 343261</a>. PlatformUITest.testWithoutDisplayAccess_sync() fails on Java 7 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=343721">Bug 343721</a>. [CommonNavigator] getParent of NavigatorContentServiceContentProvider does not return expected node. (FIXED)<br>
+  </p>
+
+<p>Integration Build (April 21, 2011, 4:23 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298961">Bug 298961</a>. [Presentations] [perfs] PresentationActivateTest#Presentation... test has an invalid duration (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=337240">Bug 337240</a>. [CommonNavigator] Mac OSX: Dragging file in Project Explorer creates backwards animation (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=343477">Bug 343477</a>. [CommonNavigagor] ProjectExplorer property sheet adapter factory is incorrectly declared (FIXED)<br>
+  </p>
+
+<p>Integration Build (April 20, 2011, 4:17 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=213290">Bug 213290</a>. [Dialogs] Browse Button in new Plug-in Project Wizard does not work when 'Location' path is null (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=228229">Bug 228229</a>. [JFace] Should we have a jfacefonts_vista.properties file? (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298952">Bug 298952</a>. [Progress] ProgressMonitorDialogPerformanceTest#testLongNames() runs too short on windows test machines (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=340136">Bug 340136</a>. [perfs] Performance regression in OpenCloseViewTest#showView:BookmarkView() (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=343160">Bug 343160</a>. Key bindings preference page has duplicated mnemonic (FIXED)<br>
+  </p>
+
+<p>Integration Build (April 18, 2011, 3:09 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=231081">Bug 231081</a>. [Markers] Polish Problems view's columns preferences (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=340978">Bug 340978</a>. [IDE] Add UI preference for new Preference: PREF_LIGHTWEIGHT_AUTO_REFRESH (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=341903">Bug 341903</a>. [Perspectives] Code-Bug in CustomizePerspectiveDialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=342685">Bug 342685</a>. EditorWithStateTest and WorkingSetTest fail on Java 7 (FIXED)<br>
+  </p>
+
+<p>Integration Build (April 11, 2011, 2:49 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=153280">Bug 153280</a>. [ActivityMgmt] Examples are shown even when capability disabled (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=231081">Bug 231081</a>. [Markers] Polish Problems view's columns preferences (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275910">Bug 275910</a>. [Widgets] PaintListener on Tree not invoked when item count is 0 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278402">Bug 278402</a>. [Import/Export] Export project does not export empty folders (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292198">Bug 292198</a>. [Viewers] Enable optimizations in font support for StyledCellLabelProvider (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=307545">Bug 307545</a>. [Workbench] heap status garbage collection/computation on UI thread (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=341447">Bug 341447</a>. [Markers] Problems view columns reset (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=341702">Bug 341702</a>. [JFace] CompositeImageDescriptor mixes images with alpha channel wrong (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=342003">Bug 342003</a>. [Markers] Failure in marker session tests (CLOSED)<br>
+  </p>
+
+<p>Integration Build (April 04, 2011, 2:48 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=88788">Bug 88788</a>. [KeyBindings] request: Back/Forward keys and mouse buttons don't work with Eclipse (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=126429">Bug 126429</a>. [ActivityMgmt] Activities should allow default enablement to be controlled by product definition (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=140425">Bug 140425</a>. [WorkbenchParts] Closing Workspace gives "Widget disposed too early!" in log (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302308">Bug 302308</a>. [Perspectives] NPE in PerspectiveHelper.addPart() (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312540">Bug 312540</a>. [LinkedResources] Copy resource in Navigator and Project Explorer always shows dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327004">Bug 327004</a>. [Viewers] Widget is disposed exception when refreshing TreeViewer after modifying a filter (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=335985">Bug 335985</a>. Adapt the KeyController model to the e4 model (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=338912">Bug 338912</a>. [Markers] Issues in Marker preferences dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=340978">Bug 340978</a>. [IDE] Add UI preference for new Preference: PREF_LIGHTWEIGHT_AUTO_REFRESH (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=341219">Bug 341219</a>. [MPE] MultiPageEditorSite may not end up forwarding post selection events (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=341259">Bug 341259</a>. [JFace] Add debug flag to find bad content providers that return multiple equal children (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=341327">Bug 341327</a>. [Commands] Handler conflict due to multiple instances of EditorActionBars for one editor id (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=341612">Bug 341612</a>. most tests won't run by default (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 28, 2011, 2:55 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=130854">Bug 130854</a>. [CellEditors] JFace TableViewer ignoring ICellEditor validator state (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323431">Bug 323431</a>. [ActivityMgmt] ConcurrentModificationException when activities added dynamically (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=340268">Bug 340268</a>. [Import/Export] Button label truncation on Import/Export Preferences dialogs (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=340342">Bug 340342</a>. [Contributions] Tooltips for command (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=340656">Bug 340656</a>. [Preferences] FileEditorsPreferencePage reuses a GridData instance for two different controls (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 21, 2011, 2:44 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297375">Bug 297375</a>. [Contributions] DynamicToolBarContributionItem needs to proxy more methods (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306352">Bug 306352</a>. [Preferences] PreferenceConverter does not store black color in preference store (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=339129">Bug 339129</a>. Perspective reset actions are not consistent. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=339713">Bug 339713</a>. [Markers] number of visible items not preserved when view is closed (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 14, 2011, 2:56 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=339129">Bug 339129</a>. Perspective reset actions are not consistent. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=339227">Bug 339227</a>. [Preferences] Startup and shutdown preference page: Restore defaults does not work as expected (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=339267">Bug 339267</a>. TrayDialog closes the tray if the help button is pressed with a cheat sheet open (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 10, 2011, 10:32 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=339481">Bug 339481</a>. [Markers] NegativeArraySizeException when trying to create Problems view (REOPENED)<br>
+  </p>
+
+<p>Integration Build (March 09, 2011, 4:10 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=339347">Bug 339347</a>. [Markers] Can't toggle item limits in Problems view any more without losing limit (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 09, 2011, 11:48 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=225601">Bug 225601</a>. Adopt API tooling for UI bundles (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283676">Bug 283676</a>. [FieldAssist] ControlDecoration should add @noextend API tooling tag (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284330">Bug 284330</a>. [JFace] Add isVisible API to ControlDecoration (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287454">Bug 287454</a>. [KeyBindings] F16-F19 unusable as shortcut keys in General -> Keys (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330206">Bug 330206</a>. Help button setHelpAvailable(), API is not working (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=339080">Bug 339080</a>. API tool errors in latest SWT (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 07, 2011, 11:30 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=338843">Bug 338843</a>. Update Display#getAppMenuBar() calls (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 06, 2011, 7:26 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=231081">Bug 231081</a>. [Markers] Polish Problems view's columns preferences (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283820">Bug 283820</a>. [Contexts] NPE on Keys preference page in ContextModel.filterContexts (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=318914">Bug 318914</a>. [WorkingSets] Provide a preference to set size of the list of most recently used working sets (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327396">Bug 327396</a>. [WorkingSets] updating of working sets during workbench restore can cause loss of working sets (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333417">Bug 333417</a>. [KeyBindings] Rename "Workbench" context and hide if not supported (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=335308">Bug 335308</a>. [JFace] JavaDoc of ControlDecoration#setDescriptionText is wrong (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=335960">Bug 335960</a>. [IDE] Update BuildAction to use new Workspace Build Configurations API (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=338056">Bug 338056</a>. SourceProviders through plugin.xml do not work (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=338843">Bug 338843</a>. Update Display#getAppMenuBar() calls (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 06, 2011, 7:23 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=231081">Bug 231081</a>. [Markers] Polish Problems view's columns preferences (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283820">Bug 283820</a>. [Contexts] NPE on Keys preference page in ContextModel.filterContexts (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=318914">Bug 318914</a>. [WorkingSets] Provide a preference to set size of the list of most recently used working sets (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327396">Bug 327396</a>. [WorkingSets] updating of working sets during workbench restore can cause loss of working sets (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333417">Bug 333417</a>. [KeyBindings] Rename "Workbench" context and hide if not supported (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=335308">Bug 335308</a>. [JFace] JavaDoc of ControlDecoration#setDescriptionText is wrong (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=335960">Bug 335960</a>. [IDE] Update BuildAction to use new Workspace Build Configurations API (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=338056">Bug 338056</a>. SourceProviders through plugin.xml do not work (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=338843">Bug 338843</a>. Update Display#getAppMenuBar() calls (FIXED)<br>
+  </p>
+
+<p>Integration Build (M�??�?�¤rz 07, 2011, 12:34 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331992">Bug 331992</a>. Workspace lock dialog not brought to front (FIXED)<br>
+  </p>
+
+<p>Integration Build (February 28, 2011, 2:52 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=72556">Bug 72556</a>. [KeyBindings] interactions: Mnemonics should not work across workbench parts (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=267424">Bug 267424</a>. [Perspectives] Closing a hidden editor (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333417">Bug 333417</a>. [KeyBindings] Rename "Workbench" context and hide if not supported (FIXED)<br>
+  </p>
+
+<p>Integration Build (February 22, 2011, 8:04 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=231081">Bug 231081</a>. [Markers] Polish Problems view's columns preferences (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297258">Bug 297258</a>. [IDE] Dialog font not honoured completely in the 'Local History' preference page (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305367">Bug 305367</a>. [DataBinding] Detail value observables for observable (list|set|map)s (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333417">Bug 333417</a>. [KeyBindings] Rename "Workbench" context and hide if not supported (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333684">Bug 333684</a>. [Dialogs] SWTExceptions when closing launch configuration dialog with the help up (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=335543">Bug 335543</a>. ProgressAnimationItem toolbar button selection opens ProgressView (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=335996">Bug 335996</a>. [Dialogs] TrayDialog must not include tray when saving size (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=337229">Bug 337229</a>. Make OpenStrategy's constant for post selection delay API (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=337347">Bug 337347</a>. Mention that IPartListener2 implementations can implement IPageChangedListener to get page change notifications (FIXED)<br>
+  </p>
+
+<p>Integration Build (February 14, 2011, 3:00 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=140101">Bug 140101</a>. [Markers] Focus cannot be set to "Creation time" field in the properties dialog of the task (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=231081">Bug 231081</a>. [Markers] Polish Problems view's columns preferences (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=269916">Bug 269916</a>. [EFS] [Accessibility]Provide shortcut key for "Choose file system" in New Report Project dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313899">Bug 313899</a>. [Progress] Every user-job causes a busy cursor to be shown for a minimum of 250ms (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325743">Bug 325743</a>. [PropertiesView] Blank display when maximize Properties view for a resource in a different view (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328708">Bug 328708</a>. Colors and Fonts preference page: Reset is broken (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=336682">Bug 336682</a>. [ErrorHandling]  testSupport2 swallows the exception (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=336684">Bug 336684</a>. [JFace] NPE in Tray Dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=336954">Bug 336954</a>. [Dialogs] OpenResourceDialog & FilteredResourcesSelectionDialog set bogus help context to parent shell (FIXED)<br>
+  </p>
+
+<p>Integration Build (February 07, 2011, 2:28 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=67035">Bug 67035</a>. [EditorMgmt] Hide Editors command should be renamed (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=105917">Bug 105917</a>. [IDE] Resource property page should mention the recursive 'isDerived' value (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=129309">Bug 129309</a>. [Workbench] allow 'Copy' on the status line (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=272153">Bug 272153</a>. [Wizards] Accessibility: Reading of back/next buttons by Screenreader (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302308">Bug 302308</a>. [Perspectives] NPE in PerspectiveHelper.addPart() (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313430">Bug 313430</a>. [Workbench] NPE during startup at WorkbenchKeyboard.isPartialMatch (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=317102">Bug 317102</a>. [EditorMgmt] Recursive editor activation when using AbstractMultiEditor (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329754">Bug 329754</a>. [Presentations] Misplaced view toolbar (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332367">Bug 332367</a>. [DataBinding] Performance of (WritableList|SimplePropertyObservableMap)#clear() (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334996">Bug 334996</a>. PageBook#showPage(Control) should set all other pages to invisible (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=335877">Bug 335877</a>. [ActivityMgmt] [QuickAccess] Disabled/filtered contributions are available in the Quick Access dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=335976">Bug 335976</a>. CCE when trying to expand the markers' view's 'Group By' submenu (FIXED)<br>
+  </p>
+
+<p>Integration Build (January 31, 2011, 3:01 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=55295">Bug 55295</a>. [ViewMgmt] View menu is shown even if all of its items are invisible (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=188700">Bug 188700</a>. [Quick Acces] Ctrl+3 dialog too small in High Contrast (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=196856">Bug 196856</a>. [EditorMgmt] 'Switch to Editor' dialog should persist dialog bounds even if the dialog has been closed regularly (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310475">Bug 310475</a>. [FastView] Fast view's system menu enables/disables unpredictably (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334362">Bug 334362</a>. Properties dialog: properties for closed project are sometimes wrong (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334636">Bug 334636</a>. [TabbedProperties] NullPointerException in TabbedPropertySheetPage.disposeContributor (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=335608">Bug 335608</a>. [BiDi] Cannot launch with com.ibm.icu.base (FIXED)<br>
+  </p>
+
+<p>Integration Build (January 26, 2011, 8:01 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332644">Bug 332644</a>. [EditorMgmt] DefaultPartList leaks shells (REOPENED)<br>
+  </p>
+
+<p>Integration Build (January 26, 2011, 10:16 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=335318">Bug 335318</a>. Improve wording of new derived resource encoding option (FIXED)<br>
+  </p>
+
+<p>Integration Build (January 24, 2011, 12:23 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=2265">Bug 2265</a>. New project wizard bases icon on the closed icon (1GEG3RS) (FIXED)<br>
+  </p>
+
+<p>Integration Build (January 24, 2011, 7:44 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+  </p>
+
+<p>Integration Build (January 21, 2011, 4:08 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=303889">Bug 303889</a>. [BiDi] BIDI3.6: Triggering Eclipse mirroring and Bidi-script based languages translation (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334236">Bug 334236</a>. [Import/Export] "Copy projects into workspace" should not select all projects on change (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334524">Bug 334524</a>. [Commands] Loosing current selection of view after perspective switch (FIXED)<br>
+  </p>
+
+<p>Integration Build (January 17, 2011, 3:03 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300472">Bug 300472</a>. [Dialogs] [JFace] Provide accessor for dialog messages (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325899">Bug 325899</a>. [Preferences] [accessibility] Preferences Dialog menu button needs a tooltip (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333590">Bug 333590</a>. [Workbench] WorkbenchAdapterFactory can't adapt workbench adapter extension interfaces (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333684">Bug 333684</a>. [Dialogs] SWTExceptions when closing launch configuration dialog with the help up (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333970">Bug 333970</a>. [ErrorHandling] Test failures in official build: at org.eclipse.ui.tests.statushandlers.StatusDialogManagerTest.testBug276371(StatusDialogManagerTest.java:638) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334125">Bug 334125</a>. StatusPart.createShowLogButton(..) leaks an image (FIXED)<br>
+  </p>
+
+<p>Integration Build (January 10, 2011, 3:03 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=74073">Bug 74073</a>. [Mac] Closing window should not exit App (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=97787">Bug 97787</a>. [EditorMgmt] Untitled Text Editor - Can lose unsaved content when reusing text editors (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=127852">Bug 127852</a>. [UX][Help] Help button should be a toggle (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=207510">Bug 207510</a>. Call to IResource.setEncoding() persists derived file's encoding setting in .settings\org.eclipse.core.resources.prefs (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=208626">Bug 208626</a>. [KeyBindings] Mnemonic gets hidden if there is existing Alt key binding (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=221172">Bug 221172</a>. [Commands] [ViewMgmt] Window > Show View doesn't open existing instances of multi-instance views (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=235657">Bug 235657</a>. [Markers][Undo] regression: can no longer undo marker operations (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=270007">Bug 270007</a>. [GlobalActions] Registering actions should not be required to use standard org.eclipse.ui commands (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300368">Bug 300368</a>. Resource Working Set shows inexistent project that cannot be deleted in Package Explorer (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305216">Bug 305216</a>. [EditorMgmt] Focus lost when closing a dirty editor from the editor selection dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306611">Bug 306611</a>. [DataBinding] Converted value property (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313303">Bug 313303</a>. [KeyBindings] Add "shortcuts" keywords to Keys preference page (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323444">Bug 323444</a>. [Undo] [Commands] java.util.ConcurrentModificationException when trying to get the undo history from a source viewer (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=324078">Bug 324078</a>. [IDE] Cannot create a virtual TreeViewer in ContentOutlinePage (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=324663">Bug 324663</a>. [ActivityMgmt] Enabling activity through core expression overrides pattern binding, causing exception (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326340">Bug 326340</a>. [Workbench] Removing recent workspaces doesn't remove them from the "Switch Workspace" menu (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326695">Bug 326695</a>. [Workbench] WorkbenchLabelProvider and IWorkbenchAdapter doesn't support StyledString (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331335">Bug 331335</a>. [Wizards] Bad implementation of IWizard's dispose() method can prevent the dialog from closing (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331348">Bug 331348</a>. [DataBinding] Make get<Value|Set|List|Map> methods of properties non-final (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331621">Bug 331621</a>. Workbench throws NPE's on initial startup after install when bundles are started programmatically in earlyStartup() (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331665">Bug 331665</a>. Add UI for Bug 207510 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331909">Bug 331909</a>. [Workbench] Intermittent test failure in PlatformUITest.testWithoutDisplayAccess_sync() (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332123">Bug 332123</a>. [Examples] Get rid of warnings in 'org.eclipse.ui.examples.propertysheet' (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332216">Bug 332216</a>. [ViewMgmt] ErrorViewPart must implement setFocus() method (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332644">Bug 332644</a>. [EditorMgmt] DefaultPartList leaks shells (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332930">Bug 332930</a>. Simplify code from bug 207510 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333101">Bug 333101</a>. [Preferences] Redundant preferences node creation in LineDelimiterEditor (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333577">Bug 333577</a>. [Win32] WindowXP command "Close Group" can not close all the Eclipse window that in one group (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333584">Bug 333584</a>. [GlobalActions] Save does not work (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333634">Bug 333634</a>. Cannot undo deletion of markers (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333689">Bug 333689</a>. [About] About dialog text - needs to not cache system property values (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333741">Bug 333741</a>. 9 Errors in WorkspaceOperationsTests (FIXED)<br>
+  </p>
+
+<p>Integration Build (December 13, 2010, 6:53 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+  </p>
+
+<p>Integration Build (Dezember 08, 2010, 1:32 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=162079">Bug 162079</a>. [PropertiesView] Properties view should be a post selection listener (FIXED)<br>
+  </p>
+
+<p>Integration Build (December 06, 2010, 11:53 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=110684">Bug 110684</a>. [PresentationAPI] [RCP] [EditorMgmt] Workbench sometimes restores multiple empty editor folders (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=162079">Bug 162079</a>. [PropertiesView] Properties view should be a post selection listener (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=207773">Bug 207773</a>. [Workbench] IMemento reference incomplete (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=244316">Bug 244316</a>. [WorkbenchLauncher] File->"Switch Workspace"->Other does nothing first time (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309746">Bug 309746</a>. [CommonNavigator] intermittent test failure in org.eclipse.ui.tests.navigator.SorterTest.testSorterContentOverride (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331524">Bug 331524</a>. WorkbenchPreferenceDialog overrides client focus (was: [preferences] Configuring problem severity via hover broken) (FIXED)<br>
+  </p>
+
+<p>Integration Build (November 29, 2010, 5:07 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111525">Bug 111525</a>. [Import/Export]  Import file system doesn't include the top folder you select (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=231081">Bug 231081</a>. [Markers] Polish Problems view's columns preferences (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=319139">Bug 319139</a>. [Import/Export] Cocoa: Import existing projects into workspace has misaligned text fields (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330206">Bug 330206</a>. Help button setHelpAvailable(), API is not working (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331317">Bug 331317</a>. Duplicate mnemonic 'D' in properties->Resource page (FIXED)<br>
+  </p>
+
+<p>Integration Build (November 22, 2010, 3:22 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=173095">Bug 173095</a>. [EditorMgmt] "Open With > Other..." dialog should set focus on the list on open (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=231081">Bug 231081</a>. [Markers] Polish Problems view's columns preferences (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=244316">Bug 244316</a>. [WorkbenchLauncher] File->"Switch Workspace"->Other does nothing first time (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293459">Bug 293459</a>. [Markers] Markers view does not persist column placements across workbench restart (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327250">Bug 327250</a>. [jface] Clicking on file in single-click mode sometimes doesn't open file (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328599">Bug 328599</a>. [Wizards] cancelable parameter does not disable Wizard progress bar cancel button (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329901">Bug 329901</a>. [Dialogs] new API DialogSettings#getOrCreateSection(IDialogSettings, String) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330373">Bug 330373</a>. IllegalStateException: Workbench has not been created yet (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330553">Bug 330553</a>. [Import/Export] Importing a project that exists in workspace location merges the contents (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330590">Bug 330590</a>. Add Bookmark should also work for folders and projects (FIXED)<br>
+  </p>
+
+<p>Integration Build (November 15, 2010, 3:15 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=5023">Bug 5023</a>. [EditorMgmt] associations: Editor selection dialog needs to be multiselect (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=51339">Bug 51339</a>. [EditorMgmt] 'Switch to Editor' dialog prompts for each dirty editor individually instead of batching them (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=207773">Bug 207773</a>. [Workbench] IMemento reference incomplete (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=227087">Bug 227087</a>. [Commands] Nicer 'Show view' command label (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=244011">Bug 244011</a>. [Wizards] Import from Filesystem dialog does not always give file-list (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=270007">Bug 270007</a>. [GlobalActions] Registering actions should not be required to use standard org.eclipse.ui commands (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279781">Bug 279781</a>. [Import/Export] Recursive addition problem in Import  > Existing projects into workspace (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299295">Bug 299295</a>. [KeyBindings] Exporting key preferences to CSV does not allow context being null (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300372">Bug 300372</a>. [Commands] Doing Ctrl+3 build id command fails with InvalidArgumentException (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323393">Bug 323393</a>. [Contributions] Service initialization wrong! Sources must be initialized before Handlers (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323489">Bug 323489</a>. [KeyBindings] Reduce memory footprint of BindingManager (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323528">Bug 323528</a>. [EditorMgmt] Need getActiveEditorInput(ExecutionEvent) and getActiveEditorInputChecked(ExecutionEvent) in HandlerUtil (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323713">Bug 323713</a>. [DND] Drop affordance drawn in minimized stack but throws IAE when mouse button is released (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327161">Bug 327161</a>. [Commands] Overlapping mnemonic in new folder wizard (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328763">Bug 328763</a>. [Commands] CommandContributionItem's getCommand() method should spec that it 'null' may be returned (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329751">Bug 329751</a>. Duplicate mnemonic 'D' on 'Appearance' preference page (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329835">Bug 329835</a>. [EditorMgmt] WorkbenchEditorsDialog's save operation simply reuses a progress monitor repeatedly for every editor to be saved (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329871">Bug 329871</a>. [Commands] Stackoverflow in BindingSystem (NEW)<br>
+  </p>
+
+<p>Integration Build (November 08, 2010, 3:04 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294628">Bug 294628</a>. [PropertiesDialog] Properties Dialog : need support for showing properties on multiple selection (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297370">Bug 297370</a>. [QuickAccess] Text at bottom of dialog should say that pressing ctrl-3 will change filtering (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305200">Bug 305200</a>. [EditorMgmt] FileEditorMappingContentProvider could just be replaced by ArrayContentProvider (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323243">Bug 323243</a>. [IDE] Unhandled event loop exception when cancelling open project (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323708">Bug 323708</a>. [DND] Previously maximized view can get into a state where it can no longer be maximized (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329002">Bug 329002</a>. Load hidden Problems views on workbench start (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329123">Bug 329123</a>. [Mac] Unhandled event loop exception when closing Error Log Event Details (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329199">Bug 329199</a>. ErrorEditorPart must implement setFocus() (FIXED)<br>
+  </p>
+
+<p>Integration Build (October 27, 2010, 3:48 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=64958">Bug 64958</a>. [ASTRewrite] Moving static members doesn't fully respect formatter settings (WONTFIX)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=72374">Bug 72374</a>. [Dialogs] Provide a generic info pop dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=74604">Bug 74604</a>. [KeyBindings] Chose key to edit from View pane (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=125632">Bug 125632</a>. [Commands] request: enhance command to show preferences dialog with parameter identifying which page to show (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=270007">Bug 270007</a>. [GlobalActions] Registering actions should not be required to use standard org.eclipse.ui commands (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326673">Bug 326673</a>. [WorkingSets] FileNotFoundException in WorkingSetManager (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328719">Bug 328719</a>. [preferences] Colors and Fonts page should have keyword "text font" (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328805">Bug 328805</a>. Some Tests with unused local variables (NEW)<br>
+  </p>
+
+<p>Integration Build (October 25, 2010, 7:45 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+  </p>
+
+<p>Integration Build (October 19, 2010, 3:21 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170244">Bug 170244</a>. [Markers] Problems view doesn't have a meaningful fast view icon (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=217955">Bug 217955</a>. [WorkingSets] API to get the IWorkingSets that are part of an aggregating IWorkingSet (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=252587">Bug 252587</a>. [Markers] Problems view should enable 'Quick Fix' for multiple selection (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=259094">Bug 259094</a>. [Markers] QuickFixPage should take advantage of IMarkerResolution2#getImage() (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=274631">Bug 274631</a>. [WorkingSets] Save/restore of aggregate workingset broken by changes from Bug 217955. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297337">Bug 297337</a>. [Markers] Markers views should set its part tool tip to its content description when hidden (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310612">Bug 310612</a>. [Markers] Quick fix wizard should not let the user finish if nothing has been selected (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325899">Bug 325899</a>. [Preferences] [accessibility] Preferences Dialog menu button needs a tooltip (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326000">Bug 326000</a>. [Markers] Problems view enhancements (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326312">Bug 326312</a>. [Preferences] NullPointerException when pressing ok in perspectives preferences, when all perspectives are closed (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326673">Bug 326673</a>. [WorkingSets] FileNotFoundException in WorkingSetManager (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327192">Bug 327192</a>. Concurrent access to file while decorating (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327503">Bug 327503</a>. [Mac] On cocoa, Shell could be decorated with the titlePath property (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327648">Bug 327648</a>. [Markers] Quick Fix dialog should only select the markers that are selected in the view (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327653">Bug 327653</a>. [Dialogs] FilteredItemsSelectionDialog burns a lot of time in LinkedList#contains(..) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327690">Bug 327690</a>. WizardHandlers could update the contribution's UI properties (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327788">Bug 327788</a>. [DynamicGUI] UIExtensionTracker calling Display.syncExec() on disposed Display (FIXED)<br>
+  </p>
+
+<p>Integration Build (October 12, 2010, 4:14 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=52053">Bug 52053</a>. [RCP] IWorkbenchWindowConfigurer defaults should be documented, consistent (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170486">Bug 170486</a>. [Mac] confusing "Eclipse UI" element in Startup and Shutdown (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=201696">Bug 201696</a>. [Mac] window hard to resize (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=262032">Bug 262032</a>. DeadlockDetector may create deadlock (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=267173">Bug 267173</a>. [Linked Resources] Data loss when replacing one linked resource with another using drag and drop (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276185">Bug 276185</a>. [Contributions] Need  getCommandContributionItemParameter in CommandContributionItem (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=321333">Bug 321333</a>. [Progress] A Job's icon could be used in TaskItem's overlay (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=321789">Bug 321789</a>. [Mac] Mac: Standard app-menu About and Preferences items require redundant menu items elsewhere (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325825">Bug 325825</a>. [preferences] make it easier to set font for all text based editors (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327250">Bug 327250</a>. [jface] Clicking on file in single-click mode sometimes doesn't open file (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327503">Bug 327503</a>. [Mac] On cocoa, Shell could be decorated with the titlePath property (REOPENED)<br>
+  </p>
+
+<p>Integration Build (October 05, 2010, 11:50 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=70140">Bug 70140</a>. [RCP] [Help] Help action fails silently if Help UI not installed (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=201650">Bug 201650</a>. [Actions] Build Project is disabled when going from problems view to an editor (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=259581">Bug 259581</a>. [Import/Export] WizardExportResourcesPage's Finish button isn't sensitive to Select/Deselect All (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=270007">Bug 270007</a>. [GlobalActions] Registering actions should not be required to use standard org.eclipse.ui commands (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=314623">Bug 314623</a>. [Mac] Toggle toolbar button is missing in the first workbench window (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=322401">Bug 322401</a>. [LinkedResources] Linked Resources properties page should have a Remove button (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323575">Bug 323575</a>. When creating a new file, the @since tag should be 3.7 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326521">Bug 326521</a>. Convert line delimiter action enablement is broken (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326924">Bug 326924</a>. Compiler warnings in N20101003-2000 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326980">Bug 326980</a>. Warnings in CocoaUIEnhancer (FIXED)<br>
+  </p>
+
+<p>Integration Build (September 28, 2010, 3:25 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304747">Bug 304747</a>. [Progress] set IProgressConstants.SHOW_IN_TASKBAR_ICON_PROPERTY on job for BuildAction when build type is full build (FIXED)<br>
+  </p>
+
+<p>Integration Build (September 13, 2010, 8:56 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=320616">Bug 320616</a>. [JFace] New default fonts on Windows 7 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=320951">Bug 320951</a>. [Viewers] ContentViewer gives bad error message when widget is disposed (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=324138">Bug 324138</a>. [ErrorHandling] Copy action from error dialog causes invalid argument exception (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=324254">Bug 324254</a>. [Mac] E3.x's CocoaUIEnhancer and e4's CocoaUIHandler needlessly disable the Services menu (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=324485">Bug 324485</a>. [Metadata] org.eclipse.jface.tests.databinding.conformance bundle should have four part version number (FIXED)<br>
+  </p>
+
+<p>Integration Build (September 06, 2010, 10:32 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299123">Bug 299123</a>. [DataBinding] SWTObservables.observeValue/Max/Min should support SWT Slider (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312926">Bug 312926</a>. [DataBinding] TreeViewerUpdater does not rebuild children (FIXED)<br>
+  </p>
+
+<p>Integration Build (August 31, 2010, 12:05 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323431">Bug 323431</a>. [ActivityMgmt] ConcurrentModificationException when activities added dynamically (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323727">Bug 323727</a>. Quit confirmation should activate window first (FIXED)<br>
+  </p>
+
+<p>Integration Build (August 24, 2010, 1:28 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280157">Bug 280157</a>. [DataBinding] MenuItem enabled is missing (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=307255">Bug 307255</a>. [DataBinding] Observable factories of pojo/bean properties do not decorate observables (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=308307">Bug 308307</a>. [DataBinding] BeanPropertyHelper.writeProperty() should give more information in an exceptional case. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=321983">Bug 321983</a>. [DataBinding] Identical instances of DecoratingObservableCollection should always be equal() (FIXED)<br>
+  </p>
+
+<p>Integration Build (August 17, 2010, 7:54 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289395">Bug 289395</a>. [DataBinding] Widget.tooltipText() property should not convert null to "" (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=322396">Bug 322396</a>. [JFace] Orca cannot read Eclipse status line (FIXED)<br>
+  </p>
+
+<p>Integration Build (August 04, 2010, 10:51 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=230082">Bug 230082</a>. [Viewers] Typo in ComboBoxViewerCellEditor (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312959">Bug 312959</a>. [Import/Export] importing file from big disk hangs UI (FIXED)<br>
+  </p>
+
+<p>Integration Build (July 30, 2010, 2:13 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311963">Bug 311963</a>. [Mac] [Commands] Command from 'org.eclipse.ui.cocoa' fragment references category defined in 'org.eclipse.ui.cheatsheets' (FIXED)<br>
+  </p>
+
+<p>Integration Build (July 26, 2010, 3:13 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310614">Bug 310614</a>. [Markers] Quick fix wizard has crazy focus problem (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313761">Bug 313761</a>. [Viewers][doc] ViewerDropAdapter.getSelectedObject impl doesn't match javadoc (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=319600">Bug 319600</a>. [Viewers] CheckboxTableViewer.getCheckedElements based on virtual table returns null data objects (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=319852">Bug 319852</a>. [Dialogs] Open Resource now interprets "." as "*.", unlike 3.5 (FIXED)<br>
+  </p>
+
+<p>Integration Build (July 12, 2010, 3:30 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=199404">Bug 199404</a>. An editor selected with Ctrl-E is not getting focus if it already visible. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275702">Bug 275702</a>. [TabbedProperties] TabbedProperyRegistry needs to be disposed (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277862">Bug 277862</a>. [navigate] Show hand pointer for single-click tables and trees (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279748">Bug 279748</a>. [Progress] Job with property KEEP_PROPERTY doesn't keep if status not Status.OK_STATUS (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292198">Bug 292198</a>. [Viewers] Enable optimizations in font support for StyledCellLabelProvider (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292212">Bug 292212</a>. [Viewers] Performance issue in doing a TreeViewer.refresh() on a node in expanded state and containing thousands of children (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=315332">Bug 315332</a>. [Viewers] [Provider] ClassCastException happened at jface when selecting tree with using picture-capture software. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=315620">Bug 315620</a>. [Progress] WorkbenchWindow is leaked (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=315936">Bug 315936</a>. [IDE] Encoding field editor: "determined from content" is ambiguous (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=317076">Bug 317076</a>. [Dialogs] PopupDialog leaks Tracker (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=317287">Bug 317287</a>. WorkbenchActionBuilder does not dispose its workbench actions (INVALID)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=317803">Bug 317803</a>. [CommonNavigator] NPE in WorkingSetsContentProvider (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=319509">Bug 319509</a>. [Viewers] Empty rows in CheckboxTableViewer with virtual table (FIXED)<br>
+  </p>
+
 <p>Integration Build (June 03, 2010, 10:58 a.m.)</p>
   <p>Problem reports updated</p>
   <p>
diff --git a/bundles/org.eclipse.ui/plugin.properties b/bundles/org.eclipse.ui/plugin.properties
index ed54609..0a1dae3 100644
--- a/bundles/org.eclipse.ui/plugin.properties
+++ b/bundles/org.eclipse.ui/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2010 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -157,8 +157,8 @@
 command.helpSearch.name = Help Search
 command.dynamicHelp.description = Open the dynamic help
 command.dynamicHelp.name = Dynamic Help
-command.hideShowEditors.description = Hide all editors
-command.hideShowEditors.name = Hide Editors
+command.hideShowEditors.description = Toggles the visibility of the editor area
+command.hideShowEditors.name = Toggle Editor Area Visibility
 command.import.description = Import
 command.import.importWizardIdParameter.name = Import Wizard
 command.import.name = Import
@@ -261,6 +261,7 @@
 command.showView.name = Show View
 command.showView.description = Shows a particular view
 command.showView.viewIdParameter = View
+command.showView.secondaryIdParameter = Secondary Id
 command.showView.makeFastParameter = As FastView
 command.switchToEditor.description = Switch to an editor
 command.switchToEditor.name = Switch to Editor
@@ -283,6 +284,8 @@
 context.window.description = A window is open
 context.actionSet.name = Action Set
 context.actionSet.description = Parent context for action sets
+context.workbenchMenu.name = Workbench Menu
+context.workbenchMenu.description = When no Workbench windows are active
 
 keyConfiguration.default.description = Default Key Configuration
 keyConfiguration.default.name = Default
@@ -348,4 +351,4 @@
 installationPage.main.name = About
 installationPage.system.name = Configuration
 installationPage.plugins.name = Plug-ins
-activeContextInfo.name = Show activeContext Info
\ No newline at end of file
+activeContextInfo.name = Show activeContext Info
diff --git a/bundles/org.eclipse.ui/plugin.xml b/bundles/org.eclipse.ui/plugin.xml
index c7a9cb7..8cd5378 100644
--- a/bundles/org.eclipse.ui/plugin.xml
+++ b/bundles/org.eclipse.ui/plugin.xml
@@ -94,6 +94,11 @@
             id="org.eclipse.ui.contexts.actionSet"
             name="%context.actionSet.name">
       </context>
+      <context
+            description="%context.workbenchMenu.description"
+            id="org.eclipse.ui.contexts.workbenchMenu"
+            name="%context.workbenchMenu.name">
+      </context>
    </extension>
    
    <extension point="org.eclipse.ui.bindings">
@@ -290,6 +295,16 @@
             commandId="org.eclipse.ui.window.maximizePart"
             sequence="M1+M"
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" />
+      <!-- Cmd+M is used for Minimize Window in cocoa -->
+      <key
+            platform="cocoa"
+            sequence="M1+M"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" />
+      <key
+            commandId="org.eclipse.ui.window.maximizePart"
+            platform="cocoa"
+            sequence="M4+M"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" />
       <key
             commandId="org.eclipse.ui.window.nextEditor"
             sequence="M1+F6"
@@ -717,16 +732,19 @@
             name="%command.helpContents.name"
             description="%command.helpContents.description"
             categoryId="org.eclipse.ui.category.help"
+            defaultHandler="org.eclipse.ui.internal.handlers.HelpContentsHandler"
             id="org.eclipse.ui.help.helpContents" />
       <command
             name="%command.helpSearch.name"
             description="%command.helpSearch.description"
             categoryId="org.eclipse.ui.category.help"
+            defaultHandler="org.eclipse.ui.internal.handlers.HelpSearchHandler"
             id="org.eclipse.ui.help.helpSearch" />
       <command
             name="%command.dynamicHelp.name"
             description="%command.dynamicHelp.description"
             categoryId="org.eclipse.ui.category.help"
+            defaultHandler="org.eclipse.ui.internal.handlers.DynamicHelpHandler"
             id="org.eclipse.ui.help.dynamicHelp" />
       <command
             name="%command.quickStart.name"
@@ -802,15 +820,18 @@
             name="%command.save.name"
             description="%command.save.description"
             categoryId="org.eclipse.ui.category.file"
+            defaultHandler="org.eclipse.ui.internal.handlers.SaveHandler"
             id="org.eclipse.ui.file.save" />
       <command
             name="%command.saveAs.name"
             description="%command.saveAs.description"
+            defaultHandler="org.eclipse.ui.internal.handlers.SaveAsHandler"
             categoryId="org.eclipse.ui.category.file"
             id="org.eclipse.ui.file.saveAs" />
       <command
             name="%command.saveAll.name"
             description="%command.saveAll.description"
+            defaultHandler="org.eclipse.ui.internal.handlers.SaveAllHandler"
             categoryId="org.eclipse.ui.category.file"
             id="org.eclipse.ui.file.saveAll" />
       <command
@@ -1087,9 +1108,15 @@
             id="org.eclipse.ui.window.hideShowEditors" />
       <command
             name="%command.lockToolBar.name"
+            defaultHandler="org.eclipse.ui.internal.handlers.LockToolBarHandler"
             description="%command.lockToolBar.description"
             categoryId="org.eclipse.ui.category.window"
-            id="org.eclipse.ui.window.lockToolBar" />
+            id="org.eclipse.ui.window.lockToolBar" >
+         <state
+               class="org.eclipse.ui.handlers.RegistryToggleState:false"
+               id="org.eclipse.ui.commands.toggleState">
+         </state>
+      </command>
       <command
             name="%command.pinEditor.name"
             description="%command.pinEditor.description"
@@ -1133,6 +1160,10 @@
       			id="org.eclipse.ui.views.showView.viewId"
       			name="%command.showView.viewIdParameter"
       			values="org.eclipse.ui.internal.registry.ViewParameterValues" />
+      		<commandParameter
+      			id="org.eclipse.ui.views.showView.secondaryId"
+      			name="%command.showView.secondaryIdParameter"
+      			optional="true"/>
         <commandParameter
               id="org.eclipse.ui.views.showView.makeFast"
               name="%command.showView.makeFastParameter"
@@ -1326,6 +1357,14 @@
             commandId="org.eclipse.ui.perspectives.showPerspective"
             icon="$nl$/icons/full/eview16/new_persp.gif">
       </image>
+      <image
+            commandId="org.eclipse.ui.help.helpContents"
+            icon="$nl$/icons/full/etool16/help_contents.gif">
+      </image>
+      <image
+            commandId="org.eclipse.ui.help.helpSearch"
+            icon="$nl$/icons/full/etool16/help_search.gif">
+      </image>
    </extension>
    
    <extension
@@ -2135,6 +2174,71 @@
             </and>
          </activeWhen>
       </handler>
+      <handler
+            class="org.eclipse.ui.internal.handlers.ResetPerspectiveHandler"
+            commandId="org.eclipse.ui.window.resetPerspective">
+         <enabledWhen>
+            <or>
+               <with
+                     variable="activeWorkbenchWindow">
+                  <test
+                        property="org.eclipse.ui.workbenchWindow.isPerspectiveOpen">
+                  </test>
+               </with>
+               <!-- this is a workaround to evaluate the expression -->
+               <with
+                     variable="activePart">
+                  <instanceof
+                        value="org.eclipse.ui.IWorkbenchPart">
+                  </instanceof>
+               </with>
+               
+            </or>
+         </enabledWhen>
+      </handler>
+      <handler
+            class="org.eclipse.ui.internal.handlers.SavePerspectiveHandler"
+            commandId="org.eclipse.ui.window.savePerspective">
+         <enabledWhen>
+            <or>
+               <with
+                     variable="activeWorkbenchWindow">
+                  <test
+                        property="org.eclipse.ui.workbenchWindow.isPerspectiveOpen">
+                  </test>
+               </with>
+               <!-- this is a workaround to evaluate the expression -->
+               <with
+                     variable="activePart">
+                  <instanceof
+                        value="org.eclipse.ui.IWorkbenchPart">
+                  </instanceof>
+               </with>
+               
+            </or>
+         </enabledWhen>
+      </handler>
+      <handler
+            class="org.eclipse.ui.internal.handlers.IntroHandler"
+            commandId="org.eclipse.ui.help.quickStartAction">
+         <enabledWhen>
+            <or>
+               <with
+                     variable="activeWorkbenchWindow">
+                  <test
+                        property="org.eclipse.ui.workbenchWindow.isPerspectiveOpen">
+                  </test>
+               </with>
+               <!-- this is a workaround to evaluate the expression -->
+               <with
+                     variable="activePart">
+                  <instanceof
+                        value="org.eclipse.ui.IWorkbenchPart">
+                  </instanceof>
+               </with>
+            </or>
+         </enabledWhen>
+      </handler>
    </extension>
    <extension
          point="org.eclipse.core.runtime.adapters">
diff --git a/bundles/org.eclipse.ui/schema/actionSets.exsd b/bundles/org.eclipse.ui/schema/actionSets.exsd
index ada3ef0..46eff5a 100644
--- a/bundles/org.eclipse.ui/schema/actionSets.exsd
+++ b/bundles/org.eclipse.ui/schema/actionSets.exsd
@@ -315,7 +315,7 @@
          <attribute name="allowLabelUpdate" type="boolean">
             <annotation>
                <documentation>
-                  optional attribute indicating whether the retarget action allows the handler to override it&apos;s label and tooltip. Only applies if &lt;samp&gt;retarget&lt;/samp&gt; attribute is true.
+                  optional attribute indicating whether the retarget action allows the handler to override its label and tooltip. Only applies if &lt;samp&gt;retarget&lt;/samp&gt; attribute is true.
                </documentation>
             </annotation>
          </attribute>
@@ -577,7 +577,7 @@
          <meta.section type="copyright"/>
       </appInfo>
       <documentation>
-         Copyright (c) 2000, 2007 IBM Corporation and others.&lt;br&gt;
+         Copyright (c) 2000, 2011 IBM Corporation and others.&lt;br&gt;
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0 which accompanies
 this distribution, and is available at &lt;a 
diff --git a/bundles/org.eclipse.ui/schema/commands.exsd b/bundles/org.eclipse.ui/schema/commands.exsd
index 157ce95..cce623a 100644
--- a/bundles/org.eclipse.ui/schema/commands.exsd
+++ b/bundles/org.eclipse.ui/schema/commands.exsd
@@ -7,7 +7,7 @@
       </appinfo>
       <documentation>
          &lt;p&gt;
-The &lt;code&gt;org.eclipse.ui.commands&lt;/code&gt; extension point is used to declare commands and command categories, using the &lt;code&gt;command&lt;/code&gt; and &lt;code&gt;category&lt;/code&gt; elements. A command is an abstract representation of some semantic behaviour, but not it&apos;s actual implementation.  This allows different developers to contribute specific behaviour for their individual parts.  For example, there might be a &quot;paste&quot; command with one implementation in an editor and a different implementation in an explorer widget.  These implementations are called handlers.  Commands can also be viewed as declarative function pointers, or signal handlers.
+The &lt;code&gt;org.eclipse.ui.commands&lt;/code&gt; extension point is used to declare commands and command categories, using the &lt;code&gt;command&lt;/code&gt; and &lt;code&gt;category&lt;/code&gt; elements. A command is an abstract representation of some semantic behaviour, but not its actual implementation.  This allows different developers to contribute specific behaviour for their individual parts.  For example, there might be a &quot;paste&quot; command with one implementation in an editor and a different implementation in an explorer widget.  These implementations are called handlers.  Commands can also be viewed as declarative function pointers, or signal handlers.
 &lt;/p&gt;
       </documentation>
    </annotation>
@@ -851,7 +851,7 @@
          <meta.section type="copyright"/>
       </appinfo>
       <documentation>
-         Copyright (c) 2000, 2007 IBM Corporation and others.&lt;br&gt;
+         Copyright (c) 2000, 2011 IBM Corporation and others.&lt;br&gt;
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0 which accompanies
 this distribution, and is available at &lt;a 
diff --git a/bundles/org.eclipse.ui/schema/popupMenus.exsd b/bundles/org.eclipse.ui/schema/popupMenus.exsd
index 70b95e2..3bcae5c 100644
--- a/bundles/org.eclipse.ui/schema/popupMenus.exsd
+++ b/bundles/org.eclipse.ui/schema/popupMenus.exsd
@@ -78,7 +78,7 @@
             <meta.element deprecated="true"/>
          </appInfo>
          <documentation>
-            This element is used to define a group of actions and/or menus for any viewer context menus for which the objects of the specified type are selected.  &lt;code&gt;enablement&lt;/code&gt; in this element refers to core expression enablement, as defined in &lt;a href=&quot;org_eclipse_core_expressions_definitions.html&quot;&gt;org.eclipse.core.expressions.definitions&lt;/a&gt;, and effects the enablement of the objectContribution not the contained actions.
+            This element is used to define a group of actions and/or menus for any viewer context menus for which the objects of the specified type are selected.  &lt;code&gt;enablement&lt;/code&gt; in this element refers to core expression enablement, as defined in &lt;a href=&quot;org_eclipse_core_expressions_definitions.html&quot;&gt;org.eclipse.core.expressions.definitions&lt;/a&gt;, and affects the enablement of the objectContribution not the contained actions.
          </documentation>
       </annotation>
       <complexType>
diff --git a/bundles/org.eclipse.ui/schema/propertiesView.exsd b/bundles/org.eclipse.ui/schema/propertiesView.exsd
index 2d00bdb..dc1f51f 100644
--- a/bundles/org.eclipse.ui/schema/propertiesView.exsd
+++ b/bundles/org.eclipse.ui/schema/propertiesView.exsd
@@ -3,7 +3,7 @@
 <schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
       <appInfo>
-         <meta.schema plugin="org.eclipse.ui" id="propertiesView" name="Properties view"/>
+         <meta.schema plugin="org.eclipse.ui" id="propertiesView" name="Properties View"/>
       </appInfo>
       <documentation>
          This extension point is used to modify behavior of the Properties view.
@@ -100,7 +100,7 @@
          <meta.section type="copyright"/>
       </appInfo>
       <documentation>
-         Copyright (c) 2009 IBM Corporation and others.&lt;br&gt;
+         Copyright (c) 2009, 2011 IBM Corporation and others.&lt;br&gt;
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0 which accompanies
 this distribution, and is available at &lt;a 
diff --git a/bundles/org.eclipse.ui/schema/propertyPages.exsd b/bundles/org.eclipse.ui/schema/propertyPages.exsd
index 4af14d3..8f03a59 100644
--- a/bundles/org.eclipse.ui/schema/propertyPages.exsd
+++ b/bundles/org.eclipse.ui/schema/propertyPages.exsd
@@ -2,9 +2,9 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.ui" id="propertyPages" name="Property Pages"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          This extension point is used to add additional property page for objects of a given type.  Once defined, these property pages will appear in the Properties Dialog for objects of that type. 
 &lt;p&gt;
@@ -24,6 +24,11 @@
    <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
 
    <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
       <complexType>
          <sequence>
             <element ref="page" minOccurs="0" maxOccurs="unbounded"/>
@@ -47,9 +52,9 @@
                <documentation>
                   an optional name of the extension instance
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -79,9 +84,9 @@
                <documentation>
                   a translatable name that will be used in the UI for this page
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="icon" type="string">
@@ -89,9 +94,9 @@
                <documentation>
                   a relative path to an icon that will be used in the UI in addition to the page name
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="resource"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="objectClass" type="string">
@@ -101,9 +106,9 @@
 
 &lt;p&gt;Deprecated in Eclipse 3.3. Use the instanceOf or adapt element of the enabledWhen element instead.  If duplicate page definitions were previously used to register the page for multiple objectClass types, these should be combined into one page definition using multiple instanceOf elements combined inside an or element&lt;/p&gt;
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" deprecated="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="class" type="string" use="required">
@@ -111,9 +116,9 @@
                <documentation>
                   a fully qualified name of the class that implements &lt;tt&gt;org.eclipse.ui.IWorkbenchPropertyPage&lt;/tt&gt;.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.ui.dialogs.PropertyPage:org.eclipse.ui.IWorkbenchPropertyPage"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="nameFilter" type="string">
@@ -134,9 +139,9 @@
 
 &lt;strong&gt;NOTE:&lt;/strong&gt; The adaptable attribute will attempt adapt an object to &lt;code&gt;org.eclipse.core.resources.IResource&lt;/code&gt; before referencing the types registered in &lt;code&gt;Platform#getAdaptorManager&lt;/code&gt;. The enabledWhen element has no special case tests for &lt;code&gt;org.eclipse.core.resources.IResource&lt;/code&gt; and uses &lt;code&gt;Platform#getAdaptorManager&lt;/code&gt; to look up adaptable types. These can be registered using the &lt;code&gt;org.eclipse.core.runtime.adaptors&lt;/code&gt; extension point.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute deprecated="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="category" type="string">
@@ -144,11 +149,34 @@
                <documentation>
                   A path indicating the location of the page in the properties tree. The path may either be a parent node ID or a sequence of IDs separated by &apos;/&apos;, representing the full path from the root node.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="identifier" basedOn="org.eclipse.ui.propertyPages/page/@id"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
+         <attribute name="selectionFilter">
+            <annotation>
+               <documentation>
+                  This is an optional attribute. If it is not specified, the property page is assumed to only support single selection (a selection that contains a single object only).
+&lt;p&gt;
+Set this attribute to &quot;multi&quot; to indicate that the property page supports multiple selected objects. Property pages supporting this mode must implement the interface &lt;tt&gt;org.eclipse.ui.IWorkbenchPropertyPageMulti&lt;/tt&gt;. For multi-select pages &quot;enabledWhen&quot; condition will be provided with a Container filled with selected items (even if the selection contains only one item). On such pages &quot;enabledWhen&quot; expression should  use &quot;iterate&quot; to access the selection&apos;s elements.
+&lt;/p&gt;&lt;p&gt;
+Set this attribute to &quot;single&quot; to indicate that the property page supports only single selection.
+&lt;/p&gt;&lt;p&gt;
+Default: single 
+&lt;/p&gt;
+Since 3.7.
+               </documentation>
+            </annotation>
+            <simpleType>
+               <restriction base="string">
+                  <enumeration value="single">
+                  </enumeration>
+                  <enumeration value="multi">
+                  </enumeration>
+               </restriction>
+            </simpleType>
+         </attribute>
       </complexType>
    </element>
 
@@ -190,9 +218,9 @@
                <documentation>
                   The id of the keyword being referred to.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="identifier" basedOn="org.eclipse.ui.keywords/keyword/@id"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -224,9 +252,9 @@
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The following is an example of the property page definition: 
 &lt;p&gt;
@@ -251,22 +279,21 @@
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiInfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The attribute &lt;samp&gt;class&lt;/samp&gt; must specify a fully qualified name 
 of the class that implements 
-&lt;samp&gt;org.eclipse.ui.IWorkbenchPropertyPage&lt;/samp&gt;.
+&lt;samp&gt;org.eclipse.ui.IWorkbenchPropertyPage&lt;/samp&gt; or &lt;samp&gt;org.eclipse.ui.IWorkbenchPropertyPageMulti&lt;/samp&gt;.
       </documentation>
    </annotation>
 
 
-
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          Some objects provided by the workbench may have 
 property pages registered. Plug-ins are allowed 
@@ -280,11 +307,11 @@
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="copyright"/>
-      </appinfo>
+      </appInfo>
       <documentation>
-         Copyright (c) 2002, 2006 IBM Corporation and others.&lt;br&gt;
+         Copyright (c) 2002, 2010 IBM Corporation and others.&lt;br&gt;
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0 which accompanies
 this distribution, and is available at &lt;a 
diff --git a/bundles/org.eclipse.ui/schema/statusHandlers.exsd b/bundles/org.eclipse.ui/schema/statusHandlers.exsd
index d8667e6..d11ffcf 100644
--- a/bundles/org.eclipse.ui/schema/statusHandlers.exsd
+++ b/bundles/org.eclipse.ui/schema/statusHandlers.exsd
@@ -3,7 +3,7 @@
 <schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
       <appinfo>
-         <meta.schema plugin="org.eclipse.ui" id="statusHandlers" name="Status handlers"/>
+         <meta.schema plugin="org.eclipse.ui" id="statusHandlers" name="Status Handlers"/>
       </appinfo>
       <documentation>
          &lt;p&gt;
@@ -261,7 +261,7 @@
          <meta.section type="copyright"/>
       </appinfo>
       <documentation>
-         Copyright (c) 2006, 2007 IBM Corporation and others.&lt;br&gt;
+         Copyright (c) 2006, 2011 IBM Corporation and others.&lt;br&gt;
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0 which accompanies
 this distribution, and is available at &lt;a 
diff --git a/bundles/org.eclipse.ui/schema/themes.exsd b/bundles/org.eclipse.ui/schema/themes.exsd
index ce88415..522c27f 100644
--- a/bundles/org.eclipse.ui/schema/themes.exsd
+++ b/bundles/org.eclipse.ui/schema/themes.exsd
@@ -546,7 +546,7 @@
    <element name="categoryPresentationBinding">
       <annotation>
          <documentation>
-            This element allows a category to be bound to a specific presentation as described by the &lt;code&gt;org.eclipse.ui.presentationFactory&lt;/code&gt; extension point.  If a category has any presentation bindings then it (and it&apos;s children) is only configurable by the user if it is bound to the active presentation.  This is useful for removing unused items from user consideration.
+            This element allows a category to be bound to a specific presentation as described by the &lt;code&gt;org.eclipse.ui.presentationFactory&lt;/code&gt; extension point.  If a category has any presentation bindings then it (and its children) is only configurable by the user if it is bound to the active presentation.  This is useful for removing unused items from user consideration.
          </documentation>
       </annotation>
       <complexType>
@@ -687,7 +687,7 @@
          <meta.section type="copyright"/>
       </appinfo>
       <documentation>
-         Copyright (c) 2003, 2006 IBM Corporation and others.&lt;br&gt;
+         Copyright (c) 2003, 2011 IBM Corporation and others.&lt;br&gt;
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0 which accompanies
 this distribution, and is available at &lt;a 
diff --git a/bundles/org.eclipse.ui/schema/viewActions.exsd b/bundles/org.eclipse.ui/schema/viewActions.exsd
index e0edde2..4e9c9a2 100644
--- a/bundles/org.eclipse.ui/schema/viewActions.exsd
+++ b/bundles/org.eclipse.ui/schema/viewActions.exsd
@@ -511,7 +511,7 @@
          <meta.section type="copyright"/>
       </appInfo>
       <documentation>
-         Copyright (c) 2002, 2007 IBM Corporation and others.&lt;br&gt;
+         Copyright (c) 2002, 2011 IBM Corporation and others.&lt;br&gt;
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0 which accompanies
 this distribution, and is available at &lt;a 
diff --git a/bundles/org.eclipse.ui/src/org/eclipse/ui/internal/UIPreferenceInitializer.java b/bundles/org.eclipse.ui/src/org/eclipse/ui/internal/UIPreferenceInitializer.java
index 693e7fe..c04d4c3 100644
--- a/bundles/org.eclipse.ui/src/org/eclipse/ui/internal/UIPreferenceInitializer.java
+++ b/bundles/org.eclipse.ui/src/org/eclipse/ui/internal/UIPreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -152,6 +152,8 @@
 		node.putInt(IWorkbenchPreferenceConstants.EDITOR_TAB_POSITION, SWT.TOP);
 		node.putBoolean(
 				IWorkbenchPreferenceConstants.SHOW_MULTIPLE_EDITOR_TABS, true);
+		
+		node.putInt(IWorkbenchPreferenceConstants.RECENTLY_USED_WORKINGSETS_SIZE, 5);
 
 		migrateInternalPreferences();
 
diff --git a/examples/org.eclipse.ui.examples.propertysheet/.classpath b/examples/org.eclipse.ui.examples.propertysheet/.classpath
index ad14fb0..4e8418b 100644
--- a/examples/org.eclipse.ui.examples.propertysheet/.classpath
+++ b/examples/org.eclipse.ui.examples.propertysheet/.classpath
@@ -2,6 +2,6 @@
 <classpath>
 	<classpathentry kind="src" path="Eclipse UI Examples PropertySheet"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/examples/org.eclipse.ui.examples.propertysheet/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.ui.examples.propertysheet/.settings/org.eclipse.jdt.core.prefs
index 36e5b57..e492bc5 100644
--- a/examples/org.eclipse.ui.examples.propertysheet/.settings/org.eclipse.jdt.core.prefs
+++ b/examples/org.eclipse.ui.examples.propertysheet/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Mon Jan 15 21:12:52 EST 2007
+#Wed Dec 08 12:02:59 CET 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -24,13 +24,13 @@
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -63,7 +63,6 @@
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
diff --git a/examples/org.eclipse.ui.examples.propertysheet/META-INF/MANIFEST.MF b/examples/org.eclipse.ui.examples.propertysheet/META-INF/MANIFEST.MF
index d41f763..674dbcb 100644
--- a/examples/org.eclipse.ui.examples.propertysheet/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.ui.examples.propertysheet/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.examples.propertysheet; singleton:=true
-Bundle-Version: 3.2.100.qualifier
+Bundle-Version: 3.2.200.qualifier
 Bundle-ClassPath: propertysheet.jar
 Bundle-Activator: org.eclipse.ui.examples.propertysheet.PropertySheetPlugin
 Bundle-Vendor: %Plugin.providerName
@@ -16,4 +16,6 @@
  org.eclipse.text,
  org.eclipse.ui.workbench.texteditor,
  org.eclipse.ui.editors
-Eclipse-LazyStart: true
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.ui.examples.propertysheet
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/tests/org.eclipse.jface.tests.databinding.conformance/META-INF/MANIFEST.MF b/tests/org.eclipse.jface.tests.databinding.conformance/META-INF/MANIFEST.MF
index d18d64f..9dcf5ee 100644
--- a/tests/org.eclipse.jface.tests.databinding.conformance/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.jface.tests.databinding.conformance/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jface.tests.databinding.conformance
-Bundle-Version: 1.1.0
+Bundle-Version: 1.1.0.qualifier
 Require-Bundle: org.junit,
  org.eclipse.core.databinding,
  org.eclipse.jface.databinding,
diff --git a/tests/org.eclipse.jface.tests.databinding/JFace-Data Binding Test Suite.launch b/tests/org.eclipse.jface.tests.databinding/JFace-Data Binding Test Suite.launch
index 844642f..a0f323a 100644
--- a/tests/org.eclipse.jface.tests.databinding/JFace-Data Binding Test Suite.launch
+++ b/tests/org.eclipse.jface.tests.databinding/JFace-Data Binding Test Suite.launch
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
 <stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
 <booleanAttribute key="askclear" value="false"/>
 <booleanAttribute key="automaticAdd" value="true"/>
@@ -35,7 +34,7 @@
 <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
 <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
 <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jface.tests.databinding.BindingTestSuite"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jface.tests.databinding"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
@@ -45,7 +44,8 @@
 <booleanAttribute key="show_selected_only" value="false"/>
 <stringAttribute key="templateConfig" value=""/>
 <booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
 <booleanAttribute key="useDefaultConfig" value="true"/>
 <booleanAttribute key="useDefaultConfigArea" value="false"/>
 <booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration>
+</launchConfiguration>
\ No newline at end of file
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/beans/BeanPropertiesTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/beans/BeanPropertiesTest.java
new file mode 100644
index 0000000..23de654
--- /dev/null
+++ b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/beans/BeanPropertiesTest.java
@@ -0,0 +1,41 @@
+package org.eclipse.core.tests.databinding.beans;
+
+import org.eclipse.core.databinding.beans.BeanProperties;
+import org.eclipse.core.databinding.beans.IBeanObservable;
+import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.core.tests.internal.databinding.beans.Bean;
+import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
+
+public class BeanPropertiesTest extends AbstractDefaultRealmTestCase {
+	private Bean bean;
+
+	protected void setUp() throws Exception {
+		super.setUp();
+
+		bean = new Bean();
+	}
+
+	public void testValue_ValueFactory_ProducesIBeanObservable() {
+		IObservable observable = BeanProperties.value(Bean.class, "value")
+				.valueFactory().createObservable(bean);
+		assertTrue(observable instanceof IBeanObservable);
+	}
+
+	public void testSet_SetFactory_ProducesIBeanObservable() {
+		IObservable observable = BeanProperties.set(Bean.class, "set")
+				.setFactory().createObservable(bean);
+		assertTrue(observable instanceof IBeanObservable);
+	}
+
+	public void testList_ListFactory_ProducesIBeanObservable() {
+		IObservable observable = BeanProperties.list(Bean.class, "list")
+				.listFactory().createObservable(bean);
+		assertTrue(observable instanceof IBeanObservable);
+	}
+
+	public void testMap_MapFactory_ProducesIBeanObservable() {
+		IObservable observable = BeanProperties.map(Bean.class, "map")
+				.mapFactory().createObservable(bean);
+		assertTrue(observable instanceof IBeanObservable);
+	}
+}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/beans/PojoPropertiesTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/beans/PojoPropertiesTest.java
new file mode 100644
index 0000000..5dcf1c2
--- /dev/null
+++ b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/beans/PojoPropertiesTest.java
@@ -0,0 +1,41 @@
+package org.eclipse.core.tests.databinding.beans;
+
+import org.eclipse.core.databinding.beans.BeanProperties;
+import org.eclipse.core.databinding.beans.IBeanObservable;
+import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.core.tests.internal.databinding.beans.Bean;
+import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
+
+public class PojoPropertiesTest extends AbstractDefaultRealmTestCase {
+	private Bean bean;
+
+	protected void setUp() throws Exception {
+		super.setUp();
+
+		bean = new Bean();
+	}
+
+	public void testValue_ValueFactory_ProducesIBeanObservable() {
+		IObservable observable = BeanProperties.value(Bean.class, "value")
+				.valueFactory().createObservable(bean);
+		assertTrue(observable instanceof IBeanObservable);
+	}
+
+	public void testSet_SetFactory_ProducesIBeanObservable() {
+		IObservable observable = BeanProperties.set(Bean.class, "set")
+				.setFactory().createObservable(bean);
+		assertTrue(observable instanceof IBeanObservable);
+	}
+
+	public void testList_ListFactory_ProducesIBeanObservable() {
+		IObservable observable = BeanProperties.list(Bean.class, "list")
+				.listFactory().createObservable(bean);
+		assertTrue(observable instanceof IBeanObservable);
+	}
+
+	public void testMap_MapFactory_ProducesIBeanObservable() {
+		IObservable observable = BeanProperties.map(Bean.class, "map")
+				.mapFactory().createObservable(bean);
+		assertTrue(observable instanceof IBeanObservable);
+	}
+}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/ConverterValuePropertyTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/ConverterValuePropertyTest.java
new file mode 100644
index 0000000..a99170f
--- /dev/null
+++ b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/ConverterValuePropertyTest.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Ovidio Mallo and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ovidio Mallo - initial API and implementation (bug 306611)
+ ******************************************************************************/
+
+package org.eclipse.core.tests.internal.databinding;
+
+import org.eclipse.core.databinding.BindingProperties;
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.core.databinding.property.value.IValueProperty;
+import org.eclipse.core.internal.databinding.ConverterValueProperty;
+import org.eclipse.core.internal.databinding.conversion.ObjectToStringConverter;
+import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
+
+/**
+ * Tests for the {@link ConverterValueProperty} class.
+ */
+public class ConverterValuePropertyTest extends AbstractDefaultRealmTestCase {
+
+	private IConverter converter;
+
+	protected void setUp() throws Exception {
+		super.setUp();
+
+		converter = new ObjectToStringConverter(Integer.class);
+	}
+
+	public void testGetValue() {
+		IValueProperty property = BindingProperties.convertedValue(converter);
+
+		assertEquals("123", property.getValue(new Integer(123)));
+	}
+
+	public void testGetValueForNullSource() {
+		// The converter converts null to "".
+		IValueProperty property = BindingProperties.convertedValue(converter);
+
+		// null should also be converted rather than simply returning null.
+		assertEquals("", property.getValue(null));
+	}
+
+	public void testSetValue() {
+		IValueProperty property = BindingProperties.convertedValue(converter);
+
+		try {
+			property.setValue(new Integer(123), "123");
+			fail("setting a value should trigger an exception!");
+		} catch (UnsupportedOperationException e) {
+			// expected exception
+		}
+	}
+
+	public void testGetValueType() {
+		IValueProperty property = BindingProperties.convertedValue(converter);
+
+		assertEquals(converter.getToType(), property.getValueType());
+	}
+}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/ListDetailValueObservableListTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/ListDetailValueObservableListTest.java
new file mode 100644
index 0000000..eefa802
--- /dev/null
+++ b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/ListDetailValueObservableListTest.java
@@ -0,0 +1,391 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Ovidio Mallo and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ovidio Mallo - initial API and implementation (bug 305367)
+ ******************************************************************************/
+
+package org.eclipse.core.tests.internal.databinding.observable.masterdetail;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.databinding.beans.BeansObservables;
+import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.core.databinding.observable.IObservableCollection;
+import org.eclipse.core.databinding.observable.Realm;
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListDiff;
+import org.eclipse.core.databinding.observable.list.ListDiffEntry;
+import org.eclipse.core.databinding.observable.list.WritableList;
+import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
+import org.eclipse.core.databinding.observable.value.WritableValue;
+import org.eclipse.core.internal.databinding.observable.masterdetail.ListDetailValueObservableList;
+import org.eclipse.jface.databinding.conformance.ObservableListContractTest;
+import org.eclipse.jface.databinding.conformance.delegate.AbstractObservableCollectionContractDelegate;
+import org.eclipse.jface.databinding.conformance.util.ListChangeEventTracker;
+import org.eclipse.jface.examples.databinding.model.SimplePerson;
+import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
+
+/**
+ * @since 1.3
+ */
+public class ListDetailValueObservableListTest extends
+		AbstractDefaultRealmTestCase {
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(
+				ListDetailValueObservableListTest.class.getName());
+		suite.addTestSuite(ListDetailValueObservableListTest.class);
+		suite.addTest(ObservableListContractTest.suite(new Delegate()));
+		return suite;
+	}
+
+	public void testUnmodifiability() {
+		WritableList masterObservableList = new WritableList();
+		masterObservableList.add(new SimplePerson());
+		masterObservableList.add(new SimplePerson());
+		ListDetailValueObservableList ldol = new ListDetailValueObservableList(
+				masterObservableList, BeansObservables.valueFactory("name"),
+				null);
+
+		try {
+			ldol.add("name");
+			fail("ListDetailValueObservableList must not be modifiable.");
+		} catch (UnsupportedOperationException e) {
+			// expected exception
+		}
+
+		try {
+			ldol.remove(masterObservableList.get(0));
+			fail("ListDetailValueObservableList must not be modifiable.");
+		} catch (UnsupportedOperationException e) {
+			// expected exception
+		}
+
+		try {
+			ldol.removeAll(Collections.singleton(masterObservableList.get(0)));
+			fail("ListDetailValueObservableList must not be modifiable.");
+		} catch (UnsupportedOperationException e) {
+			// expected exception
+		}
+
+		try {
+			ldol.retainAll(Collections.EMPTY_LIST);
+			fail("ListDetailValueObservableList must not be modifiable.");
+		} catch (UnsupportedOperationException e) {
+			// expected exception
+		}
+
+		try {
+			ldol.move(0, 1);
+			fail("ListDetailValueObservableList must not be modifiable.");
+		} catch (UnsupportedOperationException e) {
+			// expected exception
+		}
+	}
+
+	public void testGetElementType() {
+		ListDetailValueObservableList ldol = new ListDetailValueObservableList(
+				new WritableList(), BeansObservables.valueFactory("name"),
+				String.class);
+
+		assertSame(String.class, ldol.getElementType());
+	}
+
+	public void testGetObserved() {
+		WritableList masterList = new WritableList();
+		ListDetailValueObservableList ldol = new ListDetailValueObservableList(
+				masterList, BeansObservables.valueFactory("name"), String.class);
+
+		// The observed object is the master list.
+		assertSame(masterList, ldol.getObserved());
+	}
+
+	public void testMasterListInitiallyNotEmpty() {
+		WritableList masterList = new WritableList();
+		SimplePerson person = new SimplePerson();
+		person.setName("name");
+		masterList.add(person);
+		ListDetailValueObservableList ldol = new ListDetailValueObservableList(
+				masterList, BeansObservables.valueFactory("name"), String.class);
+
+		// Make sure that a non-empty master list is initialized correctly.
+		assertEquals(masterList.size(), ldol.size());
+		assertEquals(person.getName(), ldol.get(0));
+	}
+
+	public void testAddRemove() {
+		WritableList masterList = new WritableList();
+		ListDetailValueObservableList ldol = new ListDetailValueObservableList(
+				masterList, BeansObservables.valueFactory("name"), String.class);
+
+		// Initially, the detail list is empty.
+		assertTrue(ldol.isEmpty());
+
+		// Add a first person and check that its name is in the detail list.
+		SimplePerson p1 = new SimplePerson();
+		p1.setName("name1");
+		masterList.add(p1);
+		assertEquals(masterList.size(), ldol.size());
+		assertEquals(p1.getName(), ldol.get(0));
+
+		// Add a second person and check that it's name is in the detail list.
+		SimplePerson p2 = new SimplePerson();
+		p2.setName("name2");
+		masterList.add(p2);
+		assertEquals(masterList.size(), ldol.size());
+		assertEquals(p2.getName(), ldol.get(1));
+
+		// Remove the first person from the master list and check that we still
+		// have the name of the second person in the detail list.
+		masterList.remove(0);
+		assertEquals(masterList.size(), ldol.size());
+		assertEquals(p2.getName(), ldol.get(0));
+
+		// Remove the second person as well.
+		masterList.remove(0);
+		assertTrue(ldol.isEmpty());
+	}
+
+	public void testChangeDetail() {
+		WritableList masterList = new WritableList();
+		ListDetailValueObservableList ldol = new ListDetailValueObservableList(
+				masterList, BeansObservables.valueFactory("name"), String.class);
+
+		// Change the detail attribute explicitly.
+		SimplePerson p1 = new SimplePerson();
+		p1.setName("name1");
+		masterList.add(p1);
+		assertEquals(p1.getName(), ldol.get(0));
+		p1.setName("name2");
+		assertEquals(p1.getName(), ldol.get(0));
+
+		// Change the detail attribute by changing the master.
+		SimplePerson p2 = new SimplePerson();
+		p2.setName("name3");
+		masterList.set(0, p2);
+		assertEquals(p2.getName(), ldol.get(0));
+	}
+
+	public void testSet() {
+		WritableList masterList = new WritableList();
+		ListDetailValueObservableList ldol = new ListDetailValueObservableList(
+				masterList, BeansObservables.valueFactory("name"), String.class);
+
+		// Change the detail attribute explicitly.
+		SimplePerson person = new SimplePerson();
+		person.setName("name1");
+		masterList.add(person);
+		assertEquals(person.getName(), ldol.get(0));
+
+		// Set a new name on the detail list.
+		ldol.set(0, "name2");
+		// Check that the name has been propagated to the master.
+		assertEquals("name2", person.getName());
+		assertEquals(person.getName(), ldol.get(0));
+	}
+
+	public void testDuplicateMasterElements() {
+		WritableList masterList = new WritableList();
+		ListDetailValueObservableList ldol = new ListDetailValueObservableList(
+				masterList, BeansObservables.valueFactory("name"), String.class);
+
+		SimplePerson master = new SimplePerson();
+		master.setName("name1");
+
+		// Add the same master twice.
+		masterList.add(master);
+		masterList.add(master);
+
+		// Attach the change listener to the detail list.
+		ListChangeEventTracker changeTracker = ListChangeEventTracker
+				.observe(ldol);
+
+		// Setting the name on master should trigger an event on both
+		// occurrences of in the master list.
+		master.setName("name2");
+
+		// We should have 2 replace diffs, i.e. 4 diff entries.
+		assertEquals(1, changeTracker.count);
+		assertEquals(4, changeTracker.event.diff.getDifferences().length);
+		assertReplaceDiffAt(changeTracker.event.diff, 0, 0, "name1", "name2");
+		assertReplaceDiffAt(changeTracker.event.diff, 2, 0, "name1", "name2");
+
+		// Remove one instance of the master (one will remain).
+		masterList.remove(master);
+
+		// It should still be possible to work on the remaining master instance.
+		ldol.set(0, "name3");
+		assertEquals("name3", master.getName());
+	}
+
+	public void testDetailObservableChangeEvent() {
+		WritableList masterList = new WritableList();
+		ListDetailValueObservableList ldol = new ListDetailValueObservableList(
+				masterList, BeansObservables.valueFactory("name"), String.class);
+
+		ListChangeEventTracker changeTracker = ListChangeEventTracker
+				.observe(ldol);
+
+		SimplePerson person = new SimplePerson();
+		person.setName("old name");
+
+		// Initially, we should not have received any event.
+		assertEquals(0, changeTracker.count);
+
+		// Add the person and check that we receive an addition event on the
+		// correct index and with the correct value.
+		masterList.add(person);
+		assertEquals(1, changeTracker.count);
+		assertEquals(1, changeTracker.event.diff.getDifferences().length);
+		assertTrue(changeTracker.event.diff.getDifferences()[0].isAddition());
+		assertEquals(0,
+				changeTracker.event.diff.getDifferences()[0].getPosition());
+		assertEquals(person.getName(),
+				changeTracker.event.diff.getDifferences()[0].getElement());
+
+		// Change the detail property and check that we receive a replace event.
+		person.setName("new name");
+		assertEquals(2, changeTracker.count);
+		assertIsSingleReplaceDiff(changeTracker.event.diff, 0, "old name",
+				"new name");
+	}
+
+	private void assertIsSingleReplaceDiff(ListDiff diff, int index,
+			Object oldElement, Object newElement) {
+		// We should have 2 diff entries.
+		assertEquals(2, diff.getDifferences().length);
+
+		// Check that it indeed is a replace diff.
+		assertReplaceDiffAt(diff, 0, index, oldElement, newElement);
+	}
+
+	private void assertReplaceDiffAt(ListDiff diff, int diffOffset, int index,
+			Object oldElement, Object newElement) {
+		ListDiffEntry entry1 = diff.getDifferences()[0];
+		ListDiffEntry entry2 = diff.getDifferences()[1];
+
+		// One diff entry must be an addition, the other a removal.
+		assertTrue(entry1.isAddition() != entry2.isAddition());
+
+		// Check for the index on the diff entries.
+		assertEquals(index, entry1.getPosition());
+		assertEquals(index, entry2.getPosition());
+
+		// Check for the old/new element values on both diff entries.
+		if (entry1.isAddition()) {
+			assertEquals(oldElement, entry2.getElement());
+			assertEquals(newElement, entry1.getElement());
+		} else {
+			assertEquals(oldElement, entry1.getElement());
+			assertEquals(newElement, entry2.getElement());
+		}
+	}
+
+	public void testMasterNull() {
+		WritableList masterObservableList = new WritableList();
+		ListDetailValueObservableList ldol = new ListDetailValueObservableList(
+				masterObservableList, BeansObservables.valueFactory("name"),
+				String.class);
+
+		// Make sure null values are handled gracefully.
+		masterObservableList.add(null);
+		assertEquals(1, ldol.size());
+		assertNull(ldol.get(0));
+	}
+
+	public void testDetailObservableValuesAreDisposed() {
+		final List detailObservables = new ArrayList();
+		IObservableFactory detailValueFactory = new IObservableFactory() {
+			public IObservable createObservable(Object target) {
+				WritableValue detailObservable = new WritableValue();
+				// Remember the created observables.
+				detailObservables.add(detailObservable);
+				return detailObservable;
+			}
+		};
+
+		WritableList masterList = new WritableList();
+		ListDetailValueObservableList ldol = new ListDetailValueObservableList(
+				masterList, detailValueFactory, null);
+
+		masterList.add(new Object());
+		masterList.add(new Object());
+
+		assertEquals(ldol.size(), detailObservables.size());
+
+		// No detail observables should be disposed yet.
+		assertFalse(((WritableValue) detailObservables.get(0)).isDisposed());
+		assertFalse(((WritableValue) detailObservables.get(1)).isDisposed());
+
+		// Only the detail observable for the removed master should be disposed.
+		masterList.remove(1);
+		assertFalse(((WritableValue) detailObservables.get(0)).isDisposed());
+		assertTrue(((WritableValue) detailObservables.get(1)).isDisposed());
+
+		// After disposing the detail list, all detail observables should be
+		// disposed.
+		ldol.dispose();
+		assertTrue(((WritableValue) detailObservables.get(0)).isDisposed());
+		assertTrue(((WritableValue) detailObservables.get(1)).isDisposed());
+	}
+
+	public void testDisposeOnMasterDisposed() {
+		WritableList masterList = new WritableList();
+		ListDetailValueObservableList ldol = new ListDetailValueObservableList(
+				masterList, BeansObservables.valueFactory("name"), String.class);
+
+		// Initially, nothing should be disposed.
+		assertFalse(masterList.isDisposed());
+		assertFalse(ldol.isDisposed());
+
+		// Upon disposing the master list, the detail list should be disposed as
+		// well.
+		masterList.dispose();
+		assertTrue(masterList.isDisposed());
+		assertTrue(ldol.isDisposed());
+	}
+
+	private static class Delegate extends
+			AbstractObservableCollectionContractDelegate {
+		public IObservableCollection createObservableCollection(Realm realm,
+				int elementCount) {
+			WritableList masterList = new WritableList(realm);
+			for (int i = 0; i < elementCount; i++) {
+				masterList.add(new SimplePerson());
+			}
+
+			return new TestListDetailValueObservableList(masterList,
+					BeansObservables.valueFactory(realm, "name"), String.class);
+		}
+
+		public void change(IObservable observable) {
+			TestListDetailValueObservableList ldol = (TestListDetailValueObservableList) observable;
+			ldol.masterList.add(new SimplePerson());
+		}
+
+		public Object getElementType(IObservableCollection collection) {
+			return String.class;
+		}
+	}
+
+	private static class TestListDetailValueObservableList extends
+			ListDetailValueObservableList {
+		final IObservableList masterList;
+
+		public TestListDetailValueObservableList(IObservableList masterList,
+				IObservableFactory detailValueFactory, Object detailType) {
+			super(masterList, detailValueFactory, detailType);
+			this.masterList = masterList;
+		}
+	}
+}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/MapDetailValueObservableMapTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/MapDetailValueObservableMapTest.java
new file mode 100644
index 0000000..5146b89
--- /dev/null
+++ b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/MapDetailValueObservableMapTest.java
@@ -0,0 +1,309 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Ovidio Mallo and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ovidio Mallo - initial API and implementation (bug 305367)
+ ******************************************************************************/
+
+package org.eclipse.core.tests.internal.databinding.observable.masterdetail;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.databinding.beans.BeansObservables;
+import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.core.databinding.observable.map.WritableMap;
+import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
+import org.eclipse.core.databinding.observable.value.WritableValue;
+import org.eclipse.core.internal.databinding.observable.masterdetail.MapDetailValueObservableMap;
+import org.eclipse.jface.databinding.conformance.util.MapChangeEventTracker;
+import org.eclipse.jface.examples.databinding.model.SimplePerson;
+import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
+
+/**
+ * @since 1.3
+ */
+public class MapDetailValueObservableMapTest extends
+		AbstractDefaultRealmTestCase {
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(
+				MapDetailValueObservableMapTest.class.getName());
+		suite.addTestSuite(MapDetailValueObservableMapTest.class);
+		return suite;
+	}
+
+	public void testGetKeyType() {
+		MapDetailValueObservableMap mdom = new MapDetailValueObservableMap(
+				new WritableMap(SimplePerson.class, SimplePerson.class),
+				BeansObservables.valueFactory("name"), String.class);
+
+		assertSame(SimplePerson.class, mdom.getKeyType());
+	}
+
+	public void testGetValueType() {
+		MapDetailValueObservableMap mdom = new MapDetailValueObservableMap(
+				new WritableMap(), BeansObservables.valueFactory("name"),
+				String.class);
+
+		assertSame(String.class, mdom.getValueType());
+	}
+
+	public void testGetObserved() {
+		WritableMap masterMap = new WritableMap();
+		MapDetailValueObservableMap mdom = new MapDetailValueObservableMap(
+				masterMap, BeansObservables.valueFactory("name"), String.class);
+
+		// The observed object is the master key set.
+		assertSame(masterMap, mdom.getObserved());
+	}
+
+	public void testMasterSetInitiallyNotEmpty() {
+		WritableMap masterMap = new WritableMap();
+		SimplePerson person = new SimplePerson();
+		person.setName("name");
+		masterMap.put(person, person);
+		MapDetailValueObservableMap mdom = new MapDetailValueObservableMap(
+				masterMap, BeansObservables.valueFactory("name"), String.class);
+
+		// Make sure that a non-empty master key set is initialized correctly.
+		assertEquals(masterMap.size(), mdom.size());
+		assertEquals(person.getName(), mdom.get(person));
+	}
+
+	public void testAddRemove() {
+		WritableMap masterMap = new WritableMap();
+		MapDetailValueObservableMap mdom = new MapDetailValueObservableMap(
+				masterMap, BeansObservables.valueFactory("name"), String.class);
+
+		// Initially, the detail map is empty.
+		assertTrue(mdom.isEmpty());
+
+		// Add a first person and check that its name is in the detail map.
+		SimplePerson p1 = new SimplePerson();
+		p1.setName("name1");
+		masterMap.put(p1, p1);
+		assertEquals(masterMap.size(), mdom.size());
+		assertEquals(p1.getName(), mdom.get(p1));
+
+		// Add a second person and check that it's name is in the detail map.
+		SimplePerson p2 = new SimplePerson();
+		p2.setName("name2");
+		masterMap.put(p2, p2);
+		assertEquals(masterMap.size(), mdom.size());
+		assertEquals(p2.getName(), mdom.get(p2));
+
+		// Remove the first person from the master map and check that we still
+		// have the name of the second person in the detail map.
+		masterMap.remove(p1);
+		assertEquals(masterMap.size(), mdom.size());
+		assertEquals(p2.getName(), mdom.get(p2));
+
+		// Remove the second person as well.
+		masterMap.remove(p2);
+		assertTrue(mdom.isEmpty());
+	}
+
+	public void testChangeDetail() {
+		WritableMap masterMap = new WritableMap();
+		MapDetailValueObservableMap mdom = new MapDetailValueObservableMap(
+				masterMap, BeansObservables.valueFactory("name"), String.class);
+
+		// Change the detail attribute explicitly.
+		SimplePerson p1 = new SimplePerson();
+		p1.setName("name1");
+		masterMap.put(p1, p1);
+		assertEquals(p1.getName(), mdom.get(p1));
+		p1.setName("name2");
+		assertEquals(p1.getName(), mdom.get(p1));
+
+		// Change the detail attribute by changing the master.
+		SimplePerson p2 = new SimplePerson();
+		p2.setName("name3");
+		masterMap.put(p1, p2);
+		assertEquals(p2.getName(), mdom.get(p1));
+	}
+
+	public void testPut() {
+		WritableMap masterMap = new WritableMap();
+		MapDetailValueObservableMap mdom = new MapDetailValueObservableMap(
+				masterMap, BeansObservables.valueFactory("name"), String.class);
+
+		// Change the detail attribute explicitly.
+		SimplePerson person = new SimplePerson();
+		person.setName("name1");
+		masterMap.put(person, person);
+		assertEquals(person.getName(), mdom.get(person));
+
+		// Set a new name on the detail map.
+		mdom.put(person, "name2");
+		// Check that the name has been propagated to the master.
+		assertEquals("name2", person.getName());
+		assertEquals(person.getName(), mdom.get(person));
+	}
+
+	public void testContainsValue() {
+		WritableMap masterMap = new WritableMap();
+		MapDetailValueObservableMap mdom = new MapDetailValueObservableMap(
+				masterMap, BeansObservables.valueFactory("name"), String.class);
+
+		// Add a person with a given name.
+		SimplePerson person = new SimplePerson();
+		person.setName("name");
+		masterMap.put(person, person);
+
+		// Make sure the name of the person is contained.
+		assertTrue(mdom.containsValue(person.getName()));
+
+		// Remove the person and make sure that it's name cannot be found
+		// anymore.
+		masterMap.remove(person);
+		assertFalse(mdom.containsValue(person.getName()));
+	}
+
+	public void testRemove() {
+		WritableMap masterMap = new WritableMap();
+		MapDetailValueObservableMap mdom = new MapDetailValueObservableMap(
+				masterMap, BeansObservables.valueFactory("name"), String.class);
+
+		// Add two person objects to the map.
+		SimplePerson p1 = new SimplePerson();
+		SimplePerson p2 = new SimplePerson();
+		masterMap.put(p1, p1);
+		masterMap.put(p2, p2);
+
+		// Initially, both person objects should be contained in the detail map.
+		assertTrue(mdom.containsKey(p1));
+		assertTrue(mdom.containsKey(p2));
+
+		// Remove one person and check that it is not contained anymore.
+		mdom.remove(p1);
+		assertFalse(mdom.containsKey(p1));
+		assertTrue(mdom.containsKey(p2));
+
+		// Trying to remove a non-existent is allowed but has no effect.
+		mdom.remove(p1);
+		assertFalse(mdom.containsKey(p1));
+		assertTrue(mdom.containsKey(p2));
+	}
+
+	public void testDetailObservableChangeEvent() {
+		WritableMap masterMap = new WritableMap();
+		MapDetailValueObservableMap mdom = new MapDetailValueObservableMap(
+				masterMap, BeansObservables.valueFactory("name"), String.class);
+
+		MapChangeEventTracker changeTracker = MapChangeEventTracker
+				.observe(mdom);
+
+		SimplePerson person = new SimplePerson();
+		person.setName("old name");
+
+		// Initially, we should not have received any event.
+		assertEquals(0, changeTracker.count);
+
+		// Add the person and check that we receive an addition event on the
+		// correct index and with the correct value.
+		masterMap.put(person, person);
+		assertEquals(1, changeTracker.count);
+		assertEquals(1, changeTracker.event.diff.getAddedKeys().size());
+		assertEquals(0, changeTracker.event.diff.getRemovedKeys().size());
+		assertEquals(0, changeTracker.event.diff.getChangedKeys().size());
+		assertSame(person, changeTracker.event.diff.getAddedKeys().iterator()
+				.next());
+		assertNull(changeTracker.event.diff.getOldValue(person));
+		assertEquals("old name", changeTracker.event.diff.getNewValue(person));
+
+		// Change the detail property and check that we receive a replace
+		person.setName("new name");
+		assertEquals(2, changeTracker.count);
+		assertEquals(0, changeTracker.event.diff.getAddedKeys().size());
+		assertEquals(0, changeTracker.event.diff.getRemovedKeys().size());
+		assertEquals(1, changeTracker.event.diff.getChangedKeys().size());
+		assertSame(person, changeTracker.event.diff.getChangedKeys().iterator()
+				.next());
+		assertEquals("old name", changeTracker.event.diff.getOldValue(person));
+		assertEquals("new name", changeTracker.event.diff.getNewValue(person));
+	}
+
+	public void testMasterNull() {
+		WritableMap masterMap = new WritableMap();
+		MapDetailValueObservableMap mdom = new MapDetailValueObservableMap(
+				masterMap, BeansObservables.valueFactory("name"), String.class);
+
+		// Make sure null values are handled gracefully.
+		masterMap.put(null, null);
+		assertEquals(1, mdom.size());
+		assertNull(mdom.get(null));
+	}
+
+	public void testDetailObservableValuesAreDisposed() {
+		final Map detailObservables = new HashMap();
+		IObservableFactory detailValueFactory = new IObservableFactory() {
+			public IObservable createObservable(Object target) {
+				WritableValue detailObservable = new WritableValue();
+				// Remember the created observables.
+				detailObservables.put(target, detailObservable);
+				return detailObservable;
+			}
+		};
+
+		WritableMap masterMap = new WritableMap();
+		MapDetailValueObservableMap mdom = new MapDetailValueObservableMap(
+				masterMap, detailValueFactory, null);
+
+		Object master1 = new Object();
+		Object master2 = new Object();
+		masterMap.put(master1, master1);
+		masterMap.put(master2, master2);
+
+		// Attach a listener in order to ensure that all detail observables are
+		// actually created.
+		MapChangeEventTracker.observe(mdom);
+
+		assertEquals(mdom.size(), detailObservables.size());
+
+		// No detail observables should be disposed yet.
+		assertFalse(((WritableValue) detailObservables.get(master1))
+				.isDisposed());
+		assertFalse(((WritableValue) detailObservables.get(master2))
+				.isDisposed());
+
+		// Only the detail observable for the removed master should be disposed.
+		masterMap.remove(master2);
+		assertFalse(((WritableValue) detailObservables.get(master1))
+				.isDisposed());
+		assertTrue(((WritableValue) detailObservables.get(master2))
+				.isDisposed());
+
+		// After disposing the detail map, all detail observables should be
+		// disposed.
+		mdom.dispose();
+		assertTrue(((WritableValue) detailObservables.get(master1))
+				.isDisposed());
+		assertTrue(((WritableValue) detailObservables.get(master2))
+				.isDisposed());
+	}
+
+	public void testDisposeOnMasterDisposed() {
+		WritableMap masterMap = new WritableMap();
+		MapDetailValueObservableMap mdom = new MapDetailValueObservableMap(
+				masterMap, BeansObservables.valueFactory("name"), String.class);
+
+		// Initially, nothing should be disposed.
+		assertFalse(masterMap.isDisposed());
+		assertFalse(mdom.isDisposed());
+
+		// Upon disposing the master map, the detail map should be disposed as
+		// well.
+		masterMap.dispose();
+		assertTrue(masterMap.isDisposed());
+		assertTrue(mdom.isDisposed());
+	}
+}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/SetDetailValueObservableMapTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/SetDetailValueObservableMapTest.java
new file mode 100644
index 0000000..26bcf1b
--- /dev/null
+++ b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/internal/databinding/observable/masterdetail/SetDetailValueObservableMapTest.java
@@ -0,0 +1,311 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Ovidio Mallo and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ovidio Mallo - initial API and implementation (bug 305367)
+ ******************************************************************************/
+
+package org.eclipse.core.tests.internal.databinding.observable.masterdetail;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.databinding.beans.BeansObservables;
+import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
+import org.eclipse.core.databinding.observable.set.WritableSet;
+import org.eclipse.core.databinding.observable.value.WritableValue;
+import org.eclipse.core.internal.databinding.observable.masterdetail.SetDetailValueObservableMap;
+import org.eclipse.jface.databinding.conformance.util.MapChangeEventTracker;
+import org.eclipse.jface.examples.databinding.model.SimplePerson;
+import org.eclipse.jface.tests.databinding.AbstractDefaultRealmTestCase;
+
+/**
+ * @since 1.3
+ */
+public class SetDetailValueObservableMapTest extends
+		AbstractDefaultRealmTestCase {
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(SetDetailValueObservableMapTest.class
+				.getName());
+		suite.addTestSuite(SetDetailValueObservableMapTest.class);
+		return suite;
+	}
+
+	public void testGetValueType() {
+		SetDetailValueObservableMap sdom = new SetDetailValueObservableMap(
+				new WritableSet(), BeansObservables.valueFactory("name"),
+				String.class);
+
+		assertSame(String.class, sdom.getValueType());
+	}
+
+	public void testGetObserved() {
+		WritableSet masterKeySet = new WritableSet();
+		SetDetailValueObservableMap sdom = new SetDetailValueObservableMap(
+				masterKeySet, BeansObservables.valueFactory("name"),
+				String.class);
+
+		// The observed object is the master key set.
+		assertSame(masterKeySet, sdom.getObserved());
+	}
+
+	public void testMasterSetInitiallyNotEmpty() {
+		WritableSet masterKeySet = new WritableSet();
+		SimplePerson person = new SimplePerson();
+		person.setName("name");
+		masterKeySet.add(person);
+		SetDetailValueObservableMap sdom = new SetDetailValueObservableMap(
+				masterKeySet, BeansObservables.valueFactory("name"),
+				String.class);
+
+		// Make sure that a non-empty master key set is initialized correctly.
+		assertEquals(masterKeySet.size(), sdom.size());
+		assertEquals(person.getName(), sdom.get(person));
+	}
+
+	public void testAddRemove() {
+		WritableSet masterKeySet = new WritableSet();
+		SetDetailValueObservableMap sdom = new SetDetailValueObservableMap(
+				masterKeySet, BeansObservables.valueFactory("name"),
+				String.class);
+
+		// Initially, the detail map is empty.
+		assertTrue(sdom.isEmpty());
+
+		// Add a first person and check that its name is in the detail list.
+		SimplePerson p1 = new SimplePerson();
+		p1.setName("name1");
+		masterKeySet.add(p1);
+		assertEquals(masterKeySet.size(), sdom.size());
+		assertEquals(p1.getName(), sdom.get(p1));
+
+		// Add a second person and check that it's name is in the detail list.
+		SimplePerson p2 = new SimplePerson();
+		p2.setName("name2");
+		masterKeySet.add(p2);
+		assertEquals(masterKeySet.size(), sdom.size());
+		assertEquals(p2.getName(), sdom.get(p2));
+
+		// Remove the first person from the master list and check that we still
+		// have the name of the second person in the detail list.
+		masterKeySet.remove(p1);
+		assertEquals(masterKeySet.size(), sdom.size());
+		assertEquals(p2.getName(), sdom.get(p2));
+
+		// Remove the second person as well.
+		masterKeySet.remove(p2);
+		assertTrue(sdom.isEmpty());
+	}
+
+	public void testChangeDetail() {
+		WritableSet masterKeySet = new WritableSet();
+		SetDetailValueObservableMap sdom = new SetDetailValueObservableMap(
+				masterKeySet, BeansObservables.valueFactory("name"),
+				String.class);
+
+		// Change the detail attribute explicitly.
+		SimplePerson p1 = new SimplePerson();
+		p1.setName("name1");
+		masterKeySet.add(p1);
+		assertEquals(p1.getName(), sdom.get(p1));
+		p1.setName("name2");
+		assertEquals(p1.getName(), sdom.get(p1));
+
+		// Change the detail attribute by changing the master.
+		SimplePerson p2 = new SimplePerson();
+		p2.setName("name3");
+		masterKeySet.add(p2);
+		assertEquals(p2.getName(), sdom.get(p2));
+	}
+
+	public void testPut() {
+		WritableSet masterKeySet = new WritableSet();
+		SetDetailValueObservableMap sdom = new SetDetailValueObservableMap(
+				masterKeySet, BeansObservables.valueFactory("name"),
+				String.class);
+
+		// Change the detail attribute explicitly.
+		SimplePerson person = new SimplePerson();
+		person.setName("name1");
+		masterKeySet.add(person);
+		assertEquals(person.getName(), sdom.get(person));
+
+		// Set a new name on the detail map.
+		sdom.put(person, "name2");
+		// Check that the name has been propagated to the master.
+		assertEquals("name2", person.getName());
+		assertEquals(person.getName(), sdom.get(person));
+	}
+
+	public void testContainsValue() {
+		WritableSet masterKeySet = new WritableSet();
+		SetDetailValueObservableMap sdom = new SetDetailValueObservableMap(
+				masterKeySet, BeansObservables.valueFactory("name"),
+				String.class);
+
+		// Add a person with a given name.
+		SimplePerson person = new SimplePerson();
+		person.setName("name");
+		masterKeySet.add(person);
+
+		// Make sure the name of the person is contained.
+		assertTrue(sdom.containsValue(person.getName()));
+
+		// Remove the person and make sure that it's name cannot be found
+		// anymore.
+		masterKeySet.remove(person);
+		assertFalse(sdom.containsValue(person.getName()));
+	}
+
+	public void testRemove() {
+		WritableSet masterKeySet = new WritableSet();
+		SetDetailValueObservableMap sdom = new SetDetailValueObservableMap(
+				masterKeySet, BeansObservables.valueFactory("name"),
+				String.class);
+
+		// Add two person objects to the map.
+		SimplePerson p1 = new SimplePerson();
+		SimplePerson p2 = new SimplePerson();
+		masterKeySet.add(p1);
+		masterKeySet.add(p2);
+
+		// Initially, both person objects should be contained in the detail map.
+		assertTrue(sdom.containsKey(p1));
+		assertTrue(sdom.containsKey(p2));
+
+		// Remove one person and check that it is not contained anymore.
+		sdom.remove(p1);
+		assertFalse(sdom.containsKey(p1));
+		assertTrue(sdom.containsKey(p2));
+
+		// Trying to remove a non-existent is allowed but has no effect.
+		sdom.remove(p1);
+		assertFalse(sdom.containsKey(p1));
+		assertTrue(sdom.containsKey(p2));
+	}
+
+	public void testDetailObservableChangeEvent() {
+		WritableSet masterKeySet = new WritableSet();
+		SetDetailValueObservableMap sdom = new SetDetailValueObservableMap(
+				masterKeySet, BeansObservables.valueFactory("name"),
+				String.class);
+
+		MapChangeEventTracker changeTracker = MapChangeEventTracker
+				.observe(sdom);
+
+		SimplePerson person = new SimplePerson();
+		person.setName("old name");
+
+		// Initially, we should not have received any event.
+		assertEquals(0, changeTracker.count);
+
+		// Add the person and check that we receive an addition event on the
+		// correct index and with the correct value.
+		masterKeySet.add(person);
+		assertEquals(1, changeTracker.count);
+		assertEquals(1, changeTracker.event.diff.getAddedKeys().size());
+		assertEquals(0, changeTracker.event.diff.getRemovedKeys().size());
+		assertEquals(0, changeTracker.event.diff.getChangedKeys().size());
+		assertSame(person, changeTracker.event.diff.getAddedKeys().iterator()
+				.next());
+		assertNull(changeTracker.event.diff.getOldValue(person));
+		assertEquals("old name", changeTracker.event.diff.getNewValue(person));
+
+		// Change the detail property and check that we receive a replace
+		person.setName("new name");
+		assertEquals(2, changeTracker.count);
+		assertEquals(0, changeTracker.event.diff.getAddedKeys().size());
+		assertEquals(0, changeTracker.event.diff.getRemovedKeys().size());
+		assertEquals(1, changeTracker.event.diff.getChangedKeys().size());
+		assertSame(person, changeTracker.event.diff.getChangedKeys().iterator()
+				.next());
+		assertEquals("old name", changeTracker.event.diff.getOldValue(person));
+		assertEquals("new name", changeTracker.event.diff.getNewValue(person));
+	}
+
+	public void testMasterNull() {
+		WritableSet masterKeySet = new WritableSet();
+		SetDetailValueObservableMap sdom = new SetDetailValueObservableMap(
+				masterKeySet, BeansObservables.valueFactory("name"),
+				String.class);
+
+		// Make sure null values are handled gracefully.
+		masterKeySet.add(null);
+		assertEquals(1, sdom.size());
+		assertNull(sdom.get(null));
+	}
+
+	public void testDetailObservableValuesAreDisposed() {
+		final Map detailObservables = new HashMap();
+		IObservableFactory detailValueFactory = new IObservableFactory() {
+			public IObservable createObservable(Object target) {
+				WritableValue detailObservable = new WritableValue();
+				// Remember the created observables.
+				detailObservables.put(target, detailObservable);
+				return detailObservable;
+			}
+		};
+
+		WritableSet masterKeySet = new WritableSet();
+		SetDetailValueObservableMap sdom = new SetDetailValueObservableMap(
+				masterKeySet, detailValueFactory, null);
+
+		Object master1 = new Object();
+		Object master2 = new Object();
+		masterKeySet.add(master1);
+		masterKeySet.add(master2);
+
+		// Attach a listener in order to ensure that all detail observables are
+		// actually created.
+		MapChangeEventTracker.observe(sdom);
+
+		assertEquals(sdom.size(), detailObservables.size());
+
+		// No detail observables should be disposed yet.
+		assertFalse(((WritableValue) detailObservables.get(master1))
+				.isDisposed());
+		assertFalse(((WritableValue) detailObservables.get(master2))
+				.isDisposed());
+
+		// Only the detail observable for the removed master should be disposed.
+		masterKeySet.remove(master2);
+		assertFalse(((WritableValue) detailObservables.get(master1))
+				.isDisposed());
+		assertTrue(((WritableValue) detailObservables.get(master2))
+				.isDisposed());
+
+		// After disposing the detail map, all detail observables should be
+		// disposed.
+		sdom.dispose();
+		assertTrue(((WritableValue) detailObservables.get(master1))
+				.isDisposed());
+		assertTrue(((WritableValue) detailObservables.get(master2))
+				.isDisposed());
+	}
+
+	public void testDisposeOnMasterDisposed() {
+		WritableSet masterKeySet = new WritableSet();
+		SetDetailValueObservableMap sdom = new SetDetailValueObservableMap(
+				masterKeySet, BeansObservables.valueFactory("name"),
+				String.class);
+
+		// Initially, nothing should be disposed.
+		assertFalse(masterKeySet.isDisposed());
+		assertFalse(sdom.isDisposed());
+
+		// Upon disposing the master list, the detail list should be disposed as
+		// well.
+		masterKeySet.dispose();
+		assertTrue(masterKeySet.isDisposed());
+		assertTrue(sdom.isDisposed());
+	}
+}
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindingTestSuite.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindingTestSuite.java
index 488d367..56f2d52 100644
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindingTestSuite.java
+++ b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindingTestSuite.java
@@ -17,7 +17,7 @@
  *                    246103, 249992, 256150, 256543, 262269, 175735, 262946,
  *                    255734, 263693, 169876, 266038, 268336, 270461, 271720,
  *                    283204, 281723, 283428
- *     Ovidio Mallo - bugs 237163, 235195, 299619
+ *     Ovidio Mallo - bugs 237163, 235195, 299619, 306611, 305367
  *******************************************************************************/
 package org.eclipse.jface.tests.databinding;
 
@@ -37,8 +37,10 @@
 import org.eclipse.core.tests.databinding.ValueBindingTest;
 import org.eclipse.core.tests.databinding.beans.AnonymousBeanValuePropertyTest;
 import org.eclipse.core.tests.databinding.beans.AnonymousPojoValuePropertyTest;
+import org.eclipse.core.tests.databinding.beans.BeanPropertiesTest;
 import org.eclipse.core.tests.databinding.beans.BeansObservablesTest;
 import org.eclipse.core.tests.databinding.beans.PojoObservablesTest;
+import org.eclipse.core.tests.databinding.beans.PojoPropertiesTest;
 import org.eclipse.core.tests.databinding.conversion.NumberToStringConverterTest;
 import org.eclipse.core.tests.databinding.conversion.StringToNumberConverterTest;
 import org.eclipse.core.tests.databinding.observable.AbstractObservableTest;
@@ -82,6 +84,7 @@
 import org.eclipse.core.tests.databinding.validation.ValidationStatusTest;
 import org.eclipse.core.tests.internal.databinding.BindingMessagesTest;
 import org.eclipse.core.tests.internal.databinding.BindingStatusTest;
+import org.eclipse.core.tests.internal.databinding.ConverterValuePropertyTest;
 import org.eclipse.core.tests.internal.databinding.IdentityMapTest;
 import org.eclipse.core.tests.internal.databinding.IdentitySetTest;
 import org.eclipse.core.tests.internal.databinding.QueueTest;
@@ -140,6 +143,9 @@
 import org.eclipse.core.tests.internal.databinding.observable.masterdetail.DetailObservableMapTest;
 import org.eclipse.core.tests.internal.databinding.observable.masterdetail.DetailObservableSetTest;
 import org.eclipse.core.tests.internal.databinding.observable.masterdetail.DetailObservableValueTest;
+import org.eclipse.core.tests.internal.databinding.observable.masterdetail.ListDetailValueObservableListTest;
+import org.eclipse.core.tests.internal.databinding.observable.masterdetail.MapDetailValueObservableMapTest;
+import org.eclipse.core.tests.internal.databinding.observable.masterdetail.SetDetailValueObservableMapTest;
 import org.eclipse.core.tests.internal.databinding.property.value.ListSimpleValueObservableListTest;
 import org.eclipse.core.tests.internal.databinding.property.value.MapSimpleValueObservableMapTest;
 import org.eclipse.core.tests.internal.databinding.property.value.SetSimpleValueObservableMapTest;
@@ -252,8 +258,10 @@
 		// org.eclipse.core.tests.databinding.beans
 		addTestSuite(AnonymousBeanValuePropertyTest.class);
 		addTestSuite(AnonymousPojoValuePropertyTest.class);
+		addTestSuite(BeanPropertiesTest.class);
 		addTestSuite(BeansObservablesTest.class);
 		addTestSuite(PojoObservablesTest.class);
+		addTestSuite(PojoPropertiesTest.class);
 
 		// org.eclipse.core.tests.databinding.conversion
 		addTestSuite(NumberToStringConverterTest.class);
@@ -312,6 +320,7 @@
 		// org.eclipse.core.tests.internal.databinding
 		addTestSuite(BindingMessagesTest.class);
 		addTestSuite(BindingStatusTest.class);
+		addTestSuite(ConverterValuePropertyTest.class);
 		addTestSuite(IdentityMapTest.class);
 		addTestSuite(IdentitySetTest.class);
 		addTestSuite(QueueTest.class);
@@ -380,6 +389,9 @@
 		addTestSuite(DetailObservableMapTest.class);
 		addTest(DetailObservableSetTest.suite());
 		addTest(DetailObservableValueTest.suite());
+		addTest(ListDetailValueObservableListTest.suite());
+		addTest(MapDetailValueObservableMapTest.suite());
+		addTest(SetDetailValueObservableMapTest.suite());
 
 		// org.eclipse.core.tests.internal.databinding.property.value
 		addTestSuite(MapSimpleValueObservableMapTest.class);
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/SWTObservablesTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/SWTObservablesTest.java
index 18109a9..6659af5 100644
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/SWTObservablesTest.java
+++ b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/SWTObservablesTest.java
@@ -14,32 +14,43 @@
 package org.eclipse.jface.tests.databinding.swt;
 
 import org.eclipse.core.databinding.observable.IDecoratingObservable;
-import org.eclipse.core.databinding.observable.list.IObservableList;
 import org.eclipse.core.databinding.property.IPropertyObservable;
 import org.eclipse.jface.databinding.conformance.util.ChangeEventTracker;
 import org.eclipse.jface.databinding.conformance.util.RealmTester;
 import org.eclipse.jface.databinding.swt.ISWTObservable;
+import org.eclipse.jface.databinding.swt.ISWTObservableList;
 import org.eclipse.jface.databinding.swt.ISWTObservableValue;
 import org.eclipse.jface.databinding.swt.SWTObservables;
 import org.eclipse.jface.databinding.swt.WidgetProperties;
 import org.eclipse.jface.internal.databinding.swt.ButtonImageProperty;
+import org.eclipse.jface.internal.databinding.swt.ButtonSelectionProperty;
 import org.eclipse.jface.internal.databinding.swt.ButtonTextProperty;
+import org.eclipse.jface.internal.databinding.swt.CComboItemsProperty;
 import org.eclipse.jface.internal.databinding.swt.CComboSelectionProperty;
 import org.eclipse.jface.internal.databinding.swt.CComboTextProperty;
 import org.eclipse.jface.internal.databinding.swt.CLabelImageProperty;
 import org.eclipse.jface.internal.databinding.swt.CLabelTextProperty;
 import org.eclipse.jface.internal.databinding.swt.CTabItemTooltipTextProperty;
+import org.eclipse.jface.internal.databinding.swt.ComboItemsProperty;
 import org.eclipse.jface.internal.databinding.swt.ComboSelectionProperty;
 import org.eclipse.jface.internal.databinding.swt.ComboTextProperty;
+import org.eclipse.jface.internal.databinding.swt.ControlBackgroundProperty;
+import org.eclipse.jface.internal.databinding.swt.ControlForegroundProperty;
 import org.eclipse.jface.internal.databinding.swt.ControlTooltipTextProperty;
 import org.eclipse.jface.internal.databinding.swt.DateTimeSelectionProperty;
 import org.eclipse.jface.internal.databinding.swt.ItemImageProperty;
 import org.eclipse.jface.internal.databinding.swt.ItemTextProperty;
 import org.eclipse.jface.internal.databinding.swt.LabelImageProperty;
 import org.eclipse.jface.internal.databinding.swt.LabelTextProperty;
+import org.eclipse.jface.internal.databinding.swt.ListItemsProperty;
+import org.eclipse.jface.internal.databinding.swt.ListSelectionProperty;
+import org.eclipse.jface.internal.databinding.swt.MenuEnabledProperty;
+import org.eclipse.jface.internal.databinding.swt.MenuItemEnabledProperty;
+import org.eclipse.jface.internal.databinding.swt.MenuItemSelectionProperty;
 import org.eclipse.jface.internal.databinding.swt.ScaleMaximumProperty;
 import org.eclipse.jface.internal.databinding.swt.ScaleMinimumProperty;
 import org.eclipse.jface.internal.databinding.swt.ScaleSelectionProperty;
+import org.eclipse.jface.internal.databinding.swt.ScrollBarEnabledProperty;
 import org.eclipse.jface.internal.databinding.swt.SpinnerMaximumProperty;
 import org.eclipse.jface.internal.databinding.swt.SpinnerMinimumProperty;
 import org.eclipse.jface.internal.databinding.swt.SpinnerSelectionProperty;
@@ -47,6 +58,7 @@
 import org.eclipse.jface.internal.databinding.swt.TableSingleSelectionIndexProperty;
 import org.eclipse.jface.internal.databinding.swt.TextEditableProperty;
 import org.eclipse.jface.internal.databinding.swt.TextTextProperty;
+import org.eclipse.jface.internal.databinding.swt.ToolItemEnabledProperty;
 import org.eclipse.jface.tests.databinding.AbstractSWTTestCase;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.CCombo;
@@ -62,14 +74,20 @@
 import org.eclipse.swt.widgets.Item;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.swt.widgets.Scale;
+import org.eclipse.swt.widgets.ScrollBar;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Spinner;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
 import org.eclipse.swt.widgets.ToolTip;
 import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.Widget;
 
 /**
  * @since 1.1
@@ -90,15 +108,22 @@
 		RealmTester.setDefault(null);
 	}
 
+	protected Shell getShell() {
+		if (shell == null) {
+			shell = new Shell(SWT.V_SCROLL);
+		}
+		return shell;
+	}
+
 	public void testObserveForeground() throws Exception {
 		ISWTObservableValue value = SWTObservables.observeForeground(shell);
-		assertNotNull(value);
+		assertWidgetObservable(value, shell, ControlForegroundProperty.class);
 		assertEquals(Color.class, value.getValueType());
 	}
 
 	public void testObserveBackground() throws Exception {
 		ISWTObservableValue value = SWTObservables.observeBackground(shell);
-		assertNotNull(value);
+		assertWidgetObservable(value, shell, ControlBackgroundProperty.class);
 		assertEquals(Color.class, value.getValueType());
 	}
 
@@ -111,82 +136,55 @@
 	public void testObserveSelectionOfSpinner() throws Exception {
 		Spinner spinner = new Spinner(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeSelection(spinner);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == spinner);
-
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof SpinnerSelectionProperty);
+		assertWidgetObservable(value, spinner, SpinnerSelectionProperty.class);
 	}
 
 	public void testObserveSelectionOfButton() throws Exception {
 		Button button = new Button(shell, SWT.PUSH);
 		ISWTObservableValue value = SWTObservables.observeSelection(button);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == button);
+		assertWidgetObservable(value, button, ButtonSelectionProperty.class);
 	}
 
 	public void testObserveSelectionOfCombo() throws Exception {
 		Combo combo = new Combo(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeSelection(combo);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == combo);
-
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof ComboSelectionProperty);
+		assertWidgetObservable(value, combo, ComboSelectionProperty.class);
 	}
 
 	public void testObserveSelectionOfCCombo() throws Exception {
 		CCombo combo = new CCombo(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeSelection(combo);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == combo);
-
-		IPropertyObservable property = getPropertyObservable(value);
-		assertTrue(property.getProperty() instanceof CComboSelectionProperty);
+		assertWidgetObservable(value, combo, CComboSelectionProperty.class);
 	}
 
 	public void testObserveSelectionOfDateTime_Date() throws Exception {
 		DateTime dateTime = new DateTime(shell, SWT.DATE);
 		ISWTObservableValue value = SWTObservables.observeSelection(dateTime);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == dateTime);
-		IPropertyObservable property = getPropertyObservable(value);
-		assertTrue(property.getProperty() instanceof DateTimeSelectionProperty);
+		assertWidgetObservable(value, dateTime, DateTimeSelectionProperty.class);
 	}
 
 	public void testObserveSelectionOfDateTime_Calendar() throws Exception {
 		DateTime dateTime = new DateTime(shell, SWT.CALENDAR);
 		ISWTObservableValue value = SWTObservables.observeSelection(dateTime);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == dateTime);
-		IPropertyObservable property = getPropertyObservable(value);
-		assertTrue(property.getProperty() instanceof DateTimeSelectionProperty);
+		assertWidgetObservable(value, dateTime, DateTimeSelectionProperty.class);
 	}
 
 	public void testObserveSelectionOfDateTime_Time() throws Exception {
 		DateTime dateTime = new DateTime(shell, SWT.TIME);
 		ISWTObservableValue value = SWTObservables.observeSelection(dateTime);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == dateTime);
-		IPropertyObservable property = getPropertyObservable(value);
-		assertTrue(property.getProperty() instanceof DateTimeSelectionProperty);
+		assertWidgetObservable(value, dateTime, DateTimeSelectionProperty.class);
 	}
 
 	public void testObserveSelectionOfList() throws Exception {
 		List list = new List(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeSelection(list);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == list);
+		assertWidgetObservable(value, list, ListSelectionProperty.class);
 	}
 
 	public void testObserveSelectionOfScale() throws Exception {
 		Scale scale = new Scale(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeSelection(scale);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == scale);
-
-		IPropertyObservable property = getPropertyObservable(value);
-		assertTrue(property.getProperty() instanceof ScaleSelectionProperty);
+		assertWidgetObservable(value, scale, ScaleSelectionProperty.class);
 	}
 
 	public void testObserveSelectionOfUnsupportedControl() throws Exception {
@@ -204,10 +202,7 @@
 
 		ISWTObservableValue value = SWTObservables.observeText(text,
 				SWT.FocusOut);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == text);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof TextTextProperty);
+		assertWidgetObservable(value, text, TextTextProperty.class);
 
 		assertFalse(text.isListening(SWT.FocusOut));
 		ChangeEventTracker.observe(value);
@@ -220,10 +215,7 @@
 
 		ISWTObservableValue value = SWTObservables.observeText(text,
 				SWT.FocusOut);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == text);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof StyledTextTextProperty);
+		assertWidgetObservable(value, text, StyledTextTextProperty.class);
 
 		assertFalse(text.isListening(SWT.FocusOut));
 		ChangeEventTracker.observe(value);
@@ -242,45 +234,32 @@
 	public void testObserveTextOfButton() throws Exception {
 		Button button = new Button(shell, SWT.PUSH);
 		ISWTObservableValue value = SWTObservables.observeText(button);
-		assertNotNull(button);
-		assertTrue(value.getWidget() == button);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof ButtonTextProperty);
+		assertWidgetObservable(value, button, ButtonTextProperty.class);
 	}
 
 	public void testObserveTextOfLabel() throws Exception {
 		Label label = new Label(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeText(label);
-		assertNotNull(label);
-		assertTrue(value.getWidget() == label);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof LabelTextProperty);
+		assertWidgetObservable(value, label, LabelTextProperty.class);
 	}
 
 	public void testObserveTextOfCLabel() throws Exception {
 		CLabel label = new CLabel(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeText(label);
-		assertNotNull(label);
-		assertTrue(value.getWidget() == label);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof CLabelTextProperty);
+		assertWidgetObservable(value, label, CLabelTextProperty.class);
 	}
 
 	public void testObserveTextOfCombo() throws Exception {
 		Combo combo = new Combo(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeText(combo);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == combo);
-
-		assertTrue(getPropertyObservable(value).getProperty() instanceof ComboTextProperty);
+		assertWidgetObservable(value, combo, ComboTextProperty.class);
 	}
 
 	/**
 	 * @param observable
 	 * @return
 	 */
-	private IPropertyObservable getPropertyObservable(
-			ISWTObservableValue observable) {
+	private IPropertyObservable getPropertyObservable(ISWTObservable observable) {
 		IDecoratingObservable decoratingObservable = (IDecoratingObservable) observable;
 		IPropertyObservable propertyObservable = (IPropertyObservable) decoratingObservable
 				.getDecorated();
@@ -290,23 +269,14 @@
 	public void testObserveTextOfCCombo() throws Exception {
 		CCombo combo = new CCombo(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeText(combo);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == combo);
-
-		IDecoratingObservable decorating = (IDecoratingObservable) value;
-		IPropertyObservable property = (IPropertyObservable) decorating
-				.getDecorated();
-		assertTrue(property.getProperty() instanceof CComboTextProperty);
+		assertWidgetObservable(value, combo, CComboTextProperty.class);
 	}
 
 	public void testObserveTextOfText() throws Exception {
 		Text text = new Text(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeText(text);
-		assertNotNull(value);
 
-		assertTrue(value.getWidget() == text);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof TextTextProperty);
+		assertWidgetObservable(value, text, TextTextProperty.class);
 
 		assertFalse(text.isListening(SWT.Modify));
 		assertFalse(text.isListening(SWT.FocusOut));
@@ -316,10 +286,7 @@
 		CTabFolder ctf = new CTabFolder(shell, SWT.NONE);
 		Item item = new CTabItem(ctf, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeText(item);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == item);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof ItemTextProperty);
+		assertWidgetObservable(value, item, ItemTextProperty.class);
 	}
 
 	public void testObserveTextOfUnsupportedControl() throws Exception {
@@ -334,48 +301,33 @@
 	public void testObserveImageOfButton() throws Exception {
 		Button button = new Button(shell, SWT.PUSH);
 		ISWTObservableValue value = SWTObservables.observeImage(button);
-		assertNotNull(button);
-		assertTrue(value.getWidget() == button);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof ButtonImageProperty);
+		assertWidgetObservable(value, button, ButtonImageProperty.class);
 	}
 
 	public void testObserveImageOfCLabel() throws Exception {
 		CLabel cLabel = new CLabel(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeImage(cLabel);
-		assertNotNull(cLabel);
-		assertTrue(value.getWidget() == cLabel);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof CLabelImageProperty);
+		assertWidgetObservable(value, cLabel, CLabelImageProperty.class);
 	}
 
 	public void testObserveImageOfItem() throws Exception {
 		CTabFolder ctf = new CTabFolder(shell, SWT.NONE);
 		Item item = new CTabItem(ctf, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeImage(item);
-		assertNotNull(item);
-		assertTrue(value.getWidget() == item);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof ItemImageProperty);
+		assertWidgetObservable(value, item, ItemImageProperty.class);
 	}
 
 	public void testObserveImageOfLabel() throws Exception {
 		Label label = new Label(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeImage(label);
-		assertNotNull(label);
-		assertTrue(value.getWidget() == label);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof LabelImageProperty);
+		assertWidgetObservable(value, label, LabelImageProperty.class);
 	}
 
 	public void testObserveTooltipOfItem() throws Exception {
 		CTabFolder ctf = new CTabFolder(shell, SWT.NONE);
 		Item item = new CTabItem(ctf, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeTooltipText(item);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == item);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof CTabItemTooltipTextProperty);
+		assertWidgetObservable(value, item, CTabItemTooltipTextProperty.class);
 	}
 
 	public void testObserveTooltipOfUnsupportedControl() throws Exception {
@@ -390,34 +342,28 @@
 	public void testObserveTooltipOfControl() throws Exception {
 		Label label = new Label(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeTooltipText(label);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == label);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof ControlTooltipTextProperty);
+		assertWidgetObservable(value, label, ControlTooltipTextProperty.class);
 	}
 
 	public void testObserveItemsOfCombo() throws Exception {
 		Combo combo = new Combo(shell, SWT.NONE);
-		IObservableList list = SWTObservables.observeItems(combo);
-		assertNotNull(list);
-		assertTrue(list instanceof ISWTObservable);
-		assertTrue(((ISWTObservable) list).getWidget() == combo);
+		ISWTObservableList list = (ISWTObservableList) SWTObservables
+				.observeItems(combo);
+		assertWidgetObservable(list, combo, ComboItemsProperty.class);
 	}
 
 	public void testObserveItemsOfCCombo() throws Exception {
 		CCombo ccombo = new CCombo(shell, SWT.NONE);
-		IObservableList list = SWTObservables.observeItems(ccombo);
-		assertNotNull(list);
-		ISWTObservable swtObservable = (ISWTObservable) list;
-		assertTrue(swtObservable.getWidget() == ccombo);
+		ISWTObservableList list = (ISWTObservableList) SWTObservables
+				.observeItems(ccombo);
+		assertWidgetObservable(list, ccombo, CComboItemsProperty.class);
 	}
 
 	public void testObserveItemsOfList() throws Exception {
 		List list = new List(shell, SWT.NONE);
-		IObservableList observableList = SWTObservables.observeItems(list);
-		assertNotNull(observableList);
-		ISWTObservable swtObservable = (ISWTObservable) observableList;
-		assertTrue(swtObservable.getWidget() == list);
+		ISWTObservableList observableList = (ISWTObservableList) SWTObservables
+				.observeItems(list);
+		assertWidgetObservable(observableList, list, ListItemsProperty.class);
 	}
 
 	public void testObserveItemsOfUnsupportedControl() throws Exception {
@@ -433,10 +379,8 @@
 		Table table = new Table(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables
 				.observeSingleSelectionIndex(table);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == table);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof TableSingleSelectionIndexProperty);
+		assertWidgetObservable(value, table,
+				TableSingleSelectionIndexProperty.class);
 	}
 
 	public void testObserveSingleSelectionIndexOfCCombo_DeselectAll()
@@ -557,21 +501,13 @@
 	public void testObserveMinOfSpinner() throws Exception {
 		Spinner spinner = new Spinner(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeMin(spinner);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == spinner);
-
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof SpinnerMinimumProperty);
+		assertWidgetObservable(value, spinner, SpinnerMinimumProperty.class);
 	}
 
 	public void testObserveMinOfScale() throws Exception {
 		Scale scale = new Scale(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeMin(scale);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == scale);
-
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof ScaleMinimumProperty);
+		assertWidgetObservable(value, scale, ScaleMinimumProperty.class);
 	}
 
 	public void testObserveMinOfUnsupportedControl() throws Exception {
@@ -586,21 +522,13 @@
 	public void testObserveMaxOfSpinner() throws Exception {
 		Spinner spinner = new Spinner(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeMax(spinner);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == spinner);
-
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof SpinnerMaximumProperty);
+		assertWidgetObservable(value, spinner, SpinnerMaximumProperty.class);
 	}
 
 	public void testObserveMaxOfScale() throws Exception {
 		Scale scale = new Scale(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeMax(scale);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == scale);
-
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof ScaleMaximumProperty);
+		assertWidgetObservable(value, scale, ScaleMaximumProperty.class);
 	}
 
 	public void testObserveMaxOfUnsupportedControl() throws Exception {
@@ -615,10 +543,48 @@
 	public void testObserveEditableOfText() throws Exception {
 		Text text = new Text(shell, SWT.NONE);
 		ISWTObservableValue value = SWTObservables.observeEditable(text);
-		assertNotNull(value);
-		assertTrue(value.getWidget() == text);
-		IPropertyObservable propertyObservable = getPropertyObservable(value);
-		assertTrue(propertyObservable.getProperty() instanceof TextEditableProperty);
+		assertWidgetObservable(value, text, TextEditableProperty.class);
+	}
+
+	public void testObserveEnabledOfMenu() throws Exception {
+		Menu menu = new Menu(shell, SWT.BAR);
+		ISWTObservableValue value = SWTObservables.observeEnabled(menu);
+		assertWidgetObservable(value, menu, MenuEnabledProperty.class);
+	}
+
+	public void testObserveEnabledOfMenuItem() throws Exception {
+		Menu menu = new Menu(shell, SWT.DROP_DOWN);
+		MenuItem item = new MenuItem(menu, SWT.PUSH);
+		ISWTObservableValue value = SWTObservables.observeEnabled(item);
+		assertWidgetObservable(value, item, MenuItemEnabledProperty.class);
+	}
+
+	public void testObserveSelectionOfMenuItem() throws Exception {
+		Menu menu = new Menu(shell, SWT.DROP_DOWN);
+		MenuItem item = new MenuItem(menu, SWT.PUSH);
+		ISWTObservableValue value = SWTObservables.observeSelection(item);
+		assertWidgetObservable(value, item, MenuItemSelectionProperty.class);
+	}
+
+	public void testObserveEnabledOfScrollBar() throws Exception {
+		ScrollBar scrollBar = shell.getVerticalBar();
+		ISWTObservableValue value = SWTObservables.observeEnabled(scrollBar);
+		assertWidgetObservable(value, scrollBar, ScrollBarEnabledProperty.class);
+	}
+
+	public void testObserveEnabledOfToolItem() throws Exception {
+		ToolBar bar = new ToolBar(shell, SWT.HORIZONTAL);
+		ToolItem item = new ToolItem(bar, SWT.PUSH);
+		ISWTObservableValue value = SWTObservables.observeEnabled(item);
+		assertWidgetObservable(value, item, ToolItemEnabledProperty.class);
+	}
+
+	private void assertWidgetObservable(ISWTObservable observable,
+			Widget widget, Class propertyClass) {
+		assertNotNull(observable);
+		assertTrue(observable.getWidget() == widget);
+		IPropertyObservable propertyObservable = getPropertyObservable(observable);
+		assertTrue(propertyClass.isInstance(propertyObservable.getProperty()));
 	}
 
 	public void testObserveEditableOfUnsupportedControl() throws Exception {
diff --git a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/WidgetPropertiesTest.java b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/WidgetPropertiesTest.java
index 657e593..767688a 100644
--- a/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/WidgetPropertiesTest.java
+++ b/tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/swt/WidgetPropertiesTest.java
@@ -25,6 +25,9 @@
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.ScrollBar;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.TabFolder;
 import org.eclipse.swt.widgets.TabItem;
@@ -70,6 +73,13 @@
 		RealmTester.setDefault(null);
 	}
 
+	protected Shell getShell() {
+		if (shell == null) {
+			shell = new Shell(SWT.V_SCROLL);
+		}
+		return shell;
+	}
+
 	public void testImage_ObserveButton() {
 		Button button = /* who's got the */new Button(shell, SWT.PUSH);
 		button.setImage(image1);
@@ -208,4 +218,73 @@
 		observable.setValue(string2);
 		assertEquals(string2, column.getToolTipText());
 	}
+
+	public void testEnabled_ObserveMenu() {
+		Menu menu = new Menu(shell, SWT.BAR);
+		IObservableValue observable = WidgetProperties.enabled().observe(menu);
+
+		assertEquals(boolean.class, observable.getValueType());
+
+		menu.setEnabled(true);
+		assertEquals(Boolean.TRUE, observable.getValue());
+
+		observable.setValue(Boolean.FALSE);
+		assertEquals(false, menu.getEnabled());
+	}
+
+	public void testEnabled_ObserveMenuItem() {
+		Menu menu = new Menu(shell, SWT.BAR);
+		MenuItem item = new MenuItem(menu, SWT.PUSH);
+		IObservableValue observable = WidgetProperties.enabled().observe(item);
+
+		assertEquals(boolean.class, observable.getValueType());
+
+		item.setEnabled(true);
+		assertEquals(Boolean.TRUE, observable.getValue());
+
+		observable.setValue(Boolean.FALSE);
+		assertEquals(false, item.getEnabled());
+	}
+
+	public void testSelection_ObserveMenuItem() {
+		Menu menu = new Menu(shell, SWT.BAR);
+		MenuItem item = new MenuItem(menu, SWT.CHECK);
+		IObservableValue observable = WidgetProperties.selection()
+				.observe(item);
+
+		assertEquals(boolean.class, observable.getValueType());
+
+		item.setSelection(true);
+		assertEquals(Boolean.TRUE, observable.getValue());
+
+		observable.setValue(Boolean.FALSE);
+		assertEquals(false, item.getSelection());
+	}
+
+	public void testEnabled_ObserveScrollBar() {
+		ScrollBar bar = shell.getVerticalBar();
+		IObservableValue observable = WidgetProperties.enabled().observe(bar);
+
+		assertEquals(boolean.class, observable.getValueType());
+
+		bar.setEnabled(true);
+		assertEquals(Boolean.TRUE, observable.getValue());
+
+		observable.setValue(Boolean.FALSE);
+		assertEquals(false, bar.getEnabled());
+	}
+
+	public void testEnabled_ObserveToolItem() {
+		ToolBar bar = new ToolBar(shell, SWT.HORIZONTAL);
+		ToolItem item = new ToolItem(bar, SWT.PUSH);
+		IObservableValue observable = WidgetProperties.enabled().observe(item);
+
+		assertEquals(boolean.class, observable.getValueType());
+
+		item.setEnabled(true);
+		assertEquals(Boolean.TRUE, observable.getValue());
+
+		observable.setValue(Boolean.FALSE);
+		assertEquals(false, item.getEnabled());
+	}
 }
diff --git a/tests/org.eclipse.ui.tests.forms/META-INF/MANIFEST.MF b/tests/org.eclipse.ui.tests.forms/META-INF/MANIFEST.MF
index 141e3a3..74e4fa8 100755
--- a/tests/org.eclipse.ui.tests.forms/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.ui.tests.forms/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: Forms Test
 Bundle-SymbolicName: org.eclipse.ui.tests.forms;singleton:=true
-Bundle-Version: 3.3.200.qualifier
+Bundle-Version: 3.3.300.qualifier
 Bundle-Activator: org.eclipse.ui.tests.forms.plugin.FormsTestPlugin
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
diff --git a/tests/org.eclipse.ui.tests.forms/forms/org/eclipse/ui/tests/forms/layout/AllLayoutTests.java b/tests/org.eclipse.ui.tests.forms/forms/org/eclipse/ui/tests/forms/layout/AllLayoutTests.java
index 4f47a8f..94b120d 100755
--- a/tests/org.eclipse.ui.tests.forms/forms/org/eclipse/ui/tests/forms/layout/AllLayoutTests.java
+++ b/tests/org.eclipse.ui.tests.forms/forms/org/eclipse/ui/tests/forms/layout/AllLayoutTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@
 				"org.eclipse.ua.tests.forms.AllLayoutTests");
 		//$JUnit-BEGIN$
 		suite.addTestSuite(TestTableWrapLayout.class);
+		suite.addTestSuite(TestColumnWrapLayout.class);
 		//$JUnit-END$
 		return suite;
 	}
diff --git a/tests/org.eclipse.ui.tests.forms/forms/org/eclipse/ui/tests/forms/layout/TestColumnWrapLayout.java b/tests/org.eclipse.ui.tests.forms/forms/org/eclipse/ui/tests/forms/layout/TestColumnWrapLayout.java
new file mode 100644
index 0000000..64db371
--- /dev/null
+++ b/tests/org.eclipse.ui.tests.forms/forms/org/eclipse/ui/tests/forms/layout/TestColumnWrapLayout.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ui.tests.forms.layout;
+
+import junit.framework.TestCase;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.widgets.ColumnLayout;
+import org.eclipse.ui.internal.forms.widgets.ColumnLayoutUtils;
+
+public class TestColumnWrapLayout extends TestCase {
+	
+	private final Point p20 = new Point(100, 20);		
+	private final Point p30 = new Point(100, 30);	
+	private final Point p50 = new Point(100, 50);
+	private final Point p100 = new Point(100, 100);
+	private final Point p200 = new Point(100, 200);
+
+	public void testEqualSizeColumns() {
+		Point[] sizes = { p20, p30, p30, p20, p20, p30 };
+		assertEquals(50, ColumnLayoutUtils.computeColumnHeight(3, sizes, 237, 0));
+	}
+	
+	public void testEqualSizeColumnsWithMargins() {
+		Point[] sizes = { p20, p30, p30, p20, p20, p30 };
+		assertEquals(60, ColumnLayoutUtils.computeColumnHeight(3, sizes, 200, 10));
+	}
+
+	public void testVariedSizeColumns() {
+		Point[] sizes = { p200, p200, p30 };
+		assertEquals(230, ColumnLayoutUtils.computeColumnHeight(2, sizes, 100, 0));
+	}
+
+	public void testLastEntryLargest() {
+		Point[] sizes = { p50, p30, p30, p30, p50, p50, p100 };
+		assertEquals(100, ColumnLayoutUtils.computeColumnHeight(4, sizes, 100, 0));
+	}
+	
+	public void testLargeMargins() {
+		Point[] sizes = { p20, p20, p20, p20, p20, p50, p50};
+		assertEquals(260, ColumnLayoutUtils.computeColumnHeight(3, sizes, 100, 100));
+	}
+	
+	private class SizedComposite extends Composite {
+		
+		int height;
+
+		public SizedComposite(Composite parent, int style, int height) {
+			super(parent, style);
+			this.height = height;
+		}
+		
+		public Point computeSize(int wHint, int hHint, boolean changed) {
+			return new Point( 20, height); 
+		}		
+	}
+	
+	/**
+	 * Test that labels with the WRAP property set do indeed wrap.
+	 */
+	public void testColumnLayoutInShell() {
+		Display display = PlatformUI.getWorkbench().getDisplay();
+		Shell shell = new Shell(display);
+		shell.setSize(100, 300);
+		shell.setLayout(new GridLayout());
+		Composite inner = new Composite(shell, SWT.NULL);
+		ColumnLayout layout = new ColumnLayout();
+		layout.verticalSpacing = 5;
+		layout.minNumColumns = 2;
+		layout.maxNumColumns = 2;
+		layout.topMargin=2;
+		layout.bottomMargin=3;
+		inner.setLayout(layout);
+		new SizedComposite(inner, SWT.NULL, 30);
+		new SizedComposite(inner, SWT.NULL, 40);
+		new SizedComposite(inner, SWT.NULL, 20);
+		shell.layout(true);
+		assertEquals(70, inner.getSize().y);
+		shell.dispose();
+	}
+
+}
diff --git a/tests/org.eclipse.ui.tests.harness/META-INF/MANIFEST.MF b/tests/org.eclipse.ui.tests.harness/META-INF/MANIFEST.MF
index a921da7..6c98544 100644
--- a/tests/org.eclipse.ui.tests.harness/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.ui.tests.harness/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: Harness Plug-in
 Bundle-SymbolicName: org.eclipse.ui.tests.harness;singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.100.qualifier
 Bundle-Activator: org.eclipse.ui.tests.harness.UITestHarnessPlugin
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui,
diff --git a/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/RCPTestWorkbenchAdvisor.java b/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/RCPTestWorkbenchAdvisor.java
index aacba28..8b76acd 100644
--- a/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/RCPTestWorkbenchAdvisor.java
+++ b/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/RCPTestWorkbenchAdvisor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,10 +34,10 @@
 	
 	// the following fields are set by the threads that attempt sync/asyncs
 	// during startup.
-	public static Boolean syncWithDisplayAccess = null;
-	public static Boolean asyncWithDisplayAccess = null;
-	public static Boolean syncWithoutDisplayAccess = null;
-	public static Boolean asyncWithoutDisplayAccess = null;
+	public static volatile Boolean syncWithDisplayAccess = null;
+	public static volatile Boolean asyncWithDisplayAccess = null;
+	public static volatile Boolean syncWithoutDisplayAccess = null;
+	public static volatile Boolean asyncWithoutDisplayAccess = null;
 	
 	private static boolean started = false;
 
@@ -50,6 +50,8 @@
 	/** Default value of -1 causes the option to be ignored. */
 	private int idleBeforeExit = -1;
 
+	private boolean windowlessApp = false;
+
 	/**
 	 * Traps whether or not calls to displayAccess in the UI thread resulted in
 	 * an exception. Should be false.
@@ -61,11 +63,22 @@
 		// close
 		this.idleBeforeExit = -1;
 	}
-
+	
 	public RCPTestWorkbenchAdvisor(int idleBeforeExit) {
 		this.idleBeforeExit = idleBeforeExit;
 	}
 
+	/**
+	 * 
+	 * Enables the RCP application to runwithout a workbench window
+	 * 
+	 * @param runWithoutWindow
+	 * 
+	 */
+	public RCPTestWorkbenchAdvisor(boolean windowlessApp) {
+		this.windowlessApp = windowlessApp;
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -87,6 +100,12 @@
 		prefs.setValue(IWorkbenchPreferenceConstants.SHOW_PROGRESS_ON_STARTUP,
 				false);
 		prefs.setValue(IWorkbenchPreferenceConstants.SHOW_INTRO, false);
+		
+		if(windowlessApp) {
+			configurer.setSaveAndRestore(true);
+			configurer.setExitOnLastWindowClose(false);
+		}
+		
 	}
 
 	/*
diff --git a/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/TweakletCheckTest.java b/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/TweakletCheckTest.java
index edb895f..d5cc897 100644
--- a/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/TweakletCheckTest.java
+++ b/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/TweakletCheckTest.java
@@ -16,6 +16,8 @@
 import junit.framework.TestResult;
 import junit.framework.TestSuite;
 
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
 import org.eclipse.core.runtime.IExtensionPoint;
 import org.eclipse.core.runtime.Platform;
 
@@ -29,6 +31,8 @@
  */
 public class TweakletCheckTest extends TestCase {
 
+	String[] allowedTweaklets = {"org.eclipse.ui.cocoa.titlePathUpdaterTweaklet"};
+	
 	/**
 	 * 
 	 */
@@ -46,10 +50,20 @@
 		result.startTest(this);
 		try {
 			IExtensionPoint point = Platform.getExtensionRegistry()
-
 			.getExtensionPoint("org.eclipse.ui.internalTweaklets");
-			boolean abort = point.getExtensions().length > 0;
-
+			IExtension[] extensions = point.getExtensions();
+			boolean abort = false;
+			outer:
+			for (int i = 0; i < extensions.length; i++) {
+				IConfigurationElement[] elements = extensions[i].getConfigurationElements();
+				for (int j = 0; j < elements.length; j++) {
+					String id = elements[j].getAttribute("id");
+					if(!isAllowedTweaklet(id)) {
+						abort = true;
+						break outer;
+					}
+				}
+			}
 			if (abort) {
 				Error error = new Error(
 						"Tweaklets present in test setup - all test results are now suspect.  Please restart the tests with the tweaklet extensions removed.");
@@ -62,6 +76,17 @@
 
 	}
 
+	private boolean isAllowedTweaklet(String id) {
+		boolean allowed = false;
+		for (int j = 0; j < allowedTweaklets.length; j++) {
+			if(allowedTweaklets[j].equals(id)) {
+				allowed = true;
+				break;
+			}
+		}
+		return allowed;
+	}
+
 	public static Test suite() {
 		TestSuite test = new TestSuite();
 		test.addTest(new TweakletCheckTest());
diff --git a/tests/org.eclipse.ui.tests.navigator/META-INF/MANIFEST.MF b/tests/org.eclipse.ui.tests.navigator/META-INF/MANIFEST.MF
index 81d89bb..66b9c9e 100644
--- a/tests/org.eclipse.ui.tests.navigator/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.ui.tests.navigator/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %bundlename
 Bundle-SymbolicName: org.eclipse.ui.tests.navigator;singleton:=true
 Bundle-Activator: org.eclipse.ui.tests.navigator.NavigatorTestsPlugin
-Bundle-Version: 3.4.0.qualifier
+Bundle-Version: 3.4.100.qualifier
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.core.resources,
  org.eclipse.core.runtime,
diff --git a/tests/org.eclipse.ui.tests.navigator/Navigator Test Suite.launch b/tests/org.eclipse.ui.tests.navigator/Navigator Test Suite.launch
index a4d3705..015a0e9 100644
--- a/tests/org.eclipse.ui.tests.navigator/Navigator Test Suite.launch
+++ b/tests/org.eclipse.ui.tests.navigator/Navigator Test Suite.launch
@@ -1,10 +1,9 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
 <booleanAttribute key="askclear" value="false"/>
 <booleanAttribute key="automaticAdd" value="true"/>
 <booleanAttribute key="automaticValidate" value="false"/>
 <stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="org.eclipse.ui.navigator"/>
+<stringAttribute key="checked" value="[NONE]"/>
 <booleanAttribute key="clearConfig" value="true"/>
 <booleanAttribute key="clearws" value="true"/>
 <booleanAttribute key="clearwslog" value="false"/>
@@ -31,6 +30,7 @@
 <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
 <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
 <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ui.tests.navigator.NavigatorTestSuite"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ui.tests.navigator"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
@@ -41,295 +41,296 @@
 <stringAttribute key="templateConfig" value=""/>
 <booleanAttribute key="tracing" value="false"/>
 <mapAttribute key="tracingOptions">
-<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/beginend" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
-<mapEntry key="org.eclipse.ui.navigator/debug/viewermap" value="true"/>
-<mapEntry key="org.eclipse.ui/trace/sources" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
-<mapEntry key="org.eclipse.jface/debug/viewers/reentrantViewerCalls" value="false"/>
-<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/checkConditions" value="300"/>
-<mapEntry key="org.eclipse.jface.text.source/debug/RevisionRulerColumn" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/updateSequence" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/filename" value="runtime.traces"/>
-<mapEntry key="org.eclipse.debug.ui/debug/contextlaunching" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
-<mapEntry key="org.eclipse.jface.text/assert/TextSelection/validConstructorArguments" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/printHTML" value="false"/>
-<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/createChanges" value="300"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPerspectiveListener" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/debug" value="false"/>
-<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/AbstractInformationControlManager" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
-<mapEntry key="org.eclipse.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
-<mapEntry key="org.eclipse.jface/trace/actions" value="false"/>
-<mapEntry key="org.eclipse.pde.core/classpath" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/general" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.performance" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations.verbose" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/activation" value="false"/>
-<mapEntry key="org.eclipse.debug.core/debug/commands" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/workbench.restore" value="30000"/>
-<mapEntry key="org.eclipse.team.core/threading" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/presentationId" value=""/>
-<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFileMaps" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logsynchronously" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/workingSets" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/stateSaveRestore" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/activation" value="false"/>
-<mapEntry key="org.eclipse.equinox.ds/instantiate_all" value="false"/>
-<mapEntry key="org.eclipse.help/debug/toc" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
-<mapEntry key="org.eclipse.pde.build/debug" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/ContentAssistSubjectAdapters" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/search/participants" value="300"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.create" value="800"/>
-<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/generics" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPropertyChangeListener" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/requires" value="false"/>
-<mapEntry key="org.eclipse.core.resources/refresh" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/containerinitializer" value="5000"/>
-<mapEntry key="org.eclipse.osgi/profile/benchmark" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/builder/stats" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/ASTProvider" value="false"/>
-<mapEntry key="org.eclipse.equinox.security.ui/debug/storage" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.performance" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/completion" value="300"/>
-<mapEntry key="org.eclipse.osgi/profile/startup" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/save.participants" value="500"/>
-<mapEntry key="org.eclipse.equinox.ds/debug" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/timing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/reconcile" value="1000"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPageListener" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype/cache" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/locks" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose.commandId" value=""/>
-<mapEntry key="org.eclipse.ui.ide/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/debug" value="false"/>
-<mapEntry key="org.eclipse.pde.core/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPartReference" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/job.stale" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/createPartControl" value="1300"/>
-<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/variableinitializer" value="5000"/>
-<mapEntry key="org.eclipse.ui.ide/debug/internalerror/openDialog" value="false"/>
-<mapEntry key="org.eclipse.core.resources/strings" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/sourcemapper" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
-<mapEntry key="org.eclipse.core.expressions/tracePropertyResolving" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/showHeapStatus" value="false"/>
-<mapEntry key="org.eclipse.core.resources/preferences" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
-<mapEntry key="org.eclipse.ui.navigator/debug/resolution" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist_sorters/extensions" value=""/>
-<mapEntry key="org.eclipse.osgi/debug/objectPool/adds" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel/cache" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logfilename" value=""/>
-<mapEntry key="org.eclipse.team.core/backgroundevents" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/indexmanager/advanced" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.activate" value="200"/>
-<mapEntry key="org.eclipse.ui.navigator/perf/explorer/createPartControl" value="1300"/>
-<mapEntry key="org.eclipse.update.core/debug" value="true"/>
-<mapEntry key="org.eclipse.osgi/debug/security" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/swtdebugglobal" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/builders" value="10000"/>
-<mapEntry key="org.eclipse.jface/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.listeners" value="200"/>
-<mapEntry key="org.eclipse.ui/debug/showAllJobs" value="false"/>
-<mapEntry key="org.eclipse.core.resources/history" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
-<mapEntry key="org.eclipse.pde.core/validation" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
-<mapEntry key="org.eclipse.jface.text/debug/AnnotationPainter" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/set" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.switch" value="800"/>
-<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
-<mapEntry key="org.eclipse.equinox.ds/print_on_console" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/bundleTime" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.engine/engine/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/uses" value="false"/>
-<mapEntry key="org.eclipse.equinox.security.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
-<mapEntry key="org.eclipse.jface/trace/toolbarDisposal" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/workbench.start" value="45000"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/perf/success" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/selection" value="300"/>
-<mapEntry key="org.eclipse.osgi/debug/startlevel" value="false"/>
-<mapEntry key="org.eclipse.equinox.security/debug/loginFramework" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/wiring" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/snapshot" value="1000"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.verbose" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/loader" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/makeActions" value="1000"/>
-<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin/resolver" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener2" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/markers" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
-<mapEntry key="org.eclipse.equinox.registry/debug/events" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/contentTypes" value="200"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser/inprocess" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/javadeltalistener" value="500"/>
-<mapEntry key="org.eclipse.core.resources/perf/listeners" value="500"/>
-<mapEntry key="org.eclipse.ui.intro/flags/noBrowser" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.engine/profileregistry/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.init" value="800"/>
-<mapEntry key="org.eclipse.equinox.security/debug" value="false"/>
 <mapEntry key="org.eclipse.core.contenttype/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/imports" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
 <mapEntry key="org.eclipse.core.expressions/debug/TypeExtensionManager" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.help/debug/context" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/manifest" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/multipageeditor" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFiles" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuildstack" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/swtdebug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
-<mapEntry key="org.eclipse.team.core/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/classLoading" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save" value="false"/>
+<mapEntry key="org.eclipse.core.expressions/tracePropertyResolving" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/beginend" value="false"/>
 <mapEntry key="org.eclipse.core.jobs/jobs/errorondeadlock" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/FastPartitioner/PositionCache" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/events" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/commands" value="false"/>
-<mapEntry key="org.eclipse.equinox.ds/performance" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/get" value="false"/>
-<mapEntry key="org.eclipse.ui.navigator/debug/setup" value="true"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/ResultCollector" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/launchhistory" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/objectPool/dups" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/model" value="false"/>
-<mapEntry key="org.eclipse.equinox.registry/debug" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution/advanced" value="false"/>
-<mapEntry key="org.eclipse.ui.navigator/debug/dnd" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/converter/debug" value="false"/>
-<mapEntry key="org.eclipse.pde.core/cache" value="false"/>
-<mapEntry key="org.eclipse.ui.navigator/debug/sort" value="true"/>
-<mapEntry key="org.eclipse.debug.core/debug/events" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.osgi/monitor/classes" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.input" value="200"/>
-<mapEntry key="org.eclipse.equinox.p2.engine/enginesession/debug" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/TypeConstraints" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/messageBundles" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta/verbose" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/contributions" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
-<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/BreadcrumbItemDropDown" value="false"/>
-<mapEntry key="org.eclipse.jdt.core.manipulation/debug" value="true"/>
-<mapEntry key="org.eclipse.debug.ui/debug/breadcrumb" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser" value="false"/>
-<mapEntry key="org.eclipse.help/debug/search" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.create" value="800"/>
-<mapEntry key="org.eclipse.core.resources/build/stacktrace" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logInfo" value="true"/>
-<mapEntry key="org.eclipse.team.core/streams" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/undomonitor" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/breakpointDeltas" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/RefactorActionGroup" value="150"/>
-<mapEntry key="org.eclipse.ui/experimental/menus" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/locks" value="false"/>
 <mapEntry key="org.eclipse.core.jobs/jobs/shutdown" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/packageadmin" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug/compilationEnv" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/compatibility/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/declaredImages" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/gc" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/contentProvider" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/services" value="false"/>
-<mapEntry key="org.eclipse.ui.workbench/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist/extensions" value="1000"/>
-<mapEntry key="org.eclipse.osgi/debug/filter" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/debug/toolbar" value="false"/>
-<mapEntry key="org.eclipse.debug.core/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
-<mapEntry key="org.eclipse.ui.browser/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/impl" value="org.eclipse.osgi.internal.profile.DefaultProfileLogger"/>
-<mapEntry key="org.eclipse.jface/debug/dialog/noparent" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/debug" value="false"/>
-<mapEntry key="org.eclipse.help/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/perf" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/filters" value="trace.properties"/>
-<mapEntry key="org.eclipse.ui/perf/part.listeners" value="200"/>
-<mapEntry key="org.eclipse.jdt.core/debug/formatter" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/viewer" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings.verbose" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/buffersize" value="256"/>
-<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/page.listeners" value="200"/>
-<mapEntry key="org.eclipse.jface/newlook/preferences/showNewLook" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution/failure" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.pluggable.core/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/resources" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.control" value="800"/>
-<mapEntry key="org.eclipse.ui.navigator/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/perf/uijob" value="200"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener2" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/timing" value="false"/>
 <mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
 <mapEntry key="org.eclipse.core.resources/build/interrupt" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/needbuildstack" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/stacktrace" value="false"/>
+<mapEntry key="org.eclipse.core.resources/contenttype" value="false"/>
+<mapEntry key="org.eclipse.core.resources/contenttype/cache" value="false"/>
+<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
+<mapEntry key="org.eclipse.core.resources/history" value="false"/>
+<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
+<mapEntry key="org.eclipse.core.resources/perf/builders" value="10000"/>
+<mapEntry key="org.eclipse.core.resources/perf/listeners" value="500"/>
+<mapEntry key="org.eclipse.core.resources/perf/save.participants" value="500"/>
+<mapEntry key="org.eclipse.core.resources/perf/snapshot" value="1000"/>
+<mapEntry key="org.eclipse.core.resources/preferences" value="false"/>
+<mapEntry key="org.eclipse.core.resources/refresh" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
+<mapEntry key="org.eclipse.core.resources/strings" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/compatibility/debug" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/perf" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/perf/success" value="false"/>
 <mapEntry key="org.eclipse.core.runtime/preferences/plugin" value="false"/>
 <mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/cycles" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/resolution" value="false"/>
-<mapEntry key="org.eclipse.update.configurator/debug" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
+<mapEntry key="org.eclipse.debug.core/debug" value="false"/>
+<mapEntry key="org.eclipse.debug.core/debug/commands" value="false"/>
+<mapEntry key="org.eclipse.debug.core/debug/events" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/breadcrumb" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/contextlaunching" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/launchhistory" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/breakpointDeltas" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/contentProvider" value="false"/>
 <mapEntry key="org.eclipse.debug.ui/debug/viewers/deltas" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/model" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/presentationId" value=""/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/stateSaveRestore" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/updateSequence" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/viewer" value="false"/>
+<mapEntry key="org.eclipse.equinox.ds/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.ds/instantiate_all" value="false"/>
+<mapEntry key="org.eclipse.equinox.ds/performance" value="false"/>
+<mapEntry key="org.eclipse.equinox.ds/print_on_console" value="false"/>
+<mapEntry key="org.eclipse.equinox.p2.engine/engine/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.p2.engine/enginesession/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.p2.engine/profileregistry/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.preferences/general" value="false"/>
+<mapEntry key="org.eclipse.equinox.preferences/get" value="false"/>
+<mapEntry key="org.eclipse.equinox.preferences/set" value="false"/>
+<mapEntry key="org.eclipse.equinox.registry/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.registry/debug/events" value="false"/>
+<mapEntry key="org.eclipse.equinox.security.ui/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.security.ui/debug/storage" value="false"/>
+<mapEntry key="org.eclipse.equinox.security/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.security/debug/loginFramework" value="false"/>
 <mapEntry key="org.eclipse.help.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser" value="false"/>
+<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser/inprocess" value="false"/>
+<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
+<mapEntry key="org.eclipse.help.webapp/debug" value="false"/>
+<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
+<mapEntry key="org.eclipse.help/debug" value="true"/>
+<mapEntry key="org.eclipse.help/debug/context" value="false"/>
+<mapEntry key="org.eclipse.help/debug/search" value="false"/>
+<mapEntry key="org.eclipse.help/debug/toc" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.core/debug" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.core/debug/compilationEnv" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFileMaps" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFiles" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.pluggable.core/debug" value="false"/>
+<mapEntry key="org.eclipse.jdt.core.manipulation/debug" value="true"/>
+<mapEntry key="org.eclipse.jdt.core/debug" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/builder/stats" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/cpresolution/advanced" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/cpresolution/failure" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/formatter" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/indexmanager/advanced" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javadelta/verbose" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javamodel/cache" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/resolution" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/sourcemapper" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/perf/completion" value="300"/>
+<mapEntry key="org.eclipse.jdt.core/perf/containerinitializer" value="5000"/>
+<mapEntry key="org.eclipse.jdt.core/perf/javadeltalistener" value="500"/>
+<mapEntry key="org.eclipse.jdt.core/perf/reconcile" value="1000"/>
+<mapEntry key="org.eclipse.jdt.core/perf/selection" value="300"/>
+<mapEntry key="org.eclipse.jdt.core/perf/variableinitializer" value="5000"/>
+<mapEntry key="org.eclipse.jdt.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.jdt.ui/debug/ASTProvider" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/debug/BreadcrumbItemDropDown" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/debug/ResultCollector" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/debug/TypeConstraints" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/content_assist/extensions" value="1000"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/content_assist_sorters/extensions" value=""/>
+<mapEntry key="org.eclipse.jdt.ui/perf/explorer/RefactorActionGroup" value="150"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/explorer/createPartControl" value="1300"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/explorer/makeActions" value="1000"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/search/participants" value="300"/>
+<mapEntry key="org.eclipse.jface.text.source/debug/RevisionRulerColumn" value="false"/>
+<mapEntry key="org.eclipse.jface.text/assert/TextSelection/validConstructorArguments" value="false"/>
+<mapEntry key="org.eclipse.jface.text/debug/AbstractInformationControlManager" value="false"/>
+<mapEntry key="org.eclipse.jface.text/debug/AnnotationPainter" value="false"/>
+<mapEntry key="org.eclipse.jface.text/debug/ContentAssistSubjectAdapters" value="false"/>
+<mapEntry key="org.eclipse.jface.text/debug/FastPartitioner/PositionCache" value="false"/>
+<mapEntry key="org.eclipse.jface/debug" value="false"/>
+<mapEntry key="org.eclipse.jface/debug/dialog/noparent" value="false"/>
+<mapEntry key="org.eclipse.jface/debug/viewers/reentrantViewerCalls" value="false"/>
+<mapEntry key="org.eclipse.jface/newlook/preferences/showNewLook" value="false"/>
+<mapEntry key="org.eclipse.jface/trace/actions" value="false"/>
+<mapEntry key="org.eclipse.jface/trace/toolbarDisposal" value="false"/>
+<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/checkConditions" value="300"/>
+<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/createChanges" value="300"/>
+<mapEntry key="org.eclipse.osgi/debug" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/bundleTime" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/events" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/filter" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/loader" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/manifest" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/messageBundles" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/objectPool/adds" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/objectPool/dups" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/packageadmin" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/security" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/services" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/startlevel" value="false"/>
+<mapEntry key="org.eclipse.osgi/defaultprofile/buffersize" value="256"/>
+<mapEntry key="org.eclipse.osgi/defaultprofile/logfilename" value=""/>
+<mapEntry key="org.eclipse.osgi/defaultprofile/logsynchronously" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/converter/debug" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug" value="false"/>
 <mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/location" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin/resolver" value="false"/>
+<mapEntry key="org.eclipse.osgi/monitor/activation" value="false"/>
+<mapEntry key="org.eclipse.osgi/monitor/classes" value="false"/>
+<mapEntry key="org.eclipse.osgi/monitor/resources" value="false"/>
+<mapEntry key="org.eclipse.osgi/profile/benchmark" value="false"/>
+<mapEntry key="org.eclipse.osgi/profile/debug" value="false"/>
+<mapEntry key="org.eclipse.osgi/profile/impl" value="org.eclipse.osgi.internal.profile.DefaultProfileLogger"/>
+<mapEntry key="org.eclipse.osgi/profile/startup" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/cycles" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/debug" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/generics" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/imports" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/requires" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/uses" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/wiring" value="false"/>
+<mapEntry key="org.eclipse.osgi/trace/activation" value="false"/>
+<mapEntry key="org.eclipse.osgi/trace/classLoading" value="false"/>
+<mapEntry key="org.eclipse.osgi/trace/filename" value="runtime.traces"/>
+<mapEntry key="org.eclipse.osgi/trace/filters" value="trace.properties"/>
+<mapEntry key="org.eclipse.pde.build/debug" value="false"/>
+<mapEntry key="org.eclipse.pde.core/cache" value="false"/>
+<mapEntry key="org.eclipse.pde.core/classpath" value="false"/>
+<mapEntry key="org.eclipse.pde.core/debug" value="false"/>
+<mapEntry key="org.eclipse.pde.core/validation" value="false"/>
+<mapEntry key="org.eclipse.team.core/backgroundevents" value="false"/>
+<mapEntry key="org.eclipse.team.core/debug" value="false"/>
+<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
+<mapEntry key="org.eclipse.team.core/streams" value="false"/>
+<mapEntry key="org.eclipse.team.core/threading" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
+<mapEntry key="org.eclipse.team.cvs.core/debug" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
+<mapEntry key="org.eclipse.ui.browser/debug" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/gc" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/internalerror/openDialog" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/markers" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/undomonitor" value="false"/>
+<mapEntry key="org.eclipse.ui.intro.universal/debug" value="true"/>
 <mapEntry key="org.eclipse.ui.intro.universal/trace/logInfo" value="true"/>
+<mapEntry key="org.eclipse.ui.intro.universal/trace/logPerformance" value="false"/>
+<mapEntry key="org.eclipse.ui.intro/debug" value="true"/>
+<mapEntry key="org.eclipse.ui.intro/debug/toolbar" value="false"/>
+<mapEntry key="org.eclipse.ui.intro/flags/noBrowser" value="false"/>
+<mapEntry key="org.eclipse.ui.intro/trace/logInfo" value="true"/>
+<mapEntry key="org.eclipse.ui.intro/trace/logPerformance" value="false"/>
+<mapEntry key="org.eclipse.ui.intro/trace/printHTML" value="false"/>
+<mapEntry key="org.eclipse.ui.navigator/debug" value="true"/>
+<mapEntry key="org.eclipse.ui.navigator/debug/dnd" value="false"/>
+<mapEntry key="org.eclipse.ui.navigator/debug/resolution" value="true"/>
+<mapEntry key="org.eclipse.ui.navigator/debug/setup" value="true"/>
+<mapEntry key="org.eclipse.ui.navigator/debug/sort" value="true"/>
+<mapEntry key="org.eclipse.ui.navigator/debug/viewermap" value="true"/>
+<mapEntry key="org.eclipse.ui.navigator/perf/explorer/createPartControl" value="1300"/>
+<mapEntry key="org.eclipse.ui.workbench/debug" value="false"/>
+<mapEntry key="org.eclipse.ui/debug" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/contributions" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/declaredImages" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/job.stale" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/showAllJobs" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/swtdebug" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/swtdebugglobal" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/workingSets" value="false"/>
+<mapEntry key="org.eclipse.ui/experimental/menus" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener2" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPropertyChangeListener" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPartReference" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPageListener" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener2" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPerspectiveListener" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/contentTypes" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/page.listeners" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/part.activate" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/part.control" value="800"/>
+<mapEntry key="org.eclipse.ui/perf/part.create" value="800"/>
+<mapEntry key="org.eclipse.ui/perf/part.init" value="800"/>
+<mapEntry key="org.eclipse.ui/perf/part.input" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/part.listeners" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/perspective.create" value="800"/>
+<mapEntry key="org.eclipse.ui/perf/perspective.listeners" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/perspective.switch" value="800"/>
+<mapEntry key="org.eclipse.ui/perf/showHeapStatus" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/uijob" value="200"/>
+<mapEntry key="org.eclipse.ui/perf/workbench.restore" value="30000"/>
+<mapEntry key="org.eclipse.ui/perf/workbench.start" value="45000"/>
+<mapEntry key="org.eclipse.ui/trace/commands" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/contexts" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/contexts.performance" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/contexts.verbose" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers.performance" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers.verbose" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers.verbose.commandId" value=""/>
+<mapEntry key="org.eclipse.ui/trace/keyBindings" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/keyBindings.verbose" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/multipageeditor" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/operations" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/operations.verbose" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/sources" value="false"/>
+<mapEntry key="org.eclipse.update.configurator/debug" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug" value="true"/>
+<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
 </mapAttribute>
+<booleanAttribute key="useCustomFeatures" value="false"/>
 <booleanAttribute key="useDefaultConfig" value="true"/>
 <booleanAttribute key="useDefaultConfigArea" value="false"/>
 <booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
+</launchConfiguration>
\ No newline at end of file
diff --git a/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NavigatorTestBase.java b/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NavigatorTestBase.java
index 6f3edb1..8df313b 100644
--- a/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NavigatorTestBase.java
+++ b/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NavigatorTestBase.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -154,6 +154,14 @@
 
 	protected static final boolean DEBUG = false;
 
+	public NavigatorTestBase() {
+		// placeholder
+	}
+
+	public NavigatorTestBase(String name) {
+		super(name);
+	}
+
 	protected void setUp() throws Exception {
 
 		if (_navigatorInstanceId == null) {
diff --git a/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NavigatorTestSuite.java b/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NavigatorTestSuite.java
index 6eee776..0789cdd 100644
--- a/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NavigatorTestSuite.java
+++ b/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NavigatorTestSuite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,7 +35,7 @@
 		addTest(new TestSuite(ActionProviderTest.class));
 		addTest(new TestSuite(ExtensionsTest.class));
 		addTest(new TestSuite(FilterTest.class));
-		addTest(new TestSuite(WorkingSetTest.class));
+		addTest(WorkingSetTest.suite());
 		addTest(new TestSuite(ActivityTest.class));
 		addTest(new TestSuite(OpenTest.class));
 		addTest(new TestSuite(INavigatorContentServiceTests.class));
diff --git a/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/SorterTest.java b/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/SorterTest.java
index 12c99ef..37d1d6c 100644
--- a/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/SorterTest.java
+++ b/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/SorterTest.java
@@ -109,8 +109,9 @@
 		_viewer.add(newData, file);
 	}
 
+	// The test is disabled until bug 309746 (intermittent test failures) can be fixed
 	// Bug 141724 Allow sorting to be overridden
-	public void testSorterContentOverride() throws Exception {
+	public void DISABLED_testSorterContentOverride() throws Exception {
 		waitForModelObjects();
 
 		INavigatorContentDescriptor desc = _contentService
diff --git a/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/WorkingSetTest.java b/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/WorkingSetTest.java
index cfbc668..cc77148 100644
--- a/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/WorkingSetTest.java
+++ b/tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/WorkingSetTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2010 Oakland Software Incorporated and others.
+ * Copyright (c) 2008, 2011 Oakland Software Incorporated and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.ui.tests.navigator;
 
+import junit.framework.TestSuite;
+
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.jface.util.IPropertyChangeListener;
@@ -20,6 +22,7 @@
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.IWorkingSetManager;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.ResourceWorkingSetFilter;
 import org.eclipse.ui.actions.WorkingSetFilterActionGroup;
@@ -35,26 +38,40 @@
 
 public class WorkingSetTest extends NavigatorTestBase {
 
+	public static TestSuite suite() {
+		TestSuite suite = new TestSuite("org.eclipse.ui.tests.navigator.WorkingSetTest");
+		suite.addTest(new WorkingSetTest("testEmptyWindowWorkingSet"));
+		suite.addTest(new WorkingSetTest("testMissingProjectsInWorkingSet"));
+		suite.addTest(new WorkingSetTest("testTopLevelWorkingSet"));
+		suite.addTest(new WorkingSetTest("testTopLevelChange"));
+		suite.addTest(new WorkingSetTest("testMultipleWorkingSets"));
+		suite.addTest(new WorkingSetTest("testWorkingSetFilter"));
+		suite.addTest(new WorkingSetTest("testDeletedAndRecreated"));
+		return suite;
+	}
+
 	public WorkingSetTest() {
 		_navigatorInstanceId = ProjectExplorer.VIEW_ID;
 	}
 
+	public WorkingSetTest(String name) {
+		super(name);
+		_navigatorInstanceId = ProjectExplorer.VIEW_ID;
+	}
+
 	// Bug 157877 when using empty window working set, it should show all
 	public void testEmptyWindowWorkingSet() throws Exception {
 
 		WorkingSetActionProvider provider = (WorkingSetActionProvider) TestAccessHelper
-				.getActionProvider(_contentService, _actionService,
-						WorkingSetActionProvider.class);
+				.getActionProvider(_contentService, _actionService, WorkingSetActionProvider.class);
 
-		IWorkingSet workingSet = PlatformUI.getWorkbench()
-				.getActiveWorkbenchWindow().getActivePage()
-				.getAggregateWorkingSet();
+		IWorkingSet workingSet = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+				.getActivePage().getAggregateWorkingSet();
 
 		// Set the filter to window working set (which should be empty)
 		IPropertyChangeListener l = provider.getFilterChangeListener();
 		PropertyChangeEvent event = new PropertyChangeEvent(this,
-				WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null,
-				workingSet);
+				WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null, workingSet);
 		l.propertyChange(event);
 
 		TreeItem[] items = _viewer.getTree().getItems();
@@ -69,19 +86,16 @@
 		IFile f1 = _p1.getFile("f1");
 
 		WorkingSetActionProvider provider = (WorkingSetActionProvider) TestAccessHelper
-				.getActionProvider(_contentService, _actionService,
-						WorkingSetActionProvider.class);
+				.getActionProvider(_contentService, _actionService, WorkingSetActionProvider.class);
 
-		IWorkingSet workingSet = new WorkingSet("ws1", "ws1",
-				new IAdaptable[] { f1 });
+		IWorkingSet workingSet = new WorkingSet("ws1", "ws1", new IAdaptable[] { f1 });
 
-		AggregateWorkingSet agWorkingSet = new AggregateWorkingSet("AgWs",
-				"Ag Working Set", new IWorkingSet[] { workingSet });
+		AggregateWorkingSet agWorkingSet = new AggregateWorkingSet("AgWs", "Ag Working Set",
+				new IWorkingSet[] { workingSet });
 
 		IPropertyChangeListener l = provider.getFilterChangeListener();
 		PropertyChangeEvent event = new PropertyChangeEvent(this,
-				WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null,
-				agWorkingSet);
+				WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null, agWorkingSet);
 		l.propertyChange(event);
 
 		DisplayHelper.runEventLoop(Display.getCurrent(), 100);
@@ -91,8 +105,7 @@
 		TreeItem[] items = _viewer.getTree().getItems();
 		// The bug is here where the first item is a IFile, not the enclosing
 		// project
-		assertTrue("First item needs to be project", items[0].getData().equals(
-				_p1));
+		assertTrue("First item needs to be project", items[0].getData().equals(_p1));
 		assertEquals("ws1", _commonNavigator.getWorkingSetLabel());
 	}
 
@@ -101,8 +114,7 @@
 	public void testTopLevelWorkingSet() throws Exception {
 
 		WorkingSetActionProvider provider = (WorkingSetActionProvider) TestAccessHelper
-				.getActionProvider(_contentService, _actionService,
-						WorkingSetActionProvider.class);
+				.getActionProvider(_contentService, _actionService, WorkingSetActionProvider.class);
 
 		IExtensionStateModel extensionStateModel = _contentService
 				.findStateModel(WorkingSetsContentProvider.EXTENSION_ID);
@@ -110,30 +122,28 @@
 		extensionStateModel.setBooleanProperty(
 				WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS, true);
 
-		IWorkingSet workingSet = new WorkingSet("ws1", "ws1",
-				new IAdaptable[] { _p1 });
+		IWorkingSet workingSet = new WorkingSet("ws1", "ws1", new IAdaptable[] { _p1 });
 
 		IPropertyChangeListener l = provider.getFilterChangeListener();
 		PropertyChangeEvent event = new PropertyChangeEvent(this,
-				WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null,
-				workingSet);
+				WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null, workingSet);
 		l.propertyChange(event);
 
 		// DisplayHelper.sleep(Display.getCurrent(), 10000000);
 
 		_viewer.expandAll();
-		
+
 		TreeItem[] items = _viewer.getTree().getItems();
 		// The bug is here where the first item is a IFile, not the enclosing
 		// project
-		assertTrue("First item needs to be working set", items[0].getData()
-				.equals(workingSet));
+		assertTrue("First item needs to be working set", items[0].getData().equals(workingSet));
 		assertEquals("ws1", _commonNavigator.getWorkingSetLabel());
-		
-		// bug 268250 [CommonNavigator] Project labels missing in Project Explorer when working sets are top level elements
+
+		// bug 268250 [CommonNavigator] Project labels missing in Project
+		// Explorer when working sets are top level elements
 		TreeItem projectItem = items[0].getItem(0);
 		assertEquals("p1", projectItem.getText());
-		
+
 	}
 
 	// bug 244174 test property to switch back and forth between working sets
@@ -149,21 +159,18 @@
 				.getContentExtensionById(WorkingSetsContentProvider.EXTENSION_ID);
 		ce.getContentProvider();
 
-		IWorkingSet workingSet = new WorkingSet("ws1", "ws1",
-				new IAdaptable[] { _p1 });
+		IWorkingSet workingSet = new WorkingSet("ws1", "ws1", new IAdaptable[] { _p1 });
 
 		WorkingSetActionProvider provider = (WorkingSetActionProvider) TestAccessHelper
-				.getActionProvider(_contentService, _actionService,
-						WorkingSetActionProvider.class);
+				.getActionProvider(_contentService, _actionService, WorkingSetActionProvider.class);
 		IPropertyChangeListener l = provider.getFilterChangeListener();
 		PropertyChangeEvent event = new PropertyChangeEvent(this,
-				WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null,
-				workingSet);
+				WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null, workingSet);
 		l.propertyChange(event);
 
-		IWorkbenchWindow activeWindow = PlatformUI.getWorkbench()
-				.getActiveWorkbenchWindow();
+		IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
 		IWorkbenchPage activePage = activeWindow.getActivePage();
+		IWorkingSet[] activeWorkingSets = activePage.getWorkingSets();
 		activePage.setWorkingSets(new IWorkingSet[] { workingSet });
 
 		extensionStateModel.setBooleanProperty(
@@ -172,28 +179,26 @@
 
 		TreeItem[] items = _viewer.getTree().getItems();
 
-		assertTrue("First item needs to be working set", items[0].getData()
-				.equals(workingSet));
+		assertTrue("First item needs to be working set", items[0].getData().equals(workingSet));
 
 		extensionStateModel.setBooleanProperty(
 				WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS, false);
 		refreshViewer();
 
 		items = _viewer.getTree().getItems();
-		assertTrue("First item needs to be project", items[0].getData().equals(
-				_p1));
+		assertTrue("First item needs to be project", items[0].getData().equals(_p1));
 
 		extensionStateModel.setBooleanProperty(
 				WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS, true);
 		refreshViewer();
 
 		items = _viewer.getTree().getItems();
-		assertTrue("First item needs to be working set", items[0].getData()
-				.equals(workingSet));
+		assertTrue("First item needs to be working set", items[0].getData().equals(workingSet));
+
+		// Restore active working sets
+		activePage.setWorkingSets(activeWorkingSets);
 	}
 
-
-	
 	public void testMultipleWorkingSets() throws Exception {
 
 		// Force the content provider to be loaded so that it responds to the
@@ -202,47 +207,39 @@
 				.getContentExtensionById(WorkingSetsContentProvider.EXTENSION_ID);
 		ce.getContentProvider();
 
-		IWorkingSet workingSet1 = new WorkingSet("ws1", "ws1",
-				new IAdaptable[] { _p1 });
-		IWorkingSet workingSet2 = new WorkingSet("ws2", "ws2",
-				new IAdaptable[] { _p1 });
+		IWorkingSet workingSet1 = new WorkingSet("ws1", "ws1", new IAdaptable[] { _p1 });
+		IWorkingSet workingSet2 = new WorkingSet("ws2", "ws2", new IAdaptable[] { _p1 });
 
-		AggregateWorkingSet agWorkingSet = new AggregateWorkingSet("AgWs",
-				"Ag Working Set",
+		AggregateWorkingSet agWorkingSet = new AggregateWorkingSet("AgWs", "Ag Working Set",
 				new IWorkingSet[] { workingSet1, workingSet2 });
 
 		WorkingSetActionProvider provider = (WorkingSetActionProvider) TestAccessHelper
-				.getActionProvider(_contentService, _actionService,
-						WorkingSetActionProvider.class);
+				.getActionProvider(_contentService, _actionService, WorkingSetActionProvider.class);
 
 		IPropertyChangeListener l = provider.getFilterChangeListener();
 		PropertyChangeEvent event = new PropertyChangeEvent(this,
-				WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null,
-				agWorkingSet);
+				WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null, agWorkingSet);
 		l.propertyChange(event);
 
-		assertEquals(
-				WorkbenchNavigatorMessages.WorkingSetActionProvider_multipleWorkingSets,
+		assertEquals(WorkbenchNavigatorMessages.WorkingSetActionProvider_multipleWorkingSets,
 				_commonNavigator.getWorkingSetLabel());
 	}
 
-	// bug 262096 [CommonNavigator] Changing *any* filter breaks working sets filter
+	// bug 262096 [CommonNavigator] Changing *any* filter breaks working sets
+	// filter
 	public void testWorkingSetFilter() throws Exception {
 
 		_contentService.bindExtensions(new String[] { COMMON_NAVIGATOR_RESOURCE_EXT }, false);
 		_contentService.getActivationService().activateExtensions(
 				new String[] { COMMON_NAVIGATOR_RESOURCE_EXT }, true);
 
-		IWorkingSet workingSet = new WorkingSet("ws1", "ws1",
-				new IAdaptable[] { _p1 });
+		IWorkingSet workingSet = new WorkingSet("ws1", "ws1", new IAdaptable[] { _p1 });
 
 		WorkingSetActionProvider provider = (WorkingSetActionProvider) TestAccessHelper
-				.getActionProvider(_contentService, _actionService,
-						WorkingSetActionProvider.class);
+				.getActionProvider(_contentService, _actionService, WorkingSetActionProvider.class);
 		IPropertyChangeListener l = provider.getFilterChangeListener();
 		PropertyChangeEvent event = new PropertyChangeEvent(this,
-				WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null,
-				workingSet);
+				WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null, workingSet);
 		l.propertyChange(event);
 
 		ViewerFilter vf[];
@@ -253,10 +250,10 @@
 				found = true;
 		}
 		assertTrue(found);
-		
+
 		_contentService.getFilterService().activateFilterIdsAndUpdateViewer(
 				new String[] { TEST_FILTER_P1, TEST_FILTER_P2 });
-		
+
 		vf = _viewer.getFilters();
 		found = false;
 		for (int i = 0; i < vf.length; i++) {
@@ -265,6 +262,64 @@
 		}
 		assertTrue("Working set filter is gone, oh my!", found);
 	}
-	
-	
+
+	// Bug 224703 - Project explorer doesn't show recreated working set
+	// (this test does not show the problem since it was in the
+	// WorkingSetSelectionDialog, but still it's nice to have)
+	public void testDeletedAndRecreated() throws Exception {
+
+		INavigatorContentExtension ce = _contentService
+				.getContentExtensionById(WorkingSetsContentProvider.EXTENSION_ID);
+		ce.getContentProvider();
+
+		IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
+
+		IWorkingSet ws1 = workingSetManager.createWorkingSet("ws1", new IAdaptable[] { _p1 });
+		workingSetManager.addWorkingSet(ws1);
+		IWorkingSet ws2 = workingSetManager.createWorkingSet("ws2", new IAdaptable[] { _p2 });
+		workingSetManager.addWorkingSet(ws2);
+
+		WorkingSetActionProvider provider = (WorkingSetActionProvider) TestAccessHelper
+				.getActionProvider(_contentService, _actionService, WorkingSetActionProvider.class);
+
+		IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		IWorkbenchPage activePage = activeWindow.getActivePage();
+		activePage.setWorkingSets(new IWorkingSet[] { ws1, ws2 });
+
+		IPropertyChangeListener l = provider.getFilterChangeListener();
+		PropertyChangeEvent event = new PropertyChangeEvent(this,
+				WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null, ws2);
+		l.propertyChange(event);
+
+		DisplayHelper.runEventLoop(Display.getCurrent(), 100);
+
+		TreeItem[] items = _viewer.getTree().getItems();
+		assertTrue(items[0].getData().equals(_p2));
+
+		l = provider.getFilterChangeListener();
+		event = new PropertyChangeEvent(this, WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null,
+				ws1);
+		l.propertyChange(event);
+		DisplayHelper.runEventLoop(Display.getCurrent(), 100);
+		items = _viewer.getTree().getItems();
+		assertTrue(items[0].getData().equals(_p1));
+
+		workingSetManager.removeWorkingSet(ws2);
+
+		ws2 = workingSetManager.createWorkingSet("ws2", new IAdaptable[] { _p2 });
+		workingSetManager.addWorkingSet(ws2);
+
+		l = provider.getFilterChangeListener();
+		event = new PropertyChangeEvent(this, WorkingSetFilterActionGroup.CHANGE_WORKING_SET, null,
+				ws2);
+		l.propertyChange(event);
+		DisplayHelper.runEventLoop(Display.getCurrent(), 100);
+		items = _viewer.getTree().getItems();
+		assertTrue(items[0].getData().equals(_p2));
+
+		if (false)
+			DisplayHelper.sleep(Display.getCurrent(), 10000000);
+
+	}
+
 }
diff --git a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/ProgressMonitorDialogPerformanceTest.java b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/ProgressMonitorDialogPerformanceTest.java
index 0145481..a04bad2 100644
--- a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/ProgressMonitorDialogPerformanceTest.java
+++ b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/jface/tests/performance/ProgressMonitorDialogPerformanceTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@
 
 import java.lang.reflect.InvocationTargetException;
 
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.dialogs.ProgressMonitorDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -21,7 +20,6 @@
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.test.performance.Dimension;
 import org.eclipse.ui.tests.performance.BasicPerformanceTest;
-import org.eclipse.ui.tests.performance.TestRunnable;
 
 /**
  * @since 3.3
@@ -55,6 +53,7 @@
 
 		tagIfNecessary("JFace - 10000 element task name in progress dialog",
 				Dimension.ELAPSED_PROCESS);
+		setDegradationComment("The test changed in 3.7. For details, consult bug 298952.");
 		
 		Display display = Display.getCurrent();
 		if (display == null) {
@@ -70,26 +69,22 @@
 				for (int i = 0; i < chars.length; i++) {
 					chars[i] = 'A';
 				}
-				
 				final String taskName = new String(chars);
-				final IProgressMonitor finalMonitor = monitor;
 				
-				try {
-					exercise(new TestRunnable() {
-						public void run() {
-							startMeasuring();
-							finalMonitor.setTaskName(taskName);
-							processEvents();
-							stopMeasuring();
-						}
-					}, ViewerTest.MIN_ITERATIONS, ViewerTest.ITERATIONS,
-							JFacePerformanceSuite.MAX_TIME);
-				} catch (CoreException e) {
-					fail(e.getMessage(), e);
+				// warm up
+				monitor.setTaskName(taskName);
+				processEvents();
+				
+				// test
+				for (int testCounter = 0; testCounter < 20; testCounter++) {
+					startMeasuring();
+					for (int counter = 0; counter < 30; counter++) {
+						monitor.setTaskName(taskName);
+						processEvents();
+					}
+					processEvents();
+					stopMeasuring();
 				}
-
-			
-
 			}
 		};
 
diff --git a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/OpenCloseViewTest.java b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/OpenCloseViewTest.java
index 7472211..61e3c01 100644
--- a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/OpenCloseViewTest.java
+++ b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/OpenCloseViewTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,6 +41,8 @@
         processEvents();
         
        	tagIfNecessary("UI - Open/Close " + view1.getTitle(), Dimension.ELAPSED_PROCESS);
+       	if ("org.eclipse.ui.views.BookmarkView".equals(viewId))
+       		setDegradationComment("The test results are influenced by the test machine setup. See bug 340136.");
         	
 		for (int j = 0; j < 100; j++) {
 
diff --git a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationPerformanceTestSuite.java b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationPerformanceTestSuite.java
index e180108..6bf28c8 100644
--- a/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationPerformanceTestSuite.java
+++ b/tests/org.eclipse.ui.tests.performance/src/org/eclipse/ui/tests/performance/presentations/PresentationPerformanceTestSuite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,6 @@
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionPoint;
 import org.eclipse.core.runtime.Platform;
-import org.eclipse.ui.internal.IWorkbenchConstants;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.presentations.PresentationFactoryUtil;
 import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
@@ -56,6 +55,8 @@
 
     private void addTests(String presentationId) {
         AbstractPresentationFactory factory = WorkbenchPlugin.getDefault().getPresentationFactory(presentationId);
+        
+        boolean r21Presentation = "org.eclipse.ui.internal.r21presentationFactory".equals(presentationId);
 
         addTest(new PresentationInactivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 5));
         addTest(new PresentationInactivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_VIEW, 5));
@@ -63,9 +64,7 @@
         addTest(new PresentationActivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 5, false));
         addTest(new PresentationActivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_VIEW, 5, false));
         addTest(new PresentationActivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_STANDALONE, 1, false));
-        if(presentationId.equals(IWorkbenchConstants.DEFAULT_PRESENTATION_ID))
-        	addTest(new PresentationActivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1, true));
-        else
+        if(r21Presentation)
         	addTest(new PresentationActivePartPropertyTest(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1, false));
 
         addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 100, "large folder creation"));
@@ -74,7 +73,8 @@
         addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 5));
         addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_VIEW, 5));
         addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE, 1));
-        addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1));
+        if (r21Presentation)
+        	addTest(new PresentationCreateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1));
         
         addTest(new PresentationSelectTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 100));
         addTest(new PresentationSelectTest(factory, PresentationFactoryUtil.ROLE_VIEW, 100));
@@ -82,12 +82,14 @@
         addTest(new PresentationActivateTest(factory, PresentationFactoryUtil.ROLE_EDITOR, 5));
         addTest(new PresentationActivateTest(factory, PresentationFactoryUtil.ROLE_VIEW, 5));
         addTest(new PresentationActivateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE, 1));
-        addTest(new PresentationActivateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1));
+        if(r21Presentation)
+        	addTest(new PresentationActivateTest(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1));
         
         addTest(new ResizeTest(new PresentationWidgetFactory(factory, PresentationFactoryUtil.ROLE_EDITOR, 5)));
         addTest(new ResizeTest(new PresentationWidgetFactory(factory, PresentationFactoryUtil.ROLE_VIEW, 5)));
         addTest(new ResizeTest(new PresentationWidgetFactory(factory, PresentationFactoryUtil.ROLE_STANDALONE, 1)));
-        addTest(new ResizeTest(new PresentationWidgetFactory(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1)));
+        if (r21Presentation)
+        	addTest(new ResizeTest(new PresentationWidgetFactory(factory, PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE, 1)));
         
     }
     
diff --git a/tests/org.eclipse.ui.tests.rcp/.classpath b/tests/org.eclipse.ui.tests.rcp/.classpath
index 1f84474..3fefab6 100644
--- a/tests/org.eclipse.ui.tests.rcp/.classpath
+++ b/tests/org.eclipse.ui.tests.rcp/.classpath
@@ -2,6 +2,6 @@
 <classpath>
 	<classpathentry kind="src" path="Eclipse RCP Tests"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/tests/org.eclipse.ui.tests.rcp/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.ui.tests.rcp/.settings/org.eclipse.jdt.core.prefs
index 81b36c6..0892e91 100644
--- a/tests/org.eclipse.ui.tests.rcp/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/org.eclipse.ui.tests.rcp/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Fri Mar 03 16:43:22 EST 2006
+#Wed Mar 30 17:24:14 CEST 2011
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -16,13 +16,13 @@
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=disabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
 org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -55,7 +55,6 @@
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
diff --git a/tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/PlatformUITest.java b/tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/PlatformUITest.java
index b5c33ac..3dbfaa5 100644
--- a/tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/PlatformUITest.java
+++ b/tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/PlatformUITest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
+import junit.framework.TestSuite;
 
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.PlatformUI;
@@ -19,6 +20,14 @@
 import org.eclipse.ui.tests.rcp.util.WorkbenchAdvisorObserver;
 
 public class PlatformUITest extends TestCase {
+	public static TestSuite suite() {
+		TestSuite suite = new TestSuite("org.eclipse.ui.tests.rcp.PlatformUITest");
+		suite.addTest(new PlatformUITest("testEarlyGetWorkbench"));
+		suite.addTest(new PlatformUITest("testCreateDisplay"));
+		suite.addTest(new PlatformUITest("testCreateAndRunWorkbench"));
+		suite.addTest(new PlatformUITest("testCreateAndRunWorkbenchWithExceptionOnStartup"));
+		return suite;
+	}
 
     public PlatformUITest(String testName) {
         super(testName);
@@ -54,6 +63,34 @@
         assertTrue(wa.checkComplete);
         display.dispose();
         assertTrue(display.isDisposed());
+
+		assertEquals("Async run during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
+				Boolean.FALSE,
+				RCPTestWorkbenchAdvisor.asyncDuringStartup);
+
+	    // the following four asserts test the various combinations of Thread +
+		// DisplayAccess + a/sync exec. Anything without a call to DisplayAccess
+		// should be deferred until after startup.
+		assertEquals(
+				"Sync from qualified thread did not run during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
+				Boolean.TRUE,
+				RCPTestWorkbenchAdvisor.syncWithDisplayAccess);
+    	assertEquals(
+				"Async from qualified thread did not run during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
+				Boolean.TRUE,
+				RCPTestWorkbenchAdvisor.asyncWithDisplayAccess);
+		assertEquals(
+				"Sync from un-qualified thread ran during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
+				Boolean.FALSE,
+				RCPTestWorkbenchAdvisor.syncWithoutDisplayAccess);
+       	assertEquals(
+				"Async from un-qualified thread ran during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
+				Boolean.FALSE,
+				RCPTestWorkbenchAdvisor.asyncWithoutDisplayAccess);
+       	
+		assertFalse(
+				"DisplayAccess.accessDisplayDuringStartup() in UI thread did not result in exception.",
+				RCPTestWorkbenchAdvisor.displayAccessInUIThreadAllowed);
     }
     
     /**
@@ -76,69 +113,6 @@
         assertFalse(PlatformUI.isWorkbenchRunning());
         display.dispose();
         assertTrue(display.isDisposed());
-    }
-    
-    public void testStartupThreading() {
-		assertNotNull(
-				"No display during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
-				RCPTestWorkbenchAdvisor.asyncDuringStartup);
-
-		assertEquals(
-				"Async run during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
-				Boolean.FALSE,
-				RCPTestWorkbenchAdvisor.asyncDuringStartup);
-	}
-    // the following four methods test the various combinations of Thread +
-	// DisplayAccess + a/sync exec. Anything without a call to DisplayAccess
-	// should be deferred until after startup.
-    public void testDisplayAccess_sync() {
-    	assertNotNull(
-				"No display during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
-				RCPTestWorkbenchAdvisor.syncWithDisplayAccess);
-
-		assertEquals(
-				"Sync from qualified thread did not run during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
-				Boolean.TRUE,
-				RCPTestWorkbenchAdvisor.syncWithDisplayAccess);
-    }
-    
-    public void testDisplayAccess_async() {    
-    	assertNotNull(
-				"No display during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
-				RCPTestWorkbenchAdvisor.asyncWithDisplayAccess);
-    	
-    	assertEquals(
-				"Async from qualified thread did not run during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
-				Boolean.TRUE,
-				RCPTestWorkbenchAdvisor.asyncWithDisplayAccess);
-    }
-    
-    public void testWithoutDisplayAccess_sync() {
-    	assertNotNull(
-				"No display during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
-				RCPTestWorkbenchAdvisor.syncWithoutDisplayAccess);
-    	
-		assertEquals(
-				"Sync from un-qualified thread ran during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
-				Boolean.FALSE,
-				RCPTestWorkbenchAdvisor.syncWithoutDisplayAccess);
-    }
-    
-    public void testWithoutDisplayAccess_async() { 
-       	assertNotNull(
-				"No display during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
-				RCPTestWorkbenchAdvisor.asyncWithoutDisplayAccess);
-       	
-       	assertEquals(
-				"Async from un-qualified thread ran during startup.  See RCPTestWorkbenchAdvisor.preStartup()",
-				Boolean.FALSE,
-				RCPTestWorkbenchAdvisor.asyncWithoutDisplayAccess);
-    }
-    
-    public void testDisplayAccessInUIThreadAllowed() {
-		assertFalse(
-				"DisplayAccess.accessDisplayDuringStartup() in UI thread did not result in exception.",
-				RCPTestWorkbenchAdvisor.displayAccessInUIThreadAllowed);
 	}
 }
 
diff --git a/tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/RcpTestSuite.java b/tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/RcpTestSuite.java
index 4a68702..83f96f7 100644
--- a/tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/RcpTestSuite.java
+++ b/tests/org.eclipse.ui.tests.rcp/Eclipse RCP Tests/org/eclipse/ui/tests/rcp/RcpTestSuite.java
@@ -26,7 +26,7 @@
     }
 
     public RcpTestSuite() {
-        addTest(new TestSuite(PlatformUITest.class));
+        addTest(PlatformUITest.suite());
         addTest(new TestSuite(WorkbenchAdvisorTest.class));
         addTest(new TestSuite(WorkbenchConfigurerTest.class));
         addTest(new TestSuite(WorkbenchWindowConfigurerTest.class));
diff --git a/tests/org.eclipse.ui.tests.rcp/META-INF/MANIFEST.MF b/tests/org.eclipse.ui.tests.rcp/META-INF/MANIFEST.MF
index 4fafe2e..cdd8ef5 100644
--- a/tests/org.eclipse.ui.tests.rcp/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.ui.tests.rcp/META-INF/MANIFEST.MF
@@ -1,16 +1,19 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse RCP Tests
+Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ui.tests.rcp; singleton:=true
-Bundle-Version: 3.3.0.qualifier
+Bundle-Version: 3.3.100.qualifier
 Bundle-ClassPath: rcptests.jar
 Bundle-Activator: org.eclipse.core.internal.compatibility.PluginActivator
-Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
+Bundle-Vendor: %providerName
 Require-Bundle: org.eclipse.core.runtime.compatibility,
  org.eclipse.ui,
  org.junit,
  org.eclipse.test.performance,
  org.eclipse.ui.tests.harness
 Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.ui.tests.rcp.util;x-internal:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Export-Package: org.eclipse.ui.tests.rcp,
+ org.eclipse.ui.tests.rcp.performance,
+ org.eclipse.ui.tests.rcp.util
+Bundle-Localization: plugin
diff --git a/tests/org.eclipse.ui.tests.rcp/RCP Test Suite.launch b/tests/org.eclipse.ui.tests.rcp/RCP Test Suite.launch
index 03332cd..e0a97b7 100644
--- a/tests/org.eclipse.ui.tests.rcp/RCP Test Suite.launch
+++ b/tests/org.eclipse.ui.tests.rcp/RCP Test Suite.launch
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
 <stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
 <booleanAttribute key="askclear" value="false"/>
 <booleanAttribute key="automaticAdd" value="true"/>
@@ -32,6 +31,7 @@
 <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
 <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
 <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ui.tests.rcp.RcpTestSuite"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ui.tests.rcp"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
@@ -41,7 +41,8 @@
 <booleanAttribute key="show_selected_only" value="false"/>
 <stringAttribute key="templateConfig" value=""/>
 <booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
 <booleanAttribute key="useDefaultConfig" value="true"/>
 <booleanAttribute key="useDefaultConfigArea" value="false"/>
 <booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration>
+</launchConfiguration>
\ No newline at end of file
diff --git a/tests/org.eclipse.ui.tests.rcp/plugin.properties b/tests/org.eclipse.ui.tests.rcp/plugin.properties
new file mode 100644
index 0000000..e941b81
--- /dev/null
+++ b/tests/org.eclipse.ui.tests.rcp/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2011 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+pluginName= Eclipse RCP Tests
+providerName= Eclipse.org
diff --git a/tests/org.eclipse.ui.tests.views.properties.tabbed/META-INF/MANIFEST.MF b/tests/org.eclipse.ui.tests.views.properties.tabbed/META-INF/MANIFEST.MF
index 5201f76..fd5e356 100644
--- a/tests/org.eclipse.ui.tests.views.properties.tabbed/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.ui.tests.views.properties.tabbed/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.tests.views.properties.tabbed;singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.5.100.qualifier
 Bundle-Activator: org.eclipse.ui.tests.views.properties.tabbed.Activator
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui,
@@ -16,4 +16,19 @@
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,
  J2SE-1.3
+Export-Package: org.eclipse.ui.tests.views.properties.tabbed,
+ org.eclipse.ui.tests.views.properties.tabbed.dynamic.filters,
+ org.eclipse.ui.tests.views.properties.tabbed.dynamic.model,
+ org.eclipse.ui.tests.views.properties.tabbed.dynamic.section.descriptors,
+ org.eclipse.ui.tests.views.properties.tabbed.dynamic.sections,
+ org.eclipse.ui.tests.views.properties.tabbed.dynamic.tab.descriptors,
+ org.eclipse.ui.tests.views.properties.tabbed.dynamic.views,
+ org.eclipse.ui.tests.views.properties.tabbed.model,
+ org.eclipse.ui.tests.views.properties.tabbed.override,
+ org.eclipse.ui.tests.views.properties.tabbed.override.folders,
+ org.eclipse.ui.tests.views.properties.tabbed.override.items,
+ org.eclipse.ui.tests.views.properties.tabbed.override.tablist,
+ org.eclipse.ui.tests.views.properties.tabbed.sections,
+ org.eclipse.ui.tests.views.properties.tabbed.text,
+ org.eclipse.ui.tests.views.properties.tabbed.views
 
diff --git a/tests/org.eclipse.ui.tests.views.properties.tabbed/Tabbed Properties View-All Tests.launch b/tests/org.eclipse.ui.tests.views.properties.tabbed/Tabbed Properties View-All Tests.launch
index 04e1d9b..2d8c87a 100644
--- a/tests/org.eclipse.ui.tests.views.properties.tabbed/Tabbed Properties View-All Tests.launch
+++ b/tests/org.eclipse.ui.tests.views.properties.tabbed/Tabbed Properties View-All Tests.launch
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
 <booleanAttribute key="askclear" value="false"/>
 <booleanAttribute key="automaticAdd" value="true"/>
 <booleanAttribute key="automaticValidate" value="false"/>
@@ -30,6 +29,7 @@
 <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
 <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
 <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ui.tests.views.properties.tabbed.AllTests"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ui.tests.views.properties.tabbed"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
@@ -39,7 +39,8 @@
 <booleanAttribute key="show_selected_only" value="false"/>
 <stringAttribute key="templateConfig" value=""/>
 <booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
 <booleanAttribute key="useDefaultConfig" value="true"/>
 <booleanAttribute key="useDefaultConfigArea" value="false"/>
 <booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
+</launchConfiguration>
\ No newline at end of file
diff --git a/tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/TabbedPropertySheetPageTextTest.java b/tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/TabbedPropertySheetPageTextTest.java
index 898fc92..6b373c4 100644
--- a/tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/TabbedPropertySheetPageTextTest.java
+++ b/tests/org.eclipse.ui.tests.views.properties.tabbed/src/org/eclipse/ui/tests/views/properties/tabbed/TabbedPropertySheetPageTextTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,8 +12,10 @@
 
 import junit.framework.TestCase;
 
-import org.eclipse.jface.text.IDocument;
 import org.eclipse.swt.widgets.Display;
+
+import org.eclipse.jface.text.IDocument;
+
 import org.eclipse.ui.IViewPart;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
@@ -28,11 +30,12 @@
 /**
  * Tests for the text tests view.
  * 
- * @author Anthony Hunter
  * @since 3.4
  */
 public class TabbedPropertySheetPageTextTest extends TestCase {
 
+	private static final long TIME_OUT_TO_GET_ACTIVE_TABS= 30000; // in ms
+
 	private TextTestsView textTestsView;
 
 	protected void setUp() throws Exception {
@@ -84,7 +87,7 @@
         document.set("This is a test");
         textTestsView.getViewer().setSelectedRange(0, 14);
         
-        ITabDescriptor[] tabDescriptors = textTestsView.getTabbedPropertySheetPage().getActiveTabs();
+		ITabDescriptor[] tabDescriptors= waitForActiveTabs();
         /**
          * First tab is "This"
          */
@@ -115,7 +118,8 @@
 	    document.set("The fifth tab is selected");
 	    textTestsView.getViewer().setSelectedRange(0, 26);
 	    
-	    ITabDescriptor[] tabDescriptors = textTestsView.getTabbedPropertySheetPage().getActiveTabs();
+		ITabDescriptor[] tabDescriptors= waitForActiveTabs();
+
 	    /**
 	     * First tab is "the" and is selected.
 	     */
@@ -145,6 +149,17 @@
 				.getSelectedTab().getLabel());
 	}
 
+	private ITabDescriptor[] waitForActiveTabs() {
+		long threshold= System.currentTimeMillis() + TIME_OUT_TO_GET_ACTIVE_TABS;
+		ITabDescriptor[] tabDescriptors;
+		do {
+			textTestsView.getSite().getShell().getDisplay().readAndDispatch();
+			tabDescriptors= textTestsView.getTabbedPropertySheetPage().getActiveTabs();
+		} while (tabDescriptors.length == 0 && System.currentTimeMillis() < threshold);
+		assertTrue("No tab got activated", tabDescriptors.length > 0);
+		return tabDescriptors;
+	}
+
 	/**
 	 * This test makes sure that the list of sections has only one section. The
 	 * TextTestsTabDescriptor returns two sections and one section is always
@@ -155,10 +170,12 @@
         document.set("This is a test");
         textTestsView.getViewer().setSelectedRange(0, 14);
 
-        /**
-         * each tab has one section.
-         */
-        TabContents tabContents = textTestsView.getTabbedPropertySheetPage().getCurrentTab();
+		waitForActiveTabs();
+
+		/**
+		 * each tab has one section.
+		 */
+		TabContents tabContents= textTestsView.getTabbedPropertySheetPage().getCurrentTab();
         ISection[] sections = tabContents.getSections();
         assertEquals(1, sections.length);
         assertEquals(TextTestsLabelSection.class, sections[0].getClass());
diff --git a/tests/org.eclipse.ui.tests.views.properties.tabbed/test.xml b/tests/org.eclipse.ui.tests.views.properties.tabbed/test.xml
index d5d6d89..6433012 100644
--- a/tests/org.eclipse.ui.tests.views.properties.tabbed/test.xml
+++ b/tests/org.eclipse.ui.tests.views.properties.tabbed/test.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 
 <project name="testsuite" default="run" basedir=".">
   <!-- The property ${eclipse-home} should be passed into this script -->
diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ListViewerRefreshTest.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ListViewerRefreshTest.java
index e1d3ac3..aab7d57 100644
--- a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ListViewerRefreshTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ListViewerRefreshTest.java
@@ -56,6 +56,11 @@
 		shell.layout();
 		shell.open();
 	}
+	
+	protected void tearDown() throws Exception {
+		shell.dispose();
+		shell = null;
+	}
 
 	/**
 	 * Asserts the ability to refresh without a selection and preserve the
diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/SimpleTreeViewerTest.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/SimpleTreeViewerTest.java
index eed61df..09a0cf8 100644
--- a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/SimpleTreeViewerTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/SimpleTreeViewerTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,9 @@
 
 package org.eclipse.jface.tests.viewers;
 
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+
 import org.eclipse.jface.viewers.ILabelProviderListener;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.ITableLabelProvider;
@@ -19,12 +22,13 @@
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TreeNode;
+import org.eclipse.jface.viewers.TreeNodeContentProvider;
 import org.eclipse.jface.viewers.TreePathViewerSorter;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
 
 /**
  * @since 3.2
@@ -106,15 +110,17 @@
 		treeViewer.refresh();
 		treeViewer.removeSelectionChangedListener(listener);
 	}
-	
+
 	public void testBug184712() {
 		class TableAndTreeLabelProvider extends LabelProvider implements ITableLabelProvider {
 			public Image getColumnImage(Object element, int columnIndex) {
 				return null;
 			}
+
 			public String getColumnText(Object element, int columnIndex) {
 				return "wrong";
 			}
+
 			public String getText(Object element) {
 				return "right";
 			}
@@ -122,4 +128,30 @@
 		treeViewer.setLabelProvider(new TableAndTreeLabelProvider());
 		assertEquals("right", treeViewer.getTree().getItem(0).getText());
 	}
+
+	public void test327004() {
+		treeViewer.setInput(null);
+		treeViewer.setContentProvider(new TreeNodeContentProvider());
+
+		final TreeNode[] children= new TreeNode[5];
+		children[0]= new TreeNode("0");
+		children[1]= new TreeNode("1");
+		children[2]= new TreeNode("1");
+		children[3]= new TreeNode("1");
+		children[4]= new TreeNode("1");
+		treeViewer.setInput(children);
+
+		ViewerFilter filter= new ViewerFilter() {
+			public boolean select(Viewer viewer, Object parentElement, Object element) {
+				if (element == children[0] || element == children[1] || element == children[2] || element == children[4])
+					return false;
+				return true;
+			}
+		};
+		treeViewer.setFilters(new ViewerFilter[] { filter });
+		int i= treeViewer.getTree().getItemCount();
+
+		assertEquals(4, i); // 4 because the filter doesn't work due to equal nodes
+	}
+
 }
diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/SimpleVirtualLazyTreeViewerTest.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/SimpleVirtualLazyTreeViewerTest.java
index 17dce2e..63b6e4d 100644
--- a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/SimpleVirtualLazyTreeViewerTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/SimpleVirtualLazyTreeViewerTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -102,6 +102,8 @@
 	}
 
 	public void testCreation() {
+		if (disableTestsBug347491)
+			return;
 		processEvents();
 		assertTrue("tree should have items", getTreeViewer().getTree()
 				.getItemCount() > 0);
@@ -156,6 +158,8 @@
 	
 	/* test TreeViewer.remove(parent, index) */ 
 	public void testRemoveAt() {
+		if (disableTestsBug347491)
+			return;
 		TreeViewer treeViewer = (TreeViewer) fViewer;
 		// correct what the content provider is answering with
 		treeViewer.getTree().update();
diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ViewerTestCase.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ViewerTestCase.java
index 708f90f..711eed3 100644
--- a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ViewerTestCase.java
+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/ViewerTestCase.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@
 import org.eclipse.jface.util.ISafeRunnableRunner;
 import org.eclipse.jface.util.Policy;
 import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.util.Util;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
@@ -35,9 +36,12 @@
 	protected StructuredViewer fViewer;
 	protected TestElement fRootElement;
 	public TestModel fModel;
+	
+	protected boolean disableTestsBug347491 = false;
 
 	public ViewerTestCase(String name) {
 		super(name);
+		disableTestsBug347491 = Util.isCocoa();
 	}
 
 	protected void assertSelectionEquals(String message, TestElement expected) {
diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/VirtualLazyTreeViewerTest.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/VirtualLazyTreeViewerTest.java
index 868fe50..5dd7dda 100644
--- a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/VirtualLazyTreeViewerTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/VirtualLazyTreeViewerTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -117,4 +117,46 @@
     	// no need to test since virtual trees do not support sorting
     }
     
+    // Temporary overrides for bug 347491:
+    public void testRefreshWithAddedChildren() {
+		if (disableTestsBug347491)
+			return;
+		super.testRefreshWithAddedChildren();
+    }
+
+    public void testDeleteSibling() {
+		if (disableTestsBug347491)
+			return;
+    	super.testDeleteSibling();
+    }
+    
+    public void testInsertSibling() {
+		if (disableTestsBug347491)
+			return;
+    	super.testInsertSibling();
+    }
+    
+    public void testInsertSiblings() {
+		if (disableTestsBug347491)
+			return;
+    	super.testInsertSiblings();
+    }
+    
+    public void testSetInput() {
+		if (disableTestsBug347491)
+			return;
+    	super.testSetInput();
+    }
+    
+    public void testSomeChildrenChanged() {
+		if (disableTestsBug347491)
+			return;
+    	super.testSomeChildrenChanged();
+    }
+
+	public void testWorldChanged() {
+		if (disableTestsBug347491)
+			return;
+		super.testWorldChanged();
+	}
 }
diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/ConcurrentTableTestView.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/ConcurrentTableTestView.java
index 3dbc286..fec0999 100644
--- a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/ConcurrentTableTestView.java
+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/interactive/ConcurrentTableTestView.java
@@ -54,10 +54,8 @@
 	            int delay = 2; // Time to spin the CPU for (milliseconds)
 	            
 	            // Do some work to occupy time 
-	            int counter = 0;
 	            long timestamp = System.currentTimeMillis();
 	            while (System.currentTimeMillis() < timestamp + delay) {
-	                counter++;
 	            }
         	}
             
diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/wizards/TheTestWizard.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/wizards/TheTestWizard.java
index 6e0cf75..f67fb29 100644
--- a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/wizards/TheTestWizard.java
+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/wizards/TheTestWizard.java
@@ -21,12 +21,14 @@
 	public final String page1Name = "PAGE1";
 	public final String page2Name = "PAGE2";
 	public final String page3Name = "PAGE3";
-	
+	private boolean throwExceptionOnDispose; 
+
 	public TheTestWizard() {
 		super();
 		setNeedsProgressMonitor(true);
 	}
 	
+	
 	/**
 	 * Adding the page to the wizard.
 	 */
@@ -48,4 +50,20 @@
 		WizardTest.DID_FINISH = true;
 		return true;
 	}
+	
+	/**
+	 * @param throwExceptionOnDispose The throwExceptionOnDispose to set.
+	 */
+	public void setThrowExceptionOnDispose(boolean throwExceptionOnDispose) {
+		this.throwExceptionOnDispose = throwExceptionOnDispose;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.Wizard#dispose()
+	 */
+	public void dispose() {
+		super.dispose();
+		if(throwExceptionOnDispose)
+			throw new NullPointerException();
+	}
 }
\ No newline at end of file
diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/wizards/TheTestWizardPage.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/wizards/TheTestWizardPage.java
index ffcfc9d..5222bee 100644
--- a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/wizards/TheTestWizardPage.java
+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/wizards/TheTestWizardPage.java
@@ -27,6 +27,7 @@
 	public static final String BAD_TEXT_FIELD_STATUS = "A bad value was entered";
 	public static final String GOOD_TEXT_FIELD_CONTENTS = "GOOD VALUE";
 	public Text textInputField;
+	private boolean throwExceptionOnDispose; 
 
 	public TheTestWizardPage(String name) {
 		super(name);
@@ -80,5 +81,21 @@
 		setErrorMessage(message);
 		setPageComplete(message == null);
 	}
+	
+	/**
+	 * @param throwExceptionOnDispose The throwExceptionOnDispose to set.
+	 */
+	public void setThrowExceptionOnDispose(boolean throwExceptionOnDispose) {
+		this.throwExceptionOnDispose = throwExceptionOnDispose;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.DialogPage#dispose()
+	 */
+	public void dispose() {
+		super.dispose();
+		if(throwExceptionOnDispose)
+			throw new NullPointerException();
+	}
 
 }
\ No newline at end of file
diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/wizards/WizardTest.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/wizards/WizardTest.java
index 927d3ea..4abb0c3 100644
--- a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/wizards/WizardTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/wizards/WizardTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,13 +15,17 @@
 
 import junit.framework.TestCase;
 
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IPageChangedListener;
 import org.eclipse.jface.dialogs.IPageChangingListener;
 import org.eclipse.jface.dialogs.PageChangedEvent;
 import org.eclipse.jface.dialogs.PageChangingEvent;
+import org.eclipse.jface.util.ILogger;
+import org.eclipse.jface.util.Policy;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
 
 public class WizardTest extends TestCase {
 	/**
@@ -219,6 +223,40 @@
 		assertEquals("Page change notified unintentially", false, pageChanged);
 	}
 	
+	
+	public void testWizardDispose() {
+		wizard.setThrowExceptionOnDispose(true);
+
+		final boolean logged[] = new boolean[1];
+		Policy.setLog(new ILogger() {
+			public void log(IStatus status) {
+				logged[0] = true;
+			}
+		});
+		Shell shell = dialog.getShell();
+		dialog.close();
+        
+        assertTrue(logged[0]);
+        
+        shell.dispose();
+	}
+	
+	public void testWizardPageDispose() {
+        wizard.page2.setThrowExceptionOnDispose(true);
+        final boolean logged[] = new boolean[1];
+		Policy.setLog(new ILogger() {
+			public void log(IStatus status) {
+				logged[0] = true;
+			}
+		});
+        dialog.close();
+        
+        assertTrue(logged[0]);
+        assertTrue(wizard.page1.getControl().isDisposed());
+        assertTrue(wizard.page3.getControl().isDisposed());
+
+	}
+	
 	//----------------------------------------------------
 
 	
diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/ui/tests/RCPSessionApplication.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/ui/tests/RCPSessionApplication.java
index 3d1f951..e50adf9 100644
--- a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/ui/tests/RCPSessionApplication.java
+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/ui/tests/RCPSessionApplication.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,10 +19,12 @@
 
 public class RCPSessionApplication implements IApplication {
 	
+	private boolean windowlessApp = false;
+	
 	public Object start(IApplicationContext context) throws Exception {
 		Display display = PlatformUI.createDisplay();
 		try {
-			PlatformUI.createAndRunWorkbench(display, new RCPTestWorkbenchAdvisor());
+			PlatformUI.createAndRunWorkbench(display, new RCPTestWorkbenchAdvisor(windowlessApp));
 		} finally {
 			if (display != null)
 				display.dispose();
@@ -42,4 +44,12 @@
 			}
 		});
 	}
+	
+	/**
+	 * @param windowlessApp The windowlessApp to set.
+	 */
+	public void setWindowlessApp(boolean windowlessApp) {
+		this.windowlessApp = windowlessApp;
+	}
+	
 }
\ No newline at end of file
diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/ui/tests/WindowlessRCPApplication.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/ui/tests/WindowlessRCPApplication.java
new file mode 100644
index 0000000..0f1b292
--- /dev/null
+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/ui/tests/WindowlessRCPApplication.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.tests;
+
+
+public class WindowlessRCPApplication extends RCPSessionApplication {
+	
+	public WindowlessRCPApplication() {
+		setWindowlessApp(true);
+	}
+
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPageListenerTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPageListenerTest.java
index 66b6f3c..aad5834 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPageListenerTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPageListenerTest.java
@@ -128,7 +128,7 @@
      */
     public void pageActivated(IWorkbenchPage page) {
         if (pageMask == null || page == pageMask)
-            eventsReceived |= ACTIVATE;
+            eventsReceived = eventsReceived | ACTIVATE;
     }
 
     /**
@@ -136,7 +136,7 @@
      */
     public void pageClosed(IWorkbenchPage page) {
         if (pageMask == null || page == pageMask)
-            eventsReceived |= CLOSE;
+        	eventsReceived = eventsReceived | CLOSE;
     }
 
     /**
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPerspectiveListenerTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPerspectiveListenerTest.java
index 3fee6e2..9cac930 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPerspectiveListenerTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IPerspectiveListenerTest.java
@@ -80,7 +80,7 @@
     public void perspectiveActivated(IWorkbenchPage page,
             IPerspectiveDescriptor perspective) {
         if (page == fPageMask && perspective == fPerMask)
-            fEvent |= ACTIVATED;
+            fEvent = fEvent | ACTIVATED;
     }
 
     /**
@@ -89,7 +89,7 @@
     public void perspectiveChanged(IWorkbenchPage page,
             IPerspectiveDescriptor perspective, String changeId) {
         if (page == fPageMask && perspective == fPerMask)
-            fEvent |= CHANGED;
+        	fEvent = fEvent | CHANGED;
     }
 
     public static boolean isOpen(int bits) {
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkbenchPageTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkbenchPageTest.java
index 341d7e3..76a9333 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkbenchPageTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkbenchPageTest.java
@@ -59,6 +59,7 @@
 import org.eclipse.ui.editors.text.TextEditor;
 import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.internal.WorkbenchPage;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.tweaklets.Tweaklets;
 import org.eclipse.ui.internal.util.Util;
@@ -2835,6 +2836,8 @@
 		fActivePage.closeAllEditors(false);
 		assertEquals(getMessage(), 0, logCount);
 		assertEquals(0, fActivePage.getEditorReferences().length);
+		((WorkbenchPage)fActivePage).resetHiddenEditors();
+		assertEquals(0, fActivePage.getEditorReferences().length);
 	}
 	
 	/**
@@ -3002,4 +3005,60 @@
 				.isFastView(fActivePage, reference));
 	}
 
+	/**
+	 * Create and hide a single editor in a new window.  Close the window.
+	 * Make sure there are no editor errors.
+	 * 
+	 * @throws Exception
+	 */
+	public void testOpenAndHideEditor11() throws Exception {
+		proj = FileUtil.createProject("testOpenAndHideEditor");
+		IFile file1 = FileUtil.createFile("a.mock1", proj);
+		
+		IWorkbenchWindow window = openTestWindow();
+		IWorkbenchPage page = window.getActivePage();
+		
+		IEditorPart editor = IDE.openEditor(page, file1);
+		assertTrue(editor instanceof MockEditorPart);
+		IEditorReference editorRef = (IEditorReference) page
+				.getReference(editor);
+		page.hideEditor(editorRef);
+		assertEquals(0, page.getEditorReferences().length);
+		page.showEditor(editorRef);
+		assertEquals(1, page.getEditorReferences().length);
+		page.hideEditor(editorRef);
+		processEvents();
+		window.close();
+		processEvents();
+		assertEquals(getMessage(), 0, logCount);
+		assertEquals(0, page.getEditorReferences().length);
+	}
+
+	/**
+	 * Create and hide a single editor.  Close it while it's hidden
+	 * and make sure that it doesn't die.
+	 * 
+	 * @throws Exception
+	 */
+	public void testOpenAndHideEditor12() throws Exception {
+		proj = FileUtil.createProject("testOpenAndHideEditor");
+		IFile file1 = FileUtil.createFile("a.mock1", proj);
+		IEditorPart editor = IDE.openEditor(fActivePage, file1);
+		assertTrue(editor instanceof MockEditorPart);
+		IEditorReference editorRef = (IEditorReference) fActivePage
+				.getReference(editor);
+		fActivePage.hideEditor(editorRef);
+		assertEquals(0, fActivePage.getEditorReferences().length);
+		fActivePage.showEditor(editorRef);
+		assertEquals(1, fActivePage.getEditorReferences().length);
+		fActivePage.hideEditor(editorRef);
+		processEvents();
+		fActivePage.closeEditor(editor, false);
+		processEvents();
+		((WorkbenchPage)fActivePage).resetHiddenEditors();
+		assertEquals(0, fActivePage.getEditorReferences().length);
+		assertEquals(getMessage(), 0, logCount);
+		assertEquals(0, fActivePage.getEditorReferences().length);
+	}
+
 }
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkingSetManagerTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkingSetManagerTest.java
index 1eec34c..296f72d 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkingSetManagerTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/IWorkingSetManagerTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -230,6 +230,45 @@
         assertTrue(ArrayUtil.equals(new IWorkingSet[] { fWorkingSet },
                 fWorkingSetManager.getRecentWorkingSets()));
     }
+    
+    public void testRecentWorkingSetsLength() throws Throwable {
+        int oldMRULength =  fWorkingSetManager.getRecentWorkingSetsLength();
+        try {
+	        fWorkingSetManager.setRecentWorkingSetsLength(10);
+	        
+	        IWorkingSet[] workingSets = new IWorkingSet[10];
+	        for (int i = 0 ; i < 10; i++) {
+	            IWorkingSet workingSet = fWorkingSetManager.createWorkingSet(
+	                    "ws_" + Integer.toString(i + 1), new IAdaptable[] { fWorkspace.getRoot() });
+	            fWorkingSetManager.addRecentWorkingSet(workingSet);
+	            fWorkingSetManager.addWorkingSet(workingSet);
+	            workingSets[9 - i] = workingSet;
+	        }
+	        assertTrue(ArrayUtil.equals(workingSets, fWorkingSetManager.getRecentWorkingSets()));
+	        
+	        fWorkingSetManager.setRecentWorkingSetsLength(7);
+	        IWorkingSet[] workingSets7 = new IWorkingSet[7];
+	        System.arraycopy(workingSets, 0, workingSets7, 0, 7);
+	        assertTrue(ArrayUtil.equals(workingSets7, fWorkingSetManager.getRecentWorkingSets()));
+	        
+	        fWorkingSetManager.setRecentWorkingSetsLength(9);
+	        IWorkingSet[] workingSets9 = new IWorkingSet[9];
+	        System.arraycopy(workingSets, 0, workingSets9, 2, 7);
+	        
+	        for (int i = 7 ; i < 9; i++) {
+	            IWorkingSet workingSet = fWorkingSetManager.createWorkingSet(
+	                    "ws_addded_" + Integer.toString(i + 1), new IAdaptable[] { fWorkspace.getRoot() });
+	            fWorkingSetManager.addRecentWorkingSet(workingSet);
+	            fWorkingSetManager.addWorkingSet(workingSet);
+	            workingSets9[8 - i] = workingSet;
+	        }
+	        
+	        assertTrue(ArrayUtil.equals(workingSets9, fWorkingSetManager.getRecentWorkingSets()));
+        } finally {
+        	if (oldMRULength > 0)
+        		fWorkingSetManager.setRecentWorkingSetsLength(oldMRULength);
+        }
+    }
 
     public void testGetWorkingSet() throws Throwable {
         assertNull(fWorkingSetManager.getWorkingSet(WORKING_SET_NAME_1));
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/HeavyResourceView.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/HeavyResourceView.java
index 4408120..de42865 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/HeavyResourceView.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/HeavyResourceView.java
@@ -69,11 +69,9 @@
     public void useAll() {
         releaseAll();
         tempShell = new Shell(Display.getCurrent(), SWT.NONE);
-        int count = 0;
         try {
             for(;;) {
                 new Composite(tempShell, SWT.NONE);
-                count++;
             }
         } catch (SWTError e) {
             TestPlugin.getDefault().getLog().log(WorkbenchPlugin.getStatus(e));
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/CommandEnablementTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/CommandEnablementTest.java
index 0bc8481..9eb4d20 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/CommandEnablementTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/commands/CommandEnablementTest.java
@@ -518,8 +518,9 @@
 			IConfigurationElement[] configElements = extensions[i]
 					.getConfigurationElements();
 			for (int j = 0; j < configElements.length && !found; j++) {
-				if (configElements[j].getAttribute(
-						IWorkbenchRegistryConstants.ATT_CLASS).equals(
+				String attrClass = configElements[j].getAttribute(
+						IWorkbenchRegistryConstants.ATT_CLASS);
+				if (attrClass != null && attrClass.equals(
 						"org.eclipse.ui.tests.menus.HelloEHandler")) {
 					handlerProxyConfig = configElements[j];
 					commandId = handlerProxyConfig
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/Bug_262032.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/Bug_262032.java
new file mode 100644
index 0000000..350a08f
--- /dev/null
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/Bug_262032.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Broadcom Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     James Blackburn (Broadcom Corp.) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.tests.concurrency;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.ILock;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.tests.harness.TestBarrier;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Test for an issue where a lock, held by the UI thread
+ * is released while the UI thread is actually performing work 
+ * having acquired it...
+ */
+public class Bug_262032 extends TestCase {
+
+	ISchedulingRule identityRule = new ISchedulingRule() {
+		public boolean isConflicting(ISchedulingRule rule) {
+			return rule == this;
+		}
+		public boolean contains(ISchedulingRule rule) {
+			return rule == this;
+		}
+	};
+
+	public static Test suite() {
+		return new TestSuite(Bug_262032.class);
+	}
+	
+	volatile boolean concurrentAccess = false;
+
+	/**
+	 * Threads: UI(+asyncExec), j
+	 * Locks: lock, IDRule
+	 * 
+	 * j holds identity Rule
+	 * ui tries to acquire rule => block and performs asyncMessages
+	 * asyncExec run and acquire()s lock
+	 * j then attempts to acquire lock.
+	 * 
+	 * Deadlock manager believes that UI is waiting for IDrule while holding
+	 * lock, and Job holds IDRule while attempting lock.  Scheduling rules
+	 * are never released by the Deadlock detector, so the lock is yielded!
+	 * 
+	 * The expectation is that when threads are 'waiting' they're sat
+	 * in the ordered lock acquire which can give the locks safely to whoever
+	 * is deemed to need it.  In this case that's not true as the UI
+	 * is running an async exec. 
+	 * 
+	 * The result is concurrent running in a locked region.
+	 */
+	public void testBug262032() {
+		final ILock lock = Job.getJobManager().newLock();
+		final TestBarrier tb1 = new TestBarrier(-1);
+
+		// Job hols scheduling rule
+		Job j = new Job ("Deadlocking normal Job") {
+			protected IStatus run(IProgressMonitor monitor) {
+				tb1.setStatus(TestBarrier.STATUS_WAIT_FOR_START);
+				tb1.waitForStatus(TestBarrier.STATUS_RUNNING);
+				lock.acquire();
+				//test that we haven't both acquired the lock...
+				assertTrue(!concurrentAccess);
+				lock.release();
+
+				tb1.setStatus(TestBarrier.STATUS_WAIT_FOR_DONE);
+				return Status.OK_STATUS;
+			};
+		};
+		j.setRule(identityRule);
+		j.schedule();
+
+		// Wait for the job with scheduling rule to start
+		tb1.waitForStatus(TestBarrier.STATUS_WAIT_FOR_START);
+
+		// asyncExec job that wants the lock
+		Display.getDefault().asyncExec(new Runnable() {
+			public void run() {
+				lock.acquire();
+				concurrentAccess = true;
+				tb1.setStatus(TestBarrier.STATUS_RUNNING);
+				// Sleep to test for concurrent access
+				try {
+				Thread.sleep(1000); } catch (InterruptedException e) {/*don't care*/}
+				concurrentAccess = false;
+				lock.release();
+			}
+		});
+
+		// This will block, but the UI will continue to service async requests...
+		Job.getJobManager().beginRule(identityRule, null);
+		Job.getJobManager().endRule(identityRule);
+
+		try {
+			j.join();
+			tb1.waitForStatus(TestBarrier.STATUS_WAIT_FOR_DONE);
+			assertEquals(Status.OK_STATUS, j.getResult());
+		} catch (InterruptedException e) {fail();}
+	}
+
+}
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/ConcurrencyTestSuite.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/ConcurrencyTestSuite.java
index c92ac5f..486e942 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/ConcurrencyTestSuite.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/concurrency/ConcurrencyTestSuite.java
@@ -41,5 +41,6 @@
         addTestSuite(TestBug138695.class);
         addTestSuite(TestBug98621.class);
         addTestSuite(TransferRuleTest.class);
+        addTestSuite(Bug_262032.class);
     }
 }
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ExportArchiveFileOperationTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ExportArchiveFileOperationTest.java
index f8bf0a0..756d81c 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ExportArchiveFileOperationTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/datatransfer/ExportArchiveFileOperationTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,6 +36,7 @@
 import org.eclipse.ui.dialogs.IOverwriteQuery;
 import org.eclipse.ui.internal.wizards.datatransfer.ArchiveFileExportOperation;
 import org.eclipse.ui.internal.wizards.datatransfer.TarEntry;
+import org.eclipse.ui.internal.wizards.datatransfer.TarException;
 import org.eclipse.ui.internal.wizards.datatransfer.TarFile;
 import org.eclipse.ui.tests.harness.util.FileUtil;
 import org.eclipse.ui.tests.harness.util.UITestCase;
@@ -47,6 +48,7 @@
 	private static final String ZIP_FILE_EXT = "zip";
 	private static final String TAR_FILE_EXT = "tar";
     private static final String[] directoryNames = { "dir1", "dir2" };
+    private static final String[] emptyDirectoryNames = { "dir3" };
     private static final String[] fileNames = { "file1.txt", "file2.txt" };
     
     private String localDirectory;
@@ -84,9 +86,9 @@
 
         operation.setUseCompression(false);
         operation.setUseTarFormat(false);
-        openTestWindow().run(true, true, operation);
+        operation.run(new NullProgressMonitor());
         
-        verifyFolders(directoryNames.length, ZIP_FILE_EXT);	
+        verifyFolders(directoryNames.length + emptyDirectoryNames.length, ZIP_FILE_EXT);	
         
 	}
 	
@@ -99,7 +101,7 @@
 
         operation.setUseCompression(true);
         operation.setUseTarFormat(false);
-        openTestWindow().run(true, true, operation);		
+        operation.run(new NullProgressMonitor());	
 		verifyCompressed(ZIP_FILE_EXT);
 	}
 	
@@ -123,9 +125,9 @@
         operation.setCreateLeadupStructure(false);
         operation.setUseCompression(false);
         operation.setUseTarFormat(false);
-        openTestWindow().run(true, true, operation);
+        operation.run(new NullProgressMonitor());
         flattenPaths = true;
-		verifyFolders(directoryNames.length, ZIP_FILE_EXT);		
+		verifyFolders(directoryNames.length + emptyDirectoryNames.length, ZIP_FILE_EXT);		
 	}
 	
 	public void testExportZipCreateSelectedDirectoriesWithFolders() throws Exception {
@@ -142,9 +144,9 @@
         operation.setCreateLeadupStructure(false);
         operation.setUseCompression(false);
         operation.setUseTarFormat(false);
-        openTestWindow().run(true, true, operation);
+        operation.run(new NullProgressMonitor());
         excludeProjectPath = true;
-		verifyFolders(directoryNames.length, ZIP_FILE_EXT);				
+		verifyFolders(directoryNames.length + emptyDirectoryNames.length, ZIP_FILE_EXT);				
 	}
 	
 	public void testExportZipCreateSelectedDirectoriesCompressed() throws Exception {
@@ -167,10 +169,10 @@
         operation.setCreateLeadupStructure(false);
         operation.setUseCompression(true);
         operation.setUseTarFormat(false);
-        openTestWindow().run(true, true, operation);
+        operation.run(new NullProgressMonitor());
         flattenPaths = true;
 		verifyCompressed(ZIP_FILE_EXT);	
-		verifyFolders(directoryNames.length, ZIP_FILE_EXT);
+		verifyFolders(directoryNames.length + emptyDirectoryNames.length, ZIP_FILE_EXT);
 	}
 	
 	public void testExportTar() throws Exception {
@@ -182,9 +184,9 @@
         operation.setUseTarFormat(true);
         operation.setUseCompression(false);
 
-        openTestWindow().run(true, true, operation);
+        operation.run(new NullProgressMonitor());
         
-        verifyFolders(directoryNames.length, TAR_FILE_EXT);	
+        verifyFolders(directoryNames.length + emptyDirectoryNames.length, TAR_FILE_EXT);	
 	}
 	
 	public void testExportTarCompressed() throws Exception {
@@ -196,7 +198,7 @@
 
         operation.setUseTarFormat(true);
         operation.setUseCompression(true);
-        openTestWindow().run(true, true, operation);		
+        operation.run(new NullProgressMonitor());		
 		verifyCompressed(TAR_FILE_EXT);		
 	}
 	
@@ -220,9 +222,9 @@
         operation.setCreateLeadupStructure(false);
         operation.setUseCompression(false);
         operation.setUseTarFormat(true);
-        openTestWindow().run(true, true, operation);
+        operation.run(new NullProgressMonitor());
         flattenPaths = true;
-		verifyFolders(directoryNames.length, TAR_FILE_EXT);			
+		verifyFolders(directoryNames.length + emptyDirectoryNames.length, TAR_FILE_EXT);			
 	}
 	
 	public void testExportTarCreateSelectedDirectoriesWithFolders() throws Exception {
@@ -239,9 +241,9 @@
         operation.setCreateLeadupStructure(false);
         operation.setUseCompression(false);
         operation.setUseTarFormat(true);
-        openTestWindow().run(true, true, operation);
+        operation.run(new NullProgressMonitor());
         excludeProjectPath = true;
-		verifyFolders(directoryNames.length, TAR_FILE_EXT);				
+		verifyFolders(directoryNames.length + emptyDirectoryNames.length, TAR_FILE_EXT);				
 		
 	}
 	
@@ -265,10 +267,10 @@
         operation.setCreateLeadupStructure(false);
         operation.setUseCompression(true);
         operation.setUseTarFormat(true);
-        openTestWindow().run(true, true, operation);
+        operation.run(new NullProgressMonitor());
         flattenPaths = true;
 		verifyCompressed(TAR_FILE_EXT);	
-		verifyFolders(directoryNames.length, TAR_FILE_EXT);
+		verifyFolders(directoryNames.length + emptyDirectoryNames.length, TAR_FILE_EXT);
 		
 	}
 
@@ -324,6 +326,12 @@
 	    				true, new NullProgressMonitor());
 	    		}
 	    	}
+
+	    	// create empty folders to test bug 278402
+	    	for(int i = 0; i < emptyDirectoryNames.length; i++){
+	    		IFolder folder = project.getFolder(emptyDirectoryNames[i]);
+	    		folder.create(false, true, new NullProgressMonitor());
+	    	}
     	}
     	catch(Exception e){
     		fail(e.toString());
@@ -358,7 +366,7 @@
 	    		in.close();
 	    	}
     	}
-    	catch (Exception e){
+    	catch (IOException e){
     		fail(e.getMessage());
     	}
     	assertTrue(fileName + " does not appear to be compressed.", compressed);
@@ -390,7 +398,10 @@
 	    	else
 	    		verifyArchive(folderCount, allEntries);
     	}
-    	catch (Exception e){
+    	catch (IOException e){
+    		fail(e.getMessage());
+    	}
+    	catch (TarException e){
     		fail(e.getMessage());
     	}
     }
@@ -405,7 +416,10 @@
 			int idx = entryName.lastIndexOf("/");
 			String folderPath = entryName.substring(0, idx);
 			String fileName = entryName.substring(idx+1, entryName.length());
-			files.add(fileName);
+			// we get empty strings for folder entries, don't add them as a file name
+			if (fileName.length() != 0) {
+				files.add(fileName);	
+			}
 			int idx2 = folderPath.lastIndexOf("/");
 			if (idx2 != -1){
     			String folderName = folderPath.substring(idx2 + 1, folderPath.length());
@@ -461,15 +475,15 @@
     		if (directoryNames[i].equals(name))
     			return true;
     	}
+    	for (int i = 0; i < emptyDirectoryNames.length; i++){
+    		if (emptyDirectoryNames[i].equals(name))
+    			return true;
+    	}
     	return false;
     }
     
 	private boolean isDirectory(IResource resource){
-		for (int i = 0; i < directoryNames.length; i++){
-			if (directoryNames[i].equals(resource.getName()))
-				return true;
-		}
-		return false;
+		return isDirectory(resource.getName());
 	}
 	
 	private boolean isFile(IResource resource){
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/helpers/TestFacade.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/helpers/TestFacade.java
index 4862293..541eff8 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/helpers/TestFacade.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/helpers/TestFacade.java
@@ -15,12 +15,14 @@
 
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.IPageService;
 import org.eclipse.ui.IPartService;
 import org.eclipse.ui.ISelectionService;
 import org.eclipse.ui.IViewReference;
 import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPartSite;
 import org.eclipse.ui.internal.tweaklets.Tweaklets;
 import org.eclipse.ui.internal.tweaklets.Tweaklets.TweakKey;
 
@@ -75,6 +77,8 @@
 			IViewReference viewRef);
 
 	public abstract boolean isViewPaneVisible(IViewReference viewRef);
+	
+	public abstract Control getPaneControl(IWorkbenchPartSite site);
 
 	public abstract boolean isViewToolbarVisible(IViewReference viewRef);
 
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/helpers/TestFacadeImpl.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/helpers/TestFacadeImpl.java
index 95eb6bd..55dcce0 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/helpers/TestFacadeImpl.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/helpers/TestFacadeImpl.java
@@ -24,6 +24,7 @@
 import org.eclipse.ui.ISelectionService;
 import org.eclipse.ui.IViewReference;
 import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPartSite;
 import org.eclipse.ui.internal.FastViewBar;
 import org.eclipse.ui.internal.FastViewBarContextMenuContribution;
 import org.eclipse.ui.internal.PartSite;
@@ -242,4 +243,11 @@
 		return ((WorkbenchPage) ref.getPage()).getActivePerspective()
 				.isMoveable(ref);
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.tests.helpers.TestFacade#getPaneControl(org.eclipse.ui.IWorkbenchPartSite)
+	 */
+	public Control getPaneControl(IWorkbenchPartSite site) {
+		return ((PartSite)site).getPane().getControl();
+	}
 }
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingPersistenceTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingPersistenceTest.java
index 425a1cc..5a0a57d 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingPersistenceTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingPersistenceTest.java
@@ -17,6 +17,7 @@
 import org.eclipse.jface.bindings.keys.ParseException;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.util.Util;
+import org.eclipse.swt.SWT;
 import org.eclipse.ui.commands.ICommandService;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.keys.IBindingService;
@@ -154,9 +155,12 @@
 				}
 			}
 		}
-		// assertEquals(2, numAboutBindings);
-		// temp work around for honouring carbon bindings
-		assertEquals(3, numAboutBindings);
+		if (Util.WS_CARBON.equals(SWT.getPlatform())
+				|| Util.WS_COCOA.equals(SWT.getPlatform())) {
+			assertEquals(2, numAboutBindings);
+		} else {
+			assertEquals(1, numAboutBindings);
+		}
 	}
 
 	public final void testBindingTransform() throws Exception {
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/AbstractMultiEditorTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/AbstractMultiEditorTest.java
new file mode 100644
index 0000000..84c5df6
--- /dev/null
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/AbstractMultiEditorTest.java
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.tests.multieditor;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.ILogListener;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.internal.PartSite;
+import org.eclipse.ui.internal.WorkbenchPage;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.MultiEditorInput;
+import org.eclipse.ui.tests.TestPlugin;
+import org.eclipse.ui.tests.harness.util.UITestCase;
+
+public class AbstractMultiEditorTest extends UITestCase {
+
+	private static final String PROJECT_NAME = "TiledEditorProject";
+
+	private static final String TILED_EDITOR_ID = "org.eclipse.ui.tests.multieditor.ConcreteAbstractMultiEditor";
+
+	// tiled editor test files
+	private static final String DATA_FILES_DIR = "/data/org.eclipse.newMultiEditor/";
+
+	private static final String TEST01_TXT = "test01.txt";
+
+	private static final String TEST03_ETEST = "test03.etest";
+
+	private EditorErrorListener fErrorListener;
+
+	public AbstractMultiEditorTest(String tc) {
+		super(tc);
+	}
+
+	public void testBug317102() throws Throwable {
+		final String[] simpleFiles = { TEST01_TXT, TEST03_ETEST };
+
+		IWorkbenchWindow window = openTestWindow();
+		WorkbenchPage page = (WorkbenchPage) window.getActivePage();
+
+		IProject testProject = findOrCreateProject(PROJECT_NAME);
+
+		MultiEditorInput input = generateEditorInput(simpleFiles, testProject);
+
+		IEditorPart editor = page.openEditor(input,
+				AbstractMultiEditorTest.TILED_EDITOR_ID);
+
+		// did we get a multieditor back?
+		assertTrue(editor instanceof ConcreteAbstractMultiEditor);
+		ConcreteAbstractMultiEditor multiEditor = (ConcreteAbstractMultiEditor) editor;
+
+		IEditorPart[] innerEditors = multiEditor.getInnerEditors();
+		IEditorPart activeEditor = multiEditor.getActiveEditor();
+		assertEquals(activeEditor, innerEditors[0]);
+		multiEditor.activateEditor(innerEditors[1]);
+
+		// activate another view
+		IViewPart view = page.showView(IPageLayout.ID_PROBLEM_VIEW);
+		assertEquals(view, page.getActivePart());
+
+		fakeActivation(innerEditors[0]);
+	}
+
+	private void fakeActivation(IWorkbenchPart part) {
+		try {
+			setupErrorListener();
+			Event event = new Event();
+			event.type = SWT.Activate;
+			((PartSite) part.getSite()).getPane().handleEvent(event);
+
+			assertTrue("Nothing should have been logged",
+					fErrorListener.messages.isEmpty());
+		} finally {
+			removeErrorListener();
+		}
+	}
+
+	/**
+	 * Set up to catch any editor initialization exceptions.
+	 * 
+	 */
+	private void setupErrorListener() {
+		final ILog log = WorkbenchPlugin.getDefault().getLog();
+		fErrorListener = new EditorErrorListener();
+		log.addLogListener(fErrorListener);
+	}
+
+	/**
+	 * Remove the editor error listener.
+	 */
+	private void removeErrorListener() {
+		final ILog log = WorkbenchPlugin.getDefault().getLog();
+		if (fErrorListener != null) {
+			log.removeLogListener(fErrorListener);
+			fErrorListener = null;
+		}
+	}
+
+	/**
+	 * Create the multi editor input in the given project. Creates the files in
+	 * the project from template files in the classpath if they don't already
+	 * exist.
+	 * 
+	 * @param simpleFiles
+	 *            the array of filenames to copy over
+	 * @param testProject
+	 *            the project to create the files in
+	 * @return the editor input used to open the multieditor
+	 * @throws CoreException
+	 * @throws IOException
+	 */
+	private MultiEditorInput generateEditorInput(String[] simpleFiles,
+			IProject testProject) throws CoreException, IOException {
+		String[] ids = new String[simpleFiles.length];
+		IEditorInput[] inputs = new IEditorInput[simpleFiles.length];
+		IEditorRegistry registry = fWorkbench.getEditorRegistry();
+
+		for (int f = 0; f < simpleFiles.length; ++f) {
+			IFile f1 = createFile(testProject, simpleFiles[f]);
+			ids[f] = registry.getDefaultEditor(f1.getName()).getId();
+			inputs[f] = new FileEditorInput(f1);
+		}
+
+		MultiEditorInput input = new MultiEditorInput(ids, inputs);
+		return input;
+	}
+
+	/**
+	 * Create the project to work in. If it already exists, just open it.
+	 * 
+	 * @param projectName
+	 *            the name of the project to create
+	 * @return the newly opened project
+	 * @throws CoreException
+	 */
+	private static IProject findOrCreateProject(String projectName)
+			throws CoreException {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IProject testProject = workspace.getRoot().getProject(projectName);
+		if (!testProject.exists()) {
+			testProject.create(null);
+		}
+		testProject.open(null);
+		return testProject;
+	}
+
+	private static IFile createFile(IProject testProject, String simpleFile)
+			throws CoreException, IOException {
+		IFile file = testProject.getFile(simpleFile);
+		if (!file.exists()) {
+			URL url = FileLocator.toFileURL(TestPlugin.getDefault().getBundle()
+					.getEntry(DATA_FILES_DIR + simpleFile));
+			file.create(url.openStream(), true, null);
+		}
+		return file;
+	}
+
+	/**
+	 * Close any editors at the beginner of a test, so the test can be clean.
+	 */
+	protected void doSetUp() throws Exception {
+		super.doSetUp();
+		IWorkbenchPage page = fWorkbench.getActiveWorkbenchWindow()
+				.getActivePage();
+		page.closeAllEditors(false);
+	}
+
+	/**
+	 * Listens for the standard message that indicates the MultiEditor failed
+	 * ... usually caused by incorrect framework initialization that doesn't set
+	 * the innerChildren.
+	 * 
+	 * @since 3.1
+	 * 
+	 */
+	public static class EditorErrorListener implements ILogListener {
+
+		public ArrayList messages = new ArrayList();
+
+		public void logging(IStatus status, String plugin) {
+			String msg = status.getMessage();
+			Throwable ex = status.getException();
+			if (ex != null) {
+				msg += ": " + ex.getMessage();
+			}
+			messages.add(msg);
+		}
+	}
+}
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/ConcreteAbstractMultiEditor.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/ConcreteAbstractMultiEditor.java
new file mode 100644
index 0000000..f9b1e26
--- /dev/null
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/ConcreteAbstractMultiEditor.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.tests.multieditor;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.part.AbstractMultiEditor;
+
+public class ConcreteAbstractMultiEditor extends AbstractMultiEditor {
+
+	private Composite left;
+	private Composite right;
+
+	private IEditorReference leftReference;
+
+	protected void innerEditorsCreated() {
+		// no-op
+	}
+
+	public Composite getInnerEditorContainer(
+			IEditorReference innerEditorReference) {
+		if (leftReference == null) {
+			leftReference = innerEditorReference;
+			return left;
+		}
+		return right;
+	}
+
+	public void createPartControl(Composite parent) {
+		SashForm form = new SashForm(parent, SWT.HORIZONTAL);
+		left = new Composite(form, SWT.NONE);
+		left.setLayout(new FillLayout());
+		right = new Composite(form, SWT.NONE);
+		right.setLayout(new FillLayout());
+		form.setWeights(new int[] { 50, 50 });
+	}
+}
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/MultiEditorTestSuite.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/MultiEditorTestSuite.java
index 56bfff0..42f9f2d 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/MultiEditorTestSuite.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multieditor/MultiEditorTestSuite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@
      * Construct the test suite.
      */
     public MultiEditorTestSuite() {
+        addTestSuite(AbstractMultiEditorTest.class);
         addTestSuite(MultiEditorTest.class);
     }
 }
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiPageEditorSelectionTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiPageEditorSelectionTest.java
new file mode 100644
index 0000000..309f410
--- /dev/null
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiPageEditorSelectionTest.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.tests.multipageeditor;
+
+import java.io.ByteArrayInputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.tests.harness.util.UITestCase;
+import org.eclipse.ui.views.properties.PropertySheet;
+
+public class MultiPageEditorSelectionTest extends UITestCase {
+
+	private static final String MTEST01_FILE = "mtest01.multivar";
+
+	private static final String PROJECT_NAME = "MultiPageEditorSelction";
+
+	public MultiPageEditorSelectionTest(String testName) {
+		super(testName);
+	}
+
+	protected void doTearDown() throws Exception {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IProject testProject = workspace.getRoot().getProject(PROJECT_NAME);
+		if (testProject.exists()) {
+			testProject.delete(true, true, null);
+		}
+		super.doTearDown();
+	}
+
+	public void testPostSelection() throws Exception {
+		IWorkbenchWindow window = openTestWindow();
+		IEditorPart part = openEditor(window, MTEST01_FILE);
+		ISelectionProvider provider = part.getSite().getSelectionProvider();
+		assertTrue(provider instanceof IPostSelectionProvider);
+
+		final boolean[] called = { false };
+		IPostSelectionProvider postSelectionProvider = (IPostSelectionProvider) provider;
+		postSelectionProvider
+				.addPostSelectionChangedListener(new ISelectionChangedListener() {
+					public void selectionChanged(SelectionChangedEvent event) {
+						called[0] = true;
+					}
+				});
+
+		((MultiPageResourceEditor) part).updateSelection();
+		assertTrue(called[0]);
+	}
+
+	public void testPropertiesView() throws Exception {
+		IWorkbenchWindow window = openTestWindow();
+		IEditorPart part = openEditor(window, MTEST01_FILE);
+
+		PropertySheet propertiewView = (PropertySheet) window.getActivePage()
+				.showView(IPageLayout.ID_PROP_SHEET);
+
+		window.getActivePage().activate(part);
+
+		Tree tree = (Tree) propertiewView.getCurrentPage().getControl();
+		assertEquals(0, tree.getItemCount());
+
+		MultiPageResourceEditor editor = (MultiPageResourceEditor) part;
+		editor.updateSelection();
+		assertFalse(tree.getItemCount() == 0);
+	}
+
+	private IEditorPart openEditor(IWorkbenchWindow window, String filename)
+			throws CoreException, PartInitException {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+
+		IProject testProject = workspace.getRoot().getProject(PROJECT_NAME);
+		if (!testProject.exists()) {
+			testProject.create(null);
+		}
+		testProject.open(null);
+
+		IFile multiFile = testProject.getFile(filename);
+		if (!multiFile.exists()) {
+			multiFile.create(new ByteArrayInputStream("".getBytes()), true,
+					null);
+		}
+
+		IWorkbenchPage page = window.getActivePage();
+		IEditorPart part = IDE.openEditor(page, multiFile,
+				MultiPageResourceEditor.EDITOR_ID);
+		assertTrue(part instanceof MultiPageResourceEditor);
+		return part;
+	}
+}
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiPageResourceEditor.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiPageResourceEditor.java
new file mode 100644
index 0000000..73b4b7f
--- /dev/null
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiPageResourceEditor.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.tests.multipageeditor;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.ui.part.EditorPart;
+import org.eclipse.ui.part.MultiPageEditorPart;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+
+public class MultiPageResourceEditor extends MultiPageEditorPart {
+
+	static final String EDITOR_ID = "org.eclipse.ui.tests.multipageeditor.MultiPageResourceEditor"; //$NON-NLS-1$
+
+	private SubEditor editor;
+
+	private IPropertySheetPage page;
+
+	public void updateSelection() {
+		IFile file = (IFile) getEditorInput().getAdapter(IFile.class);
+		editor.setSelection(new StructuredSelection(file));
+	}
+
+	protected void createPages() {
+		try {
+			editor = new SubEditor();
+			addPage(editor, getEditorInput());
+		} catch (PartInitException e) {
+			throw new RuntimeException(e);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.part.MultiPageEditorPart#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class adapter) {
+		if (adapter == IPropertySheetPage.class) {
+			if (page == null) {
+				page = new PropertySheetPage();
+			}
+			return page;
+		}
+		return super.getAdapter(adapter);
+	}
+
+	public void doSave(IProgressMonitor monitor) {
+		// nothing to do
+	}
+
+	public void doSaveAs() {
+		// nothing to do
+	}
+
+	public boolean isSaveAsAllowed() {
+		return false;
+	}
+
+	static class SubEditor extends EditorPart implements ISelectionProvider {
+
+		private TreeViewer viewer;
+
+		public void createPartControl(Composite parent) {
+			viewer = new TreeViewer(parent);
+			viewer.setContentProvider(new WorkbenchContentProvider());
+			viewer.setLabelProvider(WorkbenchLabelProvider
+					.getDecoratingWorkbenchLabelProvider());
+			viewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
+			viewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
+
+			getSite().setSelectionProvider(this);
+		}
+
+		public void setFocus() {
+			viewer.getControl().setFocus();
+		}
+
+		public void doSave(IProgressMonitor monitor) {
+			// nothing to do
+		}
+
+		public void doSaveAs() {
+			// nothing to do
+		}
+
+		public void init(IEditorSite site, IEditorInput input)
+				throws PartInitException {
+			setSite(site);
+			setInput(input);
+		}
+
+		public boolean isDirty() {
+			return false;
+		}
+
+		public boolean isSaveAsAllowed() {
+			return false;
+		}
+
+		public void addSelectionChangedListener(
+				ISelectionChangedListener listener) {
+			viewer.addSelectionChangedListener(listener);
+		}
+
+		public ISelection getSelection() {
+			return viewer.getSelection();
+		}
+
+		public void removeSelectionChangedListener(
+				ISelectionChangedListener listener) {
+			viewer.removeSelectionChangedListener(listener);
+		}
+
+		public void setSelection(ISelection selection) {
+			viewer.setSelection(selection);
+		}
+
+	}
+}
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/services/CheckHandler.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/services/CheckHandler.java
new file mode 100644
index 0000000..a9c50d3
--- /dev/null
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/services/CheckHandler.java
@@ -0,0 +1,14 @@
+package org.eclipse.ui.tests.services;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+public class CheckHandler extends AbstractHandler {
+
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		// It's OK do do nothing
+		return null;
+	}
+
+}
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/services/EvaluationServiceTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/services/EvaluationServiceTest.java
index dec2774..c7deb46 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/services/EvaluationServiceTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/services/EvaluationServiceTest.java
@@ -11,7 +11,11 @@
 
 package org.eclipse.ui.tests.services;
 
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
 import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
 
 import org.eclipse.core.expressions.EvaluationResult;
 import org.eclipse.core.expressions.Expression;
@@ -28,9 +32,12 @@
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TreePath;
 import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IPerspectiveRegistry;
 import org.eclipse.ui.ISources;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPart;
@@ -38,8 +45,10 @@
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.contexts.IContextActivation;
 import org.eclipse.ui.contexts.IContextService;
+import org.eclipse.ui.handlers.IHandlerActivation;
+import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.internal.WorkbenchWindow;
-import org.eclipse.ui.internal.services.SlaveEvaluationService;
+import org.eclipse.ui.internal.handlers.HandlerPersistence;
 import org.eclipse.ui.services.IEvaluationReference;
 import org.eclipse.ui.services.IEvaluationService;
 import org.eclipse.ui.services.ISourceProviderService;
@@ -52,6 +61,10 @@
  * 
  */
 public class EvaluationServiceTest extends UITestCase {
+	/**
+	 * 
+	 */
+	private static final String CHECK_HANDLER_ID = "org.eclipse.ui.tests.services.checkHandler";
 	private static final String CONTEXT_ID1 = "org.eclipse.ui.command.contexts.evaluationService1";
 
 	/**
@@ -79,6 +92,40 @@
 		}
 	}
 
+	public void testBug334524() throws Exception {
+		IPerspectiveRegistry registry = PlatformUI.getWorkbench().getPerspectiveRegistry();
+		IPerspectiveDescriptor resourecePerspective = registry.findPerspectiveWithId("org.eclipse.ui.resourcePerspective");
+		IPerspectiveDescriptor javaPerspective = registry.findPerspectiveWithId("org.eclipse.jdt.ui.JavaPerspective");
+		String viewId = "org.eclipse.ui.tests.SelectionProviderView";
+		
+		IWorkbenchWindow window = openTestWindow();
+		IWorkbenchPage activePage = window.getActivePage();
+		
+		// show view in resource perspective
+		activePage.setPerspective(resourecePerspective);
+		SelectionProviderView view = (SelectionProviderView) activePage.showView(viewId);
+		processEvents();
+		
+		// show view in java perspective
+		activePage.setPerspective(javaPerspective);
+		activePage.showView(viewId);
+		processEvents();
+		
+		// now set the selection
+		IStructuredSelection selection = new StructuredSelection(new String("testing selection")); 
+		view.setSelection(selection);
+		processEvents();
+		
+		// switch perspective & check selection
+		activePage.setPerspective(resourecePerspective);
+		processEvents();
+		
+		IEvaluationService service = (IEvaluationService) window.getService(IEvaluationService.class);
+		Object currentSelection = service.getCurrentState().getVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME);
+		assertEquals(selection, currentSelection);
+		
+	}
+	
 	public void testBasicService() throws Exception {
 		IWorkbenchWindow window = openTestWindow();
 		IEvaluationService service = (IEvaluationService) window
@@ -273,7 +320,7 @@
 		IEvaluationService service = (IEvaluationService) window
 				.getService(IEvaluationService.class);
 		assertNotNull(service);
-		assertTrue(service instanceof SlaveEvaluationService);
+		//assertTrue(service instanceof SlaveEvaluationService);
 
 		MyEval listener = new MyEval();
 		IContextActivation context1 = null;
@@ -363,6 +410,51 @@
 		assertFalse(listener.currentValue);
 		assertEquals(3, listener.count);
 	}
+	
+	public void testSourceProviderPriority() throws Exception {
+		IHandlerService hs = (IHandlerService) getWorkbench().getService(IHandlerService.class);
+		
+		Collection activations = null;
+		// fill in a set of activations
+		String hsClassName = hs.getClass().getName();
+		if (hsClassName.equals("org.eclipse.ui.internal.handlers.HandlerService")) {
+			Field hpField = hs.getClass().getDeclaredField("handlerPersistence");
+			hpField.setAccessible(true);
+
+			HandlerPersistence hp = (HandlerPersistence) hpField.get(hs);
+			
+			Field activationsField = hp.getClass().getDeclaredField("handlerActivations");
+			activationsField.setAccessible(true);
+			activations = (Collection) activationsField.get(hp);
+			assertNotNull(activations);
+		} else if (hsClassName.equals("org.eclipse.ui.internal.handlers.LegacyHandlerService")) {
+			Field hsField = hs.getClass().getDeclaredField("LEGACY_H_ID");
+			String LEGACY_H_ID = (String) hsField.get(null);
+			Field hpField = hs.getClass().getDeclaredField("eclipseContext");
+			hpField.setAccessible(true);
+			Object eclipseContext = hpField.get(hs);
+			assertNotNull(eclipseContext);
+			Method getMethod = eclipseContext.getClass().getDeclaredMethod("get", new Class[] { String.class });
+			activations = (Collection) getMethod.invoke(eclipseContext, new Object[] { LEGACY_H_ID + CHECK_HANDLER_ID});
+			assertNotNull(activations);
+		} else {
+			fail("Incorrect handler service: " + hsClassName);
+		}
+		
+		IHandlerActivation activation = null;
+		Iterator i = activations.iterator();
+		while (i.hasNext()) {
+			IHandlerActivation ha = (IHandlerActivation) i.next();
+			if (CHECK_HANDLER_ID.equals(ha.getCommandId())) {
+				activation = ha;
+			}
+		}
+		
+		
+		assertNotNull("Could not find activation for " + CHECK_HANDLER_ID, activation);
+		
+		assertEquals(ISources.ACTIVE_CONTEXT<<1, activation.getSourcePriority());
+	}
 
 	public void testPropertyChange() throws Exception {
 		IWorkbenchWindow window = openTestWindow();
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/services/WorkbenchSiteProgressServiceTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/services/WorkbenchSiteProgressServiceTest.java
index 73eed8d..406ba47 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/services/WorkbenchSiteProgressServiceTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/services/WorkbenchSiteProgressServiceTest.java
@@ -20,11 +20,12 @@
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchPartSite;
 import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.internal.PartSite;
 import org.eclipse.ui.internal.progress.WorkbenchSiteProgressService;
 import org.eclipse.ui.internal.progress.WorkbenchSiteProgressService.SiteUpdateJob;
+import org.eclipse.ui.internal.tweaklets.Tweaklets;
 import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
 import org.eclipse.ui.tests.harness.util.UITestCase;
+import org.eclipse.ui.tests.helpers.TestFacade;
 
 /**
  * @since 3.5
@@ -75,7 +76,7 @@
 		forceUpdate();		
 		processEvents();
 		
-		Cursor cursor = ((PartSite)site).getPane().getControl().getCursor();
+		Cursor cursor = ((TestFacade) Tweaklets.get(TestFacade.KEY)).getPaneControl(site).getCursor();
 		assertNotNull(cursor);
 		
 		jobWithCursor.cancel();
@@ -89,7 +90,7 @@
 		processEvents();
 		forceUpdate();
 		processEvents();
-		cursor = ((PartSite)site).getPane().getControl().getCursor();
+		cursor = ((TestFacade) Tweaklets.get(TestFacade.KEY)).getPaneControl(site).getCursor();
 		assertNull(cursor); // no jobs, no cursor
 
 		// Now fire two jobs, first one with cursor & delay, the second one without any cursor or delay
@@ -112,7 +113,7 @@
 		
 		forceUpdate();
 		processEvents();
-		cursor = ((PartSite)site).getPane().getControl().getCursor();
+		cursor = ((TestFacade) Tweaklets.get(TestFacade.KEY)).getPaneControl(site).getCursor();
 		assertNull(cursor); // jobWithoutCursor is scheduled to run first - no cursor now
 		
 		while(jobWithCursor.getState() != Job.RUNNING) {
@@ -126,7 +127,7 @@
 
 		forceUpdate();		
 		processEvents();
-		cursor = ((PartSite)site).getPane().getControl().getCursor();
+		cursor = ((TestFacade) Tweaklets.get(TestFacade.KEY)).getPaneControl(site).getCursor();
 		assertNotNull(cursor); // both running now - cursor should be set
 	}
 
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/EditorWithStateTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/EditorWithStateTest.java
index 78c6422..ec832a6 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/EditorWithStateTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/EditorWithStateTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.ui.tests.session;
 
 import junit.framework.TestCase;
+import junit.framework.TestSuite;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
@@ -29,6 +30,13 @@
  */
 public class EditorWithStateTest extends TestCase {
 
+	public static TestSuite suite() {
+		TestSuite suite = new TestSuite("org.eclipse.ui.tests.session.EditorWithStateTest");
+		suite.addTest(new EditorWithStateTest("testInitialEditorOpen"));
+		suite.addTest(new EditorWithStateTest("testSecondEditorOpen"));
+		return suite;
+	}
+
 	/**
 	 * Constructs a new instance of <code>EditorWithStateTest</code>.
 	 * 
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/SessionTests.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/SessionTests.java
index 7f5d599..e08e96a 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/SessionTests.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/SessionTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import org.eclipse.jface.util.Util;
 import org.eclipse.ui.tests.harness.util.TweakletCheckTest;
 import org.eclipse.ui.tests.markers.MarkersViewColumnSizeTest;
 import org.eclipse.ui.tests.statushandlers.StatusHandlerConfigurationSuite;
@@ -46,6 +47,20 @@
 		addThemeTests();
 		addStatusHandlingTests();
 		addRestoredSessionTest();
+		addWindowlessSessionTest();
+	}
+
+	/**
+	 * 
+	 */
+	private void addWindowlessSessionTest() {
+		// Windowless apps are available only on Cocoa 
+		if(Util.isCocoa()) {
+			Map arguments = new HashMap(2);
+			arguments.put("product", null);
+			arguments.put("testApplication", "org.eclipse.ui.tests.windowLessRcpApplication");
+			addTest(new WorkbenchSessionTest("windowlessSessionTests",WindowlessSessionTest.class, arguments));
+		}
 	}
 
 	/**
@@ -86,8 +101,11 @@
 	private void addEditorTests() {
 		addTest(new WorkbenchSessionTest("editorSessionTests",
 				Bug95357Test.class));
-		addTest(new WorkbenchSessionTest("editorSessionTests",
-				EditorWithStateTest.class));
+		
+		WorkbenchSessionTest test = new WorkbenchSessionTest("editorSessionTests");
+		test.addTest(EditorWithStateTest.suite());
+		addTest(test);
+
 		addTest(new WorkbenchSessionTest("editorSessionTests",
 				ArbitraryPropertiesEditorTest.class));
 	}
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/WindowlessSessionTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/WindowlessSessionTest.java
new file mode 100644
index 0000000..869556d
--- /dev/null
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/WindowlessSessionTest.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ui.tests.session;
+
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.tests.harness.util.UITestCase;
+
+
+/**
+ * @since 3.7
+ */
+public class WindowlessSessionTest extends UITestCase {
+	
+	public WindowlessSessionTest(String name) {
+		super(name);
+	}
+
+	public void testWindowlessWorkbench() throws Exception {
+		
+		// There should not be any windows in this app
+		assertTrue(fWorkbench.getWorkbenchWindowCount() == 0);
+
+		// Now open a window
+		IWorkbenchWindow window = fWorkbench.openWorkbenchWindow(null);
+
+		// window count should be 1
+		assertTrue(fWorkbench.getWorkbenchWindowCount() == 1);
+
+		window.close();
+
+		// now the workbench should stay without a window
+		assertTrue(fWorkbench.getWorkbenchWindowCount() == 0);
+	}
+}
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/WorkbenchSessionTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/WorkbenchSessionTest.java
index 93855ec..b04e737 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/WorkbenchSessionTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/session/WorkbenchSessionTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.net.URL;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.zip.ZipFile;
@@ -24,6 +25,8 @@
 import org.eclipse.core.tests.session.Setup;
 import org.eclipse.core.tests.session.SetupManager;
 import org.eclipse.core.tests.session.SetupManager.SetupException;
+import org.eclipse.jface.util.Util;
+import org.eclipse.osgi.service.environment.Constants;
 import org.eclipse.ui.tests.TestPlugin;
 import org.eclipse.ui.tests.harness.util.FileTool;
 
@@ -76,7 +79,7 @@
 	 * @since 3.4
 	 */
 	public WorkbenchSessionTest(String dataLocation) {
-		super(dataLocation);
+		super("org.eclipse.ui.tests");
 		setApplicationId(SessionTestSuite.UI_TEST_APPLICATION);		
 		this.dataLocation = dataLocation;
 	}
@@ -98,6 +101,18 @@
 					base.setEclipseArgument(key, value);
 				}
 			}
+			
+			// <== Kludge for the bug 345127. Force spawned VM to be 32 bit
+			// if we are in a 32bit Eclipse
+			if (Util.isCocoa()) {
+				String arch = System.getProperty("osgi.arch");
+				if (Constants.ARCH_X86.equals(arch)) {
+					Map vmArguments = new HashMap(1);
+					vmArguments.put("d32", null);
+					base.setVMArguments(vmArguments);
+				}
+			}
+			// ==> End of kludge for the bug 345127.
 		} catch (Exception e) {
 			throw SetupManager.getInstance().new SetupException(e.getMessage(),
 					e);
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/statushandlers/StatusDialogManagerTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/statushandlers/StatusDialogManagerTest.java
index 8f0b2af..df9c371 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/statushandlers/StatusDialogManagerTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/statushandlers/StatusDialogManagerTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -624,10 +624,10 @@
 			int i = 0;
 
 			public String getMessage() {
-				if (i == 0) {
+				i++;
+				if (i == 1) {
 					throw new RuntimeException("the bomb!");
 				}
-				i++;
 				return super.getMessage();
 				
 			}
@@ -694,7 +694,7 @@
 		assertTrue(wsdm[0].getStatusAdapters().contains(sa));
 	}
 	
-	public void testBug274867(){
+	public void testBug275867(){
 		StatusAdapter statusAdapter = createStatusAdapter(MESSAGE_1);
 		final StatusAdapter[] passed = new StatusAdapter[] { null };
 		Composite[] support = new Composite[] { null };
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/statushandlers/SupportTrayTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/statushandlers/SupportTrayTest.java
index 859ec57..e80b34f 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/statushandlers/SupportTrayTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/statushandlers/SupportTrayTest.java
@@ -138,8 +138,7 @@
 			td[0].setBlockOnOpen(false);
 			td[0].open();
 			td[0].openTray(st);
-		} catch (Exception e) {
-			fail();
+		} finally {
 			if (td != null)
 				td[0].close();
 		}
diff --git a/tests/org.eclipse.ui.tests/JFace-All Tests.launch b/tests/org.eclipse.ui.tests/JFace-All Tests.launch
index c8a02ee..f23e426 100644
--- a/tests/org.eclipse.ui.tests/JFace-All Tests.launch
+++ b/tests/org.eclipse.ui.tests/JFace-All Tests.launch
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
 <stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
 <booleanAttribute key="askclear" value="false"/>
 <booleanAttribute key="automaticAdd" value="true"/>
@@ -32,6 +31,7 @@
 <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
 <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
 <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jface.tests.AllTests"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ui.tests"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
@@ -41,7 +41,8 @@
 <booleanAttribute key="show_selected_only" value="false"/>
 <stringAttribute key="templateConfig" value=""/>
 <booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
 <booleanAttribute key="useDefaultConfig" value="true"/>
 <booleanAttribute key="useDefaultConfigArea" value="false"/>
 <booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration>
+</launchConfiguration>
\ No newline at end of file
diff --git a/tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF
index 044d752..e0a77a4 100644
--- a/tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.ui.tests/META-INF/MANIFEST.MF
@@ -2,11 +2,10 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: Eclipse UI Tests
 Bundle-SymbolicName: org.eclipse.ui.tests; singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.6.0.qualifier
 Bundle-ClassPath: uitests.jar
 Bundle-Activator: org.eclipse.core.internal.compatibility.PluginActivator
 Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
 Require-Bundle: org.eclipse.core.runtime.compatibility,
  org.eclipse.core.resources,
  org.eclipse.core.expressions,
@@ -29,6 +28,7 @@
  org.eclipse.core.runtime
 Eclipse-AutoStart: true
 Plugin-Class: org.eclipse.ui.tests.TestPlugin
+Import-Package: org.eclipse.e4.ui.bindings.keys;resolution:=optional
 Export-Package: org.eclipse.ui.tests.api,
  org.eclipse.ui.tests.helpers,
  org.eclipse.ui.tests.menus
diff --git a/tests/org.eclipse.ui.tests/UI Test Suite.launch b/tests/org.eclipse.ui.tests/UI Test Suite.launch
index 4d92d00..afc78c7 100644
--- a/tests/org.eclipse.ui.tests/UI Test Suite.launch
+++ b/tests/org.eclipse.ui.tests/UI Test Suite.launch
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
 <booleanAttribute key="askclear" value="false"/>
 <booleanAttribute key="automaticAdd" value="true"/>
 <booleanAttribute key="automaticValidate" value="false"/>
 <stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
 <booleanAttribute key="clearConfig" value="true"/>
 <booleanAttribute key="clearws" value="true"/>
 <booleanAttribute key="clearwslog" value="false"/>
@@ -21,8 +21,6 @@
 </listAttribute>
 <stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
 <booleanAttribute key="default" value="true"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
 <booleanAttribute key="includeOptional" value="true"/>
 <stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
@@ -39,6 +37,7 @@
 <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
 <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
 <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ui.tests.UiTestSuite"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ui.tests"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
@@ -49,7 +48,8 @@
 <booleanAttribute key="show_selected_only" value="false"/>
 <stringAttribute key="templateConfig" value=""/>
 <booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
 <booleanAttribute key="useDefaultConfig" value="true"/>
 <booleanAttribute key="useDefaultConfigArea" value="false"/>
 <booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
+</launchConfiguration>
\ No newline at end of file
diff --git a/tests/org.eclipse.ui.tests/UI-Parts References Test Suite.launch b/tests/org.eclipse.ui.tests/UI-Parts References Test Suite.launch
index b99317b..5eb8f60 100644
--- a/tests/org.eclipse.ui.tests/UI-Parts References Test Suite.launch
+++ b/tests/org.eclipse.ui.tests/UI-Parts References Test Suite.launch
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
 <stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
 <booleanAttribute key="askclear" value="false"/>
 <booleanAttribute key="automaticAdd" value="true"/>
@@ -33,6 +32,7 @@
 <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
 <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
 <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ui.parts.tests.PartsReferencesTestSuite"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ui.tests"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
@@ -42,7 +42,8 @@
 <booleanAttribute key="show_selected_only" value="false"/>
 <stringAttribute key="templateConfig" value=""/>
 <booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
 <booleanAttribute key="useDefaultConfig" value="true"/>
 <booleanAttribute key="useDefaultConfigArea" value="false"/>
 <booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration>
+</launchConfiguration>
\ No newline at end of file
diff --git a/tests/org.eclipse.ui.tests/UI-Session Tests.launch b/tests/org.eclipse.ui.tests/UI-Session Tests.launch
index f8d8087..15765e6b 100644
--- a/tests/org.eclipse.ui.tests/UI-Session Tests.launch
+++ b/tests/org.eclipse.ui.tests/UI-Session Tests.launch
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
 <booleanAttribute key="askclear" value="false"/>
 <booleanAttribute key="automaticAdd" value="true"/>
 <booleanAttribute key="automaticValidate" value="false"/>
@@ -36,6 +35,7 @@
 <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
 <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
 <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ui.tests.session.SessionTests"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ui.tests"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
@@ -45,7 +45,8 @@
 <booleanAttribute key="show_selected_only" value="false"/>
 <stringAttribute key="templateConfig" value=""/>
 <booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
 <booleanAttribute key="useDefaultConfig" value="true"/>
 <booleanAttribute key="useDefaultConfigArea" value="false"/>
 <booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
+</launchConfiguration>
\ No newline at end of file
diff --git a/tests/org.eclipse.ui.tests/build.properties b/tests/org.eclipse.ui.tests/build.properties
index 5de7653..59e0d79 100644
--- a/tests/org.eclipse.ui.tests/build.properties
+++ b/tests/org.eclipse.ui.tests/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2003, 2006 IBM Corporation and others.
+# Copyright (c) 2003, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,15 +10,15 @@
 ###############################################################################
 source.uitests.jar = Eclipse JFace Tests/,\
                      Eclipse UI Tests/,\
-                     Eclipse Part References Test/
+                     Eclipse Part References Test/,\
+                     Benchmark Tests/
+
 bin.includes = icons/,\
                doc/,\
                data/,\
-               plugin.properties,\
                plugin.xml,\
                *.html,\
                *.jar,\
-               .options,\
                *.xml,\
                uiSniff,\
                uiSniff.bat,\
diff --git a/tests/org.eclipse.ui.tests/data/workspaces/windowlessSessionTests.zip b/tests/org.eclipse.ui.tests/data/workspaces/windowlessSessionTests.zip
new file mode 100644
index 0000000..55cb348
--- /dev/null
+++ b/tests/org.eclipse.ui.tests/data/workspaces/windowlessSessionTests.zip
Binary files differ
diff --git a/tests/org.eclipse.ui.tests/plugin.xml b/tests/org.eclipse.ui.tests/plugin.xml
index e77331c..2fd57de 100644
--- a/tests/org.eclipse.ui.tests/plugin.xml
+++ b/tests/org.eclipse.ui.tests/plugin.xml
@@ -687,6 +687,12 @@
             id="org.eclipse.ui.tests.multieditor.TiledEditor"
             name="%Editors.TiledEditor"/>
       <editor
+            class="org.eclipse.ui.tests.multieditor.ConcreteAbstractMultiEditor"
+            default="false"
+            icon="icons/binary_co.gif"
+            id="org.eclipse.ui.tests.multieditor.ConcreteAbstractMultiEditor"
+            name="%Editors.TiledEditor"/>
+      <editor
             class="org.eclipse.ui.tests.multieditor.TestEditor"
             contributorClass="org.eclipse.ui.tests.multieditor.TestActionBarContributor"
             default="false"
@@ -735,6 +741,11 @@
             id="org.eclipse.ui.tests.multipageeditor.MultiVariablePageEditor"
             name="Multi Variable Page Editor"/>
       <editor
+            class="org.eclipse.ui.tests.multipageeditor.MultiPageResourceEditor"
+            icon="icons/mockeditorpart1.gif"
+            id="org.eclipse.ui.tests.multipageeditor.MultiPageResourceEditor"
+            name="Multi Page Resource Editor"/>
+      <editor
             class="org.eclipse.ui.tests.manual.TestBackgroundSaveEditor"
             default="false"
             extensions="background"
@@ -4040,7 +4051,26 @@
          <service
                serviceClass="org.eclipse.ui.tests.api.DummyService"></service>
       </serviceFactory>
-   </extension>   
+   </extension> 
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            id="org.eclipse.ui.tests.services.checkHandler"
+            name="Check My Handler">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.handlers">
+      <handler
+            class="org.eclipse.ui.tests.services.CheckHandler"
+            commandId="org.eclipse.ui.tests.services.checkHandler">
+         <activeWhen>
+            <with variable="username">
+              <instanceof value="java.lang.Object"/>
+            </with>
+         </activeWhen>
+      </handler>
+   </extension>
    <extension
          point="org.eclipse.ui.commands">
       <command
@@ -4295,4 +4325,16 @@
 	      <run class="org.eclipse.ui.tests.RCPSessionApplication"> </run>
 	   </application>
    </extension>
+   <extension
+         id="windowLessRcpApplication"
+         point="org.eclipse.core.runtime.applications">
+      <application
+            cardinality="singleton-global"
+            thread="main"
+            visible="true">
+         <run
+               class="org.eclipse.ui.tests.WindowlessRCPApplication">
+         </run>
+      </application>
+   </extension>
 </plugin>