Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2004-05-03 11:52:39 -0400
committerJean Michel-Lemieux2004-05-03 11:52:39 -0400
commit776e65c4c9333977d8797f90baeee3fbefde4a2b (patch)
tree6d589ad40a8abb204e1544959fcf68ae70b5151b
parent205b72690a34c256d9450fc2b4fbec31a3a984ce (diff)
downloadeclipse.platform.team-776e65c4c9333977d8797f90baeee3fbefde4a2b.tar.gz
eclipse.platform.team-776e65c4c9333977d8797f90baeee3fbefde4a2b.tar.xz
eclipse.platform.team-776e65c4c9333977d8797f90baeee3fbefde4a2b.zip
Removed prompting preferences. Prompting only occurs when operation is modal.
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java33
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java9
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java163
4 files changed, 19 insertions, 192 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java
index 79b20146e..de2228cdb 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java
@@ -13,27 +13,30 @@ package org.eclipse.team.internal.ui;
public interface IPreferenceIds {
public static final String PREFIX = TeamUIPlugin.ID + "."; //$NON-NLS-1$
- // Sync Viewer
+ /*
+ * Default model provider layout to use with SubscriberSynchronizePage. The user can configure but this
+ * is used to select the initial layout.
+ */
public static final String SYNCVIEW_COMPRESS_FOLDERS = PREFIX + "compress_folders"; //$NON-NLS-1$
- public static final String SYNCVIEW_SELECTED_MODE = PREFIX + "syncview_selected_mode"; //$NON-NLS-1$
-
- public static final String SYNCVIEW_DEFAULT_PERSPECTIVE = PREFIX + "syncview_default_perspective"; //$NON-NLS-1$
- public static final String SYNCVIEW_DEFAULT_PERSPECTIVE_NONE = PREFIX + "sync_view_perspective_none"; //$NON-NLS-1$
+ /*
+ * Preference to enable displaying synchronization state in the elements label. This
+ * preference is used automatically with {@link StructuredViewerAdvisor}.
+ */
public static final String SYNCVIEW_VIEW_SYNCINFO_IN_LABEL = PREFIX + "view_syncinfo_in_label"; //$NON-NLS-1$
- public static final String SYNCVIEW_VIEW_PROMPT_WHEN_NO_CHANGES = PREFIX + "syncview_promptwhennochanges"; //$NON-NLS-1$
- public static final String SYNCVIEW_VIEW_PROMPT_WITH_CHANGES = PREFIX + "syncview_promptwithchanges"; //$NON-NLS-1$
-
- public static final String SYNCVIEW_VIEW_BKG_PROMPT_WHEN_NO_CHANGES = PREFIX + "syncview__bkg_promptwhennochanges"; //$NON-NLS-1$
- public static final String SYNCVIEW_VIEW_BKG_PROMPT_WITH_CHANGES = PREFIX + "syncview_bkg_promptwithchanges"; //$NON-NLS-1$
-
- public static final String SYNCHRONIZING_DEFAULT_PARTICIPANT = PREFIX + "sychronizing_default_participant"; //$NON-NLS-1$
- public static final String SYNCHRONIZING_COMPLETE_SHOW_DIALOG = PREFIX + "sychronizing_dontshow_complete_dialog"; //$NON-NLS-1$
- public static final String SYNCHRONIZING_SCHEDULED_COMPLETE_SHOW_DIALOG = PREFIX + "sychronizing_scheduled_dontshow_complete_dialog"; //$NON-NLS-1$
-
+ /*
+ * Preference to manage the perspective used to synchronize.
+ */
+ public static final String SYNCVIEW_DEFAULT_PERSPECTIVE = PREFIX + "syncview_default_perspective"; //$NON-NLS-1$
+ public static final String SYNCVIEW_DEFAULT_PERSPECTIVE_NONE = PREFIX + "sync_view_perspective_none"; //$NON-NLS-1$
public static final String SYNCHRONIZING_COMPLETE_PERSPECTIVE = PREFIX + "sychronizing_default_perspective_to_show"; //$NON-NLS-1$
public static final String SYNCHRONIZING_COMPLETE_PERSPECTIVE_PROMPT = PREFIX + "sychronizing_default_perspective_to_show_prompt"; //$NON-NLS-1$
public static final String SYNCHRONIZING_COMPLETE_PERSPECTIVE_ALWAYS = PREFIX + "sychronizing_default_perspective_to_show_always"; //$NON-NLS-1$
public static final String SYNCHRONIZING_COMPLETE_PERSPECTIVE_NEVER = PREFIX + "sychronizing_default_perspective_to_show_never"; //$NON-NLS-1$
+
+ /*
+ * Preference to save the last participant selected via the global synchronize action.
+ */
+ public static final String SYNCHRONIZING_DEFAULT_PARTICIPANT = PREFIX + "sychronizing_default_participant"; //$NON-NLS-1$
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
index aa8b09483..a04c37162 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
@@ -129,13 +129,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
store.setDefault(IPreferenceIds.SYNCVIEW_VIEW_SYNCINFO_IN_LABEL, false);
store.setDefault(IPreferenceIds.SYNCVIEW_COMPRESS_FOLDERS, true);
store.setDefault(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE, TeamSynchronizingPerspective.ID);
- store.setDefault(IPreferenceIds.SYNCVIEW_VIEW_PROMPT_WHEN_NO_CHANGES, true);
- store.setDefault(IPreferenceIds.SYNCVIEW_VIEW_PROMPT_WITH_CHANGES, true);
- store.setDefault(IPreferenceIds.SYNCVIEW_VIEW_BKG_PROMPT_WHEN_NO_CHANGES, false);
- store.setDefault(IPreferenceIds.SYNCVIEW_VIEW_BKG_PROMPT_WITH_CHANGES, true);
store.setDefault(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT, GlobalRefreshAction.NO_DEFAULT_PARTICPANT);
- store.setDefault(IPreferenceIds.SYNCHRONIZING_COMPLETE_SHOW_DIALOG, true);
- store.setDefault(IPreferenceIds.SYNCHRONIZING_SCHEDULED_COMPLETE_SHOW_DIALOG, true);
store.setDefault(IPreferenceIds.SYNCHRONIZING_COMPLETE_PERSPECTIVE, IPreferenceIds.SYNCHRONIZING_COMPLETE_PERSPECTIVE_PROMPT); //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java
index 7f9a1d84d..a618039e4 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java
@@ -13,7 +13,6 @@ package org.eclipse.team.internal.ui.preferences;
import java.text.Collator;
import java.text.DateFormat;
import java.util.*;
-
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.preference.*;
import org.eclipse.jface.util.PropertyChangeEvent;
@@ -31,8 +30,6 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
private BooleanFieldEditor compressFolders = null;
private BooleanFieldEditor showSyncInLabels = null;
- private BooleanFieldEditor promptAtEndOfSynchronize = null;
- private BooleanFieldEditor promptAtEndOfSchduledSynchronize = null;
private BooleanFieldEditor useDefaultPerspective = null;
private RadioGroupFieldEditor synchronizePerspectiveSwitch = null;
@@ -73,11 +70,7 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
addField(compressFolders);
showSyncInLabels = new BooleanFieldEditor(SYNCVIEW_VIEW_SYNCINFO_IN_LABEL, Policy.bind("SyncViewerPreferencePage.19"), SWT.NONE, getFieldEditorParent()); //$NON-NLS-1$
addField(showSyncInLabels);
- promptAtEndOfSynchronize = new BooleanFieldEditor(SYNCHRONIZING_COMPLETE_SHOW_DIALOG, Policy.bind("SyncViewerPreferencePage.31"), SWT.NONE, getFieldEditorParent()); //$NON-NLS-1$
- addField(promptAtEndOfSynchronize);
- promptAtEndOfSchduledSynchronize = new BooleanFieldEditor(SYNCHRONIZING_SCHEDULED_COMPLETE_SHOW_DIALOG, Policy.bind("SyncViewerPreferencePage.12"), SWT.NONE, getFieldEditorParent()); //$NON-NLS-1$
- addField(promptAtEndOfSchduledSynchronize);
-
+
synchronizePerspectiveSwitch= new RadioGroupFieldEditor(SYNCHRONIZING_COMPLETE_PERSPECTIVE, Policy.bind("SyncViewerPreferencePage.13"), 3, //$NON-NLS-1$
new String[][] {
{Policy.bind("SyncViewerPreferencePage.14"), SYNCHRONIZING_COMPLETE_PERSPECTIVE_ALWAYS}, //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java
deleted file mode 100644
index 4c34d0ab5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshCompleteDialog.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-
-/**
- * A dialog that is displayed at the end of a synchronize. The dialog shows the result of
- * the synchronize operation. A details area is shown if there are new changes found,
- * otherwise a message displays the current changes in the given participant.
- *
- * @since 3.0
- */
-public class RefreshCompleteDialog extends DetailsDialog {
- private IRefreshEvent event;
- private SubscriberParticipant participant;
- private Button dontShowAgainButton;
- private SyncInfoTree syncInfoSet = new SyncInfoTree();
-
- public RefreshCompleteDialog(Shell parentShell, IRefreshEvent event, SubscriberParticipant participant) {
- super(parentShell,
- event.getRefreshType() == IRefreshEvent.SCHEDULED_REFRESH ?
- Policy.bind("RefreshCompleteDialog.4a", participant.getName()) : //$NON-NLS-1$
- Policy.bind("RefreshCompleteDialog.4", participant.getName()) //$NON-NLS-1$
- );
- this.participant = participant;
- int shellStyle = getShellStyle();
- setShellStyle(shellStyle | SWT.RESIZE | SWT.MAX);
- this.event = event;
- setImageKey(DLG_IMG_INFO);
- IDialogSettings workbenchSettings = TeamUIPlugin.getPlugin().getDialogSettings();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- super.createButtonsForButtonBar(parent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createDropDownDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createDropDownDialogArea(Composite parent) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createMainDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected void createMainDialogArea(Composite parent) {
- IStatus status = event.getStatus();
- if(status.getSeverity() == IStatus.INFO) {
- createLabel(parent, status.getMessage(), 2);
- }
-
- dontShowAgainButton = new Button(parent, SWT.CHECK);
- dontShowAgainButton.setText(Policy.bind("RefreshCompleteDialog.22")); //$NON-NLS-1$
-
- initializeSettings();
- Dialog.applyDialogFont(parent);
- }
-
- protected SyncInfoSet getSubscriberSyncInfoSet() {
- return participant.getSubscriberSyncInfoCollector().getSyncInfoSet();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeCancelButton()
- */
- protected boolean includeCancelButton() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeDetailsButton()
- */
- protected boolean includeDetailsButton() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeErrorMessage()
- */
- protected boolean includeErrorMessage() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- if(dontShowAgainButton != null) {
- if(event.getRefreshType() == IRefreshEvent.USER_REFRESH) {
- TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_COMPLETE_SHOW_DIALOG, ! dontShowAgainButton.getSelection());
- } else {
- TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_SCHEDULED_COMPLETE_SHOW_DIALOG, ! dontShowAgainButton.getSelection());
- }
- }
- TeamUIPlugin.getPlugin().savePluginPreferences();
- super.okPressed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#updateEnablements()
- */
- protected void updateEnablements() {
- }
-
- private Label createLabel(Composite parent, String text, int columns) {
- Label label = new Label(parent, SWT.WRAP);
- label.setText(text);
- GridData data =
- new GridData(
- GridData.GRAB_HORIZONTAL
- | GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_BEGINNING);
- data.widthHint =
- convertHorizontalDLUsToPixels(
- IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
- data.horizontalSpan = columns;
- label.setLayoutData(data);
- return label;
- }
-
- private IResource[] getResources() {
- SyncInfo[] changes = event.getChanges();
- IResource[] resources = new IResource[changes.length];
- for (int i = 0; i < changes.length; i++) {
- SyncInfo info = changes[i];
- resources[i] = info.getLocal();
- }
- return resources;
- }
-
- private void initializeSettings() {
- if(dontShowAgainButton != null) {
- if(event.getRefreshType() == IRefreshEvent.USER_REFRESH) {
- dontShowAgainButton.setSelection(! TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCHRONIZING_COMPLETE_SHOW_DIALOG));
- } else {
- dontShowAgainButton.setSelection(! TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCHRONIZING_SCHEDULED_COMPLETE_SHOW_DIALOG));
- }
- }
- }
-} \ No newline at end of file

Back to the top