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 16540 Details for
Bug 80478
Option To Automatically refresh compare/replace with another branch or version dialog
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for org.eclipse.team.cvs.ui
org.eclipse.team.cvs.ui.patch (text/plain), 12.87 KB, created by
Dani Megert
on 2004-12-12 12:20:57 EST
(
hide
)
Description:
Patch for org.eclipse.team.cvs.ui
Filename:
MIME Type:
Creator:
Dani Megert
Created:
2004-12-12 12:20:57 EST
Size:
12.87 KB
patch
obsolete
>Index: src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java,v >retrieving revision 1.49 >diff -u -r1.49 CVSPreferencesPage.java >--- src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java 27 Aug 2004 17:08:08 -0000 1.49 >+++ src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java 12 Dec 2004 17:06:28 -0000 >@@ -59,6 +59,7 @@ > private Button determineVersionEnabled; > private Button confirmMoveTag; > private Button debugProtocol; >+ private Button autoRefreshTags; > > private Button never; > private Button prompt; >@@ -171,6 +172,7 @@ > confirmMoveTag = createCheckBox(composite, Policy.bind("CVSPreferencePage.confirmMoveTag")); //$NON-NLS-1$ > debugProtocol = createCheckBox(composite, Policy.bind("CVSPreferencePage.debugProtocol")); //$NON-NLS-1$ > usePlatformLineend = createCheckBox(composite, Policy.bind("CVSPreferencePage.lineend")); //$NON-NLS-1$ >+ autoRefreshTags = createCheckBox(composite, Policy.bind("CVSPreferencePage.autoRefreshTags")); //$NON-NLS-1$ > > createLabel(composite, ""); createLabel(composite, ""); //$NON-NLS-1$ //$NON-NLS-2$ > >@@ -239,6 +241,7 @@ > WorkbenchHelp.setHelp(repositoriesAreBinary, IHelpContextIds.PREF_TREAT_NEW_FILE_AS_BINARY); > WorkbenchHelp.setHelp(determineVersionEnabled, IHelpContextIds.PREF_DETERMINE_SERVER_VERSION); > WorkbenchHelp.setHelp(confirmMoveTag, IHelpContextIds.PREF_CONFIRM_MOVE_TAG); >+ WorkbenchHelp.setHelp(autoRefreshTags, IHelpContextIds.PREF_AUTOREFRESH_TAG); > Dialog.applyDialogFont(parent); > return composite; > } >@@ -297,6 +300,7 @@ > determineVersionEnabled.setSelection(store.getBoolean(ICVSUIConstants.PREF_DETERMINE_SERVER_VERSION)); > confirmMoveTag.setSelection(store.getBoolean(ICVSUIConstants.PREF_CONFIRM_MOVE_TAG)); > debugProtocol.setSelection(store.getBoolean(ICVSUIConstants.PREF_DEBUG_PROTOCOL)); >+ autoRefreshTags.setSelection(store.getBoolean(ICVSUIConstants.PREF_AUTO_REFRESH_TAGS_IN_TAG_SELECTION_DIALOG)); > > initializeSaveRadios(store.getInt(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS)); > } >@@ -340,6 +344,7 @@ > store.setValue(ICVSUIConstants.PREF_DETERMINE_SERVER_VERSION, determineVersionEnabled.getSelection()); > store.setValue(ICVSUIConstants.PREF_CONFIRM_MOVE_TAG, confirmMoveTag.getSelection()); > store.setValue(ICVSUIConstants.PREF_DEBUG_PROTOCOL, debugProtocol.getSelection()); >+ store.setValue(ICVSUIConstants.PREF_AUTO_REFRESH_TAGS_IN_TAG_SELECTION_DIALOG, autoRefreshTags.getSelection()); > > CVSProviderPlugin.getPlugin().setReplaceUnmanaged( > store.getBoolean(ICVSUIConstants.PREF_REPLACE_UNMANAGED)); >@@ -391,6 +396,7 @@ > repositoriesAreBinary.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_REPOSITORIES_ARE_BINARY)); > confirmMoveTag.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_CONFIRM_MOVE_TAG)); > debugProtocol.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_DEBUG_PROTOCOL)); >+ autoRefreshTags.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_AUTO_REFRESH_TAGS_IN_TAG_SELECTION_DIALOG)); > } > > private void createSaveCombo(Composite composite) { >Index: src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java,v >retrieving revision 1.154 >diff -u -r1.154 CVSUIPlugin.java >--- src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java 10 Dec 2004 21:50:18 -0000 1.154 >+++ src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java 12 Dec 2004 17:06:29 -0000 >@@ -606,6 +606,7 @@ > store.setDefault(ICVSUIConstants.PREF_SHOW_COMPARE_REVISION_IN_DIALOG, false); > store.setDefault(ICVSUIConstants.PREF_SHOW_AUTHOR_IN_EDITOR, false); > store.setDefault(ICVSUIConstants.PREF_COMMIT_SET_DEFAULT_ENABLEMENT, false); >+ store.setDefault(ICVSUIConstants.PREF_AUTO_REFRESH_TAGS_IN_TAG_SELECTION_DIALOG, false); > > PreferenceConverter.setDefault(store, ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR, new RGB(0, 0, 0)); > PreferenceConverter.setDefault(store, ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR, new RGB(0, 0, 255)); >Index: src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java,v >retrieving revision 1.81 >diff -u -r1.81 ICVSUIConstants.java >--- src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java 11 Dec 2004 03:59:55 -0000 1.81 >+++ src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java 12 Dec 2004 17:06:29 -0000 >@@ -91,6 +91,7 @@ > public final String PREF_SHOW_COMPARE_REVISION_IN_DIALOG = "pref_show_compare_revision_in_dialog"; //$NON-NLS-1$ > public final String PREF_SHOW_AUTHOR_IN_EDITOR = "pref_show_author_in_editor"; //$NON-NLS-1$ > public final String PREF_COMMIT_SET_DEFAULT_ENABLEMENT = "pref_enable_commit_sets"; //$NON-NLS-1$ >+ public final String PREF_AUTO_REFRESH_TAGS_IN_TAG_SELECTION_DIALOG = "pref_auto_refresh_tags_in_tag_selection_dialog"; //$NON-NLS-1$ > > // console preferences > public final String PREF_CONSOLE_COMMAND_COLOR = "pref_console_command_color"; //$NON-NLS-1$ >Index: src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java,v >retrieving revision 1.47 >diff -u -r1.47 IHelpContextIds.java >--- src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java 13 Sep 2004 19:13:11 -0000 1.47 >+++ src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java 12 Dec 2004 17:06:30 -0000 >@@ -86,6 +86,7 @@ > public static final String PREF_TREAT_NEW_FILE_AS_BINARY = PREFIX + "treat_new_files_as_binary_pref"; //$NON-NLS-1$ > public static final String PREF_DETERMINE_SERVER_VERSION = PREFIX + "determine_server_version"; //$NON-NLS-1$ > public static final String PREF_CONFIRM_MOVE_TAG = PREFIX + "confirm_move_tag"; //$NON-NLS-1$ >+ public static final String PREF_AUTOREFRESH_TAG = PREFIX + "auto_refresh_tag"; //$NON-NLS-1$ > > public static final String CONSOLE_PREFERENCE_PAGE = PREFIX + "console_preference_page_context"; //$NON-NLS-1$ > public static final String EXT_PREFERENCE_PAGE = PREFIX + "ext_preference_page_context"; //$NON-NLS-1$ >Index: src/org/eclipse/team/internal/ccvs/ui/messages.properties >=================================================================== >RCS file: /home/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties,v >retrieving revision 1.388 >diff -u -r1.388 messages.properties >--- src/org/eclipse/team/internal/ccvs/ui/messages.properties 10 Dec 2004 21:50:18 -0000 1.388 >+++ src/org/eclipse/team/internal/ccvs/ui/messages.properties 12 Dec 2004 17:06:33 -0000 >@@ -222,6 +222,7 @@ > CVSPreferencePage.level8=8 > CVSPreferencePage.level9=9 (highest compression) > CVSPreferencePage.lineend=Con&vert text files to use platform line ending >+CVSPreferencePage.autoRefreshTags=R&efresh tags when comparing or replacing tags from another branch or version > CVSPreferencePage.Save_dirty_editors_before_CVS_operations_1=Save dirty editors before CVS operations > CVSPreferencePage.&Never_2=&Never > CVSPreferencePage.&Prompt_3=P&rompt >@@ -734,6 +735,13 @@ > TagSelectionDialog.recurseOption=Recurse into sub-&folders > TagSelectionDialog.0=&Add Date... > TagSelectionDialog.1=&Remove >+TagSelectionDialog.2=No Tags Found >+TagSelectionDialog.3=Perform Deep Search >+TagSelectionDialog.4=Configure Manually >+TagSelectionDialog.5=Cancel >+TagSelectionDialog.6=Tags were not found for {0} using the auto-refresh files and a shallow cvs log operation. You can choose to search using a deep cvs log operation, to manually configure the tags or to cancel. >+TagSelectionDialog.7=Refreshing tags >+ > TagSelectionArea.0=&Matching tags: > TagSelectionArea.1={0}: > TagSelectionArea.2={0} (? = any character, * = any String): >Index: src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java,v >retrieving revision 1.3 >diff -u -r1.3 TagSelectionDialog.java >--- src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java 22 Nov 2004 20:10:59 -0000 1.3 >+++ src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java 12 Dec 2004 17:06:34 -0000 >@@ -10,16 +10,30 @@ > *******************************************************************************/ > package org.eclipse.team.internal.ccvs.ui.tags; > >- >+ > import org.eclipse.jface.dialogs.Dialog; > import org.eclipse.jface.dialogs.IDialogConstants; >+import org.eclipse.jface.dialogs.MessageDialog; > import org.eclipse.jface.util.IPropertyChangeListener; > import org.eclipse.jface.util.PropertyChangeEvent; >+import org.eclipse.jface.window.Window; >+ > import org.eclipse.swt.SWT; >+import org.eclipse.swt.events.DisposeEvent; >+import org.eclipse.swt.events.DisposeListener; > import org.eclipse.swt.graphics.Point; > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.widgets.*; >+ >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.core.runtime.jobs.Job; >+ >+import org.eclipse.team.core.TeamException; > import org.eclipse.team.internal.ccvs.core.CVSTag; >+import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin; >+import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants; > import org.eclipse.team.internal.ccvs.ui.IHelpContextIds; > import org.eclipse.team.internal.ccvs.ui.Policy; > >@@ -147,7 +161,7 @@ > * Subclasses should override. > * </p> > * >- * @param the parent composite to contain the dialog area >+ * @param parent the parent composite to contain the dialog area > * @return the dialog area control > */ > protected Control createDialogArea(Composite parent) { >@@ -220,6 +234,8 @@ > */ > protected void initialize() { > okButton.setEnabled(false); >+ if (CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_AUTO_REFRESH_TAGS_IN_TAG_SELECTION_DIALOG)) >+ refreshFromRepository(); > } > > >@@ -243,5 +259,76 @@ > } else if (property.equals(TagSelectionArea.OPEN_SELECTED_TAG)) { > okPressed(); > } >+ } >+ >+ /** >+ * Refreshes the tags from the repository. >+ * >+ * @since 3.1 >+ */ >+ private void refreshFromRepository() { >+ final Job refreshJob = new Job(Policy.bind("TagSelectionDialog.7")) { //$NON-NLS-1$ >+ protected IStatus run(IProgressMonitor monitor) { >+ CVSTag[] tags; >+ try { >+ if (monitor.isCanceled()) >+ return Status.CANCEL_STATUS; >+ tags= tagSource.refresh(false, Policy.subMonitorFor(monitor, 70)); >+ if (tags.length == 0 && !monitor.isCanceled() && promptForBestEffort()) { >+ if (!monitor.isCanceled()) >+ tagSource.refresh(true, Policy.subMonitorFor(monitor, 30)); >+ } >+ } catch (TeamException e) { >+ return e.getStatus(); >+ } >+ if (monitor.isCanceled()) >+ return Status.CANCEL_STATUS; >+ else >+ return Status.OK_STATUS; >+ } >+ }; >+ refreshJob.setUser(true); >+ refreshJob.setPriority(Job.DECORATE); >+ getShell().addDisposeListener(new DisposeListener() { >+ /* (non-Javadoc) >+ * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent) >+ */ >+ public void widgetDisposed(DisposeEvent e) { >+ refreshJob.cancel(); >+ } >+ }); >+ refreshJob.schedule(); >+ } >+ >+ /** >+ * Prompts the user in cases where no tags could be found. >+ * >+ * @return <code>true</code> if not canceled >+ * @since 3.1 >+ */ >+ private boolean promptForBestEffort() { >+ final boolean[] prompt = new boolean[] { false }; >+ getShell().getDisplay().syncExec(new Runnable() { >+ public void run() { >+ MessageDialog dialog = new MessageDialog( >+ getShell(), >+ Policy.bind("TagSelectionDialog.2"), null, //$NON-NLS-1$ >+ Policy.bind("TagSelectionDialog.6", tagSource.getShortDescription()), //$NON-NLS-1$ >+ MessageDialog.INFORMATION, >+ new String[] { >+ Policy.bind("TagSelectionDialog.3"), //$NON-NLS-1$ >+ Policy.bind("TagSelectionDialog.4"), //$NON-NLS-1$ >+ Policy.bind("TagSelectionDialog.5") //$NON-NLS-1$ >+ }, 1); >+ int code = dialog.open(); >+ if (code == Window.OK) { >+ prompt[0] = true; >+ } else if (code == 1) { >+ TagConfigurationDialog d = new TagConfigurationDialog(getShell(), tagSource); >+ d.open(); >+ } >+ } >+ }); >+ return prompt[0]; > } > }
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 80478
: 16540 |
16541