Package net.sourceforge.squirrel_sql.client

Examples of net.sourceforge.squirrel_sql.client.IApplication$IMenuIDs


   *
   * @param  evt  The current event.
   */
  public void actionPerformed(ActionEvent evt)
  {
    final IApplication app = getApplication();
    if (_tree != null)
    {
      // Ensure that the proper type of Object is selected in the Object
      // Tree.
      IDatabaseObjectInfo selectedObjects[] =  _tree.getSelectedDatabaseObjects();
View Full Code Here


                      (selObjs[0].getDatabaseObjectType() == DatabaseObjectType.TABLE) ||
                      (selObjs[0].getDatabaseObjectType() == DatabaseObjectType.VIEW)
              )
      )
      {
          final IApplication app = getApplication();

          final CursorChanger cursorChg = new CursorChanger(app.getMainFrame());
          cursorChg.show();
          try
          {
              new SQLFilterCommand(_tree, selObjs[0]).execute();
          }
View Full Code Here

  @Test
  public void testCreateDataSet() throws DataSetException {
   
    ISession mockSession = mockHelper.createMock(ISession.class);
    IApplication mockApplication = mockHelper.createMock(IApplication.class);
    IIdentifier mockIdentifier = mockHelper.createMock(IIdentifier.class);
    SessionManager mockSessionManager = mockHelper.createMock(SessionManager.class);
    ISQLConnection mockSqlConnection = mockHelper.createMock(ISQLConnection.class);
    SQLDatabaseMetaData mockMetaData = mockHelper.createMock(SQLDatabaseMetaData.class);
    IProcedureInfo mockProcedureInfo = mockHelper.createMock(IProcedureInfo.class);
   
    expect(mockSessionManager.getSession(mockIdentifier)).andStubReturn(mockSession);
    expect(mockSession.getApplication()).andStubReturn(mockApplication);
    expect(mockSession.getIdentifier()).andStubReturn(mockIdentifier);
    expect(mockApplication.getSessionManager()).andStubReturn(mockSessionManager);
    expect(mockSession.getSQLConnection()).andStubReturn(mockSqlConnection);
    expect(mockSqlConnection.getSQLMetaData()).andStubReturn(mockMetaData);
    expect(mockMetaData.getProcedureColumnsDataSet(mockProcedureInfo)).andStubReturn(null);
   
    mockHelper.replayAll();
View Full Code Here

   *
   * @param  evt  The current event.
   */
  public void actionPerformed(ActionEvent evt)
  {
    IApplication app = getApplication();
    CursorChanger cursorChg = new CursorChanger(app.getMainFrame());
    cursorChg.show();
    try
    {
      new ShowNativeSQLCommand(_panel).execute();
    }
View Full Code Here

   * current connection to the database and open a new one.
   *
   * @param  evt   The current event.
   */
  public void actionPerformed(ActionEvent evt) {
    IApplication app = getApplication();
    if(Dialogs.showYesNo(app.getMainFrame(), i18n.MSG))
    {
         // Can't work with ISessionAction because if a result window is on top
         // the session in a ISessionAction is null.
         ISession activeSession = getApplication().getSessionManager().getActiveSession();
      activeSession.reconnect();
View Full Code Here

//    setTitle(getTitle() + ": " + _session.getSessionSheet().getTitle());

    // This is a tool window.
    makeToolWindow(true);

    final IApplication app = getSession().getApplication();

    // Property panels for SQuirreL.
    _panels.add(new GeneralSessionPropertiesPanel());
    _panels.add(new SessionObjectTreePropertiesPanel(app));
    _panels.add(new SessionSQLPropertiesPanel(app, session));

    // Go thru all plugins attached to this session asking for panels.
    SessionPluginInfo[] plugins = app.getPluginManager().getPluginInformation(getSession());
    for (int i = 0; i < plugins.length; ++i)
    {
      SessionPluginInfo spi = plugins[i];
      if (spi.isLoaded())
      {
View Full Code Here

      if(null == _panel)
      {
         return;
      }

    IApplication app = getApplication();
    CursorChanger cursorChg = new CursorChanger(app.getMainFrame());
    cursorChg.show();
    try
    {
      new CloseAllSQLResultTabsCommand(_panel).execute();
    }
View Full Code Here

    ObjectTreePanel localMockObjectTreePanel =
      localMockHelper.createMock("localMockObjectTreePanel", ObjectTreePanel.class);
    SquirrelPreferences localMockSquirrelPreferences =
      localMockHelper.createMock("mockSquirrelPreferences", SquirrelPreferences.class);
    ISession localMockSession = localMockHelper.createMock("localMockSession", ISession.class);
    IApplication localMockApplication =
      localMockHelper.createMock("localMockApplication", IApplication.class);
    Statement localMockStatement = localMockHelper.createMock("localMockStatement", Statement.class);
    ITableInfo localMockTableInfo = localMockHelper.createMock("localMockTableInfo", ITableInfo.class);
    ResultSet localMockResultSet = localMockHelper.createMock("localMockResultSet", ResultSet.class);
    ResultSetMetaData localMockResultSetMetaData =
      localMockHelper.createMock("localMockResultSetMetaData", ResultSetMetaData.class);

    expect(localMockObjectTreePanel.getSession()).andStubReturn(localMockSession);
    expect(localMockSession.getApplication()).andStubReturn(localMockApplication);
    expect(localMockApplication.getSquirrelPreferences()).andStubReturn(localMockSquirrelPreferences);
    expect(localMockSquirrelPreferences.getShowPleaseWaitDialog()).andStubReturn(false);
    expect(localMockTableInfo.getQualifiedName()).andStubReturn("Test Qualified TableName");

    localMockStatement.close();
    expect(localMockResultSet.getMetaData()).andStubReturn(localMockResultSetMetaData);
View Full Code Here

   *
   * @param  evt  The current event.
   */
  public void actionPerformed(ActionEvent evt)
  {
    IApplication app = getApplication();
    CursorChanger cursorChg = new CursorChanger(app.getMainFrame());
    cursorChg.show();
    try
    {
         ISession activeSession = getApplication().getSessionManager().getActiveSession();
         if(   activeSession.getActiveSessionWindow() instanceof SessionInternalFrame
View Full Code Here

  public void execute()
  {
    if (_objectTree != null)
    {
      final ISession session = _objectTree.getSession();
      final IApplication app = session.getApplication();
      final WindowManager winMgr = app.getWindowManager();
      winMgr.showSQLFilterDialog( _objectTree, _objectInfo);
    }
  }
View Full Code Here

TOP

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

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.