Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.ILog


        job.schedule();
        return null;
    }

    private void error(String message) {
        ILog log = Activator.getDefault().getLog();
        String pluginId = Activator.PLUGIN_ID;
        log.log(new Status(Status.ERROR, pluginId, message));
        System.out.println(message);
    }
View Full Code Here


        log.log(new Status(Status.ERROR, pluginId, message));
        System.out.println(message);
    }

    private void log(String message) {
        ILog log = Activator.getDefault().getLog();
        String pluginId = Activator.PLUGIN_ID;
        log.log(new Status(Status.INFO, pluginId, message));
        System.out.println(message);
    }
View Full Code Here

    public static IStatus createStatus(int severity, int code, String message, Throwable exception) {
        return new Status(severity, Activator.PLUGIN_ID, code, message, exception);
    }

    public static void log(IStatus status) {
        ILog log = Activator.getDefault().getLog();
        log.log(status);
    }
View Full Code Here

    public static IStatus createStatus(int severity, int code, String message, Throwable exception) {
        return new Status(severity, Activator.PLUGIN_ID, code, message, exception);
    }

    public static void log(IStatus status) {
        ILog log = Activator.getDefault().getLog();
        log.log(status);
        NodeclipseConsole.write(status.getMessage()+"\n");
    }
View Full Code Here

    } catch (CoreException x) {
      IStatus status= x.getStatus();
      if (status == null || status.getSeverity() != IStatus.CANCEL) {
        Bundle bundle= Platform.getBundle(PlatformUI.PLUGIN_ID);
        ILog log= Platform.getLog(bundle);
        log.log(x.getStatus());

        Shell shell= getSite().getShell();
        String title= EditorMessages.Editor_error_validateEdit_title;
        String msg= EditorMessages.Editor_error_validateEdit_message;
        ErrorDialog.openError(shell, title, msg, x.getStatus());
View Full Code Here

        if (wasReadOnly != isEditorInputReadOnly())
          updateStateDependentActions();

      } catch (CoreException x) {
        Bundle bundle= Platform.getBundle(PlatformUI.PLUGIN_ID);
        ILog log= Platform.getLog(bundle);
        log.log(x.getStatus());
      }
    }
  }
View Full Code Here

            setInformation(null, null);
          }
          hasFinished= true;
        } catch (RuntimeException ex) {
          String PLUGIN_ID= "org.eclipse.jface.text"; //$NON-NLS-1$
          ILog log= Platform.getLog(Platform.getBundle(PLUGIN_ID));
          log.log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, "Unexpected runtime error while computing a text hover", ex)); //$NON-NLS-1$
        } finally {
          synchronized (fMutex) {
            if (fTextViewer != null)
              fTextViewer.removeTextListener(fStopper);
            fThread= null;
View Full Code Here

  public static ImageDescriptor getImageDescriptor(String path) {
    return imageDescriptorFromPlugin(PLUGIN_ID, path);
  }

  public void logError(String msg, Throwable t) {
    ILog log = getDefault().getLog();
    Status s = new Status(Status.ERROR, PLUGIN_ID, msg, t);
    log.log(s);
  }
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void testInvalidUriDuringPush() throws Exception {
    ILog log = Activator.getDefault().getLog();
    LogListener listener = new LogListener();
    log.addLogListener(listener);

    PushOperation pop = createInvalidPushOperation();
    pop.run(new NullProgressMonitor());
    PushOperationResult result = pop.getOperationResult();
    String errorMessage = result.getErrorMessage(new URIish(INVALID_URI));
View Full Code Here

      }
    }
  }

  public static void logException(String info, Object obj, Throwable exc) {
    ILog theLog = PHPDebugPlugin.getDefault().getLog();
    StringBuffer msg = new StringBuffer();
    if (obj != null) {
      msg.append(obj.getClass().toString());
      msg.append(" : "); //$NON-NLS-1$
    }
    if (info != null) {
      msg.append(info);
    }
    debug(msg.toString());
    if (exc != null) {
      debugException(exc);
    }
    /*
     * IStatus stat = new Status(IStatus.ERROR, Activator.PLUGIN_ID,
     * IStatus.ERROR, msg.toString(), exc); theLog.log(stat);
     */
    ByteArrayOutputStream bs = new ByteArrayOutputStream();
    PrintStream ps = new PrintStream(bs);
    exc.printStackTrace(ps);
    IStatus stat = new Status(IStatus.ERROR, PHPDebugPlugin.ID,
        IStatus.ERROR, msg + "\n" + bs.toString(), null); //$NON-NLS-1$
    theLog.log(stat);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.ILog

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.