KickJava   Java API By Example, From Geeks To Geeks.

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


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: AlreadyInstrumentedHandler.java 70 2006-09-12 19:03:22Z mho $
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 trying to instrument classes
21  * that are already instrumented.
22  *
23  * @author Marc R. Hoffmann
24  * @version $Revision: 70 $
25  */

26 public class AlreadyInstrumentedHandler 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.AlreadyInstrumentedError_title;
33     String JavaDoc message = UIMessages.AlreadyInstrumentedError_message;
34
35     MessageDialog.openError(parent, title, message);
36     return Boolean.FALSE;
37   }
38
39 }
40
Popular Tags