Examples of IObjectTreeAPI


Examples of net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI

  public void execute()
  {
    final StringBuffer buf = new StringBuffer(2048);
    final String sep = " " + _session.getQueryTokenizer().getSQLStatementSeparator();

    final IObjectTreeAPI api = _session.getSessionInternalFrame().getObjectTreeAPI();
    final IDatabaseObjectInfo[] dbObjs = api.getSelectedDatabaseObjects();

    for (int i = 0; i < dbObjs.length; ++i)
    {
      final String cmd = getMySQLCommand(dbObjs[i]);
      if (cmd != null && cmd.length() > 0)
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI


      _grapControllersBySessionID.put(session.getIdentifier(), controllers);


      IObjectTreeAPI api = session.getSessionInternalFrame().getObjectTreeAPI();

      ActionCollection coll = getApplication().getActionCollection();
      api.addToPopup(DatabaseObjectType.TABLE, coll.get(AddToGraphAction.class));

      return new PluginSessionCallbackAdaptor(this);
   }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI

   * @param ev The action event
   */
  public void actionPerformed(ActionEvent ev) {
    if (session != null)
    {
      IObjectTreeAPI treeAPI = session.getSessionInternalFrame().getObjectTreeAPI();
      IDatabaseObjectInfo[] tables = treeAPI.getSelectedDatabaseObjects();
      if (tables.length == 1 && tables[0] instanceof ITableInfo) {
      try
      {
        new ImportTableDataCommand(session, (ITableInfo) tables[0]).execute();
      }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI

  /**
   * @param session
   */
  private void updateTreeApi(ISession session) {
    IObjectTreeAPI treeAPI = session.getSessionInternalFrame().getObjectTreeAPI();
    final ActionCollection coll = getApplication().getActionCollection();

    treeAPI.addToPopup(DatabaseObjectType.TABLE, coll.get(ImportTableDataAction.class));       
  }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI

    /* (non-Javadoc)
     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
     */
    public void actionPerformed(ActionEvent evt) {
        ISession destSession = sessionInfoProv.getCopyDestSession();
        IObjectTreeAPI api =
            destSession.getObjectTreeAPIOfActiveSessionWindow();
        if (api == null) {
            return;
        }
        IDatabaseObjectInfo[] dbObjs = api.getSelectedDatabaseObjects();
        if (dbObjs.length > 1) {
            sessionInfoProv.setDestSelectedDatabaseObject(null);
            //i18n[PasteTableAction.error.multischemapaste=The paste
            //operation may only be applied to one schema at a time]
            String msg =
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI


            GenericScriptPopupAction actDbObject = new GenericScriptPopupAction(props.getScripts()[i], this, TARGET_TYPE_DB_OBJECT);

                  //IObjectTreeAPI api = m_session.getObjectTreeAPI(m_plugin);
                  IObjectTreeAPI api = FrameWorkAcessor.getObjectTreeAPI(m_session, m_plugin);

            api.addToPopup(DatabaseObjectType.TABLE, actDbObject);
            api.addToPopup(DatabaseObjectType.PROCEDURE, actDbObject);
            api.addToPopup(DatabaseObjectType.SESSION, actDbObject);

            GenericScriptPopupAction actSql = new GenericScriptPopupAction(props.getScripts()[i], this, TARGET_TYPE_SQL);

            //m_session.getSQLPanelAPI(m_plugin).addToSQLEntryAreaMenu(actSql);
            FrameWorkAcessor.getSQLPanelAPI(m_session, m_plugin).addToSQLEntryAreaMenu(actSql);
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI

  public ScriptTargetCollection getTargets(boolean targetType)
  {
    if(targetType == TARGET_TYPE_DB_OBJECT)
    {
      //IObjectTreeAPI api = m_session.getObjectTreeAPI(m_plugin);
      IObjectTreeAPI api = FrameWorkAcessor.getObjectTreeAPI(m_session, m_plugin);

         IDatabaseObjectInfo[] dbObjs = api.getSelectedDatabaseObjects();

      ScriptTargetCollection targets = new ScriptTargetCollection();
      for (int i = 0; i < dbObjs.length; i++)
      {
        if(dbObjs[i].getDatabaseObjectType().equals(DatabaseObjectType.TABLE))
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI

  /**
   * @see net.sourceforge.squirrel_sql.client.plugin.ISessionPlugin#sessionStarted(net.sourceforge.squirrel_sql.client.session.ISession)
   */
  public PluginSessionCallback sessionStarted(final ISession session)
  {
    IObjectTreeAPI api = session.getObjectTreeAPIOfActiveSessionWindow();
    addMenuItemsToContextMenu(api);
    return new DBCopyPluginSessionCallback(this);
  }
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI

    _plugin = plugin;
  }

  public void actionPerformed(ActionEvent evt) {
    if (_session != null) {
      IObjectTreeAPI treeAPI = _session.getSessionInternalFrame().getObjectTreeAPI();
      IDatabaseObjectInfo[] dbObjs = treeAPI.getSelectedDatabaseObjects();
            try {
                new GenerateSqlCommand(_session, _plugin, dbObjs).execute();
            }
            catch (Throwable th) {
                _session.showErrorMessage(th);
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI

  /**
   * Execute this command. Save the session and selected objects in the plugin for use in paste command.
   */
  public void execute()
  {
    IObjectTreeAPI api = _session.getObjectTreeAPIOfActiveSessionWindow();
    if (api != null)
    {
      IDatabaseObjectInfo[] dbObjs = api.getSelectedDatabaseObjects();
      if (DatabaseObjectType.TABLE_TYPE_DBO.equals(dbObjs[0].getDatabaseObjectType()))
      {
        String catalog = dbObjs[0].getCatalogName();
        String schema = dbObjs[0].getSchemaName();
        if (log.isDebugEnabled())
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.