Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Constant2018-08-31 06:18:40 -0400
committerOlivier Constant2018-08-31 06:18:40 -0400
commit3e407880542e841044fed953152c139644c6e119 (patch)
treea400ea68502457db09e12bee8e6c48aaa1988031
parent500fcdbcb43c54394ca7edb823d8bc227629c24f (diff)
downloadorg.eclipse.emf.diffmerge.core-3e407880542e841044fed953152c139644c6e119.tar.gz
org.eclipse.emf.diffmerge.core-3e407880542e841044fed953152c139644c6e119.tar.xz
org.eclipse.emf.diffmerge.core-3e407880542e841044fed953152c139644c6e119.zip
Fixed scalability issue with string attributes
Change-Id: Iea6a450dfdaec7dc7f87b0b60eee9105d1528809 Signed-off-by: Olivier Constant <olivier.constant@thalesgroup.com>
-rw-r--r--plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/ValuesViewer.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/ValuesViewer.java b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/ValuesViewer.java
index 1e9e7c22..9ca81429 100644
--- a/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/ValuesViewer.java
+++ b/plugins/org.eclipse.emf.diffmerge.ui/src/org/eclipse/emf/diffmerge/ui/viewers/ValuesViewer.java
@@ -382,8 +382,10 @@ IDifferenceRelatedViewer {
public String getUndecoratedText(Object element_p) {
String result = super.getUndecoratedText(element_p);
// Adapt multi-line string for one-line display
- result = result.replace('\n', '\\');
- result = result.replace('\r', '\\');
+ String[] lines = result.split("\r\n|\r|\n", 2); //$NON-NLS-1$
+ if (lines.length > 1) {
+ result = lines[0] + " [...]"; //$NON-NLS-1$
+ }
return result;
}
/**

Back to the top