A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / problem / AbortCompilation.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.internal.compiler.problem;
12
13 import net.sourceforge.phpdt.internal.compiler.CompilationResult;
14
15 /*
16  * Special unchecked exception type used to abort from the compilation process
17  * 
18  * should only be thrown from within problem handlers.
19  */
20 public class AbortCompilation extends RuntimeException {
21
22         public CompilationResult compilationResult;
23
24         public Throwable exception;
25
26         public int problemId;
27
28         public String[] problemArguments, messageArguments;
29
30         /*
31          * special fields used to abort silently (e.g. when cancelling build
32          * process)
33          */
34         public boolean isSilent;
35
36         public RuntimeException silentException;
37
38         public AbortCompilation() {
39
40                 this((CompilationResult) null);
41         }
42
43         public AbortCompilation(int problemId, String[] problemArguments,
44                         String[] messageArguments) {
45
46                 this.problemId = problemId;
47                 this.problemArguments = problemArguments;
48                 this.messageArguments = messageArguments;
49         }
50
51         public AbortCompilation(CompilationResult compilationResult) {
52
53                 this(compilationResult, null);
54         }
55
56         public AbortCompilation(CompilationResult compilationResult,
57                         Throwable exception) {
58
59                 this.compilationResult = compilationResult;
60                 this.exception = exception;
61         }
62
63         public AbortCompilation(boolean isSilent, RuntimeException silentException) {
64
65                 this.isSilent = isSilent;
66                 this.silentException = silentException;
67         }
68 }