|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 * Document processor interface |
|
17 * |
|
18 */ |
|
19 package com.nokia.tracebuilder.source; |
|
20 |
|
21 /** |
|
22 * Document processor interface |
|
23 * |
|
24 */ |
|
25 public interface SourceDocumentProcessor { |
|
26 |
|
27 /** |
|
28 * Notification about source opened |
|
29 * |
|
30 * @param document |
|
31 * the document |
|
32 */ |
|
33 public void sourceOpened(SourceDocumentInterface document); |
|
34 |
|
35 /** |
|
36 * Notification before source change |
|
37 * |
|
38 * @param source |
|
39 * the source |
|
40 * @param offset |
|
41 * removed text offset |
|
42 * @param length |
|
43 * removed text length |
|
44 * @param newText |
|
45 * new text |
|
46 */ |
|
47 public void sourceAboutToBeChanged(SourceDocumentInterface source, |
|
48 int offset, int length, String newText); |
|
49 |
|
50 /** |
|
51 * Notification about source change |
|
52 * |
|
53 * @param document |
|
54 * the document |
|
55 * @param offset |
|
56 * removed text offset |
|
57 * @param length |
|
58 * removed text length |
|
59 * @param newText |
|
60 * new text |
|
61 */ |
|
62 public void sourceChanged(SourceDocumentInterface document, int offset, |
|
63 int length, String newText); |
|
64 |
|
65 /** |
|
66 * Notification about source closed |
|
67 * |
|
68 * @param document |
|
69 * the document |
|
70 */ |
|
71 public void sourceClosed(SourceDocumentInterface document); |
|
72 |
|
73 /** |
|
74 * Notification about change in selection |
|
75 * |
|
76 * @param source |
|
77 * the source |
|
78 * @param offset |
|
79 * the offset of selection |
|
80 * @param length |
|
81 * the length of selection |
|
82 */ |
|
83 public void selectionChanged(SourceDocumentInterface source, int offset, |
|
84 int length); |
|
85 |
|
86 /** |
|
87 * Source save notification |
|
88 * |
|
89 * @param source |
|
90 * the source |
|
91 */ |
|
92 public void sourceSaved(SourceDocumentInterface source); |
|
93 |
|
94 } |