Examples of ILog


Examples of org.eclipse.core.runtime.ILog

  public static Activator getDefault() {
    return plugin;
  }

  public static void log(String msg, int msgType) {
    ILog log = getDefault().getLog();
    Status status = new Status(msgType, getDefault().getBundle().getSymbolicName(), msgType, msg + "\n", null); //$NON-NLS-1$
    log.log(status);
  }
View Full Code Here

Examples of org.eclipse.core.runtime.ILog

                  // (probably a configuration error)
                  throw new ClassNotFoundException( resolveType );
                }
            }
            catch(ClassNotFoundException notFound){
              ILog log = CatalogPlugin.getDefault().getLog();
              Status status = new Status(
                  IStatus.WARNING,
                  element.getContributor().getName(),
                  "Cannot determine resolve class for "+element.getDeclaringExtension().getUniqueIdentifier(), //$NON-NLS-1$
                  notFound );
        log.log( status );
            }
        }
        return false;
    }
View Full Code Here

Examples of org.eclipse.core.runtime.ILog

    public void addBookmark( Bookmark bookmark ) {
        load( bookmark );
        try {
            BookmarksPlugin.getDefault().storeToPreferences();
        } catch (BackingStoreException e) {
            ILog log = BookmarksPlugin.getDefault().getLog();
            IStatus status = new Status( IStatus.WARNING,BookmarksPlugin.ID,"Unable to save to BookmarksPlugin");
            log.log(status);
        }
        Set<IBookmark> bookmarks = new CopyOnWriteArraySet<IBookmark>();
        notifyListeners(new BookmarkListener.Event(bookmarks));
    }
View Full Code Here

Examples of org.eclipse.core.runtime.ILog

        for (int i = 0; i < env.length; i++)
        {
            buf.append(env[i]);
            buf.append('\n');
        }
        ILog log = PerlDebugPlugin.getDefault().getLog();
        log.log(new Status(
            IStatus.INFO,
            PerlDebugPlugin.getUniqueIdentifier(),
            IStatus.OK,
            buf.toString(),
            null));
View Full Code Here

Examples of org.eclipse.core.runtime.ILog

    extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(EditorsUI.PLUGIN_ID, "documentProviders"); //$NON-NLS-1$

    if (extensionPoint == null) {
      String msg= NLSUtility.format(TextEditorMessages.DocumentProviderRegistry_error_extension_point_not_found, PlatformUI.PLUGIN_ID);
      Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID);
      ILog log= Platform.getLog(bundle);
      log.log(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.OK, msg, null));
      return;
    }

    IConfigurationElement[] elements= extensionPoint.getConfigurationElements();
    for (int i= 0; i < elements.length; i++) {
View Full Code Here

Examples of org.eclipse.core.runtime.ILog

   *
   * @param e the core exception
   */
  private static void handleCoreException(CoreException e) {
    Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID);
    ILog log= Platform.getLog(bundle);
    log.log(e.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= getTextEditor().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 e) {
      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, e));
    }
  }
View Full Code Here

Examples of org.eclipse.core.runtime.ILog

   * @since 2.0
   */
  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

   * @param exception the exception to be logged
   * @param message the message to be logged
   */
  protected void handleCoreException(CoreException exception, String message) {
    Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID);
    ILog log= Platform.getLog(bundle);
    IStatus status= message != null ? new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.OK, message, exception) : exception.getStatus();
    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.