1 11 package org.eclipse.team.internal.ui.synchronize.actions; 12 13 import org.eclipse.jface.action.Action; 14 import org.eclipse.jface.preference.PreferencePage; 15 import org.eclipse.team.internal.ui.IHelpContextIds; 16 import org.eclipse.team.internal.ui.Utils; 17 import org.eclipse.team.internal.ui.dialogs.PreferencePageContainerDialog; 18 import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration; 19 20 public class SyncViewerShowPreferencesAction extends Action { 21 private final ISynchronizePageConfiguration configuration; 22 23 public SyncViewerShowPreferencesAction(ISynchronizePageConfiguration configuration) { 24 this.configuration = configuration; 25 Utils.initAction(this, "action.syncViewPreferences."); } 27 28 public void run() { 29 PreferencePage[] pages = configuration.getParticipant().getPreferencePages(); 30 PreferencePageContainerDialog dialog = new PreferencePageContainerDialog(configuration.getSite().getShell(), pages); 31 dialog.setHelpContextId(IHelpContextIds.SYNC_VIEW_PREFERENCE_DIALOG); 32 dialog.setBlockOnOpen(true); 33 dialog.open(); 34 } 35 } 36 | Popular Tags |