Interface IApplicationUiSupport

All Known Implementing Classes:
ApplicationUiSupport

public interface IApplicationUiSupport
Application UI support that allows clients to perform common UI operations.
Restriction:
This interface is not intended to be extended by clients.
Restriction:
This interface is not intended to be implemented by clients.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.core.runtime.IStatus
    ensureUpdated(org.eclipse.swt.widgets.Shell shell, IApplication application, PublishKind publishKind, ExecutionContext context, String mode, org.eclipse.core.runtime.IProgressMonitor monitor)
    Updates application if necessary.
    void
    Shows and updates Applications view.
    void
    showErrorDialog(org.eclipse.swt.widgets.Shell shell, String message, Throwable cause)
    Shows standard error dialog with message compound from message and messages from cause and its parent causes
  • Method Details

    • ensureUpdated

      org.eclipse.core.runtime.IStatus ensureUpdated(org.eclipse.swt.widgets.Shell shell, IApplication application, PublishKind publishKind, ExecutionContext context, String mode, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
      Updates application if necessary.

      1. If application is not prepared yet then it is prepared using the specified desired launch mode. As to what preparing application means see IApplicationManager.prepare(IApplication, String, ExecutionContext, IProgressMonitor). If application has already been launched but using a different mode then it is implementation specific as to what happens.
      2. Then application state is checked to determine if infobase needs to be updated.
      3. If updates are needed then the specified update mode is used to perform the update. An implementation might ask user for a confirmation to update infobase.
      Parameters:
      shell - Shell to be used to display messages to user. If the context does not yet has ExecutionContext.ACTIVE_SHELL_NAME specified then the shell will be propagated to the context. Must not be null.
      application - Application to check and update. Must not be null.
      publishKind - Update type to use when the application has to be updated. Must not be null.
      context - Context to be used for checking application state and updating it if necessary. Must not be null.
      mode - Desired application launch mode: either ILaunchManager.RUN_MODE or ILaunchManager.DEBUG_MODE. Must not be null.
      monitor - the progress monitor or null if not needed
      Returns:
      IStatus.OK if operation should proceed (no update was needed, application was updated or user has decided not to update) or IStatus.CANCEL if operation has been cancelled or cannot proceed (unresolved conflict with infobase). Never null.
      Throws:
      org.eclipse.core.runtime.CoreException - If application state cannot be determined, infobase cannot be checked for changes, or application launch or update fails.
    • showErrorDialog

      void showErrorDialog(org.eclipse.swt.widgets.Shell shell, String message, Throwable cause)
      Shows standard error dialog with message compound from message and messages from cause and its parent causes
      Parameters:
      shell - actual Shell for open error dialog, cannot be null
      message - error message to show, cannot be null
      cause - cause of error dialog, can be null, if is is not null all messages it and its parent cause will be added to show error message
    • showAndUpdateView

      void showAndUpdateView() throws org.eclipse.core.runtime.CoreException
      Shows and updates Applications view.
      Throws:
      org.eclipse.core.runtime.CoreException - if show or update fails