2 Replies Latest reply: Jan 21, 2013 4:54 PM by 905823 RSS

    Get currently opened file in code editor

    905823
      Hi,

      I am writing an extension for Oracle Jdeveloper. I have created a view and now I need to access the currently opened file in the code editor. However, all I get is the context of my own view:

      Context.newIdeContext(this);

      But how can I get the Code Editor and its currently opened file? Any ideas?

      Regards,

      Michael
        • 1. Re: Get currently opened file in code editor
          John 'Jb' Brock-Oracle
          There are a couple of blog posts that may help you out with this.

          https://blogs.oracle.com/jdevextensions/tags/files

          HTH,

          --jb                                                                                                                                                                                                                                                                               
          • 2. Re: Get currently opened file in code editor
            905823
            Hi John,

            thanks. I found the solution:

            Editor editor = EditorManager.getEditorManager().getCurrentEditor();

            This is the way to go.

            Regards,

            Michael

            Edited by: M. Gebhart (QA82) on 21.01.2013 14:54