1 package org.robsite.extension.rss; 2 3 import oracle.ide.Ide; 4 import oracle.ide.IdeAction; 5 6 /*** 7 * Contains constants for command IDs used by this extension, and a couple of 8 * utilities for getting instances of IdeAction for those commands. 9 * 10 * @author brian_duff@sourceforge.net 11 * @version $Revision: 1.1.1.1 $ 12 */ 13 public final class Commands 14 { 15 /*** 16 * This class cannot be constructed. 17 */ 18 private Commands() 19 { 20 } 21 22 private static final String BASE = "RSSNewsFeed."; 23 24 /*** 25 * The "Mark as Read" command ID. 26 */ 27 public static final String MARK_AS_READ = BASE + "MarkAsRead"; 28 29 /*** 30 * The "Open in Browser" command ID. 31 */ 32 public static final String OPEN_IN_BROWSER = BASE + "OpenInBrowser"; 33 34 /*** 35 * The "Check RSS News" command ID for the Help menu. 36 */ 37 public static final String VIEW_NEWS_DOCKABLE = BASE + "ViewNewsDockable"; 38 39 /*** 40 * The "RSS News" command ID for the View menu. 41 */ 42 public static final String VIEW_NEWS_DOCKABLE_VIEW = BASE + "ViewNewsDockableViewMenu"; 43 44 /*** 45 * Get an IDE action for the specified command id. 46 * 47 * @param name one of the constant command names defined in this class. 48 * @return the IdeAction for that command. 49 */ 50 public static IdeAction getAction( String name ) 51 { 52 return IdeAction.find( id( name ) ); 53 } 54 55 /*** 56 * Get the numeric id of the specified command. 57 * 58 * @param name one of the constant command names defined in this class. 59 * @return the id of the specified command. 60 */ 61 public static final int id( String name ) 62 { 63 return Ide.findOrCreateCmdID( name ); 64 } 65 }