Refactory: remove unused classes, imports, fields and methods.
[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         /**
23          * 
24          */
25         private static final long serialVersionUID = -3674083924553307963L;
26
27         public CompilationResult compilationResult;
28
29         public Throwable exception;
30
31         public int problemId;
32
33         public String[] problemArguments, messageArguments;
34
35         /*
36          * special fields used to abort silently (e.g. when cancelling build
37          * process)
38          */
39         public boolean isSilent;
40
41         public RuntimeException silentException;
42
43         public AbortCompilation() {
44
45                 this((CompilationResult) null);
46         }
47
48         public AbortCompilation(int problemId, String[] problemArguments,
49                         String[] messageArguments) {
50
51                 this.problemId = problemId;
52                 this.problemArguments = problemArguments;
53                 this.messageArguments = messageArguments;
54         }
55
56         public AbortCompilation(CompilationResult compilationResult) {
57
58                 this(compilationResult, null);
59         }
60
61         public AbortCompilation(CompilationResult compilationResult,
62                         Throwable exception) {
63
64                 this.compilationResult = compilationResult;
65                 this.exception = exception;
66         }
67
68         public AbortCompilation(boolean isSilent, RuntimeException silentException) {
69
70                 this.isSilent = isSilent;
71                 this.silentException = silentException;
72         }
73 }