KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mountainminds > eclemma > internal > ui > launching > NoCoverageDataHandler


1 /*******************************************************************************
2  * Copyright (c) 2006 Mountainminds GmbH & Co. KG
3  * This software is provided under the terms of the Eclipse Public License v1.0
4  * See http://www.eclipse.org/legal/epl-v10.html.
5  *
6  * $Id: NoCoverageDataHandler.java 131 2006-10-16 20:31:17Z mtnminds $
7  ******************************************************************************/

8 package com.mountainminds.eclemma.internal.ui.launching;
9
10 import org.eclipse.core.runtime.CoreException;
11 import org.eclipse.core.runtime.IStatus;
12 import org.eclipse.debug.core.IStatusHandler;
13 import org.eclipse.jface.dialogs.MessageDialog;
14 import org.eclipse.swt.widgets.Shell;
15
16 import com.mountainminds.eclemma.internal.ui.EclEmmaUIPlugin;
17 import com.mountainminds.eclemma.internal.ui.UIMessages;
18
19 /**
20  * Status handler that issues an error message when no coverage data has been
21  * found.
22  *
23  * @author Marc R. Hoffmann
24  * @version $Revision: 131 $
25  */

26 public class NoCoverageDataHandler implements IStatusHandler {
27
28   public Object JavaDoc handleStatus(IStatus status, Object JavaDoc source)
29       throws CoreException {
30
31     Shell parent = EclEmmaUIPlugin.getInstance().getShell();
32     String JavaDoc title = UIMessages.NoCoverageDataError_title;
33     String JavaDoc message = UIMessages.NoCoverageDataError_message;
34
35     MessageDialog.openError(parent, title, message);
36     return Boolean.FALSE;
37   }
38
39 }
40
Popular Tags