01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: //
10: package de.uka.ilkd.key.java.recoderext;
11:
12: import recoder.CrossReferenceServiceConfiguration;
13: import recoder.ProgramFactory;
14: import recoder.io.*;
15: import recoder.service.*;
16: import de.uka.ilkd.key.java.KeYProgModelInfo;
17: import de.uka.ilkd.key.util.KeYExceptionHandler;
18:
19: public class KeYCrossReferenceServiceConfiguration extends
20: CrossReferenceServiceConfiguration {
21:
22: protected KeYProgModelInfo kpmi = null;
23:
24: public KeYCrossReferenceServiceConfiguration(KeYExceptionHandler keh) {
25: super (); // initialises servConf
26: getProjectSettings().ensureSystemClassesAreInPath();
27: getProjectSettings().setErrorHandler(
28: (recoder.service.ErrorHandler) (keh));
29: }
30:
31: public KeYCrossReferenceServiceConfiguration(KeYProgModelInfo kpmi) {
32: this (kpmi.getExceptionHandler());
33: this .kpmi = kpmi;
34: }
35:
36: protected void makeServices() {
37: super .makeServices();
38: }
39:
40: protected void initServices() {
41: super .initServices();
42:
43: }
44:
45: protected ProgramFactory makeProgramFactory() {
46: return ProofJavaProgramFactory.getInstance();
47: }
48:
49: protected ChangeHistory makeChangeHistory() {
50: return new ChangeHistory(this );
51: }
52:
53: /**
54: The cross reference source info is a subclass of the source info,
55: so this class simply overrides the source info factory method.
56: */
57: protected SourceInfo makeSourceInfo() {
58: return new KeYCrossReferenceSourceInfo(this );
59: }
60:
61: protected ProjectSettings makeProjectSettings() {
62: return new ProjectSettings(this );
63: }
64:
65: protected SourceFileRepository makeSourceFileRepository() {
66: return new DefaultSourceFileRepository(this );
67: }
68:
69: protected ClassFileRepository makeClassFileRepository() {
70: return new DefaultClassFileRepository(this );
71: }
72:
73: protected ByteCodeInfo makeByteCodeInfo() {
74: return new DefaultByteCodeInfo(this );
75: }
76:
77: protected ImplicitElementInfo makeImplicitElementInfo() {
78: return new DefaultImplicitElementInfo(this );
79: }
80:
81: protected NameInfo makeNameInfo() {
82: return new DefaultNameInfo(this );
83: }
84:
85: protected ConstantEvaluator makeConstantEvaluator() {
86: return new DefaultConstantEvaluator(this );
87: }
88:
89: public KeYProgModelInfo getKeYProgModelInfo() {
90: return kpmi;
91: }
92: }
|