Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 130552 Details for
Bug 270569
[Wizards][Patch] Compare GenerateDiffFileWizard should look more like the one from CVS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch_v1
patch_look_like_CVS.txt (text/plain), 9.66 KB, created by
Kacper Zdanowicz
on 2009-04-01 08:51:47 EDT
(
hide
)
Description:
Patch_v1
Filename:
MIME Type:
Creator:
Kacper Zdanowicz
Created:
2009-04-01 08:51:47 EDT
Size:
9.66 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.compare >Index: compare/org/eclipse/compare/internal/GenerateDiffFileWizard.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Attic/GenerateDiffFileWizard.java,v >retrieving revision 1.1.2.7 >diff -u -r1.1.2.7 GenerateDiffFileWizard.java >--- compare/org/eclipse/compare/internal/GenerateDiffFileWizard.java 30 Mar 2009 15:53:03 -0000 1.1.2.7 >+++ compare/org/eclipse/compare/internal/GenerateDiffFileWizard.java 1 Apr 2009 12:38:27 -0000 >@@ -81,8 +81,8 @@ > public class GenerateDiffFileWizard extends Wizard { > > //The initial size of this wizard. >- protected final static int INITIAL_WIDTH = 300; >- protected final static int INITIAL_HEIGHT = 350; >+ private final static int INITIAL_WIDTH = 300; >+ private final static int INITIAL_HEIGHT = 350; > > public static void run(DocumentMerger merger, Shell shell, boolean rightToLeft) { > final String title = CompareMessages.GenerateLocalDiff_title; >@@ -93,7 +93,7 @@ > dialog.open(); > } > >- protected class DirectionSelectionPage extends WizardPage { >+ public class DirectionSelectionPage extends WizardPage { > > public final static int LEFT_OPTION = 1; > public final static int RIGHT_OPTION = 2; >@@ -184,7 +184,7 @@ > * Page to select a patch file. Overriding validatePage was necessary to > * allow entering a file name that already exists. > */ >- protected class LocationPage extends WizardPage { >+ public class LocationPage extends WizardPage { > > /** > * The possible locations to save a patch. >@@ -266,7 +266,7 @@ > return control; > } > >- protected Control createDialogArea(Composite parent) { >+ protected Control createDialogArea(Composite parent){ > Composite parentComposite = (Composite) super.createDialogArea(parent); > > // create a composite with standard margins and spacing >@@ -598,6 +598,7 @@ > * selected to save the patch in the clipboard or file system. > */ > public String getWorkspaceLocation() { >+ > if (pageValid && selectedLocation == WORKSPACE) { > final String filename= wsPathText.getText().trim(); > return filename; >@@ -640,6 +641,15 @@ > > Dialog.applyDialogFont(parent); > >+ /** >+ * Ensure the page is in a valid state. >+ */ >+ /*if (!validatePage()) { >+ store.storeRadioSelection(CLIPBOARD); >+ initializeDefaultValues(); >+ validatePage(); >+ } >+ pageValid= true;*/ > validatePage(); > > updateEnablements(); >@@ -861,25 +871,37 @@ > > protected boolean initialized = false; > >- protected Button unifiedDiffOption; >- protected Button unified_workspaceRelativeOption; //multi-patch format >- protected Button unified_projectRelativeOption; //full project path >- protected Button unified_selectionRelativeOption; //use path of whatever is selected >- protected Button contextDiffOption; >- protected Button regularDiffOption; >+ private Button unifiedDiffOption; >+ private Button unified_workspaceRelativeOption; //multi-patch format >+ private Button unified_projectRelativeOption; //full project path >+ private Button unified_selectionRelativeOption; //use path of whatever is selected >+ private Button contextDiffOption; >+ private Button regularDiffOption; >+ protected final RadioButtonGroup diffTypeRadioGroup = new RadioButtonGroup(); >+ protected final RadioButtonGroup unifiedRadioGroup = new RadioButtonGroup(); > > protected Group unifiedGroup; > protected Group diffTypeGroup; > >- protected final RadioButtonGroup diffTypeRadioGroup = new RadioButtonGroup(); >- protected final RadioButtonGroup unifiedRadioGroup = new RadioButtonGroup(); >- > private final DefaultValuesStore store; > > /** > * Constructor for PatchFileCreationOptionsPage. >+ * >+ * @param pageName >+ * the name of the page >+ * >+ * @param title >+ * the title for this wizard page, or <code>null</code> if >+ * none >+ * @param titleImage >+ * the image descriptor for the title of this wizard page, or >+ * <code>null</code> if none >+ * @param store >+ * the value store where the page stores it's data > */ >- protected OptionsPage(String pageName, String title, ImageDescriptor titleImage, DefaultValuesStore store) { >+ protected OptionsPage(String pageName, String title, >+ ImageDescriptor titleImage, DefaultValuesStore store) { > super(pageName, title, titleImage); > this.store = store; > } >@@ -917,7 +939,7 @@ > diffTypeRadioGroup.add(FORMAT_CONTEXT, contextDiffOption); > diffTypeRadioGroup.add(FORMAT_STANDARD, regularDiffOption); > >- // Unified Format Options >+ //Unified Format Options > unifiedGroup = new Group(composite, SWT.None); > layout = new GridLayout(); > layout.numColumns = 2; >@@ -997,17 +1019,11 @@ > > updateEnablements(); > >- performSpecificActions(); >- > // update selection > diffTypeRadioGroup.selectEnabledOnly(); > unifiedRadioGroup.selectEnabledOnly(); > } > >- protected void performSpecificActions() { >- return; >- } >- > public int getFormatSelection() { > return diffTypeRadioGroup.getSelected(); > } >@@ -1027,11 +1043,12 @@ > unifiedRadioGroup.setSelection(store.getRootSelection(), true); > } > >- protected void updateEnablements() { >- if(diffTypeRadioGroup.selected != FORMAT_UNIFIED) >+ >+ protected void updateEnablements() { >+ if(diffTypeRadioGroup.getSelected() != FORMAT_UNIFIED) > setEnableUnifiedGroup(false); > } >- >+ > public void updateDiffTypeEnablements(int[] disabled, int enabled) { > diffTypeRadioGroup.setEnablement(false, disabled, enabled); > } >@@ -1044,17 +1061,16 @@ > unifiedRadioGroup.setEnablement(enabled, new int[] { > ROOT_WORKSPACE, ROOT_PROJECT, ROOT_SELECTION }); > } >- > } > > /** > * Class to retrieve and store the default selected values. > */ >- protected final class DefaultValuesStore { >+ private final class DefaultValuesStore { > >- private static final String PREF_LAST_SELECTION = "org.eclipse.compare.internal.GenerateDiffFileWizard.PatchFileSelectionPage.lastselection"; //$NON-NLS-1$ >- private static final String PREF_LAST_FS_PATH = "org.eclipse.compare.internal.GenerateDiffFileWizard.PatchFileSelectionPage.filesystem.path"; //$NON-NLS-1$ >- private static final String PREF_LAST_WS_PATH = "org.eclipse.compare.internal.GenerateDiffFileWizard.PatchFileSelectionPage.workspace.path"; //$NON-NLS-1$ >+ private static final String PREF_LAST_SELECTION= "org.eclipse.compare.internal.GenerateDiffFileWizard.PatchFileSelectionPage.lastselection"; //$NON-NLS-1$ >+ private static final String PREF_LAST_FS_PATH= "org.eclipse.compare.internal.GenerateDiffFileWizard.PatchFileSelectionPage.filesystem.path"; //$NON-NLS-1$ >+ private static final String PREF_LAST_WS_PATH= "org.eclipse.compare.internal.GenerateDiffFileWizard.PatchFileSelectionPage.workspace.path"; //$NON-NLS-1$ > private static final String PREF_LAST_AO_FORMAT = "org.eclipse.compare.internal.GenerateDiffFileWizard.OptionsPage.diff.format"; //$NON-NLS-1$ > private static final String PREF_LAST_AO_ROOT = "org.eclipse.compare.internal.GenerateDiffFileWizard.OptionsPage.patch.root"; //$NON-NLS-1$ > >@@ -1069,7 +1085,7 @@ > try { > value= dialogSettings.getInt(PREF_LAST_SELECTION); > } catch (NumberFormatException e) { >- // do nothing >+ // ignore > } > > switch (value) { >@@ -1170,7 +1186,7 @@ > super(); > setWindowTitle(CompareMessages.GenerateLocalDiff_title); > initializeDefaultPageImageDescriptor(); >- defaultValuesStore = new DefaultValuesStore(); >+ defaultValuesStore= new DefaultValuesStore(); > } > > public GenerateDiffFileWizard(DocumentMerger merger, boolean rightToLeft) { >@@ -1230,10 +1246,6 @@ > this.setMessage(null); > } > >- protected void performSpecificActions() { >- createCustomRelativeControl(); >- } >- > protected void updateEnablements() { > diffTypeRadioGroup.setEnablement(false, new int[] { FORMAT_CONTEXT, > FORMAT_STANDARD }, FORMAT_UNIFIED); >@@ -1246,6 +1258,14 @@ > ROOT_WORKSPACE, ROOT_PROJECT, ROOT_SELECTION }); > } > >+ public void createControl(Composite parent) { >+ super.createControl(parent); >+ createCustomRelativeControl(); >+ updateEnablements(); >+ diffTypeRadioGroup.selectEnabledOnly(); >+ unifiedRadioGroup.selectEnabledOnly(); >+ } >+ > private void createCustomRelativeControl() { > unified_customRelativeOption = new Button(unifiedGroup, SWT.RADIO); > unified_customRelativeOption.setText(CompareMessages.GenerateDiffFileWizard_13); >@@ -1281,7 +1301,7 @@ > } > > /** >- * Declares the wizard banner image descriptor >+ * Declares the wizard banner iamge descriptor > */ > protected void initializeDefaultPageImageDescriptor() { > final String iconPath= "icons/full/"; //$NON-NLS-1$ >@@ -1295,22 +1315,20 @@ > } > } > >- /* >- * (non-Javadoc) >- * >- * @see org.eclipse.jface.wizard.Wizard#needsProgressMonitor() >+ /* (Non-javadoc) >+ * Method declared on IWizard. > */ > public boolean needsProgressMonitor() { > return true; > } > >- /* >- * (non-Javadoc) >- * >- * @see org.eclipse.jface.wizard.Wizard#performFinish() >+ /** >+ * Completes processing of the wizard. If this method returns <code> >+ * true</code>, the wizard will close; otherwise, it will stay active. > */ > public boolean performFinish() { >- final int location = locationPage.getSelectedLocation(); >+ >+ final int location= locationPage.getSelectedLocation(); > > final File file= location != LocationPage.CLIPBOARD? locationPage.getFile() : null; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 270569
: 130552 |
130675
|
131921