Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Langer2015-10-01 20:32:11 +0000
committerPhilip Langer2015-10-01 20:32:11 +0000
commitdccb44a25880b6caae2fe7c036f5c75b56c26dfe (patch)
treec68fd8d21913833554f344f30834b50a82e3720d
parent9e378e3fe803f8106d5f478739a79db5008712eb (diff)
downloadorg.eclipse.emf.compare-dccb44a25880b6caae2fe7c036f5c75b56c26dfe.tar.gz
org.eclipse.emf.compare-dccb44a25880b6caae2fe7c036f5c75b56c26dfe.tar.xz
org.eclipse.emf.compare-dccb44a25880b6caae2fe7c036f5c75b56c26dfe.zip
Happy checkstyle in public packages of emf.compare.ide.ui
Change-Id: I21ea375d9917b64a7f0e5cf9dc1cdc38531bb903 Signed-off-by: Philip Langer <planger@eclipsesource.com>
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/IModelMinimizer.java11
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/IStorageProviderAccessor.java6
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/SynchronizationModel.java28
3 files changed, 29 insertions, 16 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/IModelMinimizer.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/IModelMinimizer.java
index 1f3d13e21..3115e442c 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/IModelMinimizer.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/IModelMinimizer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2014 Obeo.
+ * Copyright (c) 2013, 2015 Obeo and others.
* All rights reserved. This program and 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:
* Obeo - initial API and implementation
+ * Philip Langer - javadoc fixes
*******************************************************************************/
package org.eclipse.emf.compare.ide.ui.logical;
@@ -27,12 +28,8 @@ public interface IModelMinimizer {
/**
* This will be called to reduce the number of resources in this model's traversals.
*
- * @param leftTraversal
- * The traversal corresponding to the left side.
- * @param rightTraversal
- * The traversal corresponding to the right side.
- * @param originTraversal
- * The traversal, if any, corresponding to the common ancestor of left and right sides.
+ * @param syncModel
+ * The synchronization model to be minimized.
* @param monitor
* Monitor on which to report progress to the user.
*/
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/IStorageProviderAccessor.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/IStorageProviderAccessor.java
index 0c5251ddb..aae0de89d 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/IStorageProviderAccessor.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/IStorageProviderAccessor.java
@@ -7,7 +7,7 @@
*
* Contributors:
* Obeo - initial API and implementation
- * Philip Langer - bug 470268
+ * Philip Langer - bug 470268, checkstyle fixes
*******************************************************************************/
package org.eclipse.emf.compare.ide.ui.logical;
@@ -68,7 +68,7 @@ public interface IStorageProviderAccessor {
* {@link DiffSide#REMOTE} are valid).
* @return The file before the rename, if it has been renamed at all, <code>null</code> otherwise.
*/
- public IFile getFileBeforeRename(IFile sourceOrRemoteFile, DiffSide side);
+ IFile getFileBeforeRename(IFile sourceOrRemoteFile, DiffSide side);
/**
* Given an origin file, this method optionally returns the corresponding {@link IFile} after it has
@@ -84,7 +84,7 @@ public interface IStorageProviderAccessor {
* {@link DiffSide#REMOTE} are valid).
* @return The file after the rename, if it has been renamed at all, <code>null</code> otherwise.
*/
- public IFile getFileAfterRename(IFile originFile, DiffSide side);
+ IFile getFileAfterRename(IFile originFile, DiffSide side);
/** Used by the resolution process to determine the side of the revision to fetch. */
public static enum DiffSide {
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/SynchronizationModel.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/SynchronizationModel.java
index 6f1813ebe..839fa4df0 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/SynchronizationModel.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/logical/SynchronizationModel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2015 Obeo.
+ * Copyright (c) 2011, 2015 Obeo and others.
* All rights reserved. This program and 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:
* Obeo - initial API and implementation
+ * Philip Langer - checkstyle and javadoc fixes
*******************************************************************************/
package org.eclipse.emf.compare.ide.ui.logical;
@@ -50,9 +51,10 @@ public final class SynchronizationModel implements IDiagnosable {
/** The traversal corresponding to the common ancestor of both other side. */
private final StorageTraversal originTraversal;
- /** The diagnostic that may have been issued for this synchronization model */
+ /** The diagnostic that may have been issued for this synchronization model. */
private Diagnostic diagnostic;
+ /** The resources that are part of this synchronization model. */
private ImmutableSet<IResource> resources;
/**
@@ -70,7 +72,7 @@ public final class SynchronizationModel implements IDiagnosable {
StorageTraversal originTraversal) {
this(leftTraversal, rightTraversal, originTraversal, new BasicDiagnostic(
EMFCompareIDEUIPlugin.PLUGIN_ID, 0, null, new Object[] {leftTraversal, rightTraversal,
- originTraversal }));
+ originTraversal, }));
}
/**
@@ -135,6 +137,11 @@ public final class SynchronizationModel implements IDiagnosable {
return originTraversal;
}
+ /**
+ * Returns the diagnostics that may have been issued for the left, right, and origin side.
+ *
+ * @return The diagnostics of the left, right, and origin side.
+ */
public Diagnostic getDiagnostic() {
BasicDiagnostic ret = new BasicDiagnostic(EMFCompareIDEUIPlugin.PLUGIN_ID, 0, EMFCompareIDEUIMessages
.getString("SynchronizationModel.diagnosticMesg"), new Object[] {this, }); //$NON-NLS-1$
@@ -152,6 +159,15 @@ public final class SynchronizationModel implements IDiagnosable {
return ret;
}
+ /**
+ * Creates a diagnostic for the given diagnostic {@code toAdd} of the given {@code side}.
+ *
+ * @param toAdd
+ * The diagnostic to be added to the created diagnostic.
+ * @param side
+ * The side, either left, right, or origin.
+ * @return The created diagnostic.
+ */
private BasicDiagnostic getDiagnosticForSide(Diagnostic toAdd, String side) {
BasicDiagnostic d;
d = new BasicDiagnostic(toAdd.getSeverity(), toAdd.getSource(), 0, EMFCompareIDEUIMessages
@@ -215,13 +231,13 @@ public final class SynchronizationModel implements IDiagnosable {
* empty set will be returned.
* @return The converted traversal.
*/
- private static Set<IResource> collectResources(StorageTraversal aTraversal) {
+ private static Set<IResource> collectResources(StorageTraversal traversal) {
final Set<IResource> resources = new LinkedHashSet<IResource>();
- if (aTraversal == null) {
+ if (traversal == null) {
return resources;
}
- for (IStorage storage : aTraversal.getStorages()) {
+ for (IStorage storage : traversal.getStorages()) {
if (storage instanceof IFile) {
resources.add((IFile)storage);
} else {

Back to the top