|
Lines 96-136
Link Here
|
| 96 |
} |
96 |
} |
| 97 |
|
97 |
|
| 98 |
public void refresh() { |
98 |
public void refresh() { |
| 99 |
if (!(wrappedObject instanceof SymptomDefinition)) |
99 |
// Bug 196219 |
|
|
100 |
// wrappedObject can be null and if so, all fields should be cleared |
| 101 |
if ((wrappedObject != null) && (!(wrappedObject instanceof SymptomDefinition))) |
| 100 |
return; |
102 |
return; |
| 101 |
refresh = true;// |
103 |
refresh = true;// |
| 102 |
if (name != null) { |
104 |
if (name != null) { |
| 103 |
name |
105 |
if (wrappedObject == null) { |
|
|
106 |
name.setText(""); |
| 107 |
} else { |
| 108 |
name |
| 104 |
.setText(((SymptomDefinition) wrappedObject).getName() != null ? ((SymptomDefinition) wrappedObject) |
109 |
.setText(((SymptomDefinition) wrappedObject).getName() != null ? ((SymptomDefinition) wrappedObject) |
| 105 |
.getName() |
110 |
.getName() |
| 106 |
: ""); |
111 |
: ""); |
|
|
112 |
} |
| 107 |
} |
113 |
} |
| 108 |
if (version != null) { |
114 |
if (version != null) { |
| 109 |
version |
115 |
if (wrappedObject == null) { |
|
|
116 |
version.setText(""); |
| 117 |
} else { |
| 118 |
version |
| 110 |
.setText(((SymptomDefinition) wrappedObject).getVersion() != null ? ((SymptomDefinition) wrappedObject) |
119 |
.setText(((SymptomDefinition) wrappedObject).getVersion() != null ? ((SymptomDefinition) wrappedObject) |
| 111 |
.getVersion() |
120 |
.getVersion() |
| 112 |
: defaultVersion); |
121 |
: defaultVersion); |
|
|
122 |
} |
| 113 |
} |
123 |
} |
| 114 |
if (description != null) { |
124 |
if (description != null) { |
| 115 |
description |
125 |
if (wrappedObject == null) { |
|
|
126 |
description.setText(""); |
| 127 |
} else { |
| 128 |
description |
| 116 |
.setText(((SymptomDefinition) wrappedObject) |
129 |
.setText(((SymptomDefinition) wrappedObject) |
| 117 |
.getDescription() != null |
130 |
.getDescription() != null |
| 118 |
&& ((SymptomDefinition) wrappedObject) |
131 |
&& ((SymptomDefinition) wrappedObject) |
| 119 |
.getDescription().getMessage() != null ? ((SymptomDefinition) wrappedObject) |
132 |
.getDescription().getMessage() != null ? ((SymptomDefinition) wrappedObject) |
| 120 |
.getDescription().getMessage() |
133 |
.getDescription().getMessage() |
| 121 |
: ""); |
134 |
: ""); |
|
|
135 |
} |
| 122 |
} |
136 |
} |
| 123 |
if (editor!=null ||(editor==null && isAttributeVisible(SdUIConstants.SymptomDef_comments))) { |
137 |
if (editor!=null ||(editor==null && isAttributeVisible(SdUIConstants.SymptomDef_comments))) { |
| 124 |
refreshComments(((SymptomDefinition) wrappedObject).getComment()); |
138 |
if (wrappedObject == null) { |
|
|
139 |
refreshComments(new ArrayList()); |
| 140 |
} else { |
| 141 |
refreshComments(((SymptomDefinition) wrappedObject).getComment()); |
| 142 |
} |
| 125 |
} |
143 |
} |
| 126 |
|
144 |
|
| 127 |
if (url != null) { |
145 |
if (url != null) { |
| 128 |
url |
146 |
if (wrappedObject == null) { |
|
|
147 |
url.setText(""); |
| 148 |
} else { |
| 149 |
url |
| 129 |
.setText(((SymptomDefinition) wrappedObject).getUrl() != null ? TextProcessor.process(((SymptomDefinition) wrappedObject) |
150 |
.setText(((SymptomDefinition) wrappedObject).getUrl() != null ? TextProcessor.process(((SymptomDefinition) wrappedObject) |
| 130 |
.getUrl()) |
151 |
.getUrl()) |
| 131 |
: "");//added osgi TextProcessor for correct BiDi path processing Bugzilla 152590 |
152 |
: "");//added osgi TextProcessor for correct BiDi path processing Bugzilla 152590 |
|
|
153 |
} |
| 132 |
} |
154 |
} |
| 133 |
if (mirror != null) { |
155 |
if (mirror != null) { |
|
|
156 |
if (wrappedObject == null) { |
| 157 |
mirror.setText(""); |
| 158 |
} else { |
| 134 |
List mirrors = ((SymptomDefinition) wrappedObject).getMirror(); |
159 |
List mirrors = ((SymptomDefinition) wrappedObject).getMirror(); |
| 135 |
int s = mirrors.size(); |
160 |
int s = mirrors.size(); |
| 136 |
StringBuffer mirrorsBuffer = new StringBuffer(); |
161 |
StringBuffer mirrorsBuffer = new StringBuffer(); |
|
Lines 151-165
Link Here
|
| 151 |
} |
176 |
} |
| 152 |
|
177 |
|
| 153 |
mirror.setText(TextProcessor.process(mirrorsBuffer.toString()));//added osgi TextProcessor for correct BiDi path processing Bugzilla 152590 |
178 |
mirror.setText(TextProcessor.process(mirrorsBuffer.toString()));//added osgi TextProcessor for correct BiDi path processing Bugzilla 152590 |
|
|
179 |
} |
| 154 |
} |
180 |
} |
| 155 |
if (category != null) { |
181 |
if (category != null) { |
| 156 |
category |
182 |
if (wrappedObject == null) { |
|
|
183 |
category.setText(""); |
| 184 |
} else { |
| 185 |
category |
| 157 |
.setText(((SymptomDefinition) wrappedObject).getCategory() != null ? ((SymptomDefinition) wrappedObject) |
186 |
.setText(((SymptomDefinition) wrappedObject).getCategory() != null ? ((SymptomDefinition) wrappedObject) |
| 158 |
.getCategory().toString() |
187 |
.getCategory().toString() |
| 159 |
: DEFAULT_CATEGORY); |
188 |
: DEFAULT_CATEGORY); |
|
|
189 |
} |
| 160 |
} |
190 |
} |
| 161 |
|
191 |
|
| 162 |
if(context!=null){ |
192 |
if(context!=null){ |
|
|
193 |
if (wrappedObject == null) { |
| 194 |
context.setText(""); |
| 195 |
} else { |
| 163 |
List contextList = ((SymptomDefinition) wrappedObject).getContext(); |
196 |
List contextList = ((SymptomDefinition) wrappedObject).getContext(); |
| 164 |
int s = contextList.size(); |
197 |
int s = contextList.size(); |
| 165 |
StringBuffer contextBuffer = new StringBuffer(); |
198 |
StringBuffer contextBuffer = new StringBuffer(); |
|
Lines 180-209
Link Here
|
| 180 |
} |
213 |
} |
| 181 |
|
214 |
|
| 182 |
context.setText(contextBuffer.toString()); |
215 |
context.setText(contextBuffer.toString()); |
|
|
216 |
} |
| 183 |
} |
217 |
} |
| 184 |
if (resource != null) { |
218 |
if (resource != null) { |
| 185 |
resource |
219 |
if (wrappedObject == null) { |
|
|
220 |
resource.setText(""); |
| 221 |
} else { |
| 222 |
resource |
| 186 |
.setText(((SymptomDefinition) wrappedObject).getResource() != null ? ((SymptomDefinition) wrappedObject) |
223 |
.setText(((SymptomDefinition) wrappedObject).getResource() != null ? ((SymptomDefinition) wrappedObject) |
| 187 |
.getResource() |
224 |
.getResource() |
| 188 |
: ""); |
225 |
: ""); |
|
|
226 |
} |
| 189 |
} |
227 |
} |
| 190 |
|
228 |
|
| 191 |
|
229 |
|
| 192 |
if (example != null) { |
230 |
if (example != null) { |
| 193 |
example |
231 |
if (wrappedObject == null) { |
|
|
232 |
example.setText(""); |
| 233 |
} else { |
| 234 |
example |
| 194 |
.setText(((SymptomDefinition) wrappedObject).getExample() != null |
235 |
.setText(((SymptomDefinition) wrappedObject).getExample() != null |
| 195 |
&& ((SymptomDefinition) wrappedObject).getExample() |
236 |
&& ((SymptomDefinition) wrappedObject).getExample() |
| 196 |
.getMessage() != null ? ((SymptomDefinition) wrappedObject) |
237 |
.getMessage() != null ? ((SymptomDefinition) wrappedObject) |
| 197 |
.getExample().getMessage() |
238 |
.getExample().getMessage() |
| 198 |
: ""); |
239 |
: ""); |
|
|
240 |
} |
| 199 |
} |
241 |
} |
| 200 |
if (solution != null) { |
242 |
if (solution != null) { |
| 201 |
solution |
243 |
if (wrappedObject == null) { |
|
|
244 |
solution.setText(""); |
| 245 |
} else { |
| 246 |
solution |
| 202 |
.setText(((SymptomDefinition) wrappedObject).getSolution() != null |
247 |
.setText(((SymptomDefinition) wrappedObject).getSolution() != null |
| 203 |
&& ((SymptomDefinition) wrappedObject) |
248 |
&& ((SymptomDefinition) wrappedObject) |
| 204 |
.getSolution().getMessage() != null ? ((SymptomDefinition) wrappedObject) |
249 |
.getSolution().getMessage() != null ? ((SymptomDefinition) wrappedObject) |
| 205 |
.getSolution().getMessage() |
250 |
.getSolution().getMessage() |
| 206 |
: ""); |
251 |
: ""); |
|
|
252 |
} |
| 207 |
} |
253 |
} |
| 208 |
refresh = false; |
254 |
refresh = false; |
| 209 |
} |
255 |
} |