Examples of IObjectTreeAPI


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

            {
               final Statement stmt = conn.createStatement();
               try
               {
                  //IObjectTreeAPI api = _session.getObjectTreeAPI(_plugin);
                  IObjectTreeAPI api = FrameWorkAcessor.getObjectTreeAPI(_session, _plugin);


                  IDatabaseObjectInfo[] dbObjs = api.getSelectedDatabaseObjects();

                  boolean qualifyTableNames = SQLScriptPreferencesManager.getPreferences().isQualifyTableNames();
                  boolean useDoubleQuotes = SQLScriptPreferencesManager.getPreferences().isUseDoubleQuotes();

                  for (int k = 0; k < dbObjs.length; k++)
View Full Code Here

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

    /**
     * Execute this command. Use the database meta data to construct a Create
     * Table SQL script and place it in the SQL entry panel.
     */
    public void execute() {
        IObjectTreeAPI api = FrameWorkAcessor.getObjectTreeAPI(_session,
                _plugin);
        IDatabaseObjectInfo[] dbObjs = api.getSelectedDatabaseObjects();
        scriptTablesToSQLEntryArea(dbObjs);
    }
View Full Code Here

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

    {
        final StringBuffer buf = new StringBuffer(2048);
        final String sep =
            "\n" + _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 = getSQL(dbObjs[i]);
            if (cmd != null && cmd.length() > 0)
View Full Code Here

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

  /**
   * Execute this command.
   */
  public void execute()
  {
    final IObjectTreeAPI api = _session.getSessionInternalFrame().getObjectTreeAPI();
    final IDatabaseObjectInfo[] dbObjs = api.getSelectedDatabaseObjects();

    // Get the names of all the selected tables in a comma separated list,
    StringBuffer tableList = new StringBuffer(512);
    for (int i = 0; i < dbObjs.length; ++i)
    {
View Full Code Here

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

      buf.append("create database ").append(dbName);

         SQLExecuterTask executer = new SQLExecuterTask(_session, buf.toString(), new DefaultSQLExecuterHandler(_session));
         executer.run();

      IObjectTreeAPI api = _session.getSessionInternalFrame().getObjectTreeAPI();
      api.refreshTree();
    }

  }
View Full Code Here

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

      SybaseASEExceptionFormatter formatter = new SybaseASEExceptionFormatter();
    session.setExceptionFormatter(formatter);

       
      // Add context menu items to the object tree's view and procedure nodes.
      IObjectTreeAPI otApi = session.getSessionInternalFrame().getObjectTreeAPI();
      otApi.addToPopup(DatabaseObjectType.VIEW, new ScriptSybaseASEViewAction(getApplication(), _resources, session));
      otApi.addToPopup(DatabaseObjectType.PROCEDURE, new ScriptSybaseASEProcedureAction(getApplication(), _resources, session));

        otApi.addDetailTab(DatabaseObjectType.VIEW,
                new ViewSourceTab(i18n.SHOW_VIEW_SOURCE, stmtSep));
       
        TableWithChildNodesExpander tableExp = new TableWithChildNodesExpander();
        tableExp.setTableIndexExtractor(new SybaseTableIndexExtractorImpl());
        tableExp.setTableTriggerExtractor(new SybaseTableTriggerExtractorImpl());
        otApi.addExpander(DatabaseObjectType.TABLE, tableExp);
       
        otApi.addDetailTab(DatabaseObjectType.INDEX, new DatabaseObjectInfoTab());
        //otApi.addDetailTab(DatabaseObjectType.INDEX, new IndexDetailsTab());       
        otApi.addDetailTab(DatabaseObjectType.TRIGGER, new DatabaseObjectInfoTab());
        otApi.addDetailTab(DatabaseObjectType.TRIGGER_TYPE_DBO, new DatabaseObjectInfoTab());
       
        otApi.addDetailTab(DatabaseObjectType.TRIGGER,
                           new TriggerSourceTab(i18n.TRIGGER_HINT, stmtSep));

       
      return new PluginSessionCallback()
      {
View Full Code Here

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

    private void addActionsToPopup(ISession session)  {
        ActionCollection col = getApplication().getActionCollection();
       
        try {
          IObjectTreeAPI _treeAPI = session.getSessionInternalFrame().getObjectTreeAPI();
          _treeAPI.addDetailTab(DatabaseObjectType.SESSION, new SupportedRefactoringsTab(session));
        } catch (Exception e) {
          e.printStackTrace();
        }
       
        // TABLE TYPE DBO
View Full Code Here

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

     

      GUIUtils.processOnSwingEventThread(new Runnable() {
          public void run() {
              ActionCollection coll = getApplication().getActionCollection();
              IObjectTreeAPI api =
                  session.getSessionInternalFrame().getObjectTreeAPI();

              api.addToPopup(DatabaseObjectType.TABLE, coll.get(UserScriptAction.class));
              api.addToPopup(DatabaseObjectType.PROCEDURE, coll.get(UserScriptAction.class));
              api.addToPopup(DatabaseObjectType.SESSION, coll.get(UserScriptAction.class));             
          }
      });


      UserScriptAdmin adm = new UserScriptAdmin(this, session);
View Full Code Here

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

      try
      {
         if(-1 != session.getSQLConnection().getConnection().getMetaData().getDriverName().toUpperCase().indexOf("CACHE"))
         {
            ActionCollection coll = getApplication().getActionCollection();
            IObjectTreeAPI otApi = session.getSessionInternalFrame().getObjectTreeAPI();
            otApi.addToPopup(DatabaseObjectType.VIEW, coll.get(ScriptViewAction.class));
            otApi.addToPopup(DatabaseObjectType.SESSION, coll.get(ShowNamespacesAction.class));
            otApi.addToPopup(DatabaseObjectType.SESSION, coll.get(ShowProcessesAction.class));
            otApi.addToPopup(DatabaseObjectType.PROCEDURE, coll.get(ScriptFunctionAction.class));
            otApi.addToPopup(DatabaseObjectType.PROCEDURE, coll.get(ScriptCdlAction.class));
            otApi.addToPopup(DatabaseObjectType.TABLE, coll.get(ScriptCdlAction.class));
            otApi.addToPopup(DatabaseObjectType.VIEW, coll.get(ScriptCdlAction.class));


            ISQLPanelAPI sqlApi = session.getSessionInternalFrame().getSQLPanelAPI();
            sqlApi.addToSQLEntryAreaMenu(coll.get(ShowQueryPlanAction.class));
View Full Code Here

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

   * @param coll
   * @param api
   */
  protected void addMenuItemsToContextMenu(ISession session)
  {
    final IObjectTreeAPI api = session.getObjectTreeAPIOfActiveSessionWindow();
    final ActionCollection coll = getApplication().getActionCollection();

    if (SwingUtilities.isEventDispatchThread())
    {
      addToPopup(api, coll);
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.