Commit | Line | Data |
---|---|---|
ccc66d01 | 1 | /********************************************************************** |
ed902a2b | 2 | * Copyright (c) 2012, 2014 Ericsson |
cfdb727a | 3 | * |
ccc66d01 BH |
4 | * All rights reserved. This program and the accompanying materials are |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
cfdb727a AM |
8 | * |
9 | * Contributors: | |
ccc66d01 | 10 | * Bernd Hufmann - Initial API and implementation |
ba3a9bd2 | 11 | * Bernd Hufmann - Updated for support of LTTng Tools 2.1 |
ccc66d01 | 12 | **********************************************************************/ |
9bc60be7 | 13 | package org.eclipse.tracecompass.internal.lttng2.control.ui.views.dialogs; |
ccc66d01 BH |
14 | |
15 | import java.util.List; | |
16 | ||
17 | import org.eclipse.jface.dialogs.Dialog; | |
18 | import org.eclipse.jface.dialogs.IDialogConstants; | |
ccc66d01 BH |
19 | import org.eclipse.swt.SWT; |
20 | import org.eclipse.swt.events.SelectionAdapter; | |
21 | import org.eclipse.swt.events.SelectionEvent; | |
22 | import org.eclipse.swt.graphics.Point; | |
23 | import org.eclipse.swt.layout.GridData; | |
24 | import org.eclipse.swt.layout.GridLayout; | |
25 | import org.eclipse.swt.widgets.Button; | |
26 | import org.eclipse.swt.widgets.Composite; | |
27 | import org.eclipse.swt.widgets.Control; | |
28 | import org.eclipse.swt.widgets.Group; | |
29 | import org.eclipse.swt.widgets.Shell; | |
1bc37054 | 30 | import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceDomainType; |
a20452b1 | 31 | import org.eclipse.tracecompass.internal.lttng2.control.core.model.ITraceLogLevel; |
9bc60be7 | 32 | import org.eclipse.tracecompass.internal.lttng2.control.core.model.LogLevelType; |
9bc60be7 AM |
33 | import org.eclipse.tracecompass.internal.lttng2.control.ui.Activator; |
34 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.messages.Messages; | |
35 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent; | |
36 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup; | |
ccc66d01 BH |
37 | |
38 | /** | |
ccc66d01 BH |
39 | * <p> |
40 | * Dialog box for collecting information events to be enabled. | |
41 | * </p> | |
cfdb727a | 42 | * |
dbd4432d | 43 | * @author Bernd Hufmann |
ccc66d01 BH |
44 | */ |
45 | public class EnableEventsDialog extends Dialog implements IEnableEventsDialog { | |
46 | ||
47 | // ------------------------------------------------------------------------ | |
48 | // Constants | |
49 | // ------------------------------------------------------------------------ | |
cfdb727a | 50 | |
ccc66d01 BH |
51 | /** |
52 | * The icon file for this dialog box. | |
53 | */ | |
cfdb727a | 54 | public static final String ENABLE_EVENT_ICON_FILE = "icons/elcl16/enable_event.gif"; //$NON-NLS-1$ |
ccc66d01 BH |
55 | |
56 | // ------------------------------------------------------------------------ | |
57 | // Attributes | |
58 | // ------------------------------------------------------------------------ | |
59 | /** | |
60 | * The dialog composite. | |
61 | */ | |
62 | private Composite fDialogComposite; | |
63 | /** | |
64 | * The composite with widgets for collecting information about kernel events. | |
65 | */ | |
66 | private EnableKernelEventComposite fKernelComposite; | |
67 | /** | |
cfdb727a | 68 | * The composite with widgets for collecting information about UST events. |
ccc66d01 BH |
69 | */ |
70 | private EnableUstEventsComposite fUstComposite; | |
a20452b1 BR |
71 | /** |
72 | * The composite with widgets for collecting information about JUL events. | |
73 | */ | |
74 | private EnableJulEventsComposite fJulComposite; | |
ccc66d01 BH |
75 | /** |
76 | * Radio button for selecting kernel domain. | |
77 | */ | |
78 | private Button fKernelButton; | |
79 | /** | |
80 | * Radio button for selecting UST domain. | |
81 | */ | |
82 | private Button fUstButton; | |
a20452b1 BR |
83 | /** |
84 | * Radio button for selecting JUL domain. | |
85 | */ | |
86 | private Button fJulButton; | |
ccc66d01 | 87 | /** |
cfdb727a | 88 | * The referenced trace provider group containing the kernel provider and UST |
ccc66d01 BH |
89 | * provider component which contains a list of available tracepoints. |
90 | */ | |
91 | private TraceProviderGroup fProviderGroup; | |
92 | /** | |
cfdb727a | 93 | * The parent domain component where the channel node should be added. |
ccc66d01 BH |
94 | * Null in case the domain is not known (i.e. on session level). |
95 | */ | |
1bc37054 | 96 | private TraceDomainComponent fDomainComponent; |
ccc66d01 | 97 | /** |
1bc37054 | 98 | * The domain type ({@link TraceDomainType}) |
ccc66d01 | 99 | */ |
1bc37054 BR |
100 | private TraceDomainType fDomain; |
101 | ||
ccc66d01 BH |
102 | |
103 | // ------------------------------------------------------------------------ | |
104 | // Constructors | |
105 | // ------------------------------------------------------------------------ | |
106 | /** | |
107 | * Constructor | |
108 | * @param shell - a shell for the display of the dialog | |
ccc66d01 | 109 | */ |
d132bcc7 | 110 | public EnableEventsDialog(Shell shell) { |
ccc66d01 | 111 | super(shell); |
8a396998 | 112 | setShellStyle(SWT.RESIZE | getShellStyle()); |
ccc66d01 | 113 | } |
cfdb727a | 114 | |
ccc66d01 BH |
115 | // ------------------------------------------------------------------------ |
116 | // Accessors | |
117 | // ------------------------------------------------------------------------ | |
9ee91a86 BH |
118 | @Override |
119 | public boolean isAllEvents() { | |
a20452b1 BR |
120 | switch (fDomain) { |
121 | case KERNEL: | |
9ee91a86 | 122 | return fKernelComposite.isAllEvents(); |
a20452b1 BR |
123 | case JUL: |
124 | return fJulComposite.isAllTracePoints(); | |
125 | case UST: | |
126 | return fUstComposite.isAllTracePoints(); | |
127 | case LOG4J: | |
128 | case PYTHON: | |
129 | case UNKNOWN: | |
130 | default: | |
131 | return false; | |
9ee91a86 | 132 | } |
9ee91a86 | 133 | } |
cfdb727a | 134 | |
ccc66d01 BH |
135 | @Override |
136 | public boolean isTracepoints() { | |
a20452b1 BR |
137 | switch (fDomain) { |
138 | case JUL: | |
139 | // Loggers are always TRACEPOINT | |
140 | return true; | |
141 | case KERNEL: | |
ccc66d01 | 142 | return fKernelComposite.isTracepoints(); |
a20452b1 BR |
143 | case UST: |
144 | return fUstComposite.isTracepoints(); | |
145 | case LOG4J: | |
146 | case PYTHON: | |
147 | case UNKNOWN: | |
148 | default: | |
149 | return false; | |
ccc66d01 | 150 | } |
ccc66d01 | 151 | } |
cfdb727a | 152 | |
ccc66d01 BH |
153 | @Override |
154 | public boolean isAllTracePoints() { | |
a20452b1 BR |
155 | switch (fDomain) { |
156 | case KERNEL: | |
ccc66d01 | 157 | return fKernelComposite.isAllTracePoints(); |
a20452b1 BR |
158 | case UST: |
159 | return fUstComposite.isAllTracePoints(); | |
160 | case JUL: | |
161 | return fJulComposite.isAllTracePoints(); | |
162 | case LOG4J: | |
163 | case PYTHON: | |
164 | case UNKNOWN: | |
165 | default: | |
166 | return false; | |
ccc66d01 | 167 | } |
ccc66d01 | 168 | } |
cfdb727a | 169 | |
ccc66d01 | 170 | @Override |
207ff523 | 171 | public boolean isSyscalls() { |
1bc37054 | 172 | if (fDomain.equals(TraceDomainType.KERNEL)) { |
207ff523 | 173 | return fKernelComposite.isSyscalls(); |
ccc66d01 BH |
174 | } |
175 | return false; | |
176 | } | |
cfdb727a | 177 | |
ccc66d01 | 178 | @Override |
207ff523 | 179 | public boolean isAllSyscalls() { |
1bc37054 | 180 | if (fDomain.equals(TraceDomainType.KERNEL)) { |
207ff523 | 181 | return fKernelComposite.isAllSyscalls(); |
ccc66d01 BH |
182 | } |
183 | return false; | |
184 | } | |
cfdb727a | 185 | |
ccc66d01 BH |
186 | @Override |
187 | public List<String> getEventNames() { | |
a20452b1 BR |
188 | switch (fDomain) { |
189 | case JUL: | |
190 | return fJulComposite.getEventNames(); | |
191 | case KERNEL: | |
ccc66d01 | 192 | return fKernelComposite.getEventNames(); |
a20452b1 BR |
193 | case UST: |
194 | return fUstComposite.getEventNames(); | |
195 | case LOG4J: | |
196 | case PYTHON: | |
197 | case UNKNOWN: | |
198 | default: | |
199 | return null; | |
ccc66d01 | 200 | } |
ccc66d01 | 201 | } |
11252342 | 202 | |
ccc66d01 BH |
203 | @Override |
204 | public boolean isDynamicProbe() { | |
1bc37054 | 205 | if (fDomain.equals(TraceDomainType.KERNEL)) { |
ccc66d01 BH |
206 | return fKernelComposite.isDynamicProbe(); |
207 | } | |
208 | return false; | |
209 | } | |
cfdb727a | 210 | |
ccc66d01 BH |
211 | @Override |
212 | public String getProbeName() { | |
1bc37054 | 213 | if (fDomain.equals(TraceDomainType.KERNEL)) { |
ccc66d01 BH |
214 | return fKernelComposite.getProbeName(); |
215 | } | |
216 | return null; | |
217 | } | |
cfdb727a | 218 | |
ccc66d01 BH |
219 | @Override |
220 | public String getProbeEventName() { | |
1bc37054 | 221 | if (fDomain.equals(TraceDomainType.KERNEL)) { |
ccc66d01 BH |
222 | return fKernelComposite.getProbeEventName(); |
223 | } | |
224 | return null; | |
225 | } | |
cfdb727a | 226 | |
ccc66d01 BH |
227 | @Override |
228 | public boolean isDynamicFunctionProbe() { | |
1bc37054 | 229 | if (fDomain.equals(TraceDomainType.KERNEL)) { |
ccc66d01 BH |
230 | return fKernelComposite.isDynamicFunctionProbe(); |
231 | } | |
232 | return false; | |
233 | } | |
cfdb727a | 234 | |
ccc66d01 BH |
235 | @Override |
236 | public String getFunctionEventName() { | |
1bc37054 | 237 | if (fDomain.equals(TraceDomainType.KERNEL)) { |
ccc66d01 BH |
238 | return fKernelComposite.getFunctionEventName(); |
239 | } | |
240 | return null; | |
241 | } | |
cfdb727a | 242 | |
ccc66d01 BH |
243 | @Override |
244 | public String getFunction() { | |
1bc37054 | 245 | if (fDomain.equals(TraceDomainType.KERNEL)) { |
ccc66d01 BH |
246 | return fKernelComposite.getFunction(); |
247 | } | |
248 | return null; | |
249 | } | |
cfdb727a | 250 | |
ccc66d01 BH |
251 | @Override |
252 | public boolean isWildcard() { | |
1bc37054 | 253 | if (fDomain.equals(TraceDomainType.UST)) { |
ccc66d01 BH |
254 | return fUstComposite.isWildcard(); |
255 | } | |
256 | return false; | |
257 | } | |
258 | ||
ccc66d01 BH |
259 | @Override |
260 | public String getWildcard() { | |
1bc37054 | 261 | if (fDomain.equals(TraceDomainType.UST)) { |
ccc66d01 BH |
262 | return fUstComposite.getWildcard(); |
263 | } | |
264 | return null; | |
ccc66d01 BH |
265 | } |
266 | ||
ccc66d01 BH |
267 | @Override |
268 | public boolean isLogLevel() { | |
a20452b1 BR |
269 | switch (fDomain) { |
270 | case JUL: | |
271 | return fJulComposite.isLogLevel(); | |
272 | case KERNEL: | |
273 | return false; | |
274 | case UST: | |
ccc66d01 | 275 | return fUstComposite.isLogLevel(); |
a20452b1 BR |
276 | case LOG4J: |
277 | case PYTHON: | |
278 | case UNKNOWN: | |
279 | default: | |
280 | return false; | |
ccc66d01 | 281 | } |
ccc66d01 BH |
282 | } |
283 | ||
ccc66d01 BH |
284 | @Override |
285 | public LogLevelType getLogLevelType() { | |
a20452b1 BR |
286 | switch (fDomain) { |
287 | case JUL: | |
288 | return fJulComposite.getLogLevelType(); | |
289 | case KERNEL: | |
290 | return null; | |
291 | case UST: | |
ccc66d01 | 292 | return fUstComposite.getLogLevelType(); |
a20452b1 BR |
293 | case LOG4J: |
294 | case PYTHON: | |
295 | case UNKNOWN: | |
296 | default: | |
297 | return null; | |
ccc66d01 | 298 | } |
ccc66d01 | 299 | } |
cfdb727a | 300 | |
ccc66d01 | 301 | @Override |
a20452b1 BR |
302 | public ITraceLogLevel getLogLevel() { |
303 | switch (fDomain) { | |
304 | case JUL: | |
305 | return fJulComposite.getLogLevel(); | |
306 | case KERNEL: | |
307 | return null; | |
308 | case UST: | |
ccc66d01 | 309 | return fUstComposite.getLogLevel(); |
a20452b1 BR |
310 | case LOG4J: |
311 | case PYTHON: | |
312 | case UNKNOWN: | |
313 | default: | |
314 | return null; | |
ccc66d01 | 315 | } |
ccc66d01 | 316 | } |
cfdb727a | 317 | |
ccc66d01 | 318 | @Override |
1bc37054 BR |
319 | public TraceDomainType getDomain() { |
320 | return fDomain; | |
ccc66d01 | 321 | } |
cfdb727a | 322 | |
d132bcc7 BH |
323 | @Override |
324 | public void setTraceProviderGroup(TraceProviderGroup providerGroup) { | |
325 | fProviderGroup = providerGroup; | |
326 | } | |
327 | ||
d132bcc7 BH |
328 | @Override |
329 | public void setTraceDomainComponent(TraceDomainComponent domain) { | |
1bc37054 BR |
330 | fDomainComponent = domain; |
331 | if (fDomainComponent != null) { | |
332 | fDomain = fDomainComponent.getDomain(); | |
d132bcc7 | 333 | } else { |
1bc37054 BR |
334 | if (fProviderGroup != null) { |
335 | fDomain = fProviderGroup.hasKernelProvider() ? TraceDomainType.KERNEL : TraceDomainType.UST; | |
336 | } | |
d132bcc7 BH |
337 | } |
338 | } | |
ccc66d01 | 339 | |
d4514365 BH |
340 | @Override |
341 | public String getFilterExpression() { | |
1bc37054 BR |
342 | |
343 | switch (fDomain) { | |
344 | case KERNEL: | |
f0584d20 | 345 | return fKernelComposite.getFilterExpression(); |
1bc37054 BR |
346 | case UST: |
347 | return fUstComposite.getFilterExpression(); | |
348 | case JUL: | |
349 | case LOG4J: | |
350 | case PYTHON: | |
351 | case UNKNOWN: | |
352 | default: | |
353 | return null; | |
d4514365 | 354 | } |
d4514365 BH |
355 | } |
356 | ||
91dc1c3e BR |
357 | @Override |
358 | public List<String> getExcludedEvents() { | |
1bc37054 | 359 | if (fDomain.equals(TraceDomainType.UST)) { |
91dc1c3e BR |
360 | return fUstComposite.getExcludedEvents(); |
361 | } | |
362 | return null; | |
363 | } | |
364 | ||
ccc66d01 BH |
365 | // ------------------------------------------------------------------------ |
366 | // Operations | |
367 | // ------------------------------------------------------------------------ | |
11252342 | 368 | |
ccc66d01 BH |
369 | @Override |
370 | protected void configureShell(Shell newShell) { | |
371 | super.configureShell(newShell); | |
372 | newShell.setText(Messages.TraceControl_EnableEventsDialogTitle); | |
31a6a4e4 | 373 | newShell.setImage(Activator.getDefault().loadIcon(ENABLE_EVENT_ICON_FILE)); |
ccc66d01 BH |
374 | } |
375 | ||
ccc66d01 BH |
376 | @Override |
377 | protected Control createDialogArea(Composite parent) { | |
cfdb727a | 378 | |
ccc66d01 BH |
379 | // Main dialog panel |
380 | fDialogComposite = new Composite(parent, SWT.NONE); | |
381 | GridLayout layout = new GridLayout(1, true); | |
382 | fDialogComposite.setLayout(layout); | |
383 | fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); | |
384 | ||
385 | // ------------------------------------------------------------------------ | |
cfdb727a | 386 | // Domain Group |
ccc66d01 BH |
387 | // ------------------------------------------------------------------------ |
388 | Group domainGroup = new Group(fDialogComposite, SWT.SHADOW_NONE); | |
389 | domainGroup.setText(Messages.TraceControl_DomainDisplayName); | |
a20452b1 | 390 | layout = new GridLayout(3, true); |
cfdb727a AM |
391 | domainGroup.setLayout(layout); |
392 | ||
ccc66d01 BH |
393 | fKernelButton = new Button(domainGroup, SWT.RADIO); |
394 | fKernelButton.setText(Messages.TraceControl_KernelDomainDisplayName); | |
ccc66d01 BH |
395 | fUstButton = new Button(domainGroup, SWT.RADIO); |
396 | fUstButton.setText(Messages.TraceControl_UstDisplayName); | |
a20452b1 BR |
397 | fJulButton = new Button(domainGroup, SWT.RADIO); |
398 | fJulButton.setText(Messages.TraceControl_JULDomainDisplayName); | |
ccc66d01 | 399 | |
1bc37054 BR |
400 | switch (fDomain) { |
401 | case KERNEL: | |
402 | fKernelButton.setSelection(true); | |
403 | break; | |
404 | case UST: | |
405 | fUstButton.setSelection(true); | |
406 | break; | |
407 | case JUL: | |
a20452b1 BR |
408 | fJulButton.setSelection(true); |
409 | break; | |
1bc37054 BR |
410 | case LOG4J: |
411 | case PYTHON: | |
412 | case UNKNOWN: | |
413 | default: | |
414 | break; | |
415 | } | |
416 | ||
a20452b1 | 417 | if (fDomainComponent != null) { |
ccc66d01 BH |
418 | fKernelButton.setEnabled(false); |
419 | fUstButton.setEnabled(false); | |
a20452b1 BR |
420 | fJulButton.setEnabled(false); |
421 | } else if ((fProviderGroup != null) && (!fProviderGroup.hasKernelProvider())) { | |
422 | fKernelButton.setEnabled(false); | |
423 | fUstButton.setEnabled(true); | |
424 | fJulButton.setEnabled(true); | |
ccc66d01 BH |
425 | } |
426 | ||
427 | // layout widgets | |
428 | GridData data = new GridData(GridData.FILL_HORIZONTAL); | |
429 | domainGroup.setLayoutData(data); | |
430 | ||
431 | data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true); | |
432 | fKernelButton.setLayoutData(data); | |
433 | data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true); | |
434 | fUstButton.setLayoutData(data); | |
435 | ||
436 | // ------------------------------------------------------------------------ | |
a20452b1 | 437 | // Domain data group |
ccc66d01 | 438 | // ------------------------------------------------------------------------ |
d132bcc7 BH |
439 | fUstComposite = null; |
440 | fKernelComposite = null; | |
a20452b1 | 441 | fJulComposite = null; |
1bc37054 BR |
442 | |
443 | switch (fDomain) { | |
1bc37054 | 444 | case KERNEL: |
ccc66d01 | 445 | createKernelComposite(); |
1bc37054 BR |
446 | break; |
447 | case UST: | |
ccc66d01 | 448 | createUstComposite(); |
1bc37054 BR |
449 | break; |
450 | case JUL: | |
a20452b1 BR |
451 | createJulComposite(); |
452 | break; | |
1bc37054 BR |
453 | case LOG4J: |
454 | case PYTHON: | |
455 | case UNKNOWN: | |
456 | default: | |
457 | break; | |
ccc66d01 | 458 | } |
cfdb727a | 459 | |
ccc66d01 BH |
460 | fKernelButton.addSelectionListener(new SelectionAdapter() { |
461 | @Override | |
462 | public void widgetSelected(SelectionEvent e) { | |
463 | if (fKernelButton.getSelection()) { | |
a20452b1 | 464 | disposeAllComposite(); |
ccc66d01 BH |
465 | createKernelComposite(); |
466 | fDialogComposite.layout(); | |
467 | } | |
468 | } | |
469 | }); | |
470 | ||
471 | fUstButton.addSelectionListener(new SelectionAdapter() { | |
472 | @Override | |
473 | public void widgetSelected(SelectionEvent e) { | |
474 | if (fUstButton.getSelection()) { | |
a20452b1 | 475 | disposeAllComposite(); |
ccc66d01 BH |
476 | createUstComposite(); |
477 | fDialogComposite.layout(); | |
478 | } | |
479 | } | |
480 | }); | |
cfdb727a | 481 | |
a20452b1 BR |
482 | fJulButton.addSelectionListener(new SelectionAdapter() { |
483 | @Override | |
484 | public void widgetSelected(SelectionEvent e) { | |
485 | if (fJulButton.getSelection()) { | |
486 | disposeAllComposite(); | |
487 | createJulComposite(); | |
488 | fDialogComposite.layout(); | |
489 | } | |
490 | } | |
491 | }); | |
492 | ||
493 | ||
207ff523 | 494 | getShell().setMinimumSize(new Point(550, 850)); |
cfdb727a | 495 | |
ccc66d01 BH |
496 | return fDialogComposite; |
497 | } | |
cfdb727a | 498 | |
ccc66d01 BH |
499 | @Override |
500 | protected void createButtonsForButtonBar(Composite parent) { | |
79c3db85 | 501 | createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$ |
ccc66d01 BH |
502 | createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$ |
503 | } | |
504 | ||
ccc66d01 BH |
505 | @Override |
506 | protected void okPressed() { | |
1bc37054 BR |
507 | |
508 | if (fKernelButton.getSelection()) { | |
509 | fDomain = TraceDomainType.KERNEL; | |
510 | } else if (fUstButton.getSelection()){ | |
511 | fDomain = TraceDomainType.UST; | |
a20452b1 BR |
512 | } else if (fJulButton.getSelection()) { |
513 | fDomain = TraceDomainType.JUL; | |
1bc37054 | 514 | } |
ccc66d01 BH |
515 | |
516 | // Validate kernel composite in case of kernel domain | |
517 | if (fKernelComposite != null && !fKernelComposite.isValid()) { | |
518 | return; | |
519 | } | |
cfdb727a | 520 | |
a20452b1 | 521 | // Validate UST composite in case of UST domain |
ccc66d01 BH |
522 | if (fUstComposite != null && !fUstComposite.isValid()) { |
523 | return; | |
524 | } | |
cfdb727a | 525 | |
a20452b1 BR |
526 | // Validate JUL composite in case of JUL domain |
527 | if (fJulComposite != null && !fJulComposite.isValid()) { | |
528 | return; | |
529 | } | |
530 | ||
ccc66d01 BH |
531 | // validation successful -> call super.okPressed() |
532 | super.okPressed(); | |
533 | } | |
cfdb727a | 534 | |
ccc66d01 BH |
535 | // ------------------------------------------------------------------------ |
536 | // Helper methods | |
537 | // ------------------------------------------------------------------------ | |
11252342 | 538 | |
a20452b1 BR |
539 | /** |
540 | * Disposes all composites (if existing) | |
541 | */ | |
542 | private void disposeAllComposite() { | |
543 | disposeKernelComposite(); | |
544 | disposeUstComposite(); | |
545 | disposeJulComposite(); | |
546 | } | |
547 | ||
ccc66d01 BH |
548 | /** |
549 | * Creates the kernel composite (if not existing) | |
550 | */ | |
551 | private void createKernelComposite() { | |
552 | if (fKernelComposite == null) { | |
553 | fKernelComposite = new EnableKernelEventComposite(fDialogComposite, SWT.NONE, fProviderGroup); | |
554 | GridLayout layout = new GridLayout(1, true); | |
555 | fKernelComposite.setLayout(layout); | |
556 | fKernelComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); | |
557 | ||
558 | fKernelComposite.createContent(); | |
559 | } | |
560 | } | |
561 | ||
562 | /** | |
563 | * Disposes the kernel composite (if existing) | |
564 | */ | |
565 | private void disposeKernelComposite() { | |
566 | if (fKernelComposite != null) { | |
567 | fKernelComposite.dispose(); | |
568 | fKernelComposite = null; | |
569 | } | |
570 | } | |
571 | ||
572 | /** | |
573 | * Creates the UST composite (if not existing) | |
574 | */ | |
575 | private void createUstComposite() { | |
cfdb727a | 576 | if (fUstComposite == null) { |
ccc66d01 BH |
577 | fUstComposite = new EnableUstEventsComposite(fDialogComposite, SWT.NONE, fProviderGroup); |
578 | GridLayout layout = new GridLayout(1, true); | |
579 | fUstComposite.setLayout(layout); | |
580 | fUstComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); | |
581 | ||
582 | fUstComposite.createContent(); | |
583 | } | |
584 | } | |
585 | ||
586 | /** | |
587 | * Disposes the UST composite (if existing) | |
588 | */ | |
589 | private void disposeUstComposite() { | |
590 | if (fUstComposite != null) { | |
591 | fUstComposite.dispose(); | |
592 | fUstComposite = null; | |
593 | } | |
594 | } | |
a20452b1 BR |
595 | |
596 | ||
597 | /** | |
598 | * Creates the JUL composite (if not existing) | |
599 | */ | |
600 | private void createJulComposite() { | |
601 | if (fJulComposite == null) { | |
602 | fJulComposite = new EnableJulEventsComposite(fDialogComposite, SWT.NONE, fProviderGroup); | |
603 | GridLayout layout = new GridLayout(1, true); | |
604 | fJulComposite.setLayout(layout); | |
605 | fJulComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); | |
606 | ||
607 | fJulComposite.createContent(); | |
608 | } | |
609 | } | |
610 | ||
611 | /** | |
612 | * Disposes the JUL composite (if existing) | |
613 | */ | |
614 | private void disposeJulComposite() { | |
615 | if (fJulComposite != null) { | |
616 | fJulComposite.dispose(); | |
617 | fJulComposite = null; | |
618 | } | |
619 | } | |
620 | ||
ccc66d01 | 621 | } |