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.Level;
19:
20: /**
21: * @author daniels
22: *
23: * represents an open, unrefined node in the AST.
24: * It knows, how it is called and described (tooltip).
25: */
26: public class UnrefinedAstNodeData extends AstNodeData {
27: /**
28: * The tooltip that this node as a parameter should get
29: */
30: protected final String paramTooltip;
31:
32: /**
33: * For a child we have to know its name, its type and the tooltip
34: * @param pTooltip The tooltip that this node as a parameter should get
35: * @param node The GfAstNode for the current AST node, for which
36: * this AstNodeData is the data for.
37: * @param pos The position in the GF AST of this node in Haskell notation
38: * @param selected if this is the selected node in the GF AST
39: * @param constraint A constraint from a parent node, that also
40: * applies for this node.
41: */
42: public UnrefinedAstNodeData(String pTooltip, GfAstNode node,
43: String pos, boolean selected, String constraint) {
44: super (node, pos, selected, constraint);
45: this .paramTooltip = pTooltip;
46: if (logger.isLoggable(Level.FINEST)) {
47: logger.finest(this .toString() + " - " + position);
48: }
49: }
50:
51: /**
52: * @return no refinement, no printname, thus null
53: */
54: public Printname getPrintname() {
55: return null;
56: }
57:
58: /**
59: * @return the parameter tooltip that this node has as a child
60: * of its parent (who gave it to it depending on its position)
61: */
62: public String getParamTooltip() {
63: return this.paramTooltip;
64: }
65:
66: }
|