Examples of TextEditor


Examples of com.intellij.openapi.fileEditor.TextEditor

                                if (activeConnection == connectionHandler) {
                                    FileEditor[] fileEditors = fileEditorManager.getEditors(openFile);
                                    for (FileEditor fileEditor : fileEditors) {
                                        Editor editor = null;
                                        if (fileEditor instanceof TextEditor) {
                                            TextEditor textEditor = (TextEditor) fileEditor;
                                            editor = textEditor.getEditor();
                                        }
                                        else if (fileEditor instanceof BasicTextEditor) {
                                            BasicTextEditor textEditor = (BasicTextEditor) fileEditor;
                                            editor = textEditor.getEditor();
                                        }

                                        if (editor != null) {
                                            DocumentUtil.refreshEditorAnnotations(editor);
                                        }
View Full Code Here

Examples of com.intellij.openapi.fileEditor.TextEditor

        for (FileEditor fileEditor : selectedEditors) {
            if (fileEditor instanceof BasicTextEditor) {
                BasicTextEditor textEditor = (BasicTextEditor) fileEditor;
                predefinedText = textEditor.getEditor().getSelectionModel().getSelectedText();
            } else if (fileEditor instanceof TextEditor) {
                TextEditor textEditor = (TextEditor) fileEditor;
                predefinedText = textEditor.getEditor().getSelectionModel().getSelectedText();
            }
            if (isValidPredefinedText(predefinedText)) {
                break;
            } else {
                predefinedText = null;
View Full Code Here

Examples of com.intellij.openapi.fileEditor.TextEditor

    private Editor openTextEditor(Project project, VirtualFile virtualFile) {
      Editor editor = null;
      FileEditor[] fileEditors = FileEditorManager.getInstance(project).openFile(virtualFile, true);
      for (FileEditor fileEditor : fileEditors) {
        if (fileEditor instanceof TextEditor) {
          TextEditor textEditor = (TextEditor) fileEditor;
          editor = textEditor.getEditor();
        }
      }
      return editor;
    }
View Full Code Here

Examples of com.nokia.mid.ui.TextEditor

        g.setColor(0xFFFFFF);
        g.fillRect(0, 0, 300, 300);
       
      }
    };
    TextEditor editor = TextEditor.createTextEditor(10, 0, 100, 1);
    editor.setParent(c);
    Display d = Display.getDisplay(this);
    d.setCurrent(c);
    editor.setFocus(true);
    editor.setPosition(10, 10);
    editor.setSize(100, 30);
    editor.setFont(Font.getDefaultFont());
    editor.setBackgroundColor(0xff);
    editor.setForegroundColor(0);
    editor.setVisible(true);
    editor.setContent("test");
    editor.insert("a", 2);
    editor.setCaret(2);
    System.out.println(editor.getLineMarginHeight());
  }
View Full Code Here

Examples of com.zaranux.os.client.programs.TextEditor

  @Override
  protected void execute(AsyncCallback<Boolean> callback) {
    String[] args = getArgs();
    for(String path : args)
    {
      run(new TextEditor(getAbsolutePath(path)));
    }
    callback.onSuccess(true);
  }
View Full Code Here

Examples of org.eclipse.ui.editors.text.TextEditor

        return fEditor;
    }

    protected Collection<IProject> getProjects() {

        final TextEditor editor = getEditor();
        if (editor != null) {
            final IEditorInput editorInput = editor.getEditorInput();
            if (editorInput instanceof IFileEditorInput) {
                final IFileEditorInput input = (IFileEditorInput) editorInput;
                final IFile file = input.getFile();
                final IProject project = file.getProject();
                return Lists.newArrayList(project);
View Full Code Here

Examples of org.eclipse.ui.editors.text.TextEditor

    }

    protected void addPages() {
        try {
            editor = new RuleFlowModelEditor();
            xmlEditor = new TextEditor() {
                public boolean isEditable() {
                    return false;
                }
               
                public void close(boolean save) {
View Full Code Here

Examples of org.eclipse.ui.editors.text.TextEditor

    public void testSwitchToTemplate() {
        Preferences.setJavaPackageFragmentRoot("src/main/javaxx");
        Preferences.setTemplateFileExtension(LoomConstants.HTML_FILE_EXTENSION);
        EditorFileOpener.getInstance().switchToTemplateOrJavaFile(javaFile);
        IDE.setDefaultEditor(templateFile, "org.eclipse.ui.DefaultTextEditor");
        TextEditor currentEditor = (TextEditor) getActiveEditor();
        IFileEditorInput input = (IFileEditorInput) currentEditor.getEditorInput();
        Assert.assertEquals("Wizard.html", input.getFile().getName());
    }
View Full Code Here

Examples of org.eclipse.ui.editors.text.TextEditor

    public void testSwitchToLocalTemplate() {
        Preferences.setCreateTemplateInJavaFolder(true);
        Preferences.setTemplateFileExtension(LoomConstants.TML_FILE_EXTENSION);
        EditorFileOpener.getInstance().switchToTemplateOrJavaFile(javaFile);
        IDE.setDefaultEditor(localTemplateFile, "org.eclipse.ui.DefaultTextEditor");
        TextEditor currentEditor = (TextEditor) getActiveEditor();
        IFileEditorInput input = (IFileEditorInput) currentEditor.getEditorInput();
        Assert.assertEquals("Wizard.tml", input.getFile().getName());
    }
View Full Code Here

Examples of org.eclipse.ui.editors.text.TextEditor

                IWorkbenchPage page = window.getActivePage();
                if (page != null)
                {
                    FileEditorInput input = new FileEditorInput(
                        (IFile) getMarker().getResource());
                    TextEditor editor = (TextEditor) page.findEditor(input);
                    doc = editor.getDocumentProvider().getDocument(input);
                }
            }
        }
        if (doc == null)
        {
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.