1 | /* $Id: ArgoTokenTable.java 17832 2010-01-12 19:02:29Z linus $ | |
2 | ***************************************************************************** | |
3 | * Copyright (c) 2009 Contributors - see below | |
4 | * All rights reserved. This program and the accompanying materials | |
5 | * are made available under the terms of the Eclipse Public License v1.0 | |
6 | * which accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * tfmorris | |
11 | ***************************************************************************** | |
12 | * | |
13 | * Some portions of this file was previously release using the BSD License: | |
14 | */ | |
15 | ||
16 | // Copyright (c) 1996-2008 The Regents of the University of California. All | |
17 | // Rights Reserved. Permission to use, copy, modify, and distribute this | |
18 | // software and its documentation without fee, and without a written | |
19 | // agreement is hereby granted, provided that the above copyright notice | |
20 | // and this paragraph appear in all copies. This software program and | |
21 | // documentation are copyrighted by The Regents of the University of | |
22 | // California. The software program and documentation are supplied "AS | |
23 | // IS", without any accompanying services from The Regents. The Regents | |
24 | // does not warrant that the operation of the program will be | |
25 | // uninterrupted or error-free. The end-user understands that the program | |
26 | // was developed for research purposes and is advised not to rely | |
27 | // exclusively on the program for any reason. IN NO EVENT SHALL THE | |
28 | // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, | |
29 | // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, | |
30 | // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF | |
31 | // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF | |
32 | // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY | |
33 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
34 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE | |
35 | // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF | |
36 | // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, | |
37 | // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | |
38 | ||
39 | package org.argouml.persistence; | |
40 | ||
41 | ||
42 | /** | |
43 | * These strings are used in the final output in a zargo. | |
44 | * | |
45 | * @author Jim Holt | |
46 | */ | |
47 | ||
48 | class ArgoTokenTable extends XMLTokenTableBase { | |
49 | ||
50 | /** | |
51 | * The constructor. | |
52 | */ | |
53 | public ArgoTokenTable() { | |
54 | super(32); | |
55 | } | |
56 | ||
57 | //////////////////////////////////////////////////////////////// | |
58 | // constants | |
59 | /* These strings match the XML element names in the argo.tee exactly. */ | |
60 | private static final String STRING_ARGO = "argo"; | |
61 | private static final String STRING_AUTHORNAME = "authorname"; | |
62 | private static final String STRING_AUTHOREMAIL = "authoremail"; | |
63 | private static final String STRING_VERSION = "version"; | |
64 | private static final String STRING_DESCRIPTION = "description"; | |
65 | private static final String STRING_SEARCHPATH = "searchpath"; | |
66 | private static final String STRING_MEMBER = "member"; | |
67 | private static final String STRING_HISTORYFILE = "historyfile"; | |
68 | private static final String STRING_DOCUMENTATION = "documentation"; | |
69 | ||
70 | private static final String STRING_SETTINGS = "settings"; | |
71 | private static final String STRING_NOTATIONLANGUAGE = "notationlanguage"; | |
72 | private static final String STRING_SHOWBOLDNAMES = "showboldnames"; | |
73 | private static final String STRING_USEGUILLEMOTS = "useguillemots"; | |
74 | private static final String STRING_SHOWASSOCIATIONNAMES | |
75 | = "showassociationnames"; | |
76 | private static final String STRING_SHOWVISIBILITY = "showvisibility"; | |
77 | private static final String STRING_SHOWMULTIPLICITY = "showmultiplicity"; | |
78 | private static final String STRING_SHOWINITIALVALUE = "showinitialvalue"; | |
79 | private static final String STRING_SHOWPROPERTIES = "showproperties"; | |
80 | private static final String STRING_SHOWTYPES = "showtypes"; | |
81 | private static final String STRING_SHOWSTEREOTYPES = "showstereotypes"; | |
82 | private static final String STRING_SHOWSINGULARMULTIPLICITIES | |
83 | = "showsingularmultiplicities"; | |
84 | private static final String STRING_HIDEBIDIRECTIONALARROWS | |
85 | = "hidebidirectionalarrows"; | |
86 | private static final String STRING_DEFAULTSHADOWWIDTH | |
87 | = "defaultshadowwidth"; | |
88 | private static final String STRING_FONTNAME = "fontname"; | |
89 | private static final String STRING_FONTSIZE = "fontsize"; | |
90 | // The following is deprecated, but can never be removed to preserve | |
91 | // backward compatibility with old project files | |
92 | @Deprecated | |
93 | private static final String STRING_GENERATION_OUTPUT_DIR | |
94 | = "generationoutputdir"; | |
95 | private static final String STRING_ACTIVE_DIAGRAM = "activediagram"; | |
96 | ||
97 | /** The token for argo. */ | |
98 | public static final int TOKEN_ARGO = 1; | |
99 | /** The token for author name. */ | |
100 | public static final int TOKEN_AUTHORNAME = 2; | |
101 | /** The token for author email. */ | |
102 | public static final int TOKEN_AUTHOREMAIL = 3; | |
103 | /** The token for version. */ | |
104 | public static final int TOKEN_VERSION = 4; | |
105 | /** The token for description. */ | |
106 | public static final int TOKEN_DESCRIPTION = 5; | |
107 | /** The token for search path. */ | |
108 | public static final int TOKEN_SEARCHPATH = 6; | |
109 | /** The token for member. */ | |
110 | public static final int TOKEN_MEMBER = 7; | |
111 | /** The token for history file. */ | |
112 | public static final int TOKEN_HISTORYFILE = 8; | |
113 | /** The token for documentation. */ | |
114 | public static final int TOKEN_DOCUMENTATION = 9; | |
115 | ||
116 | /** The token for settings. */ | |
117 | public static final int TOKEN_SETTINGS = 10; | |
118 | /** The token for the notation language setting. */ | |
119 | public static final int TOKEN_NOTATIONLANGUAGE = 11; | |
120 | /** A token for Notation Settings. */ | |
121 | public static final int TOKEN_USEGUILLEMOTS = 12; | |
122 | /** A token for Notation Settings. */ | |
123 | public static final int TOKEN_SHOWVISIBILITY = 13; | |
124 | /** A token for Notation Settings. */ | |
125 | public static final int TOKEN_SHOWMULTIPLICITY = 14; | |
126 | /** A token for Notation Settings. */ | |
127 | public static final int TOKEN_SHOWINITIALVALUE = 15; | |
128 | /** The token for the notation setting to show properties. */ | |
129 | public static final int TOKEN_SHOWPROPERTIES = 16; | |
130 | /** A token for Notation Settings. */ | |
131 | public static final int TOKEN_SHOWTYPES = 17; | |
132 | /** A token for Notation Settings. */ | |
133 | public static final int TOKEN_SHOWSTEREOTYPES = 18; | |
134 | /** A token for Notation Settings. */ | |
135 | public static final int TOKEN_DEFAULTSHADOWWIDTH = 19; | |
136 | /** A token for Notation Settings. */ | |
137 | public static final int TOKEN_SHOWBOLDNAMES = 20; | |
138 | /** A token for Font Settings. */ | |
139 | public static final int TOKEN_FONTNAME = 21; | |
140 | /** A token for Font Settings. */ | |
141 | public static final int TOKEN_FONTSIZE = 22; | |
142 | /** A token for Generation Settings. */ | |
143 | @Deprecated | |
144 | public static final int TOKEN_GENERATION_OUTPUT_DIR = 23; | |
145 | /** A token for Generation Settings. */ | |
146 | public static final int TOKEN_SHOWASSOCIATIONNAMES = 24; | |
147 | /** A token for the active diagram name **/ | |
148 | public static final int TOKEN_ACTIVE_DIAGRAM = 25; | |
149 | /** A token for Notation Settings **/ | |
150 | public static final int TOKEN_SHOWSINGULARMULTIPLICITIES = 26; | |
151 | ||
152 | public static final int TOKEN_HIDEBIDIRECTIONALARROWS = 27; | |
153 | | |
154 | /** The token for undefined. */ | |
155 | public static final int TOKEN_UNDEFINED = 99; | |
156 | ||
157 | //////////////////////////////////////////////////////////////// | |
158 | // protected methods | |
159 | ||
160 | /* | |
161 | * @see org.argouml.persistence.XMLTokenTableBase#setupTokens() | |
162 | */ | |
163 | protected void setupTokens() { | |
164 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_ARGO, Integer.valueOf(TOKEN_ARGO)); |
165 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_AUTHORNAME, Integer.valueOf(TOKEN_AUTHORNAME)); |
166 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_AUTHOREMAIL, Integer.valueOf(TOKEN_AUTHOREMAIL)); |
167 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_VERSION, Integer.valueOf(TOKEN_VERSION)); |
168 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_DESCRIPTION, Integer.valueOf(TOKEN_DESCRIPTION)); |
169 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_SEARCHPATH, Integer.valueOf(TOKEN_SEARCHPATH)); |
170 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_MEMBER, Integer.valueOf(TOKEN_MEMBER)); |
171 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_HISTORYFILE, Integer.valueOf(TOKEN_HISTORYFILE)); |
172 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_DOCUMENTATION, Integer.valueOf(TOKEN_DOCUMENTATION)); |
173 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_SETTINGS, Integer.valueOf(TOKEN_SETTINGS)); |
174 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_NOTATIONLANGUAGE, Integer.valueOf(TOKEN_NOTATIONLANGUAGE)); |
175 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_SHOWBOLDNAMES, Integer.valueOf(TOKEN_SHOWBOLDNAMES)); |
176 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_USEGUILLEMOTS, Integer.valueOf(TOKEN_USEGUILLEMOTS)); |
177 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_SHOWVISIBILITY, Integer.valueOf(TOKEN_SHOWVISIBILITY)); |
178 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_SHOWMULTIPLICITY, Integer.valueOf(TOKEN_SHOWMULTIPLICITY)); |
179 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_HIDEBIDIRECTIONALARROWS, Integer.valueOf(TOKEN_HIDEBIDIRECTIONALARROWS)); |
180 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_SHOWINITIALVALUE, Integer.valueOf(TOKEN_SHOWINITIALVALUE)); |
181 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_SHOWPROPERTIES, Integer.valueOf(TOKEN_SHOWPROPERTIES)); |
182 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_SHOWTYPES, Integer.valueOf(TOKEN_SHOWTYPES)); |
183 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_SHOWSTEREOTYPES, Integer.valueOf(TOKEN_SHOWSTEREOTYPES)); |
184 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_SHOWSINGULARMULTIPLICITIES, |
185 | Integer.valueOf(TOKEN_SHOWSINGULARMULTIPLICITIES)); | |
186 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_DEFAULTSHADOWWIDTH, |
187 | Integer.valueOf(TOKEN_DEFAULTSHADOWWIDTH)); | |
188 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_FONTNAME, Integer.valueOf(TOKEN_FONTNAME)); |
189 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_FONTSIZE, Integer.valueOf(TOKEN_FONTSIZE)); |
190 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_GENERATION_OUTPUT_DIR, |
191 | Integer.valueOf(TOKEN_GENERATION_OUTPUT_DIR)); | |
192 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_SHOWASSOCIATIONNAMES, |
193 | Integer.valueOf(TOKEN_SHOWASSOCIATIONNAMES)); | |
194 |
1
1. setupTokens : removed call to org/argouml/persistence/ArgoTokenTable::addToken → NO_COVERAGE |
addToken(STRING_ACTIVE_DIAGRAM, |
195 | Integer.valueOf(TOKEN_ACTIVE_DIAGRAM)); | |
196 | } | |
197 | ||
198 | } | |
Mutations | ||
164 |
1.1 |
|
165 |
1.1 |
|
166 |
1.1 |
|
167 |
1.1 |
|
168 |
1.1 |
|
169 |
1.1 |
|
170 |
1.1 |
|
171 |
1.1 |
|
172 |
1.1 |
|
173 |
1.1 |
|
174 |
1.1 |
|
175 |
1.1 |
|
176 |
1.1 |
|
177 |
1.1 |
|
178 |
1.1 |
|
179 |
1.1 |
|
180 |
1.1 |
|
181 |
1.1 |
|
182 |
1.1 |
|
183 |
1.1 |
|
184 |
1.1 |
|
186 |
1.1 |
|
188 |
1.1 |
|
189 |
1.1 |
|
190 |
1.1 |
|
192 |
1.1 |
|
194 |
1.1 |