Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2002-02-15 17:06:41 +0000
committerAndre Weinand2002-02-15 17:06:41 +0000
commit2ededfd14eeb2a99eb25fa9da648863868b340d8 (patch)
treeeba60750be6dcbc67caffe046778a48dfa1f2779 /bundles/org.eclipse.compare/compare/org/eclipse/compare
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
Diffstat (limited to 'bundles/org.eclipse.compare/compare/org/eclipse/compare')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java17
1 files changed, 13 insertions, 4 deletions
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);
}
/**

Back to the top