KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > aspectj > ajde > EditorAdapter


1
2 /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3  *
4  * This file is part of the IDE support for the AspectJ(tm)
5  * programming language; see http://aspectj.org
6  *
7  * The contents of this file are subject to the Mozilla Public License
8  * Version 1.1 (the "License"); you may not use this file except in
9  * compliance with the License. You may obtain a copy of the License at
10  * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/.
11  *
12  * Software distributed under the License is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14  * for the specific language governing rights and limitations under the
15  * License.
16  *
17  * The Original Code is AspectJ.
18  *
19  * The Initial Developer of the Original Code is Xerox Corporation. Portions
20  * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation.
21  * All Rights Reserved.
22  *
23  * Contributor(s):
24  */

25
26 package org.aspectj.ajde;
27
28 import java.io.IOException JavaDoc;
29 import java.util.List JavaDoc;
30 import org.aspectj.asm.*;
31
32 /**
33  * @author Mik Kersten
34  */

35 public interface EditorAdapter {
36
37     /**
38      * Seek the editor to a source line in the file specified.
39      */

40     public void showSourceLine(String JavaDoc filePath, int lineNumber, boolean highlight);
41
42     /**
43      * Seek the editor to a {@link SourceLocation} and highlight if specified.
44      */

45     public void showSourceLine(SourceLocation sourceLocation, boolean highlight);
46
47     /**
48      * Seek the editor to a source line in the current file.
49      */

50     public void showSourceLine(int lineNumber, boolean highlight);
51
52     /**
53      * @return full path to the file currently being edited.
54      */

55     public String JavaDoc getCurrFile();
56
57     /**
58      * Save the contents of the current file being edited.
59      */

60     public void saveContents() throws IOException JavaDoc;
61
62     /**
63      * Paste text into the current caret position of the editor.
64      */

65     public void pasteToCaretPos(String JavaDoc text);
66     
67     /**
68      * Implement if inline annotations are supported by the editor. Make null
69      * implementation if inline annotations are not supported.
70      *
71      * @param filePath path to the file that should get the annotation
72      * @param lineNumber line number for the annotation
73      * @param items list of relations to be rendered as the annotation
74      */

75     public void showSourcelineAnnotation(String JavaDoc filePath, int lineNumber, List JavaDoc items);
76
77     /**
78      * Implement if multipe editor views are supported by the editor. Make null
79      * implementation if multiple editor views are not supported.
80      *
81      * @param filePath path to the source file
82      * @param lineNumber line number of the sourceline
83      */

84     //public void addEditorViewForSourceLine(String filePath, int lineNumber);
85
}
86
Popular Tags