Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2001-12-11 16:45:12 +0000
committerAndre Weinand2001-12-11 16:45:12 +0000
commit61afca0345b61da03ac5cc133fd4d33386c6075d (patch)
tree72076e895f5947dfe06dd0fb299e0d916fbff23e /bundles/org.eclipse.compare/compare/org/eclipse/compare
parentd7e310469f6832a38a8ac8856fe535934ce193ff (diff)
downloadeclipse.platform.team-61afca0345b61da03ac5cc133fd4d33386c6075d.tar.gz
eclipse.platform.team-61afca0345b61da03ac5cc133fd4d33386c6075d.tar.xz
eclipse.platform.team-61afca0345b61da03ac5cc133fd4d33386c6075d.zip
fixed some NLS problems
Diffstat (limited to 'bundles/org.eclipse.compare/compare/org/eclipse/compare')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java8
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java1
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java44
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java16
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java4
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java5
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties10
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties9
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/patch/PatchCompareInput.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java1
11 files changed, 52 insertions, 50 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
index 0cf29b2a6..ba93999c2 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
@@ -83,11 +83,9 @@ public class CompareConfiguration {
fgImages[Differencer.CONFLICTING + Differencer.CHANGE]= CompareUIPlugin.getImageDescriptor("ovr16/confchg_ov.gif"); //$NON-NLS-1$
// end PR 1GEHGTZ
- if (false) {
- ImageDescriptor tmp= fgImages[Differencer.ADDITION];
- fgImages[Differencer.ADDITION]= fgImages[Differencer.DELETION];
- fgImages[Differencer.DELETION]= tmp;
- }
+// ImageDescriptor tmp= fgImages[Differencer.ADDITION];
+// fgImages[Differencer.ADDITION]= fgImages[Differencer.DELETION];
+// fgImages[Differencer.DELETION]= tmp;
}
private ListenerList fListeners= new ListenerList();
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 9c0d2c1c8..0af0f90a5 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
@@ -269,8 +269,6 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
*/
public void contributeToToolBar(ToolBarManager toolBarManager) {
- ResourceBundle bundle= CompareUIPlugin.getResourceBundle();
-
toolBarManager.add(new Separator());
toolBarManager.add(fIgnoreWhitespace);
toolBarManager.add(fShowPseudoConflicts);
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 a7a37f091..2a668150d 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
@@ -115,7 +115,6 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane
// we have to remember and restore the old visibility of the CustomPane
// since setContent changes the visibility
boolean old= getVisible();
- Control newControl= fViewer.getControl();
setContent(fViewer.getControl());
setVisible(old); // restore old visibility
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 6d11bb3a6..15eec327a 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
@@ -435,7 +435,14 @@ public class EditionSelectionDialog extends Dialog {
* @return a label the target side of a compare viewer
*/
protected String getTargetLabel(ITypedElement target, ITypedElement item) {
- String format= Utilities.getString(fBundle, "targetLabel"); //$NON-NLS-1$
+ String format= null;
+ if (target instanceof ResourceNode)
+ format= Utilities.getString(fBundle, "workspaceTargetLabel", null); //$NON-NLS-1$
+ if (format == null)
+ format= Utilities.getString(fBundle, "targetLabel"); //$NON-NLS-1$
+ if (format == null)
+ format= "x{0}"; //$NON-NLS-1$
+
return MessageFormat.format(format, new Object[] { target.getName() });
}
@@ -454,7 +461,16 @@ public class EditionSelectionDialog extends Dialog {
* @return a label the edition side of a compare viewer
*/
protected String getEditionLabel(ITypedElement selectedEdition, ITypedElement item) {
- String label= Utilities.getString(fBundle, "editionLabel"); //$NON-NLS-1$
+ String format= null;
+ if (selectedEdition instanceof ResourceNode)
+ format= Utilities.getString(fBundle, "workspaceEditionLabel", null); //$NON-NLS-1$
+ else if (selectedEdition instanceof HistoryItem)
+ format= Utilities.getString(fBundle, "historyEditionLabel", null); //$NON-NLS-1$
+ if (format == null)
+ format= Utilities.getString(fBundle, "editionLabel"); //$NON-NLS-1$
+ if (format == null)
+ format= "x{0}"; //$NON-NLS-1$
+
String date= ""; //$NON-NLS-1$
if (selectedEdition instanceof IModificationDate) {
@@ -462,24 +478,20 @@ public class EditionSelectionDialog extends Dialog {
date= DateFormat.getDateTimeInstance().format(new Date(modDate));
}
- String type= "";
- if (selectedEdition instanceof ResourceNode)
- type= "Workspace File";
- else if (selectedEdition instanceof HistoryItem)
- type= "Local History";
-
- return MessageFormat.format(label, new Object[] { date, type });
+ return MessageFormat.format(format, new Object[] { date });
}
protected String getShortEditionLabel(ITypedElement edition, ITypedElement item, Date date) {
- String t= DateFormat.getTimeInstance().format(date);
+ String format= null;
if (edition instanceof ResourceNode)
- t= t + " (Workspace File)";
- else if (edition instanceof HistoryItem)
- t= t;
- else
- t= t + " (Editor Buffer)";
- return t;
+ format= Utilities.getString(fBundle, "workspaceTreeFormat", null); //$NON-NLS-1$
+ if (format == null)
+ format= Utilities.getString(fBundle, "treeFormat", null); //$NON-NLS-1$
+ if (format == null)
+ format= "x{0}"; //$NON-NLS-1$
+
+ String ds= DateFormat.getTimeInstance().format(date);
+ return MessageFormat.format(format, new Object[] { ds });
}
/**
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 ea226a78f..c2759e03a 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
@@ -785,7 +785,6 @@ public class TextMergeViewer extends ContentMergeViewer {
if (diff == null || diff.fIsToken)
return;
- Point region= new Point(0, 0);
Color c= getColor(getFillColor(diff));
if (c == null)
@@ -1318,20 +1317,16 @@ public class TextMergeViewer extends ContentMergeViewer {
IDocument leftDoc, String s) {
int ancestorStart= 0;
- int ancestorEnd= 0;
ITokenComparator sa= null;
if (ancestorDoc != null) {
ancestorStart= baseDiff.fAncestorPos.getOffset();
- ancestorEnd= ancestorStart + baseDiff.fAncestorPos.getLength();
sa= createTokenComparator(a);
}
int rightStart= baseDiff.fRightPos.getOffset();
- int rightEnd= rightStart + baseDiff.fRightPos.getLength();
ITokenComparator sm= createTokenComparator(d);
int leftStart= baseDiff.fLeftPos.getOffset();
- int leftEnd= leftStart + baseDiff.fLeftPos.getLength();
ITokenComparator sy= createTokenComparator(s);
RangeDifference[] e= RangeDifferencer.findRanges(sa, sy, sm);
@@ -1372,29 +1367,22 @@ public class TextMergeViewer extends ContentMergeViewer {
IDocument ancestorDoc, String a,
IDocument rightDoc, String d,
IDocument leftDoc, String s) {
-
ITokenComparator sa= null;
int ancestorStart= 0;
- int ancestorEnd= 0;
if (ancestorDoc != null) {
sa= createTokenComparator(a);
ancestorStart= baseDiff.fAncestorPos.getOffset();
- ancestorEnd= ancestorStart + baseDiff.fAncestorPos.getLength();
}
int rightStart= baseDiff.fRightPos.getOffset();
- int rightEnd= rightStart + baseDiff.fRightPos.getLength();
ITokenComparator sm= createTokenComparator(d);
int leftStart= baseDiff.fLeftPos.getOffset();
- int leftEnd= leftStart + baseDiff.fLeftPos.getLength();
ITokenComparator sy= createTokenComparator(s);
RangeDifference[] r= RangeDifferencer.findRanges(sa, sy, sm);
-
for (int i= 0; i < r.length; i++) {
RangeDifference es= r[i];
-
// determine range of diffs in one line
int start= i;
int leftLine= -1;
@@ -1407,7 +1395,6 @@ public class TextMergeViewer extends ContentMergeViewer {
i++;
for (; i < r.length; i++) {
es= r[i];
- int ll, rl;
try {
if (leftLine != leftDoc.getLineOfOffset(leftStart+sy.getTokenStart(es.leftStart())))
break;
@@ -1439,7 +1426,6 @@ public class TextMergeViewer extends ContentMergeViewer {
break;
}
}
-
if (first != null && last != null) {
@@ -1455,7 +1441,6 @@ public class TextMergeViewer extends ContentMergeViewer {
int rightStart2= rightStart+sm.getTokenStart(first.rightStart());
int rightEnd2= rightStart+getTokenEnd(sm, last.rightStart(), last.rightLength());
-
Diff diff= new Diff(baseDiff, first.kind(),
ancestorDoc, ancestorStart2, ancestorEnd2+1,
leftDoc, leftStart2, leftEnd2+1,
@@ -2379,7 +2364,6 @@ public class TextMergeViewer extends ContentMergeViewer {
if (virtualPos < 0)
virtualPos= virtualPos;
- GC gc;
if (fSynchronizedScrolling) {
int s= 0;
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 60c1c0592..852759114 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
@@ -11,6 +11,9 @@ import org.eclipse.core.runtime.*;
import org.eclipse.compare.*;
import org.eclipse.compare.structuremergeviewer.IStructureComparator;
+/**
+ * A buffer for a workspace resource.
+ */
public class BufferedResourceNode extends ResourceNode {
private boolean fDirty= false;
@@ -73,7 +76,6 @@ public class BufferedResourceNode extends ResourceNode {
if (other instanceof IStreamContentAccessor && child instanceof IEditableContent) {
IEditableContent dst= (IEditableContent) child;
- IStreamContentAccessor src= (IStreamContentAccessor) other;
try {
InputStream is= ((IStreamContentAccessor)other).getContents();
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java
index 3457588b3..16df01c8e 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java
@@ -92,12 +92,11 @@ public class CompareNavigator {
}
public static void handleNavigationKeys(KeyEvent e) {
- if ((e.stateMask & SWT.ALT) != 0 &&
- e.character == ('N'-0x40) || e.character == ('P'-0x40)) { // Control-Alt-N/P
+ if (e.character == ('E'-0x40)) {
if (e.widget instanceof Control) {
CompareNavigator nav= findNavigator((Control)e.widget);
if (nav != null)
- nav.selectChange(e.character == ('N'-0x40));
+ nav.selectChange((e.stateMask & SWT.SHIFT) == 0);
}
}
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties
index 35163669c..ed05fc992 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties
@@ -13,8 +13,14 @@ treeTitleFormat= Local History of ''{0}''
dateIcon= obj16/day_obj.gif
timeIcon= obj16/resource_obj.gif
-editionLabel= {1}: {0}
-targetLabel= {0}
+treeFormat= {0}
+workspaceTreeFormat {0} (Workspace File)
+
+editionLabel= Local History ({0})
+workspaceEditionLabel= Workspace File
+
+targetLabel= Workspace File
+workspaceEditionLabel= Workspace File
todayFormat= Today ({0})
yesterdayFormat= Yesterday ({0})
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties
index 26439e0b9..1a35c9c21 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties
@@ -13,8 +13,13 @@ treeTitleFormat= Local History of ''{0}''
dateIcon= obj16/day_obj.gif
timeIcon= obj16/resource_obj.gif
-editionLabel= {1}: {0}
-targetLabel= {0}
+treeFormat= {0}
+workspaceTreeFormat {0} (Workspace File)
+
+editionLabel= Local History ({0})
+workspaceEditionLabel= Workspace File
+
+targetLabel= Workspace File
todayFormat= Today ({0})
yesterdayFormat= Yesterday ({0})
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/patch/PatchCompareInput.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/patch/PatchCompareInput.java
index b70562058..47f73dc24 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/patch/PatchCompareInput.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/patch/PatchCompareInput.java
@@ -37,7 +37,7 @@ import org.eclipse.compare.internal.*;
fDiff= diff;
}
public String getName() {
- return fName;
+ return fName + " *";
}
public String getType() {
return "txt";
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 9bed81ecb..8461da200 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
@@ -628,7 +628,6 @@ public class DiffTreeViewer extends TreeViewer {
while (e.hasNext()) {
Object element= e.next();
if (element instanceof ICompareInput) {
- ICompareInput diff= (ICompareInput) element;
if (isEditable(element, false))
leftToRight++;
if (isEditable(element, true))

Back to the top