Package net.sourceforge.squirrel_sql.client

Examples of net.sourceforge.squirrel_sql.client.IApplication


    public synchronized void initialize() throws PluginException
    {
       try
       {
          super.initialize();
          final IApplication app = getApplication();


          Class<?> com_apple_eawt_Application;
          try
          {
View Full Code Here


         createGUI(session, stayOnTop);
      }

      private void createGUI(ISession session, boolean stayOnTop)
      {
         IApplication app = session.getApplication();
         setUseRolloverButtons(true);
         setFloatable(false);
         add(new GetInvalidObjectsAction(app, _resources, _invalidObjectsPanel));

         addStayOnTop(stayOnTop);
View Full Code Here

   */
  public void initialize() throws PluginException
  {
    super.initialize();

    final IApplication app = getApplication();

    // Load resources.
    _resources = new Resources(this);

    createMenu();
View Full Code Here

    return _resources;
  }

   private void createMenu()
  {
    IApplication app = getApplication();
    ActionCollection coll = app.getActionCollection();

    JMenu menu = _resources.createMenu(IMenuResourceKeys.MENU);
    app.addToMenu(IApplication.IMenuIDs.SESSION_MENU, menu);

    Action act = new InQuotesAction(app, this);
    coll.add(act);
    _resources.addToMenu(act, menu);
View Full Code Here

         createGUI(session, stayOnTop, autoRefeshPeriod);
      }

      private void createGUI(ISession session, boolean stayOnTop, int autoRefeshPeriod)
      {
         IApplication app = session.getApplication();
         setUseRolloverButtons(true);
         setFloatable(false);
         add(new GetSGATraceAction(app, _resources, _sgaTracePanel));

         addStayOnTop(stayOnTop);
View Full Code Here

  /**
   * Execute this command. Display dialog and process users request.
   */
  public void execute()
  {
    final IApplication app = _plugin.getApplication();
    final JDialog dlog = new ExportDialog(app, _plugin);
    dlog.pack();
    GUIUtils.centerWithinParent(dlog);
    dlog.setVisible(true);
   }
View Full Code Here

      file.delete();
    }

    s_lastDir = file.getParentFile();

    final IApplication app = _plugin.getApplication();
    try
    {
      writeToFile(file);

      String[] params = new String[]
View Full Code Here

    }
   
    public void initialize() throws net.sourceforge.squirrel_sql.client.plugin.PluginException {
        super.initialize();
        PreferencesManager.initialize(this);
    final IApplication app = getApplication();
    final ActionCollection coll = app.getActionCollection();
       
        coll.add(new GenerateSqlAction(app, _resources, this));
        coll.add(new ScriptProcedureAction(app, _resources, this));
        coll.add(new ScriptProcedureExecAction(app, _resources, this));
        coll.add(new ShrinkDatabaseAction(app, _resources, this));
        coll.add(new TruncateLogAction(app, _resources, this));
        coll.add(new UpdateStatisticsAction(app, _resources, this));

    _mssqlMenu = createFullMssqlMenu();
       
    app.addToMenu(IApplication.IMenuIDs.SESSION_MENU, _mssqlMenu);
        super.registerSessionMenu(_mssqlMenu);
       
        _prefsManager = new PluginQueryTokenizerPreferencesManager();
        _prefsManager.initialize(this, new MSSQLPreferenceBean());       
    }
View Full Code Here

                iter.remove();
        }
    }
               
    private JMenu addToMssqlTableMenu(JMenu menu) {
    final IApplication app = getApplication();
    final ActionCollection coll = app.getActionCollection();
        final MssqlPlugin plugin = this;

    final JMenu mssqlMenu;
        if (menu == null)
            mssqlMenu = _resources.createMenu(MssqlResources.IMenuResourceKeys.MSSQL);
        else
            mssqlMenu = menu;
       
        _resources.addToMenu(coll.get(UpdateStatisticsAction.class), mssqlMenu);

        final JMenu showStatisticsMenu = _resources.createMenu(MssqlResources.IMenuResourceKeys.SHOW_STATISTICS);
        showStatisticsMenu.addMenuListener(new MenuListener() {
            public void menuSelected(MenuEvent e) {
                final JMenu menu = (JMenu) e.getSource();
                menu.removeAll();
                removeActionsOfType(coll,ShowStatisticsAction.class);
                iterateIndexes(new IndexIterationListener() {
                    public void indexSpotted(final ITableInfo tableInfo, final String indexName) {
                        final ShowStatisticsAction showStatisticsAction = new ShowStatisticsAction(app,_resources,plugin,tableInfo,indexName);
                        showStatisticsAction.setSession(_session);
                        coll.add(showStatisticsAction);
                        _resources.addToMenu(showStatisticsAction,menu);
                    }
                });
            }
            public void menuDeselected(MenuEvent e) { }
            public void menuCanceled(MenuEvent e) { }
        }
        );
       
        final JMenu indexDefragMenu = _resources.createMenu(MssqlResources.IMenuResourceKeys.INDEXDEFRAG);
        indexDefragMenu.addMenuListener(new MenuListener() {
            public void menuSelected(MenuEvent e) {
                final JMenu menu = (JMenu) e.getSource();
                menu.removeAll();
                removeActionsOfType(coll,IndexDefragAction.class);
                app.getThreadPool().addTask(new IteratorIndexesTask(menu));
            }
            public void menuDeselected(MenuEvent e) { }
            public void menuCanceled(MenuEvent e) { }
        }
        );
View Full Code Here

    // Load plugin preferences.
    loadPrefs();

    // Add menu.
    final IApplication app = getApplication();
    final ActionCollection coll = app.getActionCollection();
    coll.add(new ConnectAction(app, _resources, _prefs, this));
    coll.add(new DisconnectAction(app, _resources, _prefs, this));
    coll.add(new ValidateSQLAction(app, _resources, _prefs, this));
    createMenu();
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.client.IApplication

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.