Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-05-18 14:07:38 +0000
committerPaul Pazderski2019-05-19 23:54:17 +0000
commitde3c0c5ff08c928e6d1eb4fac2704bbb2d261669 (patch)
treede6e0a11c45731a312b5e239c22387afe93fe19c /bundles/org.eclipse.compare/compare/org
parent5e9e26b1abe5bd1df37faa91fde2d87fd79ed06b (diff)
downloadeclipse.platform.team-R4_12_maintenance.tar.gz
eclipse.platform.team-R4_12_maintenance.tar.xz
eclipse.platform.team-R4_12_maintenance.zip
This change fixes space or mixed tab/space indentations in all Java files. This also includes two or three space indentations and even fix most stray single spaces in indentations. The change includes only whitespace formatting and no code changes. Change-Id: I4149aaf4e48ccf7b49083f36d52e0c7a67433c7d
Diffstat (limited to 'bundles/org.eclipse.compare/compare/org')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java4
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java12
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java86
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java16
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamMerger.java62
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java10
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java86
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java8
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java30
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorSelectionProvider.java16
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java4
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java220
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImageDescriptor.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java44
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java6
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/LineComparator.java52
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/DecoratorOverlayIcon.java146
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchTargetPage.java18
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizardDialog.java12
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/RetargetPatchElementDialog.java6
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java4
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java4
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java2
30 files changed, 432 insertions, 432 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
index ae4cb4e6e..d8c155ac8 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
@@ -376,14 +376,14 @@ public abstract class CompareEditorInput extends PlatformObject implements IEdit
/*
* FIXME!
- */
+ */
protected void setMessage(String message) {
fMessage= message;
}
/*
* FIXME!
- */
+ */
public String getMessage() {
return fMessage;
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java
index 6fa811254..18cdf0fc0 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java
@@ -94,10 +94,10 @@ public final class CompareUI {
/**
* Name of the title property of a compare viewer.
- * If a property with this name is set
- * on the top level SWT control of a viewer, it is used as a title in the pane's
- * title bar.
- */
+ * If a property with this name is set
+ * on the top level SWT control of a viewer, it is used as a title in the pane's
+ * title bar.
+ */
public static final String COMPARE_VIEWER_TITLE= "org.eclipse.compare.CompareUI.CompareViewerTitle"; //$NON-NLS-1$
private CompareUI() {
@@ -283,7 +283,7 @@ public final class CompareUI {
*/
@Deprecated
public static IStreamMerger createStreamMerger(IContentType type) {
- return CompareUIPlugin.getDefault().createStreamMerger(type);
+ return CompareUIPlugin.getDefault().createStreamMerger(type);
}
/**
@@ -298,7 +298,7 @@ public final class CompareUI {
*/
@Deprecated
public static IStreamMerger createStreamMerger(String type) {
- return CompareUIPlugin.getDefault().createStreamMerger(type);
+ return CompareUIPlugin.getDefault().createStreamMerger(type);
}
/**
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
index 6f2ddc727..db2e4fa38 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
@@ -204,7 +204,7 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane {
@Override
public void setSelection(ISelection s) {
if (fViewer != null)
- fViewer.setSelection(s);
+ fViewer.setSelection(s);
}
private boolean hasFocus2() {
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
index 78ff969d4..3d856f9f0 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
@@ -603,20 +603,20 @@ public class EditionSelectionDialog extends ResizableDialog {
return result.toArray(new ITypedElement[result.size()]);
}
- /**
- * Returns a label for identifying the target side of a compare viewer.
- * This implementation extracts the value for the key "targetLabel" from the resource bundle
- * and passes it as the format argument to <code>MessageFormat.format</code>.
- * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
- * is the name of the given input element.
+ /**
+ * Returns a label for identifying the target side of a compare viewer.
+ * This implementation extracts the value for the key "targetLabel" from the resource bundle
+ * and passes it as the format argument to <code>MessageFormat.format</code>.
+ * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
+ * is the name of the given input element.
* <p>
* Subclasses may override to create their own label.
* </p>
- *
- * @param target the target element for which a label must be returned
- * @param item if a path has been specified in <code>selectEdition</code> a sub element of the given target; otherwise the same as target
- * @return a label the target side of a compare viewer
- */
+ *
+ * @param target the target element for which a label must be returned
+ * @param item if a path has been specified in <code>selectEdition</code> a sub element of the given target; otherwise the same as target
+ * @return a label the target side of a compare viewer
+ */
protected String getTargetLabel(ITypedElement target, ITypedElement item) {
String format= null;
if (target instanceof ResourceNode)
@@ -636,7 +636,7 @@ public class EditionSelectionDialog extends ResizableDialog {
return string;
}
- private boolean hasDoubleQuotes(String string) {
+ private boolean hasDoubleQuotes(String string) {
return string.indexOf("''") != -1; //$NON-NLS-1$
}
@@ -645,19 +645,19 @@ public class EditionSelectionDialog extends ResizableDialog {
}
/**
- * Returns a label for identifying the edition side of a compare viewer.
- * This implementation extracts the value for the key "editionLabel" from the resource bundle
- * and passes it as the format argument to <code>MessageFormat.format</code>.
- * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
- * is the formatted modification date of the given input element.
- * <p>
+ * Returns a label for identifying the edition side of a compare viewer.
+ * This implementation extracts the value for the key "editionLabel" from the resource bundle
+ * and passes it as the format argument to <code>MessageFormat.format</code>.
+ * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
+ * is the formatted modification date of the given input element.
+ * <p>
* Subclasses may override to create their own label.
* </p>
*
* @param selectedEdition the selected edition for which a label must be returned
- * @param item if a path has been specified in <code>selectEdition</code> a sub element of the given selectedEdition; otherwise the same as selectedEdition
- * @return a label for the edition side of a compare viewer
- */
+ * @param item if a path has been specified in <code>selectEdition</code> a sub element of the given selectedEdition; otherwise the same as selectedEdition
+ * @return a label for the edition side of a compare viewer
+ */
protected String getEditionLabel(ITypedElement selectedEdition, ITypedElement item) {
String format= null;
if (selectedEdition instanceof ResourceNode)
@@ -679,21 +679,21 @@ public class EditionSelectionDialog extends ResizableDialog {
return formatString(format, date);
}
- /**
- * Returns a label for identifying a node in the edition tree viewer.
- * This implementation extracts the value for the key "workspaceTreeFormat" or
- * "treeFormat" (in that order) from the resource bundle
- * and passes it as the format argument to <code>MessageFormat.format</code>.
- * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
- * is the formatted modification date of the given input element.
- * <p>
+ /**
+ * Returns a label for identifying a node in the edition tree viewer.
+ * This implementation extracts the value for the key "workspaceTreeFormat" or
+ * "treeFormat" (in that order) from the resource bundle
+ * and passes it as the format argument to <code>MessageFormat.format</code>.
+ * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
+ * is the formatted modification date of the given input element.
+ * <p>
* Subclasses may override to create their own label.
* </p>
*
* @param edition the edition for which a label must be returned
- * @param item if a path has been specified in <code>edition</code> a sub element of the given edition; otherwise the same as edition
- * @param date this date will be returned as part of the formatted string
- * @return a label of a node in the edition tree viewer
+ * @param item if a path has been specified in <code>edition</code> a sub element of the given edition; otherwise the same as edition
+ * @param date this date will be returned as part of the formatted string
+ * @return a label of a node in the edition tree viewer
* @since 2.0
*/
protected String getShortEditionLabel(ITypedElement edition, ITypedElement item, Date date) {
@@ -709,21 +709,21 @@ public class EditionSelectionDialog extends ResizableDialog {
return formatString(format, ds);
}
- /**
- * Returns an image for identifying the edition side of a compare viewer.
- * This implementation extracts the value for the key "editionLabel" from the resource bundle
- * and passes it as the format argument to <code>MessageFormat.format</code>.
- * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
- * is the formatted modification date of the given input element.
- * <p>
+ /**
+ * Returns an image for identifying the edition side of a compare viewer.
+ * This implementation extracts the value for the key "editionLabel" from the resource bundle
+ * and passes it as the format argument to <code>MessageFormat.format</code>.
+ * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
+ * is the formatted modification date of the given input element.
+ * <p>
* Subclasses may override to create their own label.
* </p>
*
* @param selectedEdition the selected edition for which a label must be returned
- * @param item if a path has been specified in <code>selectEdition</code> a sub element of the given selectedEdition; otherwise the same as selectedEdition
- * @return a label the edition side of a compare viewer
- * @since 2.0
- */
+ * @param item if a path has been specified in <code>selectEdition</code> a sub element of the given selectedEdition; otherwise the same as selectedEdition
+ * @return a label the edition side of a compare viewer
+ * @since 2.0
+ */
protected Image getEditionImage(ITypedElement selectedEdition, ITypedElement item) {
if (selectedEdition instanceof ResourceNode)
return selectedEdition.getImage();
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java
index c799c3bac..57e685093 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java
@@ -78,19 +78,19 @@ public class HistoryItem implements IEncodedStreamContentAccessor, ITypedElement
@Override
public String getCharset() throws CoreException {
- String charset= fFileState.getCharset();
- if (charset == null) {
- IResource resource= getResource();
- if (resource instanceof IEncodedStorage)
- charset= ((IEncodedStorage)resource).getCharset();
- }
+ String charset= fFileState.getCharset();
+ if (charset == null) {
+ IResource resource= getResource();
+ if (resource instanceof IEncodedStorage)
+ charset= ((IEncodedStorage)resource).getCharset();
+ }
return charset;
}
@Override
public IResource getResource() {
- IPath fullPath= fFileState.getFullPath();
- return ResourcesPlugin.getWorkspace().getRoot().findMember(fullPath);
+ IPath fullPath= fFileState.getFullPath();
+ return ResourcesPlugin.getWorkspace().getRoot().findMember(fullPath);
}
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamMerger.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamMerger.java
index bc19f6202..6c2c622ea 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamMerger.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamMerger.java
@@ -32,42 +32,42 @@ import org.eclipse.core.runtime.IStatus;
@Deprecated
public interface IStreamMerger {
- /**
- * Indicates the successful completion of the merge operation (value <code>IStatus.OK</code>)
- */
- public static final int OK= IStatus.OK;
+ /**
+ * Indicates the successful completion of the merge operation (value <code>IStatus.OK</code>)
+ */
+ public static final int OK= IStatus.OK;
- /**
- * Indicates that a change conflict prevented the merge from successful completion (value <code>1</code>)
- */
- public static final int CONFLICT= 1;
+ /**
+ * Indicates that a change conflict prevented the merge from successful completion (value <code>1</code>)
+ */
+ public static final int CONFLICT= 1;
- /**
- * Status code describing an internal error (value <code>2</code>)
- */
- public static final int INTERNAL_ERROR= 2;
+ /**
+ * Status code describing an internal error (value <code>2</code>)
+ */
+ public static final int INTERNAL_ERROR= 2;
- /**
- * Performs a merge operation on the given input streams and writes the merge result to the output stream.
- * On success a status <code>IStatus.OK</code> is returned, on error a status <code>IStatus.ERROR</code>.
- * If the merge operation cannot deal with conflicts, the code of the error status has the value <code>IStreamMerger.CONFLICT</code>.
- * For text oriented mergers the encoding for the input and output streams is honored.
- * It is the responsibility of callers to close input and output streams.
- *
- * @param output the byte stream to which the merge result is written; the merger will not close the stream
- * @param outputEncoding the encoding to use when writing to the output stream
- * @param ancestor the byte stream from which the common ancestor is read
- * @param ancestorEncoding the encoding of the ancestor input byte stream
- * @param target the byte stream containing the target of the merge
- * @param targetEncoding the encoding of the target input byte stream
- * @param other the byte stream containing the target of the merge
- * @param otherEncoding the encoding of the other input byte stream
- * @param monitor reports progress of the merge operation
- * @return returns the completion status of the operation
- */
+ /**
+ * Performs a merge operation on the given input streams and writes the merge result to the output stream.
+ * On success a status <code>IStatus.OK</code> is returned, on error a status <code>IStatus.ERROR</code>.
+ * If the merge operation cannot deal with conflicts, the code of the error status has the value <code>IStreamMerger.CONFLICT</code>.
+ * For text oriented mergers the encoding for the input and output streams is honored.
+ * It is the responsibility of callers to close input and output streams.
+ *
+ * @param output the byte stream to which the merge result is written; the merger will not close the stream
+ * @param outputEncoding the encoding to use when writing to the output stream
+ * @param ancestor the byte stream from which the common ancestor is read
+ * @param ancestorEncoding the encoding of the ancestor input byte stream
+ * @param target the byte stream containing the target of the merge
+ * @param targetEncoding the encoding of the target input byte stream
+ * @param other the byte stream containing the target of the merge
+ * @param otherEncoding the encoding of the other input byte stream
+ * @param monitor reports progress of the merge operation
+ * @return returns the completion status of the operation
+ */
IStatus merge(OutputStream output, String outputEncoding,
InputStream ancestor, String ancestorEncoding,
InputStream target, String targetEncoding,
InputStream other, String otherEncoding,
- IProgressMonitor monitor);
+ IProgressMonitor monitor);
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java
index 018ed5aa1..1b3ff0866 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java
@@ -121,7 +121,7 @@ public class ResourceNode extends BufferedContent
/**
* Returns the hash code of the name.
- * @return a hash code value for this object.
+ * @return a hash code value for this object.
*/
@Override
public int hashCode() {
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java
index 442f31092..826bd9df2 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java
@@ -175,16 +175,16 @@ public class ZipFileStructureCreator implements IStructureCreator {
}
void appendBytes(byte[] buffer, int length) {
- if (length > 0) {
+ if (length > 0) {
int oldLen= 0;
if (fContents != null)
oldLen= fContents.length;
byte[] newBuf= new byte[oldLen + length];
if (oldLen > 0)
- System.arraycopy(fContents, 0, newBuf, 0, oldLen);
- System.arraycopy(buffer, 0, newBuf, oldLen, length);
- fContents= newBuf;
- }
+ System.arraycopy(fContents, 0, newBuf, 0, oldLen);
+ System.arraycopy(buffer, 0, newBuf, oldLen, length);
+ fContents= newBuf;
+ }
}
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java
index a0b270840..db23be7a3 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java
@@ -1068,7 +1068,7 @@ public abstract class ContentMergeViewer extends ContentViewer
}
super.handleDispose(event);
- }
+ }
/**
* Updates the enabled state of the toolbar items.
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index 6135f5ba7..7c6f260f8 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -505,7 +505,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
return null;
}
- private Diff findDiff(Position p, boolean left) {
+ private Diff findDiff(Position p, boolean left) {
for (Iterator<?> iterator = fMerger.rangesIterator(); iterator.hasNext();) {
Diff diff = (Diff) iterator.next();
Position diffPos;
@@ -1650,11 +1650,11 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
}
private ChainedPreferenceStore createChainedPreferenceStore() {
- List<IPreferenceStore> stores= new ArrayList<>(2);
+ List<IPreferenceStore> stores= new ArrayList<>(2);
stores.add(getCompareConfiguration().getPreferenceStore());
stores.add(EditorsUI.getPreferenceStore());
return new ChainedPreferenceStore(stores.toArray(new IPreferenceStore[stores.size()]));
- }
+ }
/**
* Creates a color from the information stored in the given preference store.
@@ -2012,7 +2012,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
}
// don't add anything here, disposing colors should be done last
super.handleDispose(event);
- }
+ }
private void disconnect(ContributorInfo legInfo) {
if (legInfo != null)
@@ -2102,16 +2102,16 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
});
fRight.getSourceViewer().addTextPresentationListener(new ChangeHighlighter(fRight));
- IWorkbenchPart part = getCompareConfiguration().getContainer().getWorkbenchPart();
- // part is not available for contexts different than editor
- if (part != null) {
- ISelectionProvider selectionProvider = part.getSite().getSelectionProvider();
- if (selectionProvider instanceof CompareEditorSelectionProvider) {
- CompareEditorSelectionProvider cesp = (CompareEditorSelectionProvider) selectionProvider;
- SourceViewer focusSourceViewer = fFocusPart == null ? null : fFocusPart.getSourceViewer();
- cesp.setViewers(new SourceViewer[] { fLeft.getSourceViewer(), fRight.getSourceViewer(), fAncestor.getSourceViewer() }, focusSourceViewer);
- }
- }
+ IWorkbenchPart part = getCompareConfiguration().getContainer().getWorkbenchPart();
+ // part is not available for contexts different than editor
+ if (part != null) {
+ ISelectionProvider selectionProvider = part.getSite().getSelectionProvider();
+ if (selectionProvider instanceof CompareEditorSelectionProvider) {
+ CompareEditorSelectionProvider cesp = (CompareEditorSelectionProvider) selectionProvider;
+ SourceViewer focusSourceViewer = fFocusPart == null ? null : fFocusPart.getSourceViewer();
+ cesp.setViewers(new SourceViewer[] { fLeft.getSourceViewer(), fRight.getSourceViewer(), fAncestor.getSourceViewer() }, focusSourceViewer);
+ }
+ }
hsynchViewport(fAncestor.getSourceViewer(), fLeft.getSourceViewer(), fRight.getSourceViewer());
hsynchViewport(fLeft.getSourceViewer(), fAncestor.getSourceViewer(), fRight.getSourceViewer());
@@ -2197,13 +2197,13 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
sb1.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- if (fSynchronizedScrolling) {
+ if (fSynchronizedScrolling) {
int v= sb1.getSelection();
if (st2.isVisible())
st2.setHorizontalPixel(v);
if (st3.isVisible())
st3.setHorizontalPixel(v);
- }
+ }
}
});
}
@@ -2331,7 +2331,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
for (Iterator<?> iterator = fMerger.rangesIterator(); iterator.hasNext();) {
Diff diff = (Diff) iterator.next();
int h= fSynchronizedScrolling ? diff.getMaxDiffHeight()
- : diff.getRightHeight();
+ : diff.getRightHeight();
if (fMerger.useChange(diff)) {
@@ -2928,20 +2928,20 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
if (input instanceof IDiffElement) {
IDiffContainer parent= ((IDiffElement) input).getParent();
if (parent instanceof ICompareInput) {
- ICompareInput ci= (ICompareInput) parent;
-
- if (ci.getAncestor() instanceof IDocumentRange
- || ci.getLeft() instanceof IDocumentRange
- || ci.getRight() instanceof IDocumentRange) {
- if (left instanceof IDocumentRange)
- leftRange= ((IDocumentRange) left).getRange();
- if (right instanceof IDocumentRange)
- rightRange= ((IDocumentRange) right).getRange();
-
- ancestor= ci.getAncestor();
- left= getCompareConfiguration().isMirrored() ? ci.getRight() : ci.getLeft();
- right= getCompareConfiguration().isMirrored() ? ci.getLeft() : ci.getRight();
- }
+ ICompareInput ci= (ICompareInput) parent;
+
+ if (ci.getAncestor() instanceof IDocumentRange
+ || ci.getLeft() instanceof IDocumentRange
+ || ci.getRight() instanceof IDocumentRange) {
+ if (left instanceof IDocumentRange)
+ leftRange= ((IDocumentRange) left).getRange();
+ if (right instanceof IDocumentRange)
+ rightRange= ((IDocumentRange) right).getRange();
+
+ ancestor= ci.getAncestor();
+ left= getCompareConfiguration().isMirrored() ? ci.getRight() : ci.getLeft();
+ right= getCompareConfiguration().isMirrored() ? ci.getLeft() : ci.getRight();
+ }
}
}
}
@@ -3024,9 +3024,9 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
Diff selectDiff= null;
if (FIX_47640) {
if (leftRange != null)
- selectDiff= fMerger.findDiff(LEFT_CONTRIBUTOR, leftRange);
+ selectDiff= fMerger.findDiff(LEFT_CONTRIBUTOR, leftRange);
else if (rightRange != null)
- selectDiff= fMerger.findDiff(RIGHT_CONTRIBUTOR, rightRange);
+ selectDiff= fMerger.findDiff(RIGHT_CONTRIBUTOR, rightRange);
}
if (selectDiff != null)
setCurrentDiff(selectDiff, true);
@@ -3386,9 +3386,9 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
}
@Override
- protected final void handleResizeLeftRight(int x, int y, int width1, int centerWidth, int width2, int height) {
- if (fBirdsEyeCanvas != null)
- width2-= BIRDS_EYE_VIEW_WIDTH;
+ protected final void handleResizeLeftRight(int x, int y, int width1, int centerWidth, int width2, int height) {
+ if (fBirdsEyeCanvas != null)
+ width2-= BIRDS_EYE_VIEW_WIDTH;
Rectangle trim= fLeft.getSourceViewer().getTextWidget().computeTrim(0, 0, 0, 0);
int scrollbarHeight= trim.height + trim.x;
@@ -3422,7 +3422,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
int scrollbarWidth= 0;
if (fSynchronizedScrolling && fScrollCanvas != null) {
trim= fLeft.getSourceViewer().getTextWidget().computeTrim(0, 0, 0, 0);
- // one pixel was cut off
+ // one pixel was cut off
scrollbarWidth= trim.width + 2*trim.x+1;
}
int rightTextWidth= width2-scrollbarWidth;
@@ -3440,18 +3440,18 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
fScrollCanvas.setBounds(x, y, scrollbarWidth, height-scrollbarHeight);
}
- if (fBirdsEyeCanvas != null) {
- int verticalScrollbarButtonHeight= scrollbarWidth;
+ if (fBirdsEyeCanvas != null) {
+ int verticalScrollbarButtonHeight= scrollbarWidth;
int horizontalScrollbarButtonHeight= scrollbarHeight;
if (fIsMac) {
verticalScrollbarButtonHeight+= 2;
horizontalScrollbarButtonHeight= 18;
}
- if (fSummaryHeader != null)
+ if (fSummaryHeader != null)
fSummaryHeader.setBounds(x+scrollbarWidth, y, BIRDS_EYE_VIEW_WIDTH, verticalScrollbarButtonHeight);
- y+= verticalScrollbarButtonHeight;
- fBirdsEyeCanvas.setBounds(x+scrollbarWidth, y, BIRDS_EYE_VIEW_WIDTH, height-(2*verticalScrollbarButtonHeight+horizontalScrollbarButtonHeight));
- }
+ y+= verticalScrollbarButtonHeight;
+ fBirdsEyeCanvas.setBounds(x+scrollbarWidth, y, BIRDS_EYE_VIEW_WIDTH, height-(2*verticalScrollbarButtonHeight+horizontalScrollbarButtonHeight));
+ }
// doesn't work since TextEditors don't have their correct size yet.
updateVScrollBar();
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java
index ca80919c0..815b44c1a 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java
@@ -45,11 +45,11 @@ public class BufferedResourceNode extends ResourceNode {
super(resource);
}
- /*
- * Returns <code>true</code> if buffer contains uncommitted changes.
- */
+ /*
+ * Returns <code>true</code> if buffer contains uncommitted changes.
+ */
public boolean isDirty() {
- return fDirty;
+ return fDirty;
}
@Override
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
index 07af66f1c..2d5d8c9f8 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
@@ -240,20 +240,20 @@ public class CompareEditor extends EditorPart
ErrorDialog.openError(getSite().getShell(), title, msg, s);
return;
}
- doSetInput(input);
- // Need to refresh the contributor (see #67888)
- refreshActionBarsContributor();
+ doSetInput(input);
+ // Need to refresh the contributor (see #67888)
+ refreshActionBarsContributor();
}
public void refreshActionBarsContributor() {
IEditorSite editorSite= getEditorSite();
- if (editorSite != null) {
- IEditorActionBarContributor actionBarContributor= editorSite.getActionBarContributor();
- if (actionBarContributor != null) {
- actionBarContributor.setActiveEditor(null);
- actionBarContributor.setActiveEditor(this);
- }
- }
+ if (editorSite != null) {
+ IEditorActionBarContributor actionBarContributor= editorSite.getActionBarContributor();
+ if (actionBarContributor != null) {
+ actionBarContributor.setActiveEditor(null);
+ actionBarContributor.setActiveEditor(this);
+ }
+ }
}
private void doSetInput(IEditorInput input) {
@@ -299,12 +299,12 @@ public class CompareEditor extends EditorPart
initializeInBackground(cei, hadPreviousInput);
}
- firePropertyChange(IWorkbenchPartConstants.PROP_INPUT);
+ firePropertyChange(IWorkbenchPartConstants.PROP_INPUT);
- // We only need to notify of new Saveables if we are changing inputs
- if (hadPreviousInput && hasResult) {
- registerSaveable();
- }
+ // We only need to notify of new Saveables if we are changing inputs
+ if (hadPreviousInput && hasResult) {
+ registerSaveable();
+ }
}
private void registerSaveable() {
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorSelectionProvider.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorSelectionProvider.java
index cfa829fbe..ea1004aa7 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorSelectionProvider.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorSelectionProvider.java
@@ -45,17 +45,17 @@ public class CompareEditorSelectionProvider implements IPostSelectionProvider {
doSelectionChanged(event);
}
- @Override
+ @Override
public void focusGained(FocusEvent e) {
- // expecting a StyledText widget here
- doFocusChanged(e.widget);
- }
+ // expecting a StyledText widget here
+ doFocusChanged(e.widget);
+ }
- @Override
+ @Override
public void focusLost(FocusEvent e) {
- // do not reset due to focus behavior on GTK
- //fViewerInFocus= null;
- }
+ // do not reset due to focus behavior on GTK
+ //fViewerInFocus= null;
+ }
}
private class InternalPostSelectionListener implements ISelectionChangedListener {
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java
index 4d72bd60e..ac215b261 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java
@@ -369,8 +369,8 @@ public class ComparePreferencePage extends PreferencePage implements IWorkbenchP
CompareMessages.ComparePreferencePage_0, 1,
new String[][] {
new String[] { CompareMessages.ComparePreferencePage_1, ICompareUIConstants.PREF_VALUE_PROMPT },
- new String[] { CompareMessages.ComparePreferencePage_2, ICompareUIConstants.PREF_VALUE_LOOP },
- new String[] { CompareMessages.ComparePreferencePage_3, ICompareUIConstants.PREF_VALUE_NEXT },
+ new String[] { CompareMessages.ComparePreferencePage_2, ICompareUIConstants.PREF_VALUE_LOOP },
+ new String[] { CompareMessages.ComparePreferencePage_3, ICompareUIConstants.PREF_VALUE_NEXT },
new String[] { CompareMessages.ComparePreferencePage_4, ICompareUIConstants.PREF_VALUE_DO_NOTHING}
},
radioGroup, true);
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
index 21f2399fe..45f71276b 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
@@ -106,63 +106,63 @@ import org.osgi.framework.ServiceRegistration;
*/
public final class CompareUIPlugin extends AbstractUIPlugin {
- static class CompareRegistry<T> {
- private final static String ID_ATTRIBUTE= "id"; //$NON-NLS-1$
- private final static String EXTENSIONS_ATTRIBUTE= "extensions"; //$NON-NLS-1$
- private final static String CONTENT_TYPE_ID_ATTRIBUTE= "contentTypeId"; //$NON-NLS-1$
-
- private HashMap<String, T> fIdMap; // maps ids to data
- private HashMap<String, List<T>> fExtensionMap; // multimap: maps extensions to list of data
- private HashMap<IContentType, List<T>> fContentTypeBindings; // multimap: maps content type bindings to list of data
-
-
- void register(IConfigurationElement element, T data) {
- String id= element.getAttribute(ID_ATTRIBUTE);
- if (id != null) {
- if (fIdMap == null)
- fIdMap= new HashMap<>();
- fIdMap.put(id, data);
- }
-
- String types= element.getAttribute(EXTENSIONS_ATTRIBUTE);
- if (types != null) {
- if (fExtensionMap == null)
- fExtensionMap= new HashMap<>();
- StringTokenizer tokenizer= new StringTokenizer(types, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreElements()) {
- String extension= tokenizer.nextToken().trim();
- List<T> l = fExtensionMap.get(normalizeCase(extension));
+ static class CompareRegistry<T> {
+ private final static String ID_ATTRIBUTE= "id"; //$NON-NLS-1$
+ private final static String EXTENSIONS_ATTRIBUTE= "extensions"; //$NON-NLS-1$
+ private final static String CONTENT_TYPE_ID_ATTRIBUTE= "contentTypeId"; //$NON-NLS-1$
+
+ private HashMap<String, T> fIdMap; // maps ids to data
+ private HashMap<String, List<T>> fExtensionMap; // multimap: maps extensions to list of data
+ private HashMap<IContentType, List<T>> fContentTypeBindings; // multimap: maps content type bindings to list of data
+
+
+ void register(IConfigurationElement element, T data) {
+ String id= element.getAttribute(ID_ATTRIBUTE);
+ if (id != null) {
+ if (fIdMap == null)
+ fIdMap= new HashMap<>();
+ fIdMap.put(id, data);
+ }
+
+ String types= element.getAttribute(EXTENSIONS_ATTRIBUTE);
+ if (types != null) {
+ if (fExtensionMap == null)
+ fExtensionMap= new HashMap<>();
+ StringTokenizer tokenizer= new StringTokenizer(types, ","); //$NON-NLS-1$
+ while (tokenizer.hasMoreElements()) {
+ String extension= tokenizer.nextToken().trim();
+ List<T> l = fExtensionMap.get(normalizeCase(extension));
if (l == null)
fExtensionMap.put(normalizeCase(extension), l = new ArrayList<>());
l.add(data);
- }
- }
- }
-
- void createBinding(IConfigurationElement element, String idAttributeName) {
- String type= element.getAttribute(CONTENT_TYPE_ID_ATTRIBUTE);
- String id= element.getAttribute(idAttributeName);
- if (id == null)
- logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.targetIdAttributeMissing", idAttributeName)); //$NON-NLS-1$
- if (type != null && id != null && fIdMap != null) {
- T o= fIdMap.get(id);
- if (o != null) {
- IContentType ct= fgContentTypeManager.getContentType(type);
- if (ct != null) {
- if (fContentTypeBindings == null)
- fContentTypeBindings= new HashMap<>();
- List<T> l = fContentTypeBindings.get(ct);
- if (l == null)
+ }
+ }
+ }
+
+ void createBinding(IConfigurationElement element, String idAttributeName) {
+ String type= element.getAttribute(CONTENT_TYPE_ID_ATTRIBUTE);
+ String id= element.getAttribute(idAttributeName);
+ if (id == null)
+ logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.targetIdAttributeMissing", idAttributeName)); //$NON-NLS-1$
+ if (type != null && id != null && fIdMap != null) {
+ T o= fIdMap.get(id);
+ if (o != null) {
+ IContentType ct= fgContentTypeManager.getContentType(type);
+ if (ct != null) {
+ if (fContentTypeBindings == null)
+ fContentTypeBindings= new HashMap<>();
+ List<T> l = fContentTypeBindings.get(ct);
+ if (l == null)
fContentTypeBindings.put(ct, l = new ArrayList<>());
- l.add(o);
- } else {
- logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.contentTypeNotFound", type)); //$NON-NLS-1$
- }
- } else {
- logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.targetNotFound", id)); //$NON-NLS-1$
- }
- }
- }
+ l.add(o);
+ } else {
+ logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.contentTypeNotFound", type)); //$NON-NLS-1$
+ }
+ } else {
+ logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.targetNotFound", id)); //$NON-NLS-1$
+ }
+ }
+ }
T search(IContentType type) {
List<T> list = searchAll(type);
@@ -190,7 +190,7 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
return fExtensionMap.get(normalizeCase(extension));
return null;
}
- }
+ }
/** Status code describing an internal error */
public static final int INTERNAL_ERROR= 1;
@@ -222,7 +222,7 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
private static final String CONTENT_TYPE_BINDING= "contentTypeBinding"; //$NON-NLS-1$
- private static final String COMPARE_EDITOR= PLUGIN_ID + ".CompareEditor"; //$NON-NLS-1$
+ private static final String COMPARE_EDITOR= PLUGIN_ID + ".CompareEditor"; //$NON-NLS-1$
private static final String STRUCTUREVIEWER_ALIASES_PREFERENCE_NAME= "StructureViewerAliases"; //$NON-NLS-1$
@@ -362,65 +362,65 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
// collect all IStreamMergers
IConfigurationElement[] elements= registry.getConfigurationElementsFor(PLUGIN_ID, STREAM_MERGER_EXTENSION_POINT);
for (int i= 0; i < elements.length; i++) {
- IConfigurationElement element= elements[i];
- if (STREAM_MERGER.equals(element.getName()))
+ IConfigurationElement element= elements[i];
+ if (STREAM_MERGER.equals(element.getName()))
fStreamMergers.register(element, new StreamMergerDescriptor(element));
}
for (int i= 0; i < elements.length; i++) {
- IConfigurationElement element= elements[i];
- if (CONTENT_TYPE_BINDING.equals(element.getName()))
- fStreamMergers.createBinding(element, STREAM_MERGER_ID_ATTRIBUTE);
+ IConfigurationElement element= elements[i];
+ if (CONTENT_TYPE_BINDING.equals(element.getName()))
+ fStreamMergers.createBinding(element, STREAM_MERGER_ID_ATTRIBUTE);
}
// collect all IStructureCreators
elements= registry.getConfigurationElementsFor(PLUGIN_ID, STRUCTURE_CREATOR_EXTENSION_POINT);
for (int i= 0; i < elements.length; i++) {
- IConfigurationElement element= elements[i];
- String name= element.getName();
- if (!CONTENT_TYPE_BINDING.equals(name)) {
- if (!STRUCTURE_CREATOR.equals(name))
- logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, STRUCTURE_CREATOR)); //$NON-NLS-1$
- fStructureCreators.register(element, new StructureCreatorDescriptor(element));
- }
+ IConfigurationElement element= elements[i];
+ String name= element.getName();
+ if (!CONTENT_TYPE_BINDING.equals(name)) {
+ if (!STRUCTURE_CREATOR.equals(name))
+ logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, STRUCTURE_CREATOR)); //$NON-NLS-1$
+ fStructureCreators.register(element, new StructureCreatorDescriptor(element));
+ }
}
for (int i= 0; i < elements.length; i++) {
- IConfigurationElement element= elements[i];
- if (CONTENT_TYPE_BINDING.equals(element.getName()))
- fStructureCreators.createBinding(element, STRUCTURE_CREATOR_ID_ATTRIBUTE);
+ IConfigurationElement element= elements[i];
+ if (CONTENT_TYPE_BINDING.equals(element.getName()))
+ fStructureCreators.createBinding(element, STRUCTURE_CREATOR_ID_ATTRIBUTE);
}
// collect all viewers which define the structure merge viewer extension point
elements= registry.getConfigurationElementsFor(PLUGIN_ID, STRUCTURE_MERGE_VIEWER_EXTENSION_POINT);
for (int i= 0; i < elements.length; i++) {
- IConfigurationElement element= elements[i];
- String name= element.getName();
- if (!CONTENT_TYPE_BINDING.equals(name)) {
- if (!VIEWER_TAG.equals(name))
- logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, VIEWER_TAG)); //$NON-NLS-1$
- fStructureMergeViewers.register(element, new ViewerDescriptor(element));
- }
+ IConfigurationElement element= elements[i];
+ String name= element.getName();
+ if (!CONTENT_TYPE_BINDING.equals(name)) {
+ if (!VIEWER_TAG.equals(name))
+ logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, VIEWER_TAG)); //$NON-NLS-1$
+ fStructureMergeViewers.register(element, new ViewerDescriptor(element));
+ }
}
for (int i= 0; i < elements.length; i++) {
- IConfigurationElement element= elements[i];
- if (CONTENT_TYPE_BINDING.equals(element.getName()))
- fStructureMergeViewers.createBinding(element, STRUCTURE_MERGE_VIEWER_ID_ATTRIBUTE);
+ IConfigurationElement element= elements[i];
+ if (CONTENT_TYPE_BINDING.equals(element.getName()))
+ fStructureMergeViewers.createBinding(element, STRUCTURE_MERGE_VIEWER_ID_ATTRIBUTE);
}
// collect all viewers which define the content merge viewer extension point
elements= registry.getConfigurationElementsFor(PLUGIN_ID, CONTENT_MERGE_VIEWER_EXTENSION_POINT);
for (int i= 0; i < elements.length; i++) {
- IConfigurationElement element= elements[i];
- String name= element.getName();
- if (!CONTENT_TYPE_BINDING.equals(name)) {
- if (!VIEWER_TAG.equals(name))
- logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, VIEWER_TAG)); //$NON-NLS-1$
- fContentMergeViewers.register(element, new ViewerDescriptor(element));
- }
+ IConfigurationElement element= elements[i];
+ String name= element.getName();
+ if (!CONTENT_TYPE_BINDING.equals(name)) {
+ if (!VIEWER_TAG.equals(name))
+ logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, VIEWER_TAG)); //$NON-NLS-1$
+ fContentMergeViewers.register(element, new ViewerDescriptor(element));
+ }
}
for (int i= 0; i < elements.length; i++) {
- IConfigurationElement element= elements[i];
- if (CONTENT_TYPE_BINDING.equals(element.getName()))
- fContentMergeViewers.createBinding(element, CONTENT_MERGE_VIEWER_ID_ATTRIBUTE);
+ IConfigurationElement element= elements[i];
+ if (CONTENT_TYPE_BINDING.equals(element.getName()))
+ fContentMergeViewers.createBinding(element, CONTENT_MERGE_VIEWER_ID_ATTRIBUTE);
}
// collect all extensions that define the compare filter extension point
@@ -446,18 +446,18 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
// collect all viewers which define the content viewer extension point
elements= registry.getConfigurationElementsFor(PLUGIN_ID, CONTENT_VIEWER_EXTENSION_POINT);
for (int i= 0; i < elements.length; i++) {
- IConfigurationElement element= elements[i];
- String name= element.getName();
- if (!CONTENT_TYPE_BINDING.equals(name)) {
- if (!VIEWER_TAG.equals(name))
- logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, VIEWER_TAG)); //$NON-NLS-1$
- fContentViewers.register(element, new ViewerDescriptor(element));
- }
+ IConfigurationElement element= elements[i];
+ String name= element.getName();
+ if (!CONTENT_TYPE_BINDING.equals(name)) {
+ if (!VIEWER_TAG.equals(name))
+ logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, VIEWER_TAG)); //$NON-NLS-1$
+ fContentViewers.register(element, new ViewerDescriptor(element));
+ }
}
for (int i= 0; i < elements.length; i++) {
- IConfigurationElement element= elements[i];
- if (CONTENT_TYPE_BINDING.equals(element.getName()))
- fContentViewers.createBinding(element, CONTENT_VIEWER_ID_ATTRIBUTE);
+ IConfigurationElement element= elements[i];
+ if (CONTENT_TYPE_BINDING.equals(element.getName()))
+ fContentViewers.createBinding(element, CONTENT_VIEWER_ID_ATTRIBUTE);
}
}
@@ -877,7 +877,7 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
initializeRegistries();
StructureCreatorDescriptor scc= fStructureCreators.search(ctype); // search for content type
if (scc == null && type != null)
- scc= getStructureCreator(type); // search for old-style type scheme
+ scc= getStructureCreator(type); // search for old-style type scheme
if (scc != null) {
IStructureCreator sc= scc.createStructureCreator();
if (sc != null) {
@@ -998,7 +998,7 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
if (in instanceof ITypedElement) {
ITypedElement tin= (ITypedElement) in;
- IContentType ct= getContentType(tin);
+ IContentType ct= getContentType(tin);
if (ct != null) {
initializeRegistries();
List<ViewerDescriptor> list = fContentViewers.searchAll(ct);
@@ -1105,9 +1105,9 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
}
private static Viewer getViewer(Object descriptor, Viewer oldViewer, Composite parent, CompareConfiguration cc) {
- if (descriptor instanceof IViewerDescriptor)
+ if (descriptor instanceof IViewerDescriptor)
return ((IViewerDescriptor)descriptor).createViewer(oldViewer, parent, cc);
- return null;
+ return null;
}
private static String[] getTypes(ICompareInput input) {
@@ -1119,17 +1119,17 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
if (ancestor != null) {
String type= ancestor.getType();
if (type != null)
- tmp.add(normalizeCase(type));
+ tmp.add(normalizeCase(type));
}
if (left != null) {
String type= left.getType();
if (type != null)
- tmp.add(normalizeCase(type));
+ tmp.add(normalizeCase(type));
}
if (right != null) {
String type= right.getType();
if (type != null)
- tmp.add(normalizeCase(type));
+ tmp.add(normalizeCase(type));
}
return tmp.toArray(new String[tmp.size()]);
}
@@ -1376,7 +1376,7 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
//---- filters
public boolean filter(String name, boolean isFolder, boolean isArchive) {
- if (fFilter == null) {
+ if (fFilter == null) {
fFilter= new CompareResourceFilter();
final IPreferenceStore ps= getPreferenceStore();
fFilter.setFilters(ps.getString(ComparePreferencePage.PATH_FILTER));
@@ -1385,8 +1385,8 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
fFilter.setFilters(ps.getString(ComparePreferencePage.PATH_FILTER));
};
ps.addPropertyChangeListener(fPropertyChangeListener);
- }
- return fFilter.filter(name, isFolder, isArchive);
+ }
+ return fFilter.filter(name, isFolder, isArchive);
}
private void internalOpenDialog(final CompareEditorInput input) {
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImageDescriptor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImageDescriptor.java
index fabcc9c81..f4d70a4e9 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImageDescriptor.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImageDescriptor.java
@@ -133,7 +133,7 @@ public class DiffImageDescriptor extends CompositeImageDescriptor {
/* && i1.palette == i2.palette */
&& i1.transparentPixel == i2.transparentPixel
&& i1.maskPad == i2.maskPad
- && i1.alpha == i2.alpha
+ && i1.alpha == i2.alpha
&& i1.type == i2.type && i1.x == i2.x && i1.y == i2.y
&& i1.disposalMethod == i2.disposalMethod && i1.delayTime == i2.delayTime
&& equals(i1.data,i2.data) && equals(i1.maskData, i2.maskData)
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java
index fe2ebb007..5eb99ee55 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java
@@ -251,7 +251,7 @@ public class DocLineComparator implements ITokenComparator {
* Extract a single line from the underlying document.
*
* @param line the number of the line to extract
- * @param whether to include the line separator
+ * @param whether to include the line separator
* @return the contents of the line as a String
*/
private String extract(int line, boolean includeSeparator) {
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java
index e004e2493..14b092e4c 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java
@@ -307,7 +307,7 @@ public class MergeSourceViewer implements ISelectionChangedListener,
MergeSourceViewer.this.getSourceViewer().setSelectedRange(selectionStart, selectionLength);
- markInNavigationHistory();
+ markInNavigationHistory();
}
widget.setRedraw(true);
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java
index 49427d2ce..374523a14 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java
@@ -504,44 +504,44 @@ class ResourceCompareInput extends CompareEditorInput {
@Override
public <T> T getAdapter(Class<T> adapter) {
if (IFile.class.equals(adapter)) {
- IProgressMonitor pm= new NullProgressMonitor();
+ IProgressMonitor pm= new NullProgressMonitor();
// flush changes in any dirty viewer
flushViewers(pm);
- IFile[] files= getAdapter(IFile[].class);
- if (files != null && files.length > 0)
- return (T) files[0]; // can only return one: limitation on IDE.saveAllEditors; see #64617
- return null;
+ IFile[] files= getAdapter(IFile[].class);
+ if (files != null && files.length > 0)
+ return (T) files[0]; // can only return one: limitation on IDE.saveAllEditors; see #64617
+ return null;
}
if (IFile[].class.equals(adapter)) {
- HashSet<IFile> collector= new HashSet<>();
- collectDirtyResources(fRoot, collector);
- return (T) collector.toArray(new IFile[collector.size()]);
+ HashSet<IFile> collector= new HashSet<>();
+ collectDirtyResources(fRoot, collector);
+ return (T) collector.toArray(new IFile[collector.size()]);
}
return super.getAdapter(adapter);
}
private void collectDirtyResources(Object o, Set<IFile> collector) {
if (o instanceof DiffNode) {
- DiffNode node= (DiffNode) o;
+ DiffNode node= (DiffNode) o;
ITypedElement left= node.getLeft();
if (left instanceof BufferedResourceNode) {
- BufferedResourceNode bn= (BufferedResourceNode) left;
- if (bn.isDirty()) {
- IResource resource= bn.getResource();
- if (resource instanceof IFile)
- collector.add((IFile) resource);
- }
+ BufferedResourceNode bn= (BufferedResourceNode) left;
+ if (bn.isDirty()) {
+ IResource resource= bn.getResource();
+ if (resource instanceof IFile)
+ collector.add((IFile) resource);
+ }
}
ITypedElement right= node.getRight();
if (right instanceof BufferedResourceNode) {
- BufferedResourceNode bn= (BufferedResourceNode) right;
- if (bn.isDirty()) {
- IResource resource= bn.getResource();
- if (resource instanceof IFile)
- collector.add((IFile) resource);
- }
+ BufferedResourceNode bn= (BufferedResourceNode) right;
+ if (bn.isDirty()) {
+ IResource resource= bn.getResource();
+ if (resource instanceof IFile)
+ collector.add((IFile) resource);
+ }
}
IDiffElement[] children= node.getChildren();
@@ -549,7 +549,7 @@ class ResourceCompareInput extends CompareEditorInput {
for (int i= 0; i < children.length; i++) {
IDiffElement element= children[i];
if (element instanceof DiffNode)
- collectDirtyResources(element, collector);
+ collectDirtyResources(element, collector);
}
}
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java
index 06ab3e188..3ae8cafdc 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java
@@ -429,7 +429,7 @@ public class Utilities {
for (Iterator it = validPaths.iterator(); it.hasNext();) {
IPath path = (IPath) it.next();
if(path.isPrefixOf(resourceFullPath) ||
- resourceFullPath.isPrefixOf(path)) {
+ resourceFullPath.isPrefixOf(path)) {
return false;
}
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java
index 12dc5d0d8..faa11e67a 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java
@@ -976,7 +976,7 @@ public class DocumentMerger {
return region;
}
- public Diff findDiff(Position p, boolean left) {
+ public Diff findDiff(Position p, boolean left) {
for (Iterator<Diff> iterator = fAllDiffs.iterator(); iterator.hasNext();) {
Diff diff = iterator.next();
Position diffPos;
@@ -1150,7 +1150,7 @@ public class DocumentMerger {
while (e.hasNext()) {
Diff diff= e.next();
int h= synchronizedScrolling ? diff.getMaxDiffHeight()
- : diff.getRightHeight();
+ : diff.getRightHeight();
if (useChange(diff.getKind()) && !diff.fIsWhitespace) {
yy= (y*size.y)/virtualHeight;
@@ -1282,7 +1282,7 @@ public class DocumentMerger {
for (Iterator<Diff> iterator = changesIterator(); iterator.hasNext();) {
Diff diff = iterator.next();
if (diff.isDeleted() || diff.getKind() == RangeDifference.NOCHANGE)
- continue;
+ continue;
if (diff.overlaps(contributor, rangeStart, rangeEnd, getDocument(contributor).getLength()))
return diff;
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/LineComparator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/LineComparator.java
index f7f8e399e..0b85c139e 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/LineComparator.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/LineComparator.java
@@ -26,39 +26,39 @@ import org.eclipse.compare.rangedifferencer.IRangeComparator;
*/
class LineComparator implements IRangeComparator {
- private String[] fLines;
+ private String[] fLines;
- public LineComparator(InputStream is, String encoding) throws IOException {
+ public LineComparator(InputStream is, String encoding) throws IOException {
- BufferedReader br = new BufferedReader(new InputStreamReader(is, encoding));
- String line;
- ArrayList<String> ar = new ArrayList<>();
- while ((line = br.readLine()) != null) {
- ar.add(line);
- }
- // It is the responsibility of the caller to close the stream
- fLines = ar.toArray(new String[ar.size()]);
- }
+ BufferedReader br = new BufferedReader(new InputStreamReader(is, encoding));
+ String line;
+ ArrayList<String> ar = new ArrayList<>();
+ while ((line = br.readLine()) != null) {
+ ar.add(line);
+ }
+ // It is the responsibility of the caller to close the stream
+ fLines = ar.toArray(new String[ar.size()]);
+ }
- String getLine(int ix) {
- return fLines[ix];
- }
+ String getLine(int ix) {
+ return fLines[ix];
+ }
- @Override
+ @Override
public int getRangeCount() {
- return fLines.length;
- }
+ return fLines.length;
+ }
- @Override
+ @Override
public boolean rangesEqual(int thisIndex, IRangeComparator other,
- int otherIndex) {
- String s1 = fLines[thisIndex];
- String s2 = ((LineComparator) other).fLines[otherIndex];
- return s1.equals(s2);
- }
+ int otherIndex) {
+ String s1 = fLines[thisIndex];
+ String s2 = ((LineComparator) other).fLines[otherIndex];
+ return s1.equals(s2);
+ }
- @Override
+ @Override
public boolean skipRangeComparison(int length, int maxLength, IRangeComparator other) {
- return false;
- }
+ return false;
+ }
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/DecoratorOverlayIcon.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/DecoratorOverlayIcon.java
index 37c9b6a42..20db8e922 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/DecoratorOverlayIcon.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/DecoratorOverlayIcon.java
@@ -27,104 +27,104 @@ import org.eclipse.swt.graphics.Point;
* Copied until bug 164394 is resolved.
*/
class DecoratorOverlayIcon extends CompositeImageDescriptor {
- // the base image
- private Image base;
+ // the base image
+ private Image base;
- // the overlay images
- private ImageDescriptor[] overlays;
+ // the overlay images
+ private ImageDescriptor[] overlays;
- // the size
- private Point size;
+ // the size
+ private Point size;
- /**
- * OverlayIcon constructor.
- *
- * @param baseImage the base image
- * @param overlaysArray the overlay images
- * @param sizeValue the size
- */
- public DecoratorOverlayIcon(Image baseImage,
- ImageDescriptor[] overlaysArray, Point sizeValue) {
- this.base = baseImage;
- this.overlays = overlaysArray;
- this.size = sizeValue;
- }
+ /**
+ * OverlayIcon constructor.
+ *
+ * @param baseImage the base image
+ * @param overlaysArray the overlay images
+ * @param sizeValue the size
+ */
+ public DecoratorOverlayIcon(Image baseImage,
+ ImageDescriptor[] overlaysArray, Point sizeValue) {
+ this.base = baseImage;
+ this.overlays = overlaysArray;
+ this.size = sizeValue;
+ }
- /**
- * Draw the overlays for the receiver.
- * @param overlaysArray the overlay images
- */
- protected void drawOverlays(ImageDescriptor[] overlaysArray) {
+ /**
+ * Draw the overlays for the receiver.
+ * @param overlaysArray the overlay images
+ */
+ protected void drawOverlays(ImageDescriptor[] overlaysArray) {
- for (int i = 0; i < overlays.length; i++) {
- ImageDescriptor overlay = overlaysArray[i];
- if (overlay == null) {
+ for (int i = 0; i < overlays.length; i++) {
+ ImageDescriptor overlay = overlaysArray[i];
+ if (overlay == null) {
continue;
}
- ImageData overlayData = overlay.getImageData();
- //Use the missing descriptor if it is not there.
- if (overlayData == null) {
+ ImageData overlayData = overlay.getImageData();
+ //Use the missing descriptor if it is not there.
+ if (overlayData == null) {
overlayData = ImageDescriptor.getMissingImageDescriptor()
- .getImageData();
+ .getImageData();
}
- switch (i) {
- case IDecoration.TOP_LEFT:
- drawImage(overlayData, 0, 0);
- break;
- case IDecoration.TOP_RIGHT:
- drawImage(overlayData, size.x - overlayData.width, 0);
- break;
- case IDecoration.BOTTOM_LEFT:
- drawImage(overlayData, 0, size.y - overlayData.height);
- break;
- case IDecoration.BOTTOM_RIGHT:
- drawImage(overlayData, size.x - overlayData.width, size.y
- - overlayData.height);
- break;
- }
- }
- }
+ switch (i) {
+ case IDecoration.TOP_LEFT:
+ drawImage(overlayData, 0, 0);
+ break;
+ case IDecoration.TOP_RIGHT:
+ drawImage(overlayData, size.x - overlayData.width, 0);
+ break;
+ case IDecoration.BOTTOM_LEFT:
+ drawImage(overlayData, 0, size.y - overlayData.height);
+ break;
+ case IDecoration.BOTTOM_RIGHT:
+ drawImage(overlayData, size.x - overlayData.width, size.y
+ - overlayData.height);
+ break;
+ }
+ }
+ }
- @Override
+ @Override
public boolean equals(Object o) {
- if (!(o instanceof DecoratorOverlayIcon)) {
+ if (!(o instanceof DecoratorOverlayIcon)) {
return false;
}
- DecoratorOverlayIcon other = (DecoratorOverlayIcon) o;
- return base.equals(other.base)
- && Arrays.equals(overlays, other.overlays);
- }
+ DecoratorOverlayIcon other = (DecoratorOverlayIcon) o;
+ return base.equals(other.base)
+ && Arrays.equals(overlays, other.overlays);
+ }
- @Override
+ @Override
public int hashCode() {
- int code = base.hashCode();
- for (int i = 0; i < overlays.length; i++) {
- if (overlays[i] != null) {
+ int code = base.hashCode();
+ for (int i = 0; i < overlays.length; i++) {
+ if (overlays[i] != null) {
code ^= overlays[i].hashCode();
}
- }
- return code;
- }
+ }
+ return code;
+ }
- @Override
+ @Override
protected void drawCompositeImage(int width, int height) {
- ImageDescriptor underlay = overlays[IDecoration.UNDERLAY];
- if (underlay != null) {
+ ImageDescriptor underlay = overlays[IDecoration.UNDERLAY];
+ if (underlay != null) {
drawImage(underlay.getImageData(), 0, 0);
}
- drawImage(base.getImageData(), 0, 0);
- drawOverlays(overlays);
- }
+ drawImage(base.getImageData(), 0, 0);
+ drawOverlays(overlays);
+ }
- @Override
+ @Override
protected Point getSize() {
- return size;
- }
+ return size;
+ }
- @Override
+ @Override
protected int getTransparentPixel() {
- return base.getImageData().transparentPixel;
- }
+ return base.getImageData().transparentPixel;
+ }
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchTargetPage.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchTargetPage.java
index e762bf5f3..2c0e878b1 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchTargetPage.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchTargetPage.java
@@ -92,15 +92,15 @@ public class PatchTargetPage extends WizardPage {
useWorkspaceAsTarget.addListener(SWT.Selection, event -> {
fShowError = true;
- if (useWorkspaceAsTarget.getSelection()) {
- fPatchTargets.getTree().setEnabled(false);
- fPatcher.setTarget(ResourcesPlugin.getWorkspace().getRoot());
- } else {
- fPatchTargets.getTree().setEnabled(true);
- fPatcher.setTarget(Utilities.getFirstResource(fPatchTargets.getSelection()));
- }
- markPreviewPageToRecalucateIfNonWorkspacePatch();
- updateWidgetEnablements();
+ if (useWorkspaceAsTarget.getSelection()) {
+ fPatchTargets.getTree().setEnabled(false);
+ fPatcher.setTarget(ResourcesPlugin.getWorkspace().getRoot());
+ } else {
+ fPatchTargets.getTree().setEnabled(true);
+ fPatcher.setTarget(Utilities.getFirstResource(fPatchTargets.getSelection()));
+ }
+ markPreviewPageToRecalucateIfNonWorkspacePatch();
+ updateWidgetEnablements();
});
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizardDialog.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizardDialog.java
index 211da60e4..a2a42d850 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizardDialog.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizardDialog.java
@@ -32,11 +32,11 @@ public class PatchWizardDialog extends WizardDialog {
@Override
protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings settings = CompareUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(PATCH_WIZARD_SETTINGS_SECTION);
- if (section == null) {
- section = settings.addNewSection(PATCH_WIZARD_SETTINGS_SECTION);
- }
- return section;
+ IDialogSettings settings = CompareUIPlugin.getDefault().getDialogSettings();
+ IDialogSettings section = settings.getSection(PATCH_WIZARD_SETTINGS_SECTION);
+ if (section == null) {
+ section = settings.addNewSection(PATCH_WIZARD_SETTINGS_SECTION);
+ }
+ return section;
}
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/RetargetPatchElementDialog.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/RetargetPatchElementDialog.java
index 778970a88..20f2a9314 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/RetargetPatchElementDialog.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/RetargetPatchElementDialog.java
@@ -49,7 +49,7 @@ class RetargetPatchElementDialog extends Dialog {
private static class RetargetPatchContentProvider extends BaseWorkbenchContentProvider {
private final PatchDiffNode node;
public RetargetPatchContentProvider(PatchDiffNode node) {
- this.node = node;
+ this.node = node;
}
@Override
public Object[] getChildren(Object element) {
@@ -104,8 +104,8 @@ class RetargetPatchElementDialog extends Dialog {
GridLayout layout= new GridLayout();
layout.numColumns= 1;
- layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+ layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+ layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
composite.setLayout(layout);
final GridData data= new GridData(SWT.FILL, SWT.FILL, true, true);
composite.setLayoutData(data);
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
index f206b7234..aed63ed10 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
@@ -370,8 +370,8 @@ public class DiffTreeViewer extends TreeViewer {
/**
* Overridden to avoid expanding {@code DiffNode}s that shouldn't expand.
*
- * @param node the node to expand
- * @param level non-negative level, or {@code ALL_LEVELS} to collapse all levels of the tree
+ * @param node the node to expand
+ * @param level non-negative level, or {@code ALL_LEVELS} to collapse all levels of the tree
*/
@Override
protected void internalExpandToLevel(Widget node, int level) {
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java
index 701fd922f..28fad0147 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java
@@ -255,8 +255,8 @@ public class DocumentRangeNode
/**
* Implementation based on <code>getID</code>.
- * @param other the object to compare this <code>DocumentRangeNode</code> against.
- * @return <code>true</code> if the <code>DocumentRangeNodes</code>are equal; <code>false</code> otherwise.
+ * @param other the object to compare this <code>DocumentRangeNode</code> against.
+ * @return <code>true</code> if the <code>DocumentRangeNodes</code>are equal; <code>false</code> otherwise.
*/
@Override
public boolean equals(Object other) {
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java
index ad5319d60..2682af036 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java
@@ -32,7 +32,7 @@ package org.eclipse.compare.structuremergeviewer;
public interface ICompareInputChangeListener {
/**
* Called whenever the value (not the content) of one or more of the three sides
- * of a {@link ICompareInput} has changed.
+ * of a {@link ICompareInput} has changed.
*
* @param source the {@link ICompareInput} that has changed
*/
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
index e534f7cd6..af1093d5f 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
@@ -263,7 +263,7 @@ public class StructureDiffViewer extends DiffTreeViewer {
return fRoot;
}
- /*
+ /*
* Method declared on StructuredViewer. Overridden to create the comparable
* structures from the input object and to feed them through the differencing
* engine. Note: for this viewer the value from <code>getInput</code> is not

Back to the top