Code/completion insight Multi column select

Hi
Is it possible to select multiple columns via code insight pop up window.
For example if I have the following query
select a.
from table a
If I type a. completion insight will show me the columns for the table. I would like select more than one column at one time (like in TOAD)
Thanks in advance

No, but you can:
* request it at the SQL Developer Exchange
* use the popup describe of the table (selecting the table name in the worksheet and pressing shift-F4)
* drag a table from the navigator treeview to the worksheet to generate a SELECT statement with all columns
Have fun,
K.

Similar Messages

  • Jdeveloper11gR2 Cannot get code Completion Insight in *.jsp files

    I am not getting code completion insight when pressing Ctrl + Space in *.jsp files. But it works in *.java files. My version of Jdeveloper is Jdeveloper 11g Release 2 version 11.1.2.2.0 .
    Edited by: Smitha Bhatt on Jun 7, 2012 5:40 PM

    I filed bug 14169588 for this.

  • Code completion(insight) not working in SQL Developer Version 2.1.1.64

    I recently downloaded SQL developer Version 2.1.1.64. However the code completion feature is not working automatically. I have checked the Automatically complete code in SQL worsheet checkbox under Tools->Preferences-> Code Editor-> Completion Insight.
    Strangely, I get the code completion pop up window when I explicitly press the completion insight shortcut(Ctrl + Space).
    Please help.
    Thanks and Regards.

    Hi, I am getting the following logs :
    Code completion time = 1015
    *...?aux tok2?, parse time = 63
    InsightableOracleDatabase.fetch() time = 360
    Code completion time = 844
    Finished parsing = 0
    *...?aux tok2?, parse time = 62
    InsightableOracleDatabase.fetch() time = 344
    Code completion time = 812
    Finished parsing = 0
    *...?aux tok2?, parse time = 63
    InsightableOracleDatabase.fetch() time = 359
    Code completion time = 891
    Finished parsing = 0
    Thanks

  • EA1: code completion with update statements

    Hello all,
    Code completion works well for selects, but (for me, anyway) not as well for updates - I get nothing after
    update table_a set <ctrl+space>
    unless I select '(', which works for the first column, but after that, I get nothing. However, if I do this (doesn't really make much sense)
    update table_a set xxx = <ctrl+space>
    where xxx is nonsense, I then get a list of columns, and can chain several together. So, it's almost as if things are the wrong way around - you get code completion on the value rather than the column. Am I dong something wrong, or is this a bug?
    In general, though, 1.5 just feels so much nicer to use. Well done!
    John

    Excellent! Bugs fixed even before they're reported ;>
    Now, when can I get my hands on EA2.....?

  • Code Templates/Completion Insight SQL Developer 3.2.2

    Hello, today I got the version 3.2.2. During the first start all setting from my previous version were imported and all work perfect, except the completion insight.
    If I write
    ssf +[CTRL + Space]
    the result in the previous version is
    select * from
    In the new version, for the same input is:
    ssfselect * from
    For other code template it is the same, the id for the code template will not be delete while setting the code template.
    Is this a bug or is there somethin wrong with my enviroment?

    It's a bug that's been fixed for version 4.0.

  • BUG: EA 2.1 code editor: completion insight doesn't work in opened files

    I just migrated from SQLDEV 1.5.5 to EA 2.1. It's nice that I colud find so many of my suggestions implemented in this new version. THANKX :-)
    code editor:
    When I'm working in SQL Worksheet the "completion insight" feature is working well, but when I try to use it in an opened file, it doesn't work.
    Is there a special preference to turn on for use with files?
    Edited by: @chris on 12.11.2009 10:57

    Correct it did work in 1.5. on .sql files, when connected, so I have updated the ER to bug. We also need to expand this to support PL/SQL files.
    Sue

  • Can't get completion insight to work

    Hi all,
    I just can't get completion insight to work on the newer releases of sqldeveloper. It works fine until Version 1.5.5 Build MAIN-5969. However on both Version 2.1.0.62 Build MAIN-62.61 and Version 2.1.0.63 Build MAIN-63.73 it justn't work no matter what settings I use.
    I have run both the builds from \sqldeveloper\bin\sqldeveloper.exe and no exceptions are reported.
    This is the console output from 2.1.0.63
    Finished parsing = 16
    UsersCache.fillIn() time = 2015 ret==null?: false
    Finished parsing = 0
    Finished parsing = 0
    Finished parsing = 0
    Finished parsing = 0
    *...?aux t2?, parse time = 172
    Finished parsing = 0
    Finished parsing = 0
    InsightableOracleDatabase.fetch() time = 2609
    select 'TABLE' type, user owner, name object_name, null column_name, null column
    id, null datatype FROM sys.obj$ o
    where o.owner# = 173
    and o.name not like 'BIN%'
    and o.type# = 2
    and rownum <=50
    union all
    select 'VIEW' type, user owner, name object_name, null column_name, null column_
    id, null data_type FROM sys.obj$ o
    where o.owner# = 173
    and o.name not like 'BIN%'
    and o.type# = 4
    and rownum <=50
    Code completion time = 3516
    Finished parsing = 0
    *...?aux tok2?, parse time = 31
    Finished parsing = 0
    Finished parsing = 0
    Finished parsing = 0
    Finished parsing = 0
    Finished parsing = 0
    Finished parsing = 0
    InsightableOracleDatabase.fetch() time = 38828
    select 'TABLE' type, ''||o.owner# owner, name object_name, null column_name, nul
    l column_id, null data_type FROM sys.obj$ o
    where o.name not like 'BIN%'
    and o.type# = 2
    and rownum <=50
    and name like ?
    union all
    select 'VIEW' type, ''||o.owner# owner, name object_name, null column_name, null
    column_id, null data_type FROM sys.obj$ o
    where o.name not like 'BIN%'
    and o.type# = 4
    and rownum <=50
    and name like ?
    union all
    select 'TABLE' type, user owner, synonym_name object_name, null column_name, nul
    l column_id, null data_type
    from all_synonyms
    where synonym_name like ?
    and rownum <=50
    and owner in (user,'PUBLIC')
    AP_I%
    AP_I%
    AP_I%
    Code completion time = 38984
    Any help to get this working would be much appreciated.
    Thanks

    This console output says that the completion insight queries are executing - the first example took ~ 3.5 seconds and the second example took ~ 39 seconds. Unfortunately, it doesn't tell you how many records it returned.
    If you copy the queries out of the console output and run them manually, do you get any results? For example, the second query would be:
    select 'TABLE' type, ''||o.owner# owner, name object_name, null column_name, null column_id, null data_type
    FROM sys.obj$ o
    where o.name not like 'BIN%'
    and o.type# = 2
    and rownum <=50
    and name like 'AP_I%'
    union all
    select 'VIEW' type, ''||o.owner# owner, name object_name, null column_name, null column_id, null data_type
    FROM sys.obj$ o
    where o.name not like 'BIN%'
    and o.type# = 4
    and rownum <=50
    and name like 'AP_I%'
    union all
    select 'TABLE' type, user owner, synonym_name object_name, null column_name, null column_id, null data_type
    from all_synonyms
    where synonym_name like 'AP_I%'
    and rownum <=50
    and owner in (user,'PUBLIC')theFurryOne

  • 3.1EA2 issue - Completion insight popup too narrow

    Since updating to 3.1EA2, the popup containing choices for completion seems to be set to a fixed width, and is only wide enough to show 10-11 characters.

    Possibly what is needed here are more eyes and more test cases. Apparently many have found enough cases to feel this is an obvious problem.
    Take the following case on WinXP, 3.1.06.44:
    1) Launch SQL Developer.  A fresh start may not be necessary, but ensures everything is initialized.
    2) Connect to SCOTT schema.
    3) In worksheet, quickly enter "select * from emp;" so no completion insight pop-up appears.
    4) Change "*" to "e".
    5) Pop-up appears with EMPNO, ENAME at top, with room for 11 characters, but some items are longer.
    6) Highlight EMPNO and ENAME, then <Enter>.
    7) This yields "select EMPNO M, ENAME N from emp;"
    8) Insert a comma after "ENAME N"
    9) Pop-up appears with all EMP table columns, but only showing the first 2.5 letters. Don't select anything.
    10) Continue inserting after the comma.  Add a blank space followed by a lowercase j.
    11) Pop-up appears with items starting in J, including JOB, but only showing the first 2 letters.Hopefully this behavior is not unique to my environment and others can replicate it.
    Thanks,
    Gary
    SQL Developer Team
    Edited by: gggraham on Nov 18, 2011 3:19 PM
    Sizing of SQL Developer window or the worksheet pane does not affect the pop-up list width. Code editor font is DialogInput. LAF is Windows.

  • How Can I get multi column values from dynamic search help?

    Hi Gurus;
    I'm using dynamic search help in my program.
    I want to get multi column values from search help. But I dont know solution for this issue.
    I'm using F4IF_INT_TABLE_VALUE_REQUEST FM.
    How Can I get multi column values from dynamic search help?
    Thanks.

    Believe it or not, the same FM worked for me in a dynpro. I will try to explain here how it works in custom screen and then you can do your work for other screens or program types. I am not going to write my actual work but will explain in general.
    I have 4 fields (FLD1, FLD2, FLD3, FLD4) and i made the search based on FLD2 and when user click on a line (could be any field), then this would bring the line on to the screens.
    There are like 3 steps.
    You have your value_tab for my fields FLD1, FLD2, FLD3 and FLD4. This is just the data that we pass into the FM. (data: IT_VALTAB type table of ZVAL_TABLE)
    Next map the screen fields into an internal table (data: It_dynpfld type table of dselc ). I also have other internal tables defined  (just to keep it straight, i will be putting here) data:  It_return type standard table of ddshretval.
    Next step is to call the function module. Make sure you have values in IT_VALTAB.
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
            retfield        = 'FLD2'
            value_org       = 'S'
          tables
            value_tab       = It_VALTAB
            return_tab      = It_return
            dynpfld_mapping = It_dynpfld
          exceptions
            parameter_error = 1
            no_values_found = 2
            others          = 3.
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
          with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        else.
          perform get_selected_fields tables It_return.
        endif.
    The code within the perform GET_SELECTED_FIELDS  - We need to map the result fields after user selects it. The code goes like this. This is step is to update the dynpro fields.
    I need a internal table as well as a work area here. like,
    data: lt_fields type table of dynpread,
            la_fields type dynpread.
      field-symbols: <fs_return> type ddshretval.
    so fill out LT_FIELDS from the IT_RETURN table
    loop at lt_return assigning <fs_return>.
        la_fields-fieldname = <fs_return>-retfield.
        la_fields-fieldvalue = <fs_return>-fieldval.
        append la_fields to lt_fields.
        clear: la_fields.
      endloop.
    Call the FM to update the dynpro
    call function 'DYNP_VALUES_UPDATE'
        exporting
          dyname               = sy-repid
          dynumb               = '1002' "This is my screen number. You could use 1000 for selection screen (hope so)
        tables
          dynpfields           = lt_fields
        exceptions
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          undefind_error       = 7
          others               = 8.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    good luck

  • How to generate a second csv file with different report columns selected?

    Hi. Everybody:
    How to generate a second csv file with different report columns selected?
    The first csv file is easy (report attributes -> report export -> enable CSV output Yes). However, our users demand 2 csv files with different report columns selected to meet their different needs.
    (The users don't want to have one csv file with all report columns included. They just want to get whatever they need directly, no extra columns)
    Thank you for any help!
    MZ

    Hello,
    I'm doing it usually. Typically example would be in the report only the column "FIRST_NAME" and "LAST_NAME" displayed whereas
    in the csv exported with the UTL_FILE the complete address (street, housenumber, additions, zip, town, state ... ) is written, these things are needed e.g. the form letters.
    You do not need another page, just an additional button named e.g. "export_to_csv" on your report page.
    The csv export itself is handled from a plsql procedure "stored procedure" ( I like to have business logic outside of apex) which is invoked by pressing the button "export_to_csv". Of course the stored procedure can handle also parameters
    An example code would be something like
    PROCEDURE srn_brief_mitglieder (
         p_start_mg_nr IN NUMBER,
         p_ende_mg_nr IN NUMBER
    AS
    export_file          UTL_FILE.FILE_TYPE;
    l_line               VARCHAR2(20000);
    l_lfd               NUMBER;
    l_dateiname          VARCHAR2(100);
    l_datum               VARCHAR2(20);
    l_hilfe               VARCHAR2(20);
    CURSOR c1 IS
    SELECT
    MG_NR
    ,TO_CHAR(MG_BEITRITT,'dd.mm.yyyy') AS MG_BEITRITT ,TO_CHAR(MG_AUFNAHME,'dd.mm.yyyy') AS MG_AUFNAHME
    ,MG_ANREDE ,MG_TITEL ,MG_NACHNAME ,MG_VORNAME
    ,MG_STRASSE ,MG_HNR ,MG_ZUSATZ ,MG_PLZ ,MG_ORT
    FROM MITGLIEDER
    WHERE MG_NR >= p_start_mg_nr
    AND MG_NR <= p_ende_mg_nr
    --WHERE ROWNUM < 10
    ORDER BY MG_NR;
    BEGIN
    SELECT TO_CHAR(SYSDATE, 'yyyy_mm_dd' ) INTO l_datum FROM DUAL;
    SELECT TO_CHAR(SYSDATE, 'hh24miss' ) INTO l_hilfe FROM DUAL;
    l_datum := l_datum||'_'||l_hilfe;
    --DBMS_OUTPUT.PUT_LINE ( l_datum);
    l_dateiname := 'SRNBRIEF_MITGLIEDER_'||l_datum||'.CSV';
    --DBMS_OUTPUT.PUT_LINE ( l_dateiname);
    export_file := UTL_FILE.FOPEN('EXPORTDIR', l_dateiname, 'W');
    l_line := '';
    --HEADER
    l_line := '"NR"|"BEITRITT"|"AUFNAHME"|"ANREDE"|"TITEL"|"NACHNAME"|"VORNAME"';
    l_line := l_line||'|"STRASSE"|"HNR"|"ZUSATZ"|"PLZ"|"ORT"';
         UTL_FILE.PUT_LINE(export_file, l_line);
    FOR rec IN c1
    LOOP
         l_line :=  '"'||rec.MG_NR||'"';     
         l_line := l_line||'|"'||rec.MG_BEITRITT||'"|"' ||rec.MG_AUFNAHME||'"';
         l_line := l_line||'|"'||rec.MG_ANREDE||'"|"'||rec.MG_TITEL||'"|"'||rec.MG_NACHNAME||'"|"'||rec.MG_VORNAME||'"';     
         l_line := l_line||'|"'||rec.MG_STRASSE||'"|"'||rec.MG_HNR||'"|"'||rec.MG_ZUSATZ||'"|"'||rec.MG_PLZ||'"|"'||rec.MG_ORT||'"';          
    --     DBMS_OUTPUT.PUT_LINE (l_line);
    -- in datei schreiben
         UTL_FILE.PUT_LINE(export_file, l_line);
    END LOOP;
    UTL_FILE.FCLOSE(export_file);
    END srn_brief_mitglieder;Edited by: wucis on Nov 6, 2011 9:09 AM

  • Determine the best width for ListCellRenderer - Multi-column combo box

    Currently, I am having a multi column combo box. In order for the column to align properly during show popup, I use box layout to do so. However, the short coming for box layout is that, the size for each column is fixed. This makes me have a difficulty, when I have a long string to be displayed. The problem is shown through the following screen shoot.
    http://i.imgur.com/4Nfc6.png
    This is because in 2nd column,
    1) All the 3 rows must be in same size so that they are aligned.
    2) But 1st row and 2nd row cell renderer, do not know 3rd row is holding such a long string.
    The code (2 files) to demo this problem is as follow. Is there any way the size of the cell will be adjusted automatically? Yet, all the row will be aligned properly.
    ResultSetCellRenderer.java
    package javaapplication24;
    import java.awt.Color;
    import java.awt.Component;
    import javaapplication24.NewJFrame.ResultType;
    import javax.swing.JList;
    import javax.swing.ListCellRenderer;
    import javax.swing.UIManager;
    * @author yccheok
    public class ResultSetCellRenderer extends javax.swing.JPanel implements ListCellRenderer {
        /** Creates new form ResultSetCellRenderer */
        public ResultSetCellRenderer() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            jLabel1 = new javax.swing.JLabel();
            jLabel2 = new javax.swing.JLabel();
            setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.X_AXIS));
            jLabel1.setText("jLabel1");
            jLabel1.setMaximumSize(new java.awt.Dimension(88, 14));
            jLabel1.setMinimumSize(new java.awt.Dimension(88, 14));
            jLabel1.setPreferredSize(new java.awt.Dimension(88, 14));
            add(jLabel1);
            jLabel2.setText("jLabel2");
            jLabel2.setMaximumSize(new java.awt.Dimension(100, 14));
            jLabel2.setMinimumSize(new java.awt.Dimension(200, 14));
            jLabel2.setPreferredSize(new java.awt.Dimension(100, 14));
            add(jLabel2);
        }// </editor-fold>
        // Variables declaration - do not modify
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        // End of variables declaration
        // Do not use static, so that our on-the-fly look n feel change will work.
        private final Color cfc  = UIManager.getColor("ComboBox.foreground");
        private final Color cbc  = UIManager.getColor("ComboBox.background");
        private final Color csfc = UIManager.getColor("ComboBox.selectionForeground");
        private final Color csbc = UIManager.getColor("ComboBox.selectionBackground");
        private final Color cdfc = UIManager.getColor("ComboBox.disabledForeground");
        // For Nimbus look n feel.
        private final Color nimbus_csfc;
             Color c = UIManager.getColor("ComboBox:\"ComboBox.renderer\"[Selected].textForeground");
             // Pretty interesting. Applying "c" directly on the component will not
             // work. I have the create a new instance of Color based on "c" to make
             // it works.
             nimbus_csfc = c != null ? new Color(c.getRed(), c.getGreen(), c.getBlue()) : null;
        private final Color nimbus_csbc;
            Color c = UIManager.getColor("ComboBox:\"ComboBox.renderer\"[Selected].background");
             // Pretty interesting. Applying "c" directly on the component will not
             // work. I have the create a new instance of Color based on "c" to make
             // it works.
            nimbus_csbc = c != null ? new Color(c.getRed(), c.getGreen(), c.getBlue()) : null;
        @Override
        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
            final Color _csbc = csbc != null ? csbc : nimbus_csbc;
            final Color _csfc = csfc != null ? csfc : nimbus_csfc;
            this.setBackground(isSelected ? _csbc : cbc);
            this.setForeground(isSelected ? _csfc : cfc);
            jLabel1.setBackground(isSelected ? _csbc : cbc);
            jLabel1.setForeground(isSelected ? _csfc : cfc);
            jLabel2.setBackground(isSelected ? _csbc : cbc);
            jLabel2.setForeground(isSelected ? _csfc : cfc);
            final ResultType result = (ResultType)value;
            jLabel1.setText(result.symbol);
            jLabel2.setText(result.name);
            return this;
    NewJFrame.java
    package javaapplication24;
    import java.awt.Container;
    import java.awt.Dimension;
    import javax.swing.JComboBox;
    import javax.swing.JList;
    import javax.swing.JScrollBar;
    import javax.swing.JScrollPane;
    import javax.swing.SwingUtilities;
    import javax.swing.event.PopupMenuEvent;
    import javax.swing.event.PopupMenuListener;
    import javax.swing.plaf.basic.BasicComboPopup;
    * @author yccheok
    public class NewJFrame extends javax.swing.JFrame {
        public static class ResultType {
             * The symbol.
            public final String symbol;
             * The name.
            public final String name;
            public ResultType(String symbol, String name) {
                this.symbol = symbol;
                this.name = name;
            @Override
            public String toString() {
                return symbol;
        /** Creates new form NewJFrame */
        public NewJFrame() {
            initComponents();
            this.jComboBox1.addPopupMenuListener(this.getPopupMenuListener());
            this.jComboBox1.setRenderer(new ResultSetCellRenderer());
            this.jComboBox1.addItem(new ResultType("Number 1", "Normal"));
            this.jComboBox1.addItem(new ResultType("Number 2", "Normal"));
            this.jComboBox1.addItem(new ResultType("Number 3", "A VERY VERY VERY VERY long text"));
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            jComboBox1 = new javax.swing.JComboBox();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
            jComboBox1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jComboBox1ActionPerformed(evt);
            getContentPane().add(jComboBox1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 110, -1));
            pack();
        }// </editor-fold>
        private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {
            // TODO add your handling code here:
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                @Override
                public void run() {
                    final NewJFrame frame = new NewJFrame();
                    frame.setVisible(true);
        private PopupMenuListener getPopupMenuListener() {
            return new PopupMenuListener() {
                @Override
                public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
                    // We will have a much wider drop down list.
                    adjustPopupWidth(jComboBox1);
                @Override
                public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
                @Override
                public void popupMenuCanceled(PopupMenuEvent e) {
         * Adjust popup for combo box, so that horizontal scrollbar will not display.
         * Resize JComboBox dropdown doesn't work without customized ListCellRenderer
         * http://www.camick.com/java/source/BoundsPopupMenuListener.java
         * @param comboBox The combo box
        public static void adjustPopupWidth(JComboBox comboBox) {
            if (comboBox.getItemCount() == 0) return;
            Object comp = comboBox.getAccessibleContext().getAccessibleChild(0);
            if (!(comp instanceof BasicComboPopup)) {
                return;
            BasicComboPopup popup = (BasicComboPopup)comp;
            JList list = popup.getList();
            JScrollPane scrollPane = getScrollPane(popup);
            // Just to be paranoid enough.
            if (list == null || scrollPane == null) {
                return;
            //  Determine the maximimum width to use:
            //  a) determine the popup preferred width
            //  b) ensure width is not less than the scroll pane width
            int popupWidth = list.getPreferredSize().width
                            + 5  // make sure horizontal scrollbar doesn't appear
                            + getScrollBarWidth(popup, scrollPane);
            Dimension scrollPaneSize = scrollPane.getPreferredSize();
            popupWidth = Math.max(popupWidth, scrollPaneSize.width);
            //  Adjust the width
            scrollPaneSize.width = popupWidth;
            scrollPane.setPreferredSize(scrollPaneSize);
            scrollPane.setMaximumSize(scrollPaneSize);
         *  I can't find any property on the scrollBar to determine if it will be
         *  displayed or not so use brute force to determine this.
        private static int getScrollBarWidth(BasicComboPopup popup, JScrollPane scrollPane) {
            int scrollBarWidth = 0;
            JComboBox comboBox = (JComboBox)popup.getInvoker();
            if (comboBox.getItemCount() > comboBox.getMaximumRowCount()) {
                JScrollBar vertical = scrollPane.getVerticalScrollBar();
                scrollBarWidth = vertical.getPreferredSize().width;
            return scrollBarWidth;
         *  Get the scroll pane used by the popup so its bounds can be adjusted
        private static JScrollPane getScrollPane(BasicComboPopup popup) {
            JList list = popup.getList();
            Container c = SwingUtilities.getAncestorOfClass(JScrollPane.class, list);
            return (JScrollPane)c;
        // Variables declaration - do not modify
        private javax.swing.JComboBox jComboBox1;
        // End of variables declaration
    }Edited by: yccheok on Jan 13, 2011 9:35 AM

    Are these two lines intentionally or is it just a mismatch?
    jLabel2.setMaximumSize(new java.awt.Dimension(100, 14));
    jLabel2.setMinimumSize(new java.awt.Dimension(200, 14));
    2) But 1st row and 2nd row cell renderer, do not know 3rd row is holding such a long string.There is only one cell renderer for all rows, so no need for the rows to know each other.
    To calculate the exact maximum width of column two, you have to check each entry.
    If you can do this BEFORE creating the combo, you could do this in a loop similar to this pseudo code
    FontMetrics fm= jComboBox1.getFontMetrics(jComboBox1.getFont());
    foreach (column2String) {
      int length= fm.stringWidth(column2String);
      if (length>max) max= length;
    }Now you have a max value to dimension jLabel2 in your renderer.
    If you don't fill your combo in one go, but rather at runtime, you have to check at each
    jComboBox1.addItem(...)
    whether the string for label2 is extending the current max, redefine max, and repaint the combo.
    This second approach I haven't done so far, but that's how I would try.

  • 3.1EA1: Completion insight

    Hello,
    Im using SQL Developer on Windows 7 32-bit, Java 1.6.0_27, Oracle 10gR2
    Completion insight is not working when writing a query in an *.sql file. Eventough the database connection is opened and selected in the sql-worksheet.
    Kind regards,
    D.

    Hi Vadim,
    Thanks for picking up this thread. A quick update on my research for this matter...
    1) In 3.0.04.34, I have no trouble getting Code Insight to work on an opened SQL file once a connection is selected from the drop-down list.
    2) In 3.1.06.44, it does not work after selecting the first connection, but will after switching to another connection, e.g.,
    Test case:
    a. Open a SQL file containing "select deptno from emp"
    b. Select a "local_scott" connection from the drop-down list.
    c. Change text to "select deptno, e from emp" and ctrl-space with cursor immediately after the ", e". No result.
    d. Select another connection, say "remote_scott", from the drop-down list.
    e. Repeat (c), highlighting "empno" and "ename" in the list.  Enter to add to the SQL text.    3) In 3.1.06.44, running from the command line, I got the following exception while adding ", j" followed by ctrl-space:
    Registered TimesTen
    Parser.forest(): AssertionErrorunwind labeled_nonblock_stmt: unlabeled_nonblock_stmt!; @[0,11)
    Exception in thread "InsightThread" java.lang.NullPointerException
            at oracle.dbtools.raptor.insight.CompletionInsight.complete(CompletionInsight.java:740)
            at oracle.dbtools.raptor.insight.CompletionInsight$InsightThread.run(CompletionInsight.java:507)
    but it seemed to work fine anyway.
    It's great that a workaround exists. I leave any bug raising up to you.
    -Gary

  • Completion Insight not working

    A customer is using the same version of SQL Developer on the same workstation platform as myself.  My Completion Insight works, his does not.
    SQL Developer version 3.1.07 on Windows 7 Professional.
    Completion Insight is enabled under Tools->Preferences->Completion Insight.  Regardless of this setting the ctl + <space> shortcut works instantly for me, but under no circumstances for the customer.
    I made a test account on the DB that mirrors customer's privileges - my Completion Insight using the test account still works, so the problem must be with local to his install.
    I verified his SQL Developer files came from the same zip file I used for my own installation.
    Any ideas what is preventing his Completion from working?

    You might consider upgrading your customer to the latest release, v3.2.20.09
    In the meantime, I've noticed completion insight NOT working when there's a syntax/parsing issue. For example, what's in the worksheet code wise when they try it?
    With an empty worksheet, if they type select * from <ctrl><space>, does nothing come back?

  • Is it possible to search only one column in a multi column data store?

    Assume I create a context index using a multi column datastore for the columns first_name, middle_name, and last_name.
    Then I can search all of the columns in the index using contains().
    Is there any way to use contains() to just search one of the columns in a multi column datastore - just last_name for instance?
    In some cases a want to search all of the columns, in other cases just one of the columns.

    Yes, see the doc:
    http://download.oracle.com/docs/cd/B14117_01/text.101/b10730/cdatadic.htm#i1006391
    If you use the default behaviour, then your column data will be separated by XML-like tags.
    <first_name>John</first_name><middle_name>Peter</middle_name><last_name>Doe</last_name>
    You would then need to EITHER define each of these as sections, or use "auto_section_group". You can then search on them using
    ... contains (col, 'peter within middle_name') >0
    See example:
    SQL> drop table t;
    Table dropped.
    SQL> create table t (first varchar2(20), middle varchar2(20), last varchar2(20));
    Table created.
    SQL> insert into t values ('John', 'Peter', 'Doe');
    1 row created.
    SQL> insert into t values ('Peter', 'Frederik', 'Smith');
    1 row created.
    SQL> exec ctx_ddl.drop_preference('my_mcds')
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.create_preference('my_mcds', 'multi_column_datastore')
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute('my_mcds', 'columns', 'first,middle,last')
    PL/SQL procedure successfully completed.
    SQL> create index ti on t (first) indextype is ctxsys.context
      2  parameters ('datastore my_mcds section group ctxsys.auto_section_group');
    Index created.
    SQL> select * from t where contains (first, 'peter')>0;
    FIRST               MIDDLE            LAST
    John               Peter            Doe
    Peter               Frederik            Smith
    SQL> select * from t where contains (first, 'peter within middle')>0;
    FIRST               MIDDLE            LAST
    John               Peter            Doe

  • Group By Completion Insight Bug

    1. Open a connection and type the following:
    select d.dummy, count(d.dummy) from dual d group by d.dummy;
    2. Now modify the select list as follows:
    select d.dummy, count(d.dummy), count(d.dummy) sum from dual d group by d.dummy;
    3. Completion insight changes the code to:
    select d.dummy, count(d.dummy), count(d.dummy) from dual d group by d.dummy, count;
    ORA-00904: "COUNT": invalid identifier
    Version 2.1.1.64
    Java(TM) Platform     1.6.0_15
    Oracle IDE     2.1.1.64.45
    Versioning Support     2.1.1.64.45
    Mac OSX Leopard

    Hi Vadim,
    I agree with you about the order of the SQL clauses. They must have been pretty keen on it 'making sense' in English. Meh! ;)
    Autocomplete is cool, but as someone who can touch type (albeit at only ~70 wpm!), I usually find waiting for it to kick in a bit tiresome given that I can finish "select * from" in not much more than a second. I don't turn it off because it hardly ever gets a chance to fire.
    I do use autocomplete in some other tools; in VB, it gives you a canonical map of the object model you are working with (often there seem to be things missing in SQL Developer). In TextMate, on the other hand, it isn't so 'smart', but its wicked fast, which it does by simply relying on text in the current file. Both work well. I do understand there is a different set of challenges in a DBMS client, though.
    Incidentally, when I just tried selecting two tables simultaneously, the tool generated invalid SQL:
    select * from V_TN_SPAN_GRPS _, V_TNS_WITH_DEFAULT_CONTRACTS S
    (i.e. it supplied an underscore as the alias for the first view.)
    Also, Ctrl+Space doesn't work for me (I'm on a Mac). Actually, there appear to be several default keymappings that don't work on a Mac. Here is my version info...
    About
    Oracle SQL Developer 3.0.02
    Version 3.0.02
    Build MAIN-02.83
    Copyright © 2005,2010 Oracle. All Rights Reserved.
    IDE Version: 11.1.1.4.37.58.80
    Product ID: oracle.sqldeveloper
    Product Version: 11.1.2.02.83
    Version
    Component     Version
    =========     =======
    Java(TM) Platform     1.6.0_20
    Oracle IDE     3.0.02.83
    Versioning Support     3.0.02.83
    Properties
    Name     Value
    ====     =====
    apple.awt.graphics.UseOpenGL     false
    apple.awt.graphics.UseQuartz     false
    apple.laf.useScreenMenuBar     true
    awt.nativeDoubleBuffering     true
    awt.toolkit     apple.awt.CToolkit
    class.load.environment     oracle.ide.boot.IdeClassLoadEnvironment
    class.load.log.level     CONFIG
    class.transfer     delegate
    com.apple.macos.smallTabs     true
    com.apple.mrj.application.apple.menu.about.name     SQL_Developer
    com.apple.mrj.application.growbox.intrudes     false
    file.encoding     MacRoman
    file.encoding.pkg     sun.io
    file.separator     /
    gopherProxySet     false
    http.agent     Mozilla/5.0 (Java 1.6.0_20; Mac OS X 10.5.8 x86_64; en_US) ICEbrowser/v6_1_3
    ice.browser.forcegc     false
    ice.pilots.html4.ignoreNonGenericFonts     true
    ice.pilots.html4.tileOptThreshold     0
    ide.AssertTracingDisabled     true
    ide.bootstrap.start     1292186226787790000
    ide.build     MAIN-02.83
    ide.conf     /Users/henrycollingridge/software/oracle_sql_developer/3.0 EA2/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf
    ide.config_pathname     /Users/henrycollingridge/software/oracle_sql_developer/3.0 EA2/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf
    ide.debugbuild     false
    ide.devbuild     false
    ide.extension.search.path     sqldeveloper/extensions:jdev/extensions:ide/extensions
    ide.firstrun     true
    ide.java.minversion     1.6.0_04
    ide.main.class     oracle.ide.boot.IdeLauncher
    ide.patches.dir     ide/lib/patches
    ide.pref.dir     /Users/henrycollingridge/.sqldeveloper
    ide.product     oracle.sqldeveloper
    ide.splash.screen     splash.gif
    ide.startingcwd     "/Users/henrycollingridge/software/oracle_sql_developer/3.0 EA2/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin"
    ide.user.dir     /Users/henrycollingridge/.sqldeveloper
    ide.user.dir.var     IDE_USER_DIR
    ide.vcs.noapplications     true
    ide.work.dir     /Users/henrycollingridge/sqldeveloper
    java.awt.graphicsenv     apple.awt.CGraphicsEnvironment
    java.awt.printerjob     apple.awt.CPrinterJob
    java.class.path     ../../ide/lib/ide-boot.jar
    java.class.version     50.0
    java.endorsed.dirs     /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/endorsed
    java.ext.dirs     /Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext
    java.home     /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
    java.io.tmpdir     /var/folders/Z7/Z7MY8LDOGtWDoXjXAewXxk++0Wk/-Tmp-/
    java.library.path     .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
    java.naming.factory.initial     oracle.javatools.jndi.LocalInitialContextFactory
    java.protocol.handler.pkgs     oracle.jdevimpl.handler
    java.runtime.name     Java(TM) SE Runtime Environment
    java.runtime.version     1.6.0_20-b02-279-9M3165
    java.specification.name     Java Platform API Specification
    java.specification.vendor     Sun Microsystems Inc.
    java.specification.version     1.6
    java.util.logging.config.file     logging.conf
    java.vendor     Apple Inc.
    java.vendor.url     http://www.apple.com/
    java.vendor.url.bug     http://bugreport.apple.com/
    java.version     1.6.0_20
    java.vm.info     mixed mode
    java.vm.name     Java HotSpot(TM) 64-Bit Server VM
    java.vm.specification.name     Java Virtual Machine Specification
    java.vm.specification.vendor     Sun Microsystems Inc.
    java.vm.specification.version     1.0
    java.vm.vendor     Apple Inc.
    java.vm.version     16.3-b01-279
    jdbc.library     /Users/henrycollingridge/software/oracle_sql_developer/3.0 EA2/SQLDeveloper.app/Contents/Resources/sqldeveloper/jdbc/lib/ojdbc5.jar
    line.separator     \n
    log.file.name     ../\log\datamodeler.log
    mrj.build     9M3165
    mrj.version     1050.1.6.0_20-279
    oracle.home     /Users/henrycollingridge/software/oracle_sql_developer/3.0 EA2/SQLDeveloper.app/Contents/Resources/sqldeveloper
    oracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG     true
    oracle.jdbc.mapDateToTimestamp     false
    oracle.translated.locales     de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW
    oracle.xdkjava.compatibility.version     9.0.4
    orai18n.library     /Users/henrycollingridge/software/oracle_sql_developer/3.0 EA2/SQLDeveloper.app/Contents/Resources/sqldeveloper/jlib/orai18n.jar
    os.arch     x86_64
    os.name     Mac OS X
    os.version     10.5.8
    path.separator     :
    reserved_filenames     con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout,conout$
    sqldev.debug     false
    sun.arch.data.model     64
    sun.awt.exception.handler     apple.awt.CToolkit$EventQueueExceptionHandler
    sun.boot.class.path     ../../rdbms/jlib/ojdi.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jsfd.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/sunrsasign.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/charsets.jar
    sun.boot.library.path     /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries
    sun.cpu.endian     little
    sun.cpu.isalist     
    sun.io.unicode.encoding     UnicodeLittle
    sun.java.launcher     SUN_STANDARD
    sun.java2d.ddoffscreen     false
    sun.jnu.encoding     MacRoman
    sun.management.compiler     HotSpot 64-Bit Server Compiler
    sun.os.patch.level     unknown
    svnkit.sax.useDefault     true
    user.country     US
    user.dir     /Users/henrycollingridge/software/oracle_sql_developer/3.0 EA2/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin
    user.home     /Users/henrycollingridge
    user.language     en
    user.name     henrycollingridge
    user.timezone     Pacific/Auckland
    windows.shell.font.languages     
    Extensions
    Name     Identifier     Version     Status
    ====     ==========     =======     ======
    Check For Updates     oracle.ide.webupdate     11.1.1.4.37.58.80     Loaded
    Code Editor     oracle.ide.ceditor     11.1.1.4.37.58.80     Loaded
    Component Palette     oracle.ide.palette1     11.1.1.4.37.58.80     Loaded
    Database Connection Support     oracle.jdeveloper.db.connection     11.1.1.4.37.58.80     Loaded
    Database Object Explorers     oracle.ide.db.explorer     11.1.1.4.37.58.80     Loaded
    Database UI     oracle.ide.db     11.1.1.4.37.58.80     Loaded
    Diff/Merge     oracle.ide.diffmerge     11.1.1.4.37.58.80     Loaded
    Extended IDE Platform     oracle.javacore     11.1.1.4.37.58.80     Loaded
    External Tools     oracle.ide.externaltools     11.1.1.4.37.58.80     Loaded
    File Support     oracle.ide.files     11.1.1.4.37.58.80     Loaded
    Help System     oracle.ide.help     11.1.1.4.37.58.80     Loaded
    History Support     oracle.jdeveloper.history     11.1.1.4.37.58.80     Loaded
    Import/Export Support     oracle.ide.importexport     11.1.1.4.37.58.80     Loaded
    Index Migrator support     oracle.ideimpl.indexing-migrator     11.1.1.4.37.58.80     Loaded
    JDeveloper Runner     oracle.jdeveloper.runner     11.1.1.4.37.58.80     Loaded
    Log Window     oracle.ide.log     11.1.1.4.37.58.80     Loaded
    Mac OS X Adapter     oracle.ideimpl.apple     11.1.1.4.37.58.80     Loaded
    Navigator     oracle.ide.navigator     11.1.1.4.37.58.80     Loaded
    Object Gallery     oracle.ide.gallery     11.1.1.4.37.58.80     Loaded
    Oracle IDE     oracle.ide     11.1.1.4.37.58.80     Loaded
    Oracle SQL Developer     oracle.sqldeveloper     11.1.2.02.83     Loaded
    Oracle SQL Developer - 3rd Party Database Browsers     oracle.sqldeveloper.thirdparty.browsers     11.1.1.02.83     Loaded
    Oracle SQL Developer - DBA Navigator     oracle.sqldeveloper.dbanavigator     11.1.1.02.83     Loaded
    Oracle SQL Developer - Extras     oracle.sqldeveloper.extras     1.1.1.02.83     Loaded
    Oracle SQL Developer - File Navigator     oracle.sqldeveloper.filenavigator     11.1.1.02.83     Loaded
    Oracle SQL Developer - Migrations Antlr3 Translator     oracle.sqldeveloper.migration.translation.core_antlr3     11.1.1.02.83     Loaded
    Oracle SQL Developer - Migrations Application Migration     oracle.sqldeveloper.migration.application     11.1.1.02.83     Loaded
    Oracle SQL Developer - Migrations Core     oracle.sqldeveloper.migration     11.1.1.02.83     Loaded
    Oracle SQL Developer - Migrations DB2     oracle.sqldeveloper.migration.db2     11.1.1.02.83     Loaded
    Oracle SQL Developer - Migrations DB2 Translator     oracle.sqldeveloper.migration.translation.db2     11.1.1.02.83     Loaded
    Oracle SQL Developer - Migrations Microsoft Access     oracle.sqldeveloper.migration.msaccess     11.1.1.02.83     Loaded
    Oracle SQL Developer - Migrations Microsoft SQL Server     oracle.sqldeveloper.migration.sqlserver     11.1.1.02.83     Loaded
    Oracle SQL Developer - Migrations MySQL     oracle.sqldeveloper.migration.mysql     11.1.1.02.83     Loaded
    Oracle SQL Developer - Migrations Sybase Adaptive Server     oracle.sqldeveloper.migration.sybase     11.1.1.02.83     Loaded
    Oracle SQL Developer - Migrations T-SQL Translator     oracle.sqldeveloper.migration.translation.core     11.1.1.02.83     Loaded
    Oracle SQL Developer - Migrations Teradata     oracle.sqldeveloper.migration.teradata     11.1.1.02.83     Loaded
    Oracle SQL Developer - Migrations Translation UI     oracle.sqldeveloper.migration.translation.gui     11.1.1.02.83     Loaded
    Oracle SQL Developer - Object Viewer     oracle.sqldeveloper.oviewer     11.1.1.02.83     Loaded
    Oracle SQL Developer - Real Time SQL Monitoring     oracle.sqldeveloper.sqlmonitor     11.1.1.02.83     Loaded
    Oracle SQL Developer - Reports     oracle.sqldeveloper.report     11.1.1.02.83     Loaded
    Oracle SQL Developer - Scheduler     oracle.sqldeveloper.scheduler     11.1.1.02.83     Loaded
    Oracle SQL Developer - Schema Browser     oracle.sqldeveloper.schemabrowser     11.1.1.02.83     Loaded
    Oracle SQL Developer - SearchBar     oracle.sqldeveloper.searchbar     11.1.1.02.83     Loaded
    Oracle SQL Developer - Snippet     oracle.sqldeveloper.snippet     11.1.1.02.83     Loaded
    Oracle SQL Developer - Spatial     oracle.sqldeveloper.spatial     11.1.1.02.83     Loaded
    Oracle SQL Developer - TimesTen     oracle.sqldeveloper.timesten     2.0.0.02.83     Loaded
    Oracle SQL Developer - Tuning     oracle.sqldeveloper.tuning     11.1.1.02.83     Loaded
    Oracle SQL Developer - Unit Test     oracle.sqldeveloper.unit_test     11.1.1.02.83     Loaded
    Oracle SQL Developer - User Extensions Support     oracle.sqldeveloper.userextensions     11.1.1.02.83     Loaded
    Oracle SQL Developer - Worksheet v2     oracle.sqldeveloper.worksheet     11.1.1.02.83     Loaded
    Oracle SQL Developer - XML Schema     oracle.sqldeveloper.xmlschema     11.1.1.02.83     Loaded
    Oracle SQL Developer Data Modeler     oracle.datamodeler.viewer     3.0.0.654     Loaded
    Oracle SQL Developer Data Modeler - Reports     oracle.sqldeveloper.datamodeler_reports     11.1.1.02.83     Loaded
    PROBE Debugger     oracle.jdeveloper.db.debug.probe     11.1.1.4.37.58.80     Loaded
    Peek     oracle.ide.peek     11.1.1.4.37.58.80     Loaded
    Persistent Storage     oracle.ide.persistence     11.1.1.4.37.58.80     Loaded
    Property Inspector     oracle.ide.inspector     11.1.1.4.37.58.80     Loaded
    QuickDiff     oracle.ide.quickdiff     11.1.1.4.37.58.80     Loaded
    Replace With     oracle.ide.replace     11.1.1.4.37.58.80     Loaded
    Runner     oracle.ide.runner     11.1.1.4.37.58.80     Loaded
    VHV     oracle.ide.vhv     11.1.1.4.37.58.80     Loaded
    Versioning Support     oracle.jdeveloper.vcs     11.1.1.4.37.58.80     Loaded
    Versioning Support for Subversion     oracle.jdeveloper.subversion     11.1.1.4.37.58.80     Loaded
    Virtual File System     oracle.ide.vfs     11.1.1.4.37.58.80     Loaded
    Web Browser and Proxy     oracle.ide.webbrowser     11.1.1.4.37.58.80     Loaded
    XML Editing Framework IDE Extension     oracle.ide.xmlef     11.1.1.4.37.58.80     Loaded
    audit     oracle.ide.audit     11.1.1.4.37.58.80     Loaded
    classpath: protocol handler extension     oracle.jdeveloper.classpath     11.1.1.0.0     Loaded
    jdukshare     oracle.bm.jdukshare     11.1.1.4.37.58.80     Loaded
    mof-xmi     oracle.mof.xmi     11.1.1.4.37.58.80     Loaded
    oracle.ide.dependency     oracle.ide.dependency     11.1.1.4.37.58.80     Loaded
    oracle.ide.indexing     oracle.ide.indexing     11.1.1.4.37.58.80     Loaded
    palette2     oracle.ide.palette2     11.1.1.4.37.58.80     Loaded
    status     oracle.ide.status     11.1.1.4.37.58.80     Loaded

Maybe you are looking for