1 19 20 package org.netbeans.modules.refactoring.api.ui; 21 22 import java.awt.event.ActionEvent ; 23 import javax.swing.Action ; 24 import org.netbeans.modules.refactoring.spi.impl.*; 25 import org.openide.util.ContextAwareAction; 26 27 41 public final class RefactoringActionsFactory { 42 43 46 public static final ActionEvent DEFAULT_EVENT = new ActionEvent (new Object (), 0, null) { 47 public void setSource(Object newSource) { 48 throw new UnsupportedOperationException (); 49 } 50 }; 51 52 private RefactoringActionsFactory(){} 53 54 55 59 public static ContextAwareAction renameAction() { 60 return RenameAction.findObject(RenameAction.class, true); 61 } 62 63 67 public static ContextAwareAction moveAction() { 68 return MoveAction.findObject(MoveAction.class, true); 69 } 70 71 75 public static ContextAwareAction safeDeleteAction() { 76 return SafeDeleteAction.findObject(SafeDeleteAction.class, true); 77 } 78 79 83 public static ContextAwareAction copyAction() { 84 return SafeDeleteAction.findObject(CopyAction.class, true); 85 } 86 87 91 public static ContextAwareAction whereUsedAction() { 92 return WhereUsedAction.findObject(WhereUsedAction.class, true); 93 } 94 95 99 public static Action editorSubmenuAction() { 100 return RSMEditorAction.findObject(RSMEditorAction.class, true); 101 } 102 103 107 public static ContextAwareAction popupSubmenuAction() { 108 return RSMDataObjectAction.findObject(RSMDataObjectAction.class, true); 109 } 110 } 111 | Popular Tags |