Package: IDebugOptions

IDebugOptions

Coverage

1: /*
2: * #%~
3: * org.overture.ide.debug
4: * %%
5: * Copyright (C) 2008 - 2014 Overture
6: * %%
7: * This program is free software: you can redistribute it and/or modify
8: * it under the terms of the GNU General Public License as
9: * published by the Free Software Foundation, either version 3 of the
10: * License, or (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public
18: * License along with this program. If not, see
19: * <http://www.gnu.org/licenses/gpl-3.0.html>.
20: * #~%
21: */
22: package org.overture.ide.debug.core;
23:
24: import org.overture.ide.debug.core.model.IVdmStackFrame;
25:
26: public interface IDebugOptions
27: {
28:
29:         abstract class Option
30:         {
31:                 private final String name;
32:
33:                 public Option(String name)
34:                 {
35:                         this.name = name;
36:                 }
37:
38:                 public String getName()
39:                 {
40:                         return name;
41:                 }
42:
43:         }
44:
45:         public class BooleanOption extends Option
46:         {
47:                 private final boolean defaultValue;
48:
49:                 public BooleanOption(String name, boolean defaultValue)
50:                 {
51:                         super(name);
52:                         this.defaultValue = defaultValue;
53:                 }
54:
55:                 public boolean getDefaultValue()
56:                 {
57:                         return defaultValue;
58:                 }
59:
60:         }
61:
62:         public class IntegerOption extends Option
63:         {
64:                 private final int defaultValue;
65:
66:                 public IntegerOption(String name, int defaultValue)
67:                 {
68:                         super(name);
69:                         this.defaultValue = defaultValue;
70:                 }
71:
72:                 public int getDefaultValue()
73:                 {
74:                         return defaultValue;
75:                 }
76:
77:         }
78:
79:         public class StringOption extends Option
80:         {
81:                 private final String defaultValue;
82:
83:                 public StringOption(String name, String defaultValue)
84:                 {
85:                         super(name);
86:                         this.defaultValue = defaultValue;
87:                 }
88:
89:                 public String getDefaultValue()
90:                 {
91:                         return defaultValue;
92:                 }
93:
94:         }
95:
96:         boolean get(BooleanOption option);
97:
98:         int get(IntegerOption option);
99:
100:         String get(StringOption option);
101:
102:         /**
103:          * Filter the specified stack frames before they are returned to the client. Implementation should return copy of
104:          * the array even if there are no modifications.
105:          *
106:          * @param frames
107:          * @return
108:          */
109:         IVdmStackFrame[] filterStackLevels(IVdmStackFrame[] frames);
110:
111:         /**
112:          * @param stackFrames
113:          * @return
114:          */
115:         boolean isValidStack(IVdmStackFrame[] frames);
116:
117: }