Examples of IFileEditorInput


Examples of org.eclipse.ui.IFileEditorInput

     *            the erlang editor which is used to get the current selection
     */
    public AbstractErlMemberSelection(final ITextEditor editor) {
        final ITextSelection selection = (ITextSelection) editor.getSelectionProvider()
                .getSelection();
        final IFileEditorInput input = (IFileEditorInput) editor.getEditorInput();
        document = editor.getDocumentProvider().getDocument(input);
        final IFile afile = input.getFile();
        store(selection, afile, document);
    }
View Full Code Here

Examples of org.eclipse.ui.IFileEditorInput

        final IEditorInput input = editor.getEditorInput();
        if (!(input instanceof IFileEditorInput)) {
            throw new WranglerException("Can not refactor external modules!");
        }
        document = editor.getDocumentProvider().getDocument(input);
        final IFileEditorInput fileInput = (IFileEditorInput) input;
        final IFile theFile = fileInput.getFile();
        store(selection, theFile, document);
    }
View Full Code Here

Examples of org.eclipse.ui.IFileEditorInput

                            "For running Wrangler refactorings, all Erlang files need to be saved. Would you like to continue with saving files?");
            if (answer) {
                for (final IEditorPart ed : dirtyEditors) {
                    if (ed instanceof ITextEditor) {
                        final ITextEditor ted = (ITextEditor) ed;
                        final IFileEditorInput fei = (IFileEditorInput) ted
                                .getEditorInput();
                        if (WranglerUtils.isErlangFile(fei.getFile())) {
                            ed.doSave(null);
                        }

                    }
                }
View Full Code Here

Examples of org.eclipse.ui.IFileEditorInput

     * @param editor
     *            editor which has the document
     * @return document is conatained by the editor
     */
    static public IDocument getDocument(final ITextEditor editor) {
        final IFileEditorInput input = (IFileEditorInput) editor.getEditorInput();
        final IDocument doc = editor.getDocumentProvider().getDocument(input);

        return doc;
    }
View Full Code Here

Examples of org.eclipse.ui.IFileEditorInput

    String suffix = computeSuffix(context, node);

    IEditorPart editorPart = Workbench.getInstance()
        .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
    if (editorPart != null) {
      IFileEditorInput input = (IFileEditorInput) editorPart
          .getEditorInput();
      IFile file = input.getFile();
      String fileName = file.getFullPath().toString();
      if (fileName.endsWith(".tml")) {
        String aimFileName = null;
        String aimNameShort = null;
        IProject activeProject = file.getProject();
View Full Code Here

Examples of org.eclipse.ui.IFileEditorInput

    String suffix = "";// computeSuffix(context, node);

    IEditorPart editorPart = Workbench.getInstance()
        .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
    if (editorPart != null) {
      IFileEditorInput input = (IFileEditorInput) editorPart
          .getEditorInput();
      IFile file = input.getFile();
      String fileName = file.getFullPath().toString();
      if (fileName.endsWith(".tml")) {
        String aimFileName = null;
        String aimNameShort = null;
        IProject activeProject = file.getProject();
View Full Code Here

Examples of org.eclipse.ui.IFileEditorInput

    List results = new ArrayList();
    String suffix = computeSuffix(context, node);

    IEditorPart editorPart = Workbench.getInstance().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
    if (editorPart != null) {
      IFileEditorInput input = (IFileEditorInput) editorPart.getEditorInput();
      IFile file = input.getFile();
      String fileName = file.getFullPath().toString();
      if (fileName.endsWith(".tml")) {
        String aimFileName = null;
        String aimNameShort = null;
        IProject activeProject = file.getProject();
View Full Code Here

Examples of org.eclipse.ui.IFileEditorInput

    public boolean equals(Object obj) {
        if (!(obj instanceof IFileEditorInput)) {
            return false;
        }
        IFileEditorInput o = (IFileEditorInput) obj;
        return getFile().equals(o.getFile());
    }
View Full Code Here

Examples of org.eclipse.ui.IFileEditorInput

      if (dot != -1)
        pname = pname.substring(dot + 1);
     
      String eventTypeSig = Signature.createTypeSignature(pname, false);
     
      IFileEditorInput file = (IFileEditorInput) editor.getEditorInput();
      ICompilationUnit unit = JavaCore.createCompilationUnitFrom(file.getFile());
      IType meType = unit.getType(className);
      IMember member = meType.getMethod(methodDesc.getName(),new String[] {eventTypeSig });
      JavaUI.revealInEditor(editor, (IJavaElement) member);
    }   
  }
View Full Code Here

Examples of org.eclipse.ui.IFileEditorInput

      if (dot != -1)
        pname = pname.substring(dot + 1);
     
      String eventTypeSig = Signature.createTypeSignature(pname, false);
     
      IFileEditorInput file = (IFileEditorInput) editor.getEditorInput();
      ICompilationUnit unit = JavaCore.createCompilationUnitFrom(file.getFile());
      String name = file.getName();
      dot = name.lastIndexOf('.');
      if (dot != -1)
        name = name.substring(0, dot);
      IType type = unit.getType(name);
     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.