This discussion is archived
2 Replies Latest reply: Jan 21, 2013 2:54 PM by 905823 RSS

Get currently opened file in code editor

905823 Newbie
Currently Being Moderated
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 Journeyer
    Currently Being Moderated
    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 Newbie
    Currently Being Moderated
    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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points