Package com.intellij.openapi.fileEditor

Examples of com.intellij.openapi.fileEditor.OpenFileDescriptor


  public OpenFileDescriptor getOpenFileDescriptor(int offset) {
    VirtualFile file = getFile();
    if (file == null) return null;
    if (myProject == null) return null;
    return new OpenFileDescriptor(myProject, file, offset);
  }
View Full Code Here


    if (element == null) return;
    VirtualFile file = element.getContainingFile().getVirtualFile();
    TextRange range = element.getTextRange();
    int offset = range.getStartOffset() + startOffset;
    Project project = element.getProject();
    FileEditorManager.getInstance(project).openTextEditor(new OpenFileDescriptor(project, file, offset), requestFocus);
  }
View Full Code Here

            if (offset < 0) {
                offset = 0;
            }

            if (file.isValid()) {
                FileEditorManager.getInstance(project).openTextEditor(new OpenFileDescriptor(project, file, offset), true);
            } else {
                log.error("VirtualFile.isValid() returned false. Possibly tried to open a deleted file.");
            }
        } else {
            log.error("Unable to retrieve a Document for the VirtualFile " + file.getName() + ".");
View Full Code Here

TOP

Related Classes of com.intellij.openapi.fileEditor.OpenFileDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.