Package org.eclipse.ui.console

Examples of org.eclipse.ui.console.TextConsoleViewer


    public void createPartControl(Composite parent)
    {
        console = new IOConsole("Runtime Log", LogViewerPlugin.getImageDescriptor("jsbook_obj.gif"));
        console.setTabWidth(4);
       
        textConsoleViewer = new TextConsoleViewer(parent, console);
        textConsoleViewer.getTextWidget().setEditable(false);
       
        startListening();
    }
View Full Code Here


  /**
   * Called by the framework to open the view.
   */
  public void createPartControl(Composite parent) {
    ioConsole = new IOConsole("Crystal User Console", ImageDescriptor.getMissingImageDescriptor());
    viewer = new TextConsoleViewer(parent, ioConsole);
    viewer.setInput(getViewSite());
   
    ioConsoleOutputStream = ioConsole.newOutputStream();
   
    PrintWriter pw = getPrintWriter();
View Full Code Here

     
      protected IConsoleDocumentPartitioner getPartitioner() {
        return new MM(this);
      }
    };
    final TextConsoleViewer sv = new TextConsoleViewer(owner, console);
    ConsolePlugin.getDefault().getConsoleManager()
        .createPatternMatchListeners(console);
    IDocument document = console.getDocument();
    document.setDocumentPartitioner(new MM(console));
    logViewer.setFilter(new IFilter(){

      public boolean accept(Object o) {
        return true;
      }

      public Point match(String text) {
        if (filterText!=null&&filterText.length()>0){
          int indexOf = text.indexOf(filterText);
          if (indexOf!=-1){
            return new Point(indexOf,filterText.length());
          }
        }
        return new Point(0,0);
      }
     
    });
    sv.getTextWidget().setEditable(false);
    // sv.setDocument(document);

    // sv.getTextWidget().setFont(JFaceResources.getTextFont());
    logViewer.getSelectionProvider().addSelectionChangedListener(
        new ISelectionChangedListener() {

          public void selectionChanged(SelectionChangedEvent event) {
            if (!event.getSelection().isEmpty()) {
              IStructuredSelection sm = (IStructuredSelection) event
                  .getSelection();
              Object firstElement = sm.getFirstElement();
              ILogItem item = (ILogItem) firstElement;

              sv.getDocument().set(item.getMessage());
              Display.getCurrent().asyncExec(new Runnable() {

                public void run() {
                  sv.getTextWidget().redraw();
                }
              });
            }
          }
        });
View Full Code Here

                public void keyReleased(KeyEvent e) {
                }
            });

            IOConsolePage consolePage = (IOConsolePage) page;
            TextConsoleViewer viewer = consolePage.getViewer();

            contentAssist = new PyContentAssistant() {
                public String showPossibleCompletions() {
                    //Only show completions if we're in a suspended console.
                    if (getCurrentSuspendedPyStackFrame(console) == null) {
View Full Code Here

TOP

Related Classes of org.eclipse.ui.console.TextConsoleViewer

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.