From 2ededfd14eeb2a99eb25fa9da648863868b340d8 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Fri, 15 Feb 2002 17:06:41 +0000 Subject: #9532: Compare with patch: next disabled although clipboard specified --- .../eclipse/compare/internal/patch/InputPatchPage.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'bundles/org.eclipse.compare/compare/org/eclipse/compare') 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); } /** -- cgit v1.2.3