Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2002-02-15 17:06:41 +0000
committerAndre Weinand2002-02-15 17:06:41 +0000
commit2ededfd14eeb2a99eb25fa9da648863868b340d8 (patch)
treeeba60750be6dcbc67caffe046778a48dfa1f2779
parentccbeb6cab5cc0d7cece5202e41763053a8bae6a9 (diff)
downloadeclipse.platform.team-2ededfd14eeb2a99eb25fa9da648863868b340d8.tar.gz
eclipse.platform.team-2ededfd14eeb2a99eb25fa9da648863868b340d8.tar.xz
eclipse.platform.team-2ededfd14eeb2a99eb25fa9da648863868b340d8.zip
#9532: Compare with patch: next disabled although clipboard specified
-rw-r--r--bundles/org.eclipse.compare/buildnotes_compare.html1
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java17
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html1
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java17
4 files changed, 28 insertions, 8 deletions
diff --git a/bundles/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/buildnotes_compare.html
index 810ad50f0..e70b5e17e 100644
--- a/bundles/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/org.eclipse.compare/buildnotes_compare.html
@@ -32,6 +32,7 @@ Known deficiencies</h2>
<h2>
Problem reports fixed</h2>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9540">#9540</a>: Compare with patch: it should not be possible to check items that could not be applied<br>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9532">#9532</a>: Compare with patch: next disabled although clipboard specified<br>
<h2>
Problem reports closed</h2>
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
index 988036dc1..d45405548 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
@@ -44,6 +44,8 @@ import org.eclipse.compare.internal.Utilities;
// help IDs
private final static String PATCH_HELP_CONTEXT_ID= "PatchWizardHelpId"; //$NON-NLS-1$
+ private boolean fShowError= false;
+
// SWT widgets
private Button fUseClipboardButton;
private Combo fPatchFileNameField;
@@ -188,7 +190,6 @@ import org.eclipse.compare.internal.Utilities;
int matches= matchTrailingSegments(path, filePath);
if (matches > 0)
return matches;
- //System.out.println(" " + filePath + ": " + matches);
}
return 0;
}
@@ -281,6 +282,7 @@ import org.eclipse.compare.internal.Utilities;
fUsePatchFileButton.addSelectionListener(
new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
+ fShowError= true;
setEnablePatchFile(!getUseClipboard());
updateWidgetEnablements();
}
@@ -297,6 +299,7 @@ import org.eclipse.compare.internal.Utilities;
fPatchFileNameField.addModifyListener(
new ModifyListener() {
public void modifyText(ModifyEvent e) {
+ fShowError= true;
updateWidgetEnablements();
}
}
@@ -413,7 +416,8 @@ import org.eclipse.compare.internal.Utilities;
}
setPageComplete(anySelected && gotPatch);
- setErrorMessage(error);
+ if (fShowError)
+ setErrorMessage(error);
}
protected void handlePatchFileBrowseButtonPressed() {
@@ -504,11 +508,13 @@ import org.eclipse.compare.internal.Utilities;
* last time this wizard was used to completion
*/
private void restoreWidgetValues() {
+
+ boolean useClipboard= false;
+
IDialogSettings settings= getDialogSettings();
if (settings != null) {
- // set 'Use Clipboard' radio button
- setUseClipboard(settings.getBoolean(STORE_USE_CLIPBOARD_ID));
+ useClipboard= settings.getBoolean(STORE_USE_CLIPBOARD_ID);
// set filenames history
String[] sourceNames= settings.getArray(STORE_PATCH_FILES_ID);
@@ -522,6 +528,9 @@ import org.eclipse.compare.internal.Utilities;
if (patchFilePath != null)
setSourceName(patchFilePath);
}
+
+ // set 'Use Clipboard' radio buttons
+ setUseClipboard(useClipboard);
}
/**
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
index 810ad50f0..e70b5e17e 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
@@ -32,6 +32,7 @@ Known deficiencies</h2>
<h2>
Problem reports fixed</h2>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9540">#9540</a>: Compare with patch: it should not be possible to check items that could not be applied<br>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9532">#9532</a>: Compare with patch: next disabled although clipboard specified<br>
<h2>
Problem reports closed</h2>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
index 988036dc1..d45405548 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
@@ -44,6 +44,8 @@ import org.eclipse.compare.internal.Utilities;
// help IDs
private final static String PATCH_HELP_CONTEXT_ID= "PatchWizardHelpId"; //$NON-NLS-1$
+ private boolean fShowError= false;
+
// SWT widgets
private Button fUseClipboardButton;
private Combo fPatchFileNameField;
@@ -188,7 +190,6 @@ import org.eclipse.compare.internal.Utilities;
int matches= matchTrailingSegments(path, filePath);
if (matches > 0)
return matches;
- //System.out.println(" " + filePath + ": " + matches);
}
return 0;
}
@@ -281,6 +282,7 @@ import org.eclipse.compare.internal.Utilities;
fUsePatchFileButton.addSelectionListener(
new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
+ fShowError= true;
setEnablePatchFile(!getUseClipboard());
updateWidgetEnablements();
}
@@ -297,6 +299,7 @@ import org.eclipse.compare.internal.Utilities;
fPatchFileNameField.addModifyListener(
new ModifyListener() {
public void modifyText(ModifyEvent e) {
+ fShowError= true;
updateWidgetEnablements();
}
}
@@ -413,7 +416,8 @@ import org.eclipse.compare.internal.Utilities;
}
setPageComplete(anySelected && gotPatch);
- setErrorMessage(error);
+ if (fShowError)
+ setErrorMessage(error);
}
protected void handlePatchFileBrowseButtonPressed() {
@@ -504,11 +508,13 @@ import org.eclipse.compare.internal.Utilities;
* last time this wizard was used to completion
*/
private void restoreWidgetValues() {
+
+ boolean useClipboard= false;
+
IDialogSettings settings= getDialogSettings();
if (settings != null) {
- // set 'Use Clipboard' radio button
- setUseClipboard(settings.getBoolean(STORE_USE_CLIPBOARD_ID));
+ useClipboard= settings.getBoolean(STORE_USE_CLIPBOARD_ID);
// set filenames history
String[] sourceNames= settings.getArray(STORE_PATCH_FILES_ID);
@@ -522,6 +528,9 @@ import org.eclipse.compare.internal.Utilities;
if (patchFilePath != null)
setSourceName(patchFilePath);
}
+
+ // set 'Use Clipboard' radio buttons
+ setUseClipboard(useClipboard);
}
/**

Back to the top