Examples of ILog


Examples of org.eclipse.core.runtime.ILog

  RulerColumnDescriptor(IConfigurationElement element, RulerColumnRegistry registry) throws InvalidRegistryObjectException {
    Assert.isLegal(registry != null);
    Assert.isLegal(element != null);
    fElement= element;

    ILog log= TextEditorPlugin.getDefault().getLog();
    ExtensionPointHelper helper= new ExtensionPointHelper(element, log);

    fId= helper.getNonNullAttribute(ID);
    fName= helper.getDefaultAttribute(NAME, fId);
    helper.getNonNullAttribute(CLASS); // just check validity
View Full Code Here

Examples of org.eclipse.core.runtime.ILog

    fConstraints= Collections.EMPTY_SET;
  }

  public RulerColumnPlacement(IConfigurationElement element) throws InvalidRegistryObjectException {
    Assert.isLegal(element != null);
    ILog log= TextEditorPlugin.getDefault().getLog();
    ExtensionPointHelper helper= new ExtensionPointHelper(element, log);
   
    fGravity= helper.getDefaultAttribute(GRAVITY, 1f);
    if (fGravity < 0 || fGravity > 1)
      helper.fail(RulerColumnMessages.RulerColumnPlacement_illegal_gravity_msg);
View Full Code Here

Examples of org.eclipse.core.runtime.ILog

    } 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

Examples of org.eclipse.core.runtime.ILog

        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

Examples of org.eclipse.core.runtime.ILog

   * @param exception the exception to be handled
   * @param message the message to be logged with the given exception
   */
  protected void handleCoreException(CoreException exception, String message) {
    Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID);
    ILog log= Platform.getLog(bundle);

    if (message != null)
      log.log(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.OK, message, exception));
    else
      log.log(exception.getStatus());


    Shell shell= fTextEditor.getSite().getShell();
    String title= getString(fBundle, fPrefix + "error.dialog.title", fPrefix + "error.dialog.title"); //$NON-NLS-2$ //$NON-NLS-1$
    String msg= getString(fBundle, fPrefix + "error.dialog.message", fPrefix + "error.dialog.message"); //$NON-NLS-2$ //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.core.runtime.ILog

    IOperationHistory operationHistory= PlatformUI.getWorkbench().getOperationSupport().getOperationHistory();
    try {
      operationHistory.execute(operation, null, context);
    } catch (ExecutionException x) {
      Bundle bundle= Platform.getBundle(PlatformUI.PLUGIN_ID);
      ILog log= Platform.getLog(bundle);
      String msg= getString(fBundle, fPrefix + "error.dialog.message", fPrefix + "error.dialog.message"); //$NON-NLS-2$ //$NON-NLS-1$
      log.log(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.OK, msg, x));
    }
  }
View Full Code Here

Examples of org.eclipse.core.runtime.ILog

   * @param message a message to aid debugging
   */
  protected void handleCoreException(CoreException exception, String message) {

    Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID);
    ILog log= Platform.getLog(bundle);
    if (message != null)
      log.log(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.OK, message, exception));
    else
      log.log(exception.getStatus());
  }
View Full Code Here

Examples of org.eclipse.core.runtime.ILog

        LoggingEvent event = new LoggingEvent("category",
                                              new Logger("category") {},
                                              priority,
                                              "message",
                                              null);
        ILog log = new ILog() {
            // javadoc inherited
            public void addLogListener(ILogListener listener) {
            }

            // javadoc inherited
View Full Code Here

Examples of org.eclipse.core.runtime.ILog

   * Logging debug information.
   *
   * @param message message
   */
  public static void logDebug(String message){
    ILog log = getDefault().getLog();
    IStatus status = new Status(IStatus.INFO,getDefault().getPluginId(),0,message,null);
    log.log(status);
  }
View Full Code Here

Examples of org.eclipse.core.runtime.ILog

   * Logging error information.
   *
   * @param message message
   */
  public static void logError(String message){
    ILog log = getDefault().getLog();
    IStatus status = new Status(IStatus.ERROR,getDefault().getPluginId(),0,message,null);
    log.log(status);
  }
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.