Examples of ILogListener


Examples of org.eclipse.core.runtime.ILogListener

   * Before jumping into an Eclipse test, this method should be called
   * so we can catch any exceptions that occur during loading, and
   * print them out to the log.
   */
  protected void addLogListener() {
    Platform.addLogListener(new ILogListener() {
      @Override
      public void logging(IStatus status, String plugin) {
        // rethrow if exception is caught
        if (status.getSeverity() == IStatus.ERROR) {
          // JUnit won't actually catch this, because the Platform is
View Full Code Here

Examples of org.eclipse.core.runtime.ILogListener

            "  }",
            "}");
    frame.refresh();
    // add log listener for exception validation
    ILog log = DesignerPlugin.getDefault().getLog();
    ILogListener logListener = new ILogListener() {
      public void logging(IStatus status, String plugin) {
        assertEquals(IStatus.ERROR, status.getSeverity());
        Throwable exception = status.getException();
        assertThat(exception).isExactlyInstanceOf(IllegalStateException.class);
        assertEquals("Bad getElement()", exception.getMessage());
View Full Code Here

Examples of org.eclipse.core.runtime.ILogListener

    frame.refresh();
    String originalSource = m_lastEditor.getSource();
    // add log listener for exception validation
    final AtomicInteger exceptionCount = new AtomicInteger();
    ILog log = DesignerPlugin.getDefault().getLog();
    ILogListener logListener = new ILogListener() {
      public void logging(IStatus status, String plugin) {
        exceptionCount.getAndIncrement();
      }
    };
    // temporary intercept logging
View Full Code Here

Examples of org.eclipse.core.runtime.ILogListener

  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_unknownProperty() throws Exception {
    ILog log = DesignerPlugin.getDefault().getLog();
    ILogListener logListener = new ILogListener() {
      public void logging(IStatus status, String plugin) {
        assertEquals(IStatus.ERROR, status.getSeverity());
        assertEquals(DesignerPlugin.PLUGIN_ID, status.getPlugin());
        assertEquals(IStatus.ERROR, status.getCode());
        assertInstanceOf(IllegalArgumentException.class, status.getException());
View Full Code Here

Examples of org.eclipse.core.runtime.ILogListener

  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_unknownProperty() throws Exception {
    ILog log = DesignerPlugin.getDefault().getLog();
    ILogListener logListener = new ILogListener() {
      public void logging(IStatus status, String plugin) {
        assertEquals(IStatus.ERROR, status.getSeverity());
        assertEquals(DesignerPlugin.PLUGIN_ID, status.getPlugin());
        assertEquals(IStatus.ERROR, status.getCode());
        assertInstanceOf(IllegalArgumentException.class, status.getException());
View Full Code Here

Examples of org.eclipse.core.runtime.ILogListener

  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_unknownProperty() throws Exception {
    ILog log = DesignerPlugin.getDefault().getLog();
    ILogListener logListener = new ILogListener() {
      public void logging(IStatus status, String plugin) {
        assertEquals(IStatus.ERROR, status.getSeverity());
        assertEquals(DesignerPlugin.PLUGIN_ID, status.getPlugin());
        assertEquals(IStatus.ERROR, status.getCode());
        assertInstanceOf(IllegalArgumentException.class, status.getException());
View Full Code Here

Examples of org.jamesii.core.util.logging.ILogListener

  public boolean initialize(final IProgressListener l) {
    int taskCount = 4;
    int task = 0;

    l.taskInfo(this, "Loading PlugIns...");
    ILogListener logListener;
    ApplicationLogger.addLogListener(logListener = new ILogListener() {

      @Override
      public void publish(LogRecord record) {
        if (record.getLevel().intValue() <= Level.INFO.intValue()) {
          l.taskInfo(this, record.getMessage());
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.