Skip to content
Commits on Source (3)
......@@ -2,15 +2,15 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.compare.core
Bundle-Version: 3.6.600.qualifier
Bundle-Version: 3.6.700.qualifier
Bundle-Activator: org.eclipse.compare.internal.core.ComparePlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.compare.internal.core;x-friends:="org.eclipse.compare",
org.eclipse.compare.internal.core.patch;x-friends:="org.eclipse.compare",
org.eclipse.compare.patch; core="split"; mandatory:="core",
org.eclipse.compare.internal.core.patch;x-friends:="org.eclipse.compare,org.eclipse.team.ui",
org.eclipse.compare.patch;core=split;mandatory:=core,
org.eclipse.compare.rangedifferencer
Import-Package: com.ibm.icu.text;version="3.6.1"
Bundle-Localization: plugin
......
......@@ -14,11 +14,11 @@
<parent>
<artifactId>eclipse.platform.team</artifactId>
<groupId>eclipse.platform.team</groupId>
<version>4.13.0-SNAPSHOT</version>
<version>4.14.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<groupId>org.eclipse.compare</groupId>
<artifactId>org.eclipse.compare.core</artifactId>
<version>3.6.600-SNAPSHOT</version>
<version>3.6.700-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
......@@ -177,7 +177,7 @@ public abstract class LCS {
/**
* Helper function for Myers' LCS algorithm to find the middle snake for
* l1[bottoml1..topl1] and l2[bottoml2..topl2] The x, y coodrdinates of the
* l1[bottoml1..topl1] and l2[bottoml2..topl2] The x, y coordinates of the
* start of the middle snake are saved in snake[0], snake[1] respectively
* and the length of the snake is saved in s[2].
*
......@@ -191,7 +191,7 @@ public abstract class LCS {
* to store furthest reaching D-paths
* @param snake should be allocated as int[3], used to store the beginning
* x, y coordinates and the length of the middle snake
* @subMonitor subMonitor
* @param subMonitor
*
* @return The number of differences (SES) between l1[bottoml1..topl1] and
* l2[bottoml2..topl2]
......
......@@ -17,9 +17,7 @@ import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.compare.patch.IFilePatchResult;
import org.eclipse.compare.patch.IHunk;
import org.eclipse.compare.patch.PatchConfiguration;
import org.eclipse.compare.patch.*;
import org.eclipse.core.runtime.Assert;
/**
......@@ -362,7 +360,7 @@ public class Hunk implements IHunk {
&& contextLines.size() >= fuzz
&& !checkPrecedingContextLines(configuration, lines,
fuzz, pos, contextLines))
Assert.isTrue(false, "doPatch: preceding context lines don't match, even though fuzz factor has been used"); //$NON-NLS-1$;
Assert.isTrue(false, "doPatch: preceding context lines don't match, even though fuzz factor has been used"); //$NON-NLS-1$
// else if there is less or equal context line to the fuzz
// factor we ignore them all and treat as matching
......@@ -381,7 +379,7 @@ public class Hunk implements IHunk {
&& contextLines.size() >= fuzz
&& !checkPrecedingContextLines(configuration, lines,
fuzz, pos, contextLines))
Assert.isTrue(false, "doPatch: preceding context lines don't match, even though fuzz factor has been used"); //$NON-NLS-1$;
Assert.isTrue(false, "doPatch: preceding context lines don't match, even though fuzz factor has been used"); //$NON-NLS-1$
precedingLinesChecked = true;
contextLines.clear();
......
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.compare.win32;singleton:=true
Bundle-Version: 1.2.600.qualifier
Bundle-Version: 1.2.700.qualifier
Bundle-Vendor: %providerName
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Eclipse-PlatformFilter: (osgi.os=win32)
......
......@@ -14,12 +14,12 @@
<parent>
<artifactId>eclipse.platform.team</artifactId>
<groupId>eclipse.platform.team</groupId>
<version>4.13.0-SNAPSHOT</version>
<version>4.14.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<groupId>org.eclipse.compare</groupId>
<artifactId>org.eclipse.compare.win32</artifactId>
<version>1.2.600-SNAPSHOT</version>
<version>1.2.700-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
......
......@@ -181,16 +181,13 @@ public abstract class AbstractMergeViewer extends Viewer {
private File createTempFile(InputStream contents) throws IOException {
File file = File.createTempFile("compare", ".doc"); //$NON-NLS-1$ //$NON-NLS-2$
file.deleteOnExit();
OutputStream out = new BufferedOutputStream(new FileOutputStream(file));
try {
try (OutputStream out = new BufferedOutputStream(new FileOutputStream(file))) {
byte[] buffer = new byte[1024];
int length;
while ((length = contents.read(buffer)) != -1) {
out.write(buffer, 0, length);
}
return file;
} finally {
out.close();
}
}
......@@ -270,8 +267,7 @@ public abstract class AbstractMergeViewer extends Viewer {
}
protected byte[] asBytes(File file) throws IOException {
InputStream in = new BufferedInputStream(new FileInputStream(file));
try {
try (InputStream in = new BufferedInputStream(new FileInputStream(file))) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int length;
......@@ -280,8 +276,6 @@ public abstract class AbstractMergeViewer extends Viewer {
}
out.close();
return out.toByteArray();
} finally {
in.close();
}
}
......
......@@ -123,8 +123,7 @@ public class WordComparison {
*
* <p>An exception is thrown if the id cannot be retrieved</p>
*
* Reference information for id assignment: <a href="
* http://msdn.microsoft.com/en-us/library/w7a36sdf%28VS.80%29.aspx">http://msdn.microsoft.com/en-us/library/w7a36sdf%28VS.80%29.aspx</a>
* Reference information for id assignment: <a href="http://msdn.microsoft.com/en-us/library/w7a36sdf%28VS.80%29.aspx">http://msdn.microsoft.com/en-us/library/w7a36sdf%28VS.80%29.aspx</a>
*
* @param auto - object from which we want to get the property, must not be <code>null</code>
* @param reference - an reference object from which the property will be obtained.
......
......@@ -2,15 +2,15 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.compare; singleton:=true
Bundle-Version: 3.7.700.qualifier
Bundle-Version: 3.7.800.qualifier
Bundle-Activator: org.eclipse.compare.internal.CompareUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.compare,
org.eclipse.compare.contentmergeviewer,
org.eclipse.compare.internal;x-internal:=true,
org.eclipse.compare.internal;x-friends:="org.eclipse.team.ui",
org.eclipse.compare.internal.merge;x-internal:=true,
org.eclipse.compare.internal.patch;x-internal:=true,
org.eclipse.compare.internal.patch;x-friends:="org.eclipse.team.ui",
org.eclipse.compare.patch,
org.eclipse.compare.structuremergeviewer
Require-Bundle: org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
......
......@@ -1467,9 +1467,7 @@ public abstract class CompareEditorInput extends PlatformObject implements IEdit
}
});
return true;
} catch (InterruptedException x) {
// Ignore
} catch (OperationCanceledException x) {
} catch (InterruptedException | OperationCanceledException x) {
// Ignore
} catch (InvocationTargetException x) {
ErrorDialog.openError(fComposite.getShell(), CompareMessages.CompareDialog_error_title, null,
......
......@@ -19,6 +19,7 @@
* Stephan Herrmann (stephan@cs.tu-berlin.de) - Bug 291695: Element compare fails to use source range
* Robin Stocker (robin@nibor.org) - Bug 398594: [Edit] Enable center arrow buttons when editable and for both sides
* Robin Stocker (robin@nibor.org) - Bug 399960: [Edit] Make merge arrow buttons easier to hit
* John Hendrikx (hjohn@xs4all.nl) - Bug 541401 - [regression] Vertical scrollbar thumb size is wrong in compare view
*******************************************************************************/
package org.eclipse.compare.contentmergeviewer;
......@@ -2095,6 +2096,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
public void getName(AccessibleEvent e) {
// Check for Mirrored status flag before returning the left label's text.
e.result = NLS.bind(CompareMessages.TextMergeViewer_accessible_left,
getControl().getData(CompareUI.COMPARE_VIEWER_TITLE),
getCompareConfiguration().isMirrored() ? getCompareConfiguration().getRightLabel(getInput())
: getCompareConfiguration().getLeftLabel(getInput()));
}
......@@ -2108,6 +2110,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
public void getName(AccessibleEvent e) {
// Check for Mirrored status flag before returning the right label's text.
e.result = NLS.bind(CompareMessages.TextMergeViewer_accessible_right,
getControl().getData(CompareUI.COMPARE_VIEWER_TITLE),
getCompareConfiguration().isMirrored() ? getCompareConfiguration().getLeftLabel(getInput())
: getCompareConfiguration().getRightLabel(getInput()));
}
......@@ -2163,6 +2166,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
fBirdsEyeCanvas= new BufferedCanvas(composite, SWT.NONE) {
@Override
public void doPaint(GC gc) {
updateVScrollBar(); // Update scroll bar here as initially viewport height is wrong
paintBirdsEyeView(this, gc);
}
};
......
......@@ -188,8 +188,7 @@ public class AddFromHistoryDialog extends ResizableDialog {
// sort input files
final int count= inputFiles.length;
final IFile[] files= new IFile[count];
for (int i= 0; i < count; i++)
files[i]= inputFiles[i];
System.arraycopy(inputFiles, 0, files, 0, count);
if (count > 1)
internalSort(files, 0, count-1);
......