Package tool.error

Source Code of tool.error.ErrorTest

package tool.error;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.swt.widgets.Display;

import tool.ToolPlugin;
import tool.repository.ToolRepositoryException;

public class ErrorTest {

  /**
   * @param args
   */
  public static void main(String[] args) {
    ToolRepositoryException reposEx = new ToolRepositoryException("BoB", "really long error message,\n" +
        "the quick brown fox jumps over the lazy dogs back\n" +
        "message with\n" +
        "multiple lines\n");
    IStatus status = new Status(IStatus.ERROR, ToolPlugin.PLUGIN_ID, "Status message", reposEx);
    ErrorDialog ed = new ErrorDialog(Display.getDefault().getActiveShell(), "Title for Error Dialog", "terse error message", status, 0);
    ed.open();
//    ErrorDialog.openError(Display.getDefault().getActiveShell(), "Title for Error Dialog", "terse error message", status);
  }

}
TOP

Related Classes of tool.error.ErrorTest

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.