KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > ui > IDebugEditorPresentation


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.debug.ui;
12
13 import org.eclipse.debug.core.model.IStackFrame;
14 import org.eclipse.debug.core.model.IThread;
15 import org.eclipse.ui.IEditorPart;
16
17 /**
18  * A debug model presentation may implement this interface to override
19  * standard editor positioning and annotations associated with
20  * source code display for stack frames.
21  *
22  * @since 3.0
23  */

24 public interface IDebugEditorPresentation {
25     /**
26      * Positions and adds annotations to the given editor for the specified
27      * stack frame and returns whether any annotations were added. When
28      * <code>true</code> is returned, a call will be made to remove annotations
29      * when the source selection is cleared for the stack frame. When
30      * <code>false</code> is returned, the debugger will position and add
31      * standard annotations to the editor, and a corresponding call to remove
32      * annotations will not be made. This method is called when the debugger is
33      * has opened an editor to display source for the given stack frame.
34      *
35      * @param editorPart the editor the debugger has opened
36      * @param frame the stack frame for which the debugger is displaying
37      * source
38      */

39     public boolean addAnnotations(IEditorPart editorPart, IStackFrame frame);
40     
41     /**
42      * Removes any debug related annotations from the given editor.
43      * This method is called when the debugger clears the source selection
44      * in an editor opened by the debugger. For example, when a debug
45      * session is resumed or terminated.
46      *
47      * @param editorPart an editor that annotations were added to for
48      * a stack frame
49      * @param thread the thread for which stack frame annotations were
50      * added to the editor
51      */

52     public void removeAnnotations(IEditorPart editorPart, IThread thread);
53 }
54
Popular Tags