com.intellij.openapi.fileEditor
Class OpenFileDescriptor

java.lang.Object
  extended by com.intellij.openapi.fileEditor.OpenFileDescriptor
All Implemented Interfaces:
Navigatable

public class OpenFileDescriptor
extends java.lang.Object
implements Navigatable


Constructor Summary
OpenFileDescriptor(Project project, VirtualFile file)
           
OpenFileDescriptor(Project project, VirtualFile file, int offset)
           
OpenFileDescriptor(Project project, VirtualFile file, int line, int col)
           
 
Method Summary
 boolean canNavigate()
           
 boolean canNavigateToSource()
           
 int getColumn()
           
 VirtualFile getFile()
           
 int getLine()
           
 int getOffset()
           
 Project getProject()
           
 void navigate(boolean requestFocus)
          Open editor and select/navigate to the object there if possible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenFileDescriptor

public OpenFileDescriptor(Project project,
                          VirtualFile file,
                          int offset)
Throws:
java.lang.IllegalArgumentException - if file is null

OpenFileDescriptor

public OpenFileDescriptor(Project project,
                          VirtualFile file,
                          int line,
                          int col)
Throws:
java.lang.IllegalArgumentException - if file is null

OpenFileDescriptor

public OpenFileDescriptor(Project project,
                          VirtualFile file)
Throws:
java.lang.IllegalArgumentException - if file is null
Method Detail

getFile

public VirtualFile getFile()

getOffset

public int getOffset()

getLine

public int getLine()

getColumn

public int getColumn()

navigate

public void navigate(boolean requestFocus)
Description copied from interface: Navigatable
Open editor and select/navigate to the object there if possible. Just do nothing if navigation is not possible like in case of a package

Specified by:
navigate in interface Navigatable

canNavigate

public boolean canNavigate()
Specified by:
canNavigate in interface Navigatable
Returns:
false if navigation is not possible for any reason.

canNavigateToSource

public boolean canNavigateToSource()
Specified by:
canNavigateToSource in interface Navigatable
Returns:
false if navigation to source is not possible for any reason. Source means some kind of editor

getProject

public Project getProject()