01: //Copyright (c) Hans-Joachim Daniels 2005
02: //
03: //This program is free software; you can redistribute it and/or modify
04: //it under the terms of the GNU General Public License as published by
05: //the Free Software Foundation; either version 2 of the License, or
06: //(at your option) any later version.
07: //
08: //This program is distributed in the hope that it will be useful,
09: //but WITHOUT ANY WARRANTY; without even the implied warranty of
10: //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11: //GNU General Public License for more details.
12: //
13: //You can either finde the file LICENSE or LICENSE.TXT in the source
14: //distribution or in the .jar file of this application
15:
16: package de.uka.ilkd.key.ocl.gf;
17:
18: import java.util.logging.Logger;
19:
20: /**
21: * @author daniels
22: * Offers the interface that GFEditor2 uses to send back the constraint after editing.
23: * Has no dependancies on KeY or TogetherCC.
24: */
25: abstract class ConstraintCallback {
26:
27: /**
28: * Does the logging. What else should it do?
29: */
30: protected static Logger logger = Logger
31: .getLogger(ConstraintCallback.class.getName());
32:
33: /**
34: * The path name of the directory where the grammars reside
35: */
36: String grammarsDir;
37:
38: /**
39: * sets the directory where the grammars reside
40: * @param grammarsDir
41: */
42: void setGrammarsDir(final String grammarsDir) {
43: this .grammarsDir = grammarsDir;
44: }
45:
46: /**
47: * gets the directory where the grammars reside
48: */
49: String getGrammarsDir() {
50: return this .grammarsDir;
51: }
52:
53: /**
54: * Sends the finished OCL constraint back to Together to save it
55: * as a JavaDoc comment.
56: * @param constraint The OCL constraint in question.
57: */
58: abstract void sendConstraint(String constraint);
59:
60: /**
61: * Sends the unfinished OCL constraint back to Together to save it
62: * as a GF tree as a JavaDoc comment.
63: * @param abs The GF tree in question
64: */
65: abstract void sendAbstract(String abs);
66: }
|