[checkstyle] Fix checkstyle issues due to import organizing
diff --git a/plugins/org.eclipse.mylyn.docs.intent.client.indexer/src/org/eclipse/mylyn/docs/intent/client/indexer/IndexerRepositoryClient.java b/plugins/org.eclipse.mylyn.docs.intent.client.indexer/src/org/eclipse/mylyn/docs/intent/client/indexer/IndexerRepositoryClient.java
index a7b5982..18af677 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.client.indexer/src/org/eclipse/mylyn/docs/intent/client/indexer/IndexerRepositoryClient.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.client.indexer/src/org/eclipse/mylyn/docs/intent/client/indexer/IndexerRepositoryClient.java
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.mylyn.docs.intent.client.indexer;
 
+import com.google.common.collect.Lists;
+
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
@@ -30,8 +32,6 @@
 import org.eclipse.mylyn.docs.intent.core.document.IntentDocument;
 import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndex;
 
-import com.google.common.collect.Lists;
-
 /**
  * When notified about modifications on the listened elements, update the index.
  * 
diff --git a/plugins/org.eclipse.mylyn.docs.intent.client.synchronizer/src/org/eclipse/mylyn/docs/intent/client/synchronizer/SynchronizerRepositoryClient.java b/plugins/org.eclipse.mylyn.docs.intent.client.synchronizer/src/org/eclipse/mylyn/docs/intent/client/synchronizer/SynchronizerRepositoryClient.java
index 4aa62c3..1b136c0 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.client.synchronizer/src/org/eclipse/mylyn/docs/intent/client/synchronizer/SynchronizerRepositoryClient.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.client.synchronizer/src/org/eclipse/mylyn/docs/intent/client/synchronizer/SynchronizerRepositoryClient.java
@@ -10,6 +10,9 @@
  *******************************************************************************/

 package org.eclipse.mylyn.docs.intent.client.synchronizer;

 

+import com.google.common.collect.Iterables;

+import com.google.common.collect.Sets;

+

 import java.util.Collection;

 import java.util.Iterator;

 

@@ -26,9 +29,6 @@
 import org.eclipse.mylyn.docs.intent.core.compiler.SynchronizerCompilationStatus;

 import org.eclipse.mylyn.docs.intent.core.compiler.TraceabilityIndex;

 

-import com.google.common.collect.Iterables;

-import com.google.common.collect.Sets;

-

 /**

  * In charge of communication between the repository and the synchronizer ; launch a synchronization operation

  * each time a modification on the compiler's generated elements index is detected.

diff --git a/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/completion/ModelingUnitCompletionProcessor.java b/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/completion/ModelingUnitCompletionProcessor.java
index 5904362..96317b4 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/completion/ModelingUnitCompletionProcessor.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/completion/ModelingUnitCompletionProcessor.java
@@ -10,6 +10,9 @@
  *******************************************************************************/
 package org.eclipse.mylyn.docs.intent.client.ui.editor.completion;
 
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Sets;
+
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.regex.Pattern;
@@ -35,9 +38,6 @@
 import org.eclipse.mylyn.docs.intent.core.modelingunit.InstanciationInstruction;
 import org.eclipse.mylyn.docs.intent.parser.IntentKeyWords;
 
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Sets;
-
 /**
  * Computes the completion proposal for ModelingUnits.
  * 
diff --git a/plugins/org.eclipse.mylyn.docs.intent.collab.cdo/src/org/eclipse/mylyn/docs/intent/collab/cdo/repository/CDORepository.java b/plugins/org.eclipse.mylyn.docs.intent.collab.cdo/src/org/eclipse/mylyn/docs/intent/collab/cdo/repository/CDORepository.java
index 10dcf97..89e9ca6 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.collab.cdo/src/org/eclipse/mylyn/docs/intent/collab/cdo/repository/CDORepository.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.collab.cdo/src/org/eclipse/mylyn/docs/intent/collab/cdo/repository/CDORepository.java
@@ -44,6 +44,11 @@
 	public static final String CDO_REPOSITORY_IDENTIFIER = "cdo://";
 
 	/**
+	 * List of the active repositories (while not empty, we can't close the session).
+	 */
+	private static Set<CDORepository> activeRepositories = new LinkedHashSet<CDORepository>();
+
+	/**
 	 * Connector to the repository.
 	 */
 	private IConnector connector;
@@ -64,11 +69,6 @@
 	private CDOSession session;
 
 	/**
-	 * List of the active repositories (while not empty, we can't close the session).
-	 */
-	private static Set<CDORepository> activeRepositories = new LinkedHashSet<CDORepository>();
-
-	/**
 	 * Configuration of this CDORepository (abstract notion).
 	 */
 	private CDOConfig repositoryConfiguration;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/match/EditionDistance.java b/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/match/EditionDistance.java
index 292fc10..bc053bb 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/match/EditionDistance.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/match/EditionDistance.java
@@ -10,6 +10,12 @@
  *******************************************************************************/

 package org.eclipse.mylyn.docs.intent.compare.match;

 

+import com.google.common.base.Predicate;

+import com.google.common.collect.Iterables;

+import com.google.common.collect.Iterators;

+import com.google.common.collect.Maps;

+import com.google.common.collect.Sets;

+

 import java.util.Iterator;

 import java.util.Map;

 import java.util.Set;

@@ -39,12 +45,6 @@
 import org.eclipse.emf.ecore.EStructuralFeature;

 import org.eclipse.emf.ecore.util.InternalEList;

 

-import com.google.common.base.Predicate;

-import com.google.common.collect.Iterables;

-import com.google.common.collect.Iterators;

-import com.google.common.collect.Maps;

-import com.google.common.collect.Sets;

-

 /**

  * This distance function implementation will actually compare the given EObject.

  * 

diff --git a/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/scope/IntentComparisonScope.java b/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/scope/IntentComparisonScope.java
index 01158f0..aef6c05 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/scope/IntentComparisonScope.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/scope/IntentComparisonScope.java
@@ -10,6 +10,9 @@
  *******************************************************************************/

 package org.eclipse.mylyn.docs.intent.compare.scope;

 

+import com.google.common.collect.ForwardingIterator;

+import com.google.common.collect.Iterators;

+

 import java.util.Iterator;

 

 import org.eclipse.emf.common.notify.Notifier;

@@ -18,9 +21,6 @@
 import org.eclipse.emf.ecore.resource.Resource;

 import org.eclipse.emf.ecore.util.EcoreUtil;

 

-import com.google.common.collect.ForwardingIterator;

-import com.google.common.collect.Iterators;

-

 /**

  * The comparison scope for intent documents. Derived from FilterComparisonScope: resolve content proxies.

  * 

diff --git a/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/utils/EMFCompareUtils.java b/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/utils/EMFCompareUtils.java
index 9caf3f5..152936d 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/utils/EMFCompareUtils.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/utils/EMFCompareUtils.java
@@ -10,9 +10,7 @@
  *******************************************************************************/

 package org.eclipse.mylyn.docs.intent.compare.utils;

 

-import static com.google.common.base.Predicates.instanceOf;

-import static com.google.common.base.Predicates.not;

-import static com.google.common.base.Predicates.or;

+import com.google.common.base.Predicates;

 

 import org.eclipse.emf.common.notify.Notifier;

 import org.eclipse.emf.compare.Comparison;

@@ -59,8 +57,9 @@
 	 */

 	public static Comparison compare(Notifier left, Notifier right) {

 		IntentComparisonScope scope = new IntentComparisonScope(left, right);

-		scope.setEObjectContentFilter(not(or(instanceOf(CompilationStatus.class),

-				instanceOf(SynchronizerCompilationStatus.class))));

+		scope.setEObjectContentFilter(Predicates.not(Predicates.or(

+				Predicates.instanceOf(CompilationStatus.class),

+				Predicates.instanceOf(SynchronizerCompilationStatus.class))));

 

 		Builder builder = EMFCompare.builder();

 		builder.setMatchEngine(DefaultMatchEngine.create(UseIdentifiers.NEVER));

@@ -83,8 +82,9 @@
 	 */

 	public static Comparison compareDocuments(Notifier left, Notifier right) {

 		IntentComparisonScope scope = new IntentComparisonScope(left, right);

-		scope.setEObjectContentFilter(not(or(instanceOf(CompilationStatus.class),

-				instanceOf(SynchronizerCompilationStatus.class))));

+		scope.setEObjectContentFilter(Predicates.not(Predicates.or(

+				Predicates.instanceOf(CompilationStatus.class),

+				Predicates.instanceOf(SynchronizerCompilationStatus.class))));

 

 		IEObjectMatcher matcher = new ProximityEObjectMatcher(new EditionDistance(left, right));

 		final IComparisonFactory comparisonFactory = new DefaultComparisonFactory(

diff --git a/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/utils/IntentPrettyPrinter.java b/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/utils/IntentPrettyPrinter.java
index a8a141a..348963f 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/utils/IntentPrettyPrinter.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.compare/src/org/eclipse/mylyn/docs/intent/compare/utils/IntentPrettyPrinter.java
@@ -10,6 +10,8 @@
  *******************************************************************************/

 package org.eclipse.mylyn.docs.intent.compare.utils;

 

+import com.google.common.collect.Iterables;

+

 import java.io.PrintStream;

 import java.util.Arrays;

 

@@ -28,8 +30,6 @@
 import org.eclipse.mylyn.docs.intent.markup.markup.Annotations;

 import org.eclipse.mylyn.docs.intent.markup.markup.Text;

 

-import com.google.common.collect.Iterables;

-

 /**

  * This class exposes methods to serialize a "human-readable" form of the comparison model onto a given

  * stream.

@@ -40,6 +40,10 @@
 @SuppressWarnings("nls")

 public final class IntentPrettyPrinter {

 

+	private static final String QUOTE = "\"";

+

+	private static final String WHITESPACE = " ";

+

 	private static final String SEP = " |";

 

 	/** This is the max length of the columns we display for the Match. */

@@ -424,15 +428,15 @@
 	}

 

 	public static String diffToReadableString(Diff diff) {

-		String res = diff.getKind() + " ";

+		String res = diff.getKind() + WHITESPACE;

 		if (diff instanceof AttributeChange) {

 			AttributeChange change = (AttributeChange)diff;

 			res += change.getAttribute().getEContainingClass().getName() + "."

-					+ change.getAttribute().getName() + " ";

+					+ change.getAttribute().getName() + WHITESPACE;

 		} else if (diff instanceof ReferenceChange) {

 			ReferenceChange change = (ReferenceChange)diff;

 			res += change.getReference().getEContainingClass().getName() + "."

-					+ change.getReference().getName() + " ";

+					+ change.getReference().getName() + WHITESPACE;

 		}

 		res += "\n" + diff + "\n";

 		res += "based on " + matchToReadableString(diff.getMatch());

@@ -461,12 +465,12 @@
 			// }

 		}

 		if (element instanceof Text) {

-			res = "\"" + ((Text)element).getData() + "\"";

+			res = QUOTE + ((Text)element).getData() + QUOTE;

 		} else if (element instanceof IntentDocument || element instanceof Annotations) {

 			res = null;

 		} else if (element instanceof StructuralFeatureAffectation) {

 			StructuralFeatureAffectation aff = (StructuralFeatureAffectation)element;

-			res += element.eClass().getName() + " \"" + aff.getName() + "\"";

+			res += element.eClass().getName() + " \"" + aff.getName() + QUOTE;

 		}

 		return res;

 	}

diff --git a/plugins/org.eclipse.mylyn.docs.intent.markup/src/org/eclipse/mylyn/docs/intent/markup/resource/WikimediaResource.java b/plugins/org.eclipse.mylyn.docs.intent.markup/src/org/eclipse/mylyn/docs/intent/markup/resource/WikimediaResource.java
index 76647b3..2f3a021 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.markup/src/org/eclipse/mylyn/docs/intent/markup/resource/WikimediaResource.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.markup/src/org/eclipse/mylyn/docs/intent/markup/resource/WikimediaResource.java
@@ -13,6 +13,8 @@
  *******************************************************************************/
 package org.eclipse.mylyn.docs.intent.markup.resource;
 
+import com.google.common.collect.Iterators;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -47,8 +49,6 @@
 import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
 
-import com.google.common.collect.Iterators;
-
 /**
  * A resource implementation for web-based pages on wikimedia.
  * 
diff --git a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/compare/IntentMatchEngineTests.java b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/compare/IntentMatchEngineTests.java
index 9695940..95f4116 100644
--- a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/compare/IntentMatchEngineTests.java
+++ b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/compare/IntentMatchEngineTests.java
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.mylyn.docs.intent.client.ui.test.unit.compare;
 
+import com.google.common.collect.Sets;
+
 import java.util.Collection;
 import java.util.List;
 
@@ -28,8 +30,6 @@
 import org.eclipse.mylyn.docs.intent.parser.IntentParser;
 import org.eclipse.mylyn.docs.intent.parser.modelingunit.ParseException;
 
-import com.google.common.collect.Sets;
-
 /**
  * Test ensuring that the Intent match engine works as expected.
  * 
diff --git a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/demo/editor/CompletionTest.java b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/demo/editor/CompletionTest.java
index fc535a6..592978d 100644
--- a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/demo/editor/CompletionTest.java
+++ b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/demo/editor/CompletionTest.java
@@ -71,6 +71,7 @@
 	 * 

 	 * @throws Exception

 	 */

+	// CHECKSTYLE:OFF

 	public void testCompletion() throws Exception {

 		ICompletionProposal[] proposals = null;

 

@@ -166,6 +167,8 @@
 				proposals[0].getDisplayString());

 	}

 

+	// CHECKSTYLE:ON

+

 	/**

 	 * Returns the completion proposals at the given offset.

 	 * 

diff --git a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/synchronizer/SynchronizerTest.java b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/synchronizer/SynchronizerTest.java
index 44627f4..0e6f456 100644
--- a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/synchronizer/SynchronizerTest.java
+++ b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/synchronizer/SynchronizerTest.java
@@ -57,6 +57,7 @@
 	 * 
 	 * @throws Exception
 	 */
+	// CHECKSTYLE:OFF
 	public void testSynchronizationStatus() throws Exception {
 		markers = intentProject.findMarkers("org.eclipse.core.resources.problemmarker", true,
 				IResource.DEPTH_INFINITE);
@@ -82,6 +83,8 @@
 				1326, 6);
 	}
 
+	// CHECKSTYLE:ON
+
 	/**
 	 * Checks that the given message exists at the given position.
 	 *