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: // This file is part of KeY - Integrated Deductive Software Design
10: // Copyright (C) 2001-2003 Universitaet Karlsruhe, Germany
11: // and Chalmers University of Technology, Sweden
12: //
13: // The KeY system is protected by the GNU General Public License.
14: // See LICENSE.TXT for details.
15: //
16:
17: package de.uka.ilkd.key.proof.init;
18:
19: import java.io.File;
20:
21: import de.uka.ilkd.key.gui.configuration.ProofSettings;
22: import de.uka.ilkd.key.java.CompilationUnit;
23: import de.uka.ilkd.key.java.ConvertException;
24: import de.uka.ilkd.key.util.ProgressMonitor;
25:
26: /**
27: * sub-class of JavaInputWithJMLSpecBrowser which is used to parse just a
28: * single JML-enriched java source file.
29: * @deprecated
30: */
31: public class KeYJMLInput extends JavaInputWithJMLSpecBrowser {
32:
33: public KeYJMLInput(String name, File file, boolean allIntMode,
34: ProgressMonitor monitor) {
35: super (name, file, allIntMode, monitor);
36: }
37:
38: public ProofSettings getPreferences() {
39: settings = ProofSettings.DEFAULT_SETTINGS;
40: return settings;
41: }
42:
43: public String readJavaPath() throws ProofInputException {
44: assert path != null;
45: if (path.getParentFile() != null) {
46: return path.getParentFile().getAbsolutePath();
47: } else {
48: return "./";
49: }
50: }
51:
52: public void readJML(CompilationUnit[] compUnits)
53: throws ProofInputException {
54: try {
55: parseJMLSpecs(getTypesWithJMLSpecs(compUnits));
56: // initConfig.getServices().getImplementation2SpecMap().setProgVarNS(
57: // initConfig.progVarNS());
58: } catch (ConvertException ce) {
59: throw new ProofInputException(ce);
60: }
61: }
62:
63: /*
64: public String readModel() throws ProofInputException{
65: try {
66: parseJMLSpecs(getTypesWithJMLSpecs(
67: getKeYJavaASTConverter().
68: readCompilationUnitsAsFiles(
69: new String[]{path.getPath()})));
70: // initConfig.getServices().getImplementation2SpecMap().setProgVarNS(
71: // initConfig.progVarNS());
72: } catch (ConvertException ce) {
73: throw new ProofInputException(ce);
74: }
75: return null;
76: }*/
77: }
|