Package org.eclipse.ui.editors.text

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


  protected void addPages() {
    try {
      myDisplayGroupPage = new DisplayGroupPage(this, "Display Groups");
      addPage(myDisplayGroupPage);

      myTextEditor = new TextEditor();
      IEditorInput input = this.getEditorInput();
      IFile file = ((FileEditorInput) input).getFile();
      if (!file.exists()) {
        try {
          FileEditorInput fileInput = (FileEditorInput)input;
View Full Code Here


   * Creates page 0 of the multi-page editor,
   * which contains a text editor.
   */
  void createPage0() {
    try {
      editor = new TextEditor();
      int index = addPage(editor, getEditorInput());
      setPageText(index, editor.getTitle());
    } catch (PartInitException e) {
      ErrorDialog.openError(
        getSite().getShell(),
View Full Code Here

              Object editorPage = ((MultiPageEditorPart) editor)
                  .getSelectedPage();
              if (!(editorPage instanceof ITextEditor)) {

                IEditorPart[] editorPages = ((MultiPageEditorPart) editor)
                    .findEditors(new TextEditor()
                        .getEditorInput());
                System.out.println(editorPages.length);
                ((MultiPageEditorPart) editor)
                    .setActiveEditor(new TextEditor());
              }

              if (editorPage instanceof ITextEditor) {
                ITextEditor editorTextual = (ITextEditor) editorPage;
                IDocument document = editorTextual
View Full Code Here

              Object editorPage = ((MultiPageEditorPart) editor)
                  .getSelectedPage();
              if (!(editorPage instanceof ITextEditor)) {

                IEditorPart[] editorPages = ((MultiPageEditorPart) editor)
                    .findEditors(new TextEditor()
                        .getEditorInput());
                System.out.println(editorPages.length);
                ((MultiPageEditorPart) editor)
                    .setActiveEditor(new TextEditor());
              }

              if (editorPage instanceof ITextEditor) {
                ITextEditor editorTextual = (ITextEditor) editorPage;
                IDocument document = editorTextual
View Full Code Here

            file.create(stringToStream(contents, ResourcesPlugin.getEncoding()), true, null);
            IWorkbenchWindow dw = getWorkbench().getActiveWorkbenchWindow();
            if (dw != null) {
                IWorkbenchPage page = dw.getActivePage();
                if (page != null) {
                    TextEditor editor = (TextEditor) IDE.openEditor(page, file, true);
                    editor.selectAndReveal(contents.length(), 0);
                }
            }
        }
        catch (CoreException e) {
            CCWPlugin.logError(e);
View Full Code Here

    }

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

  /**
   * Creates page 0 of the multi-page editor, which contains a text editor.
   */
  void createPage0() {
    try {
      editor = new TextEditor();
      int index = addPage(editor, getEditorInput());
      setPageText(index, editor.getTitle());
    } catch (PartInitException e) {
      ErrorDialog.openError(
          getSite().getShell(),
View Full Code Here

      else if(MODULEFILE_NAME.equals(file.getName())) {
        setPageText(sourcePageIdx, UIPlugin.getLocalString("_UI_Source_title"));
        IFile metadataJSON = file.getParent().getFile(Path.fromPortableString(METADATA_JSON_NAME));
        if(metadataJSON.exists() && metadataJSON.isDerived()) {
          FileEditorInput metadataInput = new FileEditorInput(metadataJSON);
          derivedJSON = new TextEditor() {
            @Override
            public boolean isEditable() {
              return false;
            }
          };
View Full Code Here

TOP

Related Classes of org.eclipse.ui.editors.text.TextEditor

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.