1 20 21 package org.apache.directory.ldapstudio.schemas.controller.actions; 22 23 24 import org.apache.directory.ldapstudio.schemas.Messages; 25 import org.apache.directory.ldapstudio.schemas.PluginConstants; 26 import org.apache.directory.ldapstudio.schemas.view.preferences.HierarchyViewPreferencePage; 27 import org.eclipse.jface.action.Action; 28 import org.eclipse.swt.widgets.Display; 29 import org.eclipse.swt.widgets.Shell; 30 import org.eclipse.ui.dialogs.PreferencesUtil; 31 32 33 39 public class OpenHierarchyViewPreferencesAction extends Action 40 { 41 44 public OpenHierarchyViewPreferencesAction() 45 { 46 super( Messages.getString( "OpenHierarchyViewPreferencesAction.Preferences..." ) ); setToolTipText( getText() ); 48 setId( PluginConstants.CMD_HIERARCHY_VIEW_PREFERENCES ); 49 setEnabled( true ); 50 } 51 52 53 56 public void run() 57 { 58 Shell shell = Display.getCurrent().getActiveShell(); 59 PreferencesUtil.createPreferenceDialogOn( shell, HierarchyViewPreferencePage.ID, new String [] 60 { HierarchyViewPreferencePage.ID }, null ).open(); 61 } 62 } 63 | Popular Tags |