Mercurial > jhg
annotate src/org/tmatesoft/hg/core/HgStatusHandler.java @ 425:48f993aa2f41
FIXMEs: exceptions, javadoc
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 28 Mar 2012 18:39:29 +0200 |
parents | 9c9c442b5f2e |
children | 31a89587eb04 |
rev | line source |
---|---|
360
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
1 /* |
423
9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
360
diff
changeset
|
2 * Copyright (c) 2011-2012 TMate Software Ltd |
360
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
3 * |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
4 * This program is free software; you can redistribute it and/or modify |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
6 * the Free Software Foundation; version 2 of the License. |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
7 * |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
8 * This program is distributed in the hope that it will be useful, |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
11 * GNU General Public License for more details. |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
12 * |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
13 * For information on how to redistribute this software under |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
14 * the terms of a license other than GNU General Public License |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
15 * contact TMate Software at support@hg4j.com |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
16 */ |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
17 package org.tmatesoft.hg.core; |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
18 |
423
9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
360
diff
changeset
|
19 import org.tmatesoft.hg.internal.Callback; |
360
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
20 import org.tmatesoft.hg.util.Path; |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
21 import org.tmatesoft.hg.util.Status; |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
22 |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
23 /** |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
24 * Callback to process {@link HgStatus} objects. |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
25 * @author Artem Tikhomirov |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
26 * @author TMate Software Ltd. |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
27 */ |
423
9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
360
diff
changeset
|
28 @Callback |
360
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
29 public interface HgStatusHandler { |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
30 |
423
9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
360
diff
changeset
|
31 /** #next() as in HgChangesetHandler? |
9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
360
diff
changeset
|
32 * FIXME perhaps, handle() is better name? If yes, rename method in HgChangesetHandler, too, to make them similar. |
360
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
33 * void next(HgStatus s); |
423
9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
360
diff
changeset
|
34 * @throws HgCallbackTargetException wrapper for any exception user code may produce |
360
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
35 */ |
423
9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
360
diff
changeset
|
36 void handleStatus(HgStatus s) throws HgCallbackTargetException; |
360
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
37 |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
38 /** |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
39 * Report non-critical error processing single file during status operation |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
40 * @param file name of the file that caused the trouble |
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
41 * @param s error description object |
423
9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
360
diff
changeset
|
42 * @throws HgCallbackTargetException wrapper for any exception user code may produce |
360
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
43 */ |
423
9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
360
diff
changeset
|
44 void handleError(Path file, Status s) throws HgCallbackTargetException; |
360
150500515714
Report non-critical errors during status operation to handler/inspector
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
45 } |