1 2 Previous Next 18 Replies Latest reply on Apr 9, 2015 9:20 PM by Ismail_K

    EA2 Request for EA3 feature to keep editor windows open

    Kyle {unique}

      I would like the ability to turn off editor window auto close.

       

      I understand that means that I will have to manually close a window when I'm done with it.  I understand that means the tool may use more memory and resources while "extra" windows remain open.

       

       

       

      But I think that letting the developer control which editor windows are open or closed is preferable to letting the tool close windows in what appears to be a random (the choice it makes about which file to close is not obvious and frequently includes the file I had just opened immediately prior to opening a second file) manner.

       

      I have Max Open PL/SQL editors set to 75 already and this behavior starts when I have about 3 open.

        • 1. Re: EA2 Request for EA3 feature to keep editor windows open
          thatJeffSmith-Oracle

          That would be a bug. For some reason the framework thinks you have 75 editors open when you only have 3.

           

          Run this in a worksheet

           

          set hidden param pinContent = true;

          set hidden param pinCount = true;

           

          You should see then in the log some output like 'Pinned 2 editors...pinned node sqldev.nav:Ide'

          1 person found this helpful
          • 2. Re: EA2 Request for EA3 feature to keep editor windows open
            Kyle {unique}

            Is there another setting to run on to see that message? 

             

            I see the "Logging Page" tab at the bottom of my application window, but no text like that.  I tried with and without the debugging turned on in /Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf

             

            Am I looking in the right place for that message?

            • 3. Re: EA2 Request for EA3 feature to keep editor windows open
              Gary Graham-Oracle

              Try opening SQL Developer from its bin directory via a command line console:  sqldeveloper.exe

               

              Open a worksheet on a connection, execute the set hidden parameters statements per Jeff, then open some PL/SQL package specs, bodies, procedures, and functions.  You will see output in the command line console similar to...

              LOAD TIME : 498UsersCache.fillIn() time = 24  ret==null?: false

              Pinned 1 editors

              Pinned node sqldev.nav:IdeConnections%2523xe_hr//HR/PACKAGE/OPTSTATSBRIEF

              Pinned 2 editors

              Pinned node sqldev.nav:IdeConnections%2523xe_hr//HR/PACKAGE/OPTSTATSBRIEF

              Pinned node sqldev.nav:IdeConnections%2523xe_hr//HR/PACKAGE/OPTSTATSBRIEF/PACKA

              GE+BODY/OPTSTATSBRIEF

              • 4. Re: EA2 Request for EA3 feature to keep editor windows open
                mi*359433*ee

                I am running 4.1.0.18 and had similar issues with pinned tabs staying open since version 4.0. I decided to turn off the autopin in preferences and manage the pinning myself. I found the behavior predictable and repeatable. Makes things much easier to manage.

                 

                Here are my observations:

                • Pinning is only available if a connection is chosen (not sure why it needs to be this way)
                • When opening a PL/SQL file, the tab is unpinned by default. If there are other unpinned tabs, the new PL/SQL tab will replace all unpinned tabs.
                • If after opening a PL/SQL file, the user manually pin the tab. It will stay pinned until user closes it. Opening new files will not close the pinned tabs.
                • There seems to be a bug on rendering of pin/unpin icon. Unpinning a pinned tab does not change the icon to the unpinned icon. It does show a "depression" around the pinned icon.

                 

                So, what I am doing now is (with autopin turned off):

                1. Open file
                2. Select connection
                3. Pin the tab
                4. Repeat when opening another file

                 

                This approach should address your point on letting developer control opening and closing of windows. The main issue I had before was that I am not sure if opening a file will close my other opened files. With this approach, I can be certain that the tabs I pinned will stay open.

                • 5. Re: EA2 Request for EA3 feature to keep editor windows open
                  Kyle {unique}

                  Gary, my log tab looks nothing like that.  Am I looking in the right place for that message?

                   

                  Here is what I get when I open a file (I started by clearing previous logs)

                  FINE76910oracle.javatools.db.execute.StatementWrapperdev - Prospect Pro CCCP - front end: SELECT /*OracleDictionaryQueries.ALL_MAIN_OBJECT_NAMESPACE_QUERY*/ OBJECT_NAME FROM SYS.ALL_OBJECTS WHERE OWNER = '' AND OBJECT_NAME LIKE 'PACKAGE_BODY%' AND OBJECT_TYPE IN ( 'CUBE','CUBE BUILD PROCESS','CUBE DIMENSION','FUNCTION','MATERIALIZED VIEW','MEASURE FOLDER','OLAPACL','PACKAGE','PROCEDURE','REALM CONSTRAINT','SEQUENCE','SYNONYM','TABLE','TYPE','VIEW' ) Binds used: '', 'PACKAGE_BODY%', Executing query and processing results took 2.870475ms.
                  FINE76903oracle.javatools.db.AbstractDBObjectProviderDatabase dev -  timestamp resume
                  FINE76892oracle.javatools.db.AbstractDBObjectProviderDatabase dev -  front end: timestamp suspend
                  WARNING7688105oracle.javatools.db.AbstractDBObjectProvidergetObject cannot process wildcards - use criteria "name" not "nameLike".
                  FINEST76876826oracle.olap.syntaxbuilder.editor.plugins.CalculatedMeasurePluginsFactorycreating plugins?oracle.dbtools.raptor.navigator.plsql.PlSqlNode
                  FINE76860oracle.javatools.ui.GraphicsUtilsadjusted point = java.awt.Point[x=222,y=39225]
                  FINE76850oracle.javatools.ui.GraphicsUtilspopup menu show point = java.awt.Point[x=-1660,y=837]
                  FINE76840oracle.javatools.ui.GraphicsUtilsyOffset = 277
                  FINE76830oracle.javatools.ui.GraphicsUtilsxOffset = 0
                  FINE76820oracle.javatools.ui.GraphicsUtilsnon-zero offset indicates popup point was adjusted to ensure it doesn't extend beyond the display rectangle
                  FINE76810oracle.javatools.ui.GraphicsUtilsscreen size = java.awt.Dimension[width=1890,height=995]
                  FINE76803068oracle.javatools.ui.GraphicsUtilspopup menu preferred size = java.awt.Dimension[width=115,height=158]
                  • 6. Re: EA2 Request for EA3 feature to keep editor windows open
                    thatJeffSmith-Oracle

                    start SQL Developer from a cmd window, out of the bin directory. The messages will be written to that window as standard output.

                    • 7. Re: EA2 Request for EA3 feature to keep editor windows open
                      Gary Graham-Oracle

                      Kyle,

                       

                      In 4.1, the View > Log pane will show two tabs (Messages, Statements) by default, plus add a Logging Page tab if you have altered your sqldeveloper.conf file to have IncludeConfFile  sqldeveloper-debug.conf.


                      But the set hidden param statements do not influence the Logging Page output, as your last post shows. The extra logging only goes to the cmd line console.

                      • 8. Re: EA2 Request for EA3 feature to keep editor windows open
                        Ismail_K

                        Ok I think I got it.  I'm running SQL Developer on Mac.

                         

                        I open via the command line and set the hidden pin parameters that Jeff mentioned above.  When I open the first plsql package the log says, "Pinned 173 editors", followed by "Pinned node file:" with the path to every file in that directory, which is 173 files.  Further clicks after that show "Pinned 50 editors".  My Max Open PL/SQL editors setting is set to 50.

                         

                        Thanks, I hope this helps get this bug fixed.

                         

                        Ismail

                        • 9. Re: EA2 Request for EA3 feature to keep editor windows open
                          Gary Graham-Oracle

                          In your workflow, you always open a file containing PL/SQL (presumably with the Code Editor preference of Link Stored Procedures to Files checked).

                           

                          I just want to note the scenario I use for this discussion only includes existing stored procedures in the schema. None of them were opened first as linked files.

                          • 10. Re: Re: EA2 Request for EA3 feature to keep editor windows open
                            Kyle {unique}

                            OK, I have it now.  Previously I was using either to dock icon or my "sql" alias at the command line.

                             

                            alias sql="nohup open -n /Applications/SQLDeveloper.app > /dev/null 2>&1 &"


                            In order to view that new Java popup console window I had to change to executing a different startup file.


                            sql_log=/tmp/sqldev.`date "+%Y%m%d%H%M%S"`.log

                            alias sqld="nohup open -n /Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin/sqldeveloper >> ${sql_log} 2>&1 &"


                            So now I can open the debug version with the "sqld" command.  I guess I'll be changing the Max Open PL/SQL editors to something like 1024 (or more)

                             

                            Although "Autopin PL/SQL editors" does not pin PL/SQL files opened from the file system.


                            On opening the very first window I get a message that 76 are open and pinned already.

                            Oracle SQL Developer

                            Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.

                             

                            Java asserts are enabled!

                             

                             

                            LOAD TIME : 223UsersCache.fillIn() time = 4  ret==null?: true

                            Pinned 76 editors


                            • 11. Re: EA2 Request for EA3 feature to keep editor windows open
                              mi*359433*ee

                              Yes. I always open PL/SQL files from my SVN directory instead of opening from schema. Link Stored Procedures to Files is checked.

                              • 12. Re: EA2 Request for EA3 feature to keep editor windows open
                                Kyle {unique}

                                Oh and using the window splitter counts as a new editor window too.  That also will make an unpinned window go away.

                                • 13. Re: EA2 Request for EA3 feature to keep editor windows open
                                  Vadim Tropashko-Oracle

                                  It would be useful to summarize all the findings into a bug. I agree that for file based sources witnessing pin tool button disabled is wrong. I disagree that this button is unpinned by default; what I see is that its state is exactly as Preferences->Code editor->Autopin Sql Editors says. To return to the main thread, do we have a test case where N editors are pinned, and opening N+1 editor closing some of the pinned editors when Max Open PL/SQL editors is greater than N?

                                  • 14. Re: EA2 Request for EA3 feature to keep editor windows open
                                    Ismail_K

                                    Hi Vadim.  Thank you for joining this thread.

                                     

                                    Please forgive me, but I don't fully understand your message, nor do I fully understand Gary's last comment either.

                                     

                                    We have previously opened a thread about this issue without any resolution: "Autopin PL/SQL editors" not pinning consistently?

                                    Also, we have logged a support ticket with Oracle as well; if I can get more information on that I'll add it to this post.

                                     

                                    Here's my test case:

                                     

                                    1. Open SQL Developer Version 4.1.0.18 on the command line on my Mac using "open -n sqldeveloper" from the /Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin directory.

                                     

                                    2. Set the hidden params indicated earlier in this thread.

                                     

                                    3. Open a pl/sql package body file from my local machine using the Files viewer.  The package body opens up pinned and connected to the appropriate database.  I get this in the log:

                                    Oracle SQL Developer

                                    Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.

                                     

                                    Java asserts are enabled!

                                     

                                     

                                    LOAD TIME : 200UsersCache.fillIn() time = 69  ret==null?: true

                                    Pinned 173 editors

                                    Pinned node file:/...

                                    Pinned node file:/...

                                    Pinned node file:/...

                                    Pinned node file:/...

                                    .

                                    .

                                    .

                                    (The log lists the 173 files that I have in that directory)

                                    (I have removed the actual file path and file names)

                                     

                                    4. I opened up another pl/sql file from the same directory, and the first file that I opened, which was pinned, gets closed/removed.  Here is the log on that:

                                    Pinned 50 editors

                                    Pinned node file:/...

                                    Pinned node file:/...

                                    Pinned node file:/...

                                    Pinned node file:/...

                                    .

                                    .

                                    .

                                    (The log lists the last 50 files in the directory, sorted alphabetically)

                                    (I have removed the actual file path and file names)

                                     

                                    5. Apparently now the application thinks that I have 50 editors pinned.  If I open a file that comes logically before the last 50 alphabetically-sorted files in the same directory, it opens unpinned.  If I open a file that is logically within the last 50 alphabetically-sorted files, it opens up pinned.

                                     

                                    ---

                                    This seems to be the bug that we are dealing with, where we experience "random" pinned pl/sql editors being closed without our "permission".

                                     

                                    Lastly, a question.  What is the reason for having the pinning/unpinning capability?  If I open a file that I'm referencing or editing, I don't want anything to close it...ever.  Perhaps there is a good reason for this that I am unaware of.

                                     

                                    Thank you.

                                    1 2 Previous Next