Tabnine Logo
ConsolePlugin
Code IndexAdd Tabnine to your IDE (free)

How to use
ConsolePlugin
in
org.eclipse.ui.console

Best Java code snippets using org.eclipse.ui.console.ConsolePlugin (Showing top 20 results out of 315)

origin: org.eclipse/org.eclipse.ui.console

/**
 * Returns the console manager.
 * 
 * @return the console manager
 */
private IConsoleManager getConsoleManager() {
  return ConsolePlugin.getDefault().getConsoleManager();
}
origin: org.eclipse/org.eclipse.ui.console

public void consolesAdded(IConsole[] consoles) {
  Display display = ConsolePlugin.getStandardDisplay();
  display.asyncExec(new Runnable() {
    public void run() {
      update();
    }
  });
}
origin: org.eclipse/org.eclipse.ui.console

/**
 * Logs the specified status with this plug-in's log.
 * 
 * @param status status to log
 */
public static void log(IStatus status) {
  getDefault().getLog().log(status);
}
origin: org.eclipse.platform/org.eclipse.debug.ui

/**
 * Because the autoscroll value is in another plugin we must update the preference store manually
 */
protected void updateAutoScrollLockEditor() {
  autoScrollLockEditor.setPreferenceStore(ConsolePlugin.getDefault().getPreferenceStore());
  autoScrollLockEditor.load();
}
origin: stackoverflow.com

 private static MessageConsole findConsole(String name) {
 ConsolePlugin plugin = ConsolePlugin.getDefault();
 IConsoleManager conMan = plugin.getConsoleManager();
 IConsole[] existing = conMan.getConsoles();
 for (int i = 0; i < existing.length; i++)
 if (name.equals(existing[i].getName()))
 return (MessageConsole) existing[i];
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.console

  @Override
  public void run() {
    try {
      Point selection= fTextViewer.getTextWidget().getSelection();
      IDocument document= fTextViewer.getDocument();
      fLastLine= document.getLineOfOffset(document.getLength()) + 1;
      int startLine= selection == null ? 1 : fTextViewer.getTextWidget().getLineAtOffset(selection.x) + 1;
      String title= ConsoleMessages.TextViewerGotoLineAction_Go_To_Line_1;
      String message= MessageFormat.format(ConsoleMessages.TextViewerGotoLineAction_Enter_line_number__8, new Object[] {Integer.valueOf(fLastLine)});
      String value= Integer.toString(startLine);
      Shell activeShell= fTextViewer.getTextWidget().getShell();
      InputDialog d= new InputDialog(activeShell, title, message, value, new NumberValidator());
      if (d.open() == Window.OK) {
        try {
          int line= Integer.parseInt(d.getValue());
          gotoLine(line - 1);
        } catch (NumberFormatException x) {
          ConsolePlugin.errorDialog(activeShell, ConsoleMessages.TextViewerGotoLineAction_Go_To_Line_1, ConsoleMessages.TextViewerGotoLineAction_Exceptions_occurred_attempt_to_go_to_line_2, x); //
        }
      }
    } catch (BadLocationException x) {
      ConsolePlugin.errorDialog(fTextViewer.getTextWidget().getShell(), ConsoleMessages.TextViewerGotoLineAction_Go_To_Line_1, ConsoleMessages.TextViewerGotoLineAction_Exceptions_occurred_attempt_to_go_to_line_2, x); //
      return;
    }
  }
}
origin: stackoverflow.com

private MessageConsole findConsole(String name) {
  ConsolePlugin plugin = ConsolePlugin.getDefault();
  IConsoleManager conMan = plugin.getConsoleManager();
  IConsole[] existing = conMan.getConsoles();
  //if console exists, clear it 
  for (int i = 0; i < existing.length; i++)
    if (name.equals(existing[i].getName())){
      ((MessageConsole) existing[i]).clearConsole(); //this is the important part
      return myConsole;
    }
  myConsole = new MessageConsole(name, null);
  conMan.addConsoles(new IConsole[]{myConsole});
  return myConsole;
 }
origin: org.eclipse/org.eclipse.ui.console

  public void run() {
    try {
      Point selection= fTextViewer.getTextWidget().getSelection();
      IDocument document= fTextViewer.getDocument();
      fLastLine= document.getLineOfOffset(document.getLength()) + 1;
      int startLine= selection == null ? 1 : fTextViewer.getTextWidget().getLineAtOffset(selection.x) + 1;
      String title= ConsoleMessages.TextViewerGotoLineAction_Go_To_Line_1; 
      String message= MessageFormat.format(ConsoleMessages.TextViewerGotoLineAction_Enter_line_number__8, new Object[] {new Integer(fLastLine)}); 
      String value= Integer.toString(startLine);
      Shell activeShell= fTextViewer.getTextWidget().getShell();
      InputDialog d= new InputDialog(activeShell, title, message, value, new NumberValidator());
      if (d.open() == Window.OK) {
        try {
          int line= Integer.parseInt(d.getValue());
          gotoLine(line - 1);
        } catch (NumberFormatException x) {
          ConsolePlugin.errorDialog(activeShell, ConsoleMessages.TextViewerGotoLineAction_Go_To_Line_1, ConsoleMessages.TextViewerGotoLineAction_Exceptions_occurred_attempt_to_go_to_line_2, x); // 
        }
      }
    } catch (BadLocationException x) {
      ConsolePlugin.errorDialog(fTextViewer.getTextWidget().getShell(), ConsoleMessages.TextViewerGotoLineAction_Go_To_Line_1, ConsoleMessages.TextViewerGotoLineAction_Exceptions_occurred_attempt_to_go_to_line_2, x); // 
      return;
    }
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.console

/**
 * Returns the console manager.
 *
 * @return the console manager
 */
private IConsoleManager getConsoleManager() {
  return ConsolePlugin.getDefault().getConsoleManager();
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.console

/**
 * Logs the specified status with this plug-in's log.
 *
 * @param status status to log
 */
public static void log(IStatus status) {
  getDefault().getLog().log(status);
}
origin: org.eclipse/org.eclipse.ui.console

  public void consolesRemoved(IConsole[] consoles) {
    Display display = ConsolePlugin.getStandardDisplay();
    display.asyncExec(new Runnable() {
      public void run() {
        if (fMenu != null) {
          fMenu.dispose();
        }
        update();
      }
    });
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.console

/**
 * Jumps to the line.
 */
protected void gotoLine(int line) {
  IDocument document= fTextViewer.getDocument();
  try {
    int start= document.getLineOffset(line);
    int length= document.getLineLength(line);
    fTextViewer.getTextWidget().setSelection(start, start + length);
    fTextViewer.revealRange(start, length);
  } catch (BadLocationException x) {
    ConsolePlugin.errorDialog(fTextViewer.getTextWidget().getShell(), ConsoleMessages.TextViewerGotoLineAction_Go_To_Line_1, ConsoleMessages.TextViewerGotoLineAction_Exceptions_occurred_attempt_to_go_to_line_2, x); //
  }
}
origin: org.eclipse.pde/org.eclipse.pde.ui

public OSGiConsoleFactory() {
  fConsoleManager = ConsolePlugin.getDefault().getConsoleManager();
}
origin: org.eclipse/org.eclipse.ui.console

public void setWaterMarks(int low, int high) {
  lowWaterMark = low;
  highWaterMark = high;
  ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() {
    public void run() {
      checkBufferSize();
    }
  });
}

origin: org.eclipse/org.eclipse.ui.console

/**
 * Jumps to the line.
 */
protected void gotoLine(int line) {
  IDocument document= fTextViewer.getDocument();
  try {
    int start= document.getLineOffset(line);
    int length= document.getLineLength(line);
    fTextViewer.getTextWidget().setSelection(start, start + length);
    fTextViewer.revealRange(start, length);
  } catch (BadLocationException x) {
    ConsolePlugin.errorDialog(fTextViewer.getTextWidget().getShell(), ConsoleMessages.TextViewerGotoLineAction_Go_To_Line_1, ConsoleMessages.TextViewerGotoLineAction_Exceptions_occurred_attempt_to_go_to_line_2, x); // 
  }
}
origin: org.eclipse/org.eclipse.ui.console

/**
 * Shows this console in all console views. This console will be become visible
 * if another console is currently pinned. 
 * 
 * @since 3.1
 */
public void activate() {
  ConsolePlugin.getDefault().getConsoleManager().showConsoleView(this);
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.console

public void setWaterMarks(int low, int high) {
  lowWaterMark = low;
  highWaterMark = high;
  ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() {
    @Override
    public void run() {
      checkBufferSize();
    }
  });
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.console

/**
 * Shows this console in all console views. This console will be become visible
 * if another console is currently pinned.
 *
 * @since 3.1
 */
public void activate() {
  ConsolePlugin.getDefault().getConsoleManager().showConsoleView(this);
}
origin: org.eclipse/org.eclipse.ui.console

/**
 * makes the associated text widget uneditable.
 */
public void setReadOnly() {
  ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() {
    public void run() {
      StyledText text = getTextWidget();
      if (text != null && !text.isDisposed()) {
        text.setEditable(false);
      }
    }
  });
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.console

  @Override
  public void run() {
    ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[]{fConsole});
  }
}
org.eclipse.ui.consoleConsolePlugin

Javadoc

The console plug-in class.

Most used methods

  • getConsoleManager
    Returns the console manager. The manager will be created lazily on the first access.
  • getDefault
    Returns the singleton instance of the console plug-in.
  • getStandardDisplay
    Returns the workbench display.
  • errorDialog
    Utility method with conventions
  • getLog
  • getUniqueIdentifier
    Convenience method which returns the unique identifier of this plug-in.
  • log
    Logs the specified status with this plug-in's log.
  • newErrorStatus
    Returns a new error status for this plug-in with the given message
  • getPreferenceStore

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • runOnUiThread (Activity)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • String (java.lang)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now