Menu

Right Click Actions

a_lazar
2009-03-16
2013-04-29
  • a_lazar

    a_lazar - 2009-03-16

    I have two questions about adding actions:

    1) as a contributor, am I responsible for adding/finding the pictures used in menus for the actions?

    2) where are the files located that keep all of the menu labels for the actions (such as "generate select statement")

    Thanks.

     
    • Johan Compagner

      Johan Compagner - 2009-03-17

      if you as a contributor add actions through your own plugin then those plugins should have the icons (if you want icons)

      mostly they are in the /icons dir in the root of the plugin.

       
    • a_lazar

      a_lazar - 2009-03-17

      Not to be rude, but does anybody know the answer to my second question about where the action labels are kept?

      Thanks.

       
    • Heiko Hilbert

      Heiko Hilbert - 2009-03-18

      The icon for your action is defined in the plugin.xml/fragment.xml.
      All the Strings displayed in the GUI are externalized in a property file called text.properties.
      Each fragment has these file in the package according to the plugin/fragment id.

      For example in the mysql plugin there is a CreateTableScriptAction. In the fragment.xml it is declared as:

         <extension
               point="net.sourceforge.sqlexplorer.nodeContextAction">
            <action
                  class="net.sourceforge.sqlexplorer.mysql.actions.CreateTableScriptAction"
                  database-product-name="MySQL*"
                  icon="icons/create_table.gif"
                  id="net.sourceforge.sqlexplorer.mysql.createTableScript"
                  name="Create Table Script"
                  node-type="table"/>
         </extension>

      The text for the actions label is stored in:

      src/net/sourceforge/sqlexplorer/mysql/text.properties

      It is retrieved using the Messages class:

          public String getText() {

              return Messages.getString("mysql.DatabaseStructureView.Action.CreateTableScript");
          }

      HTH

       

Log in to post a comment.