Commit | Line | Data |
---|---|---|
c3c5c786 FC |
1 | /*******************************************************************************\r |
2 | * Copyright (c) 2010 Ericsson\r | |
3 | * \r | |
4 | * All rights reserved. This program and the accompanying materials are\r | |
5 | * made available under the terms of the Eclipse Public License v1.0 which\r | |
6 | * accompanies this distribution, and is available at\r | |
7 | * http://www.eclipse.org/legal/epl-v10.html\r | |
8 | * \r | |
9 | * Contributors:\r | |
10 | * Patrick Tasse - Initial API and implementation\r | |
11 | *******************************************************************************/\r | |
12 | \r | |
13 | package org.eclipse.linuxtools.tmf.ui.dialogs;\r | |
14 | \r | |
15 | import java.io.File;\r | |
12c155f5 | 16 | import java.net.URI;\r |
c3c5c786 FC |
17 | \r |
18 | import org.eclipse.core.resources.IFile;\r | |
12c155f5 FC |
19 | import org.eclipse.core.resources.IFolder;\r |
20 | import org.eclipse.core.resources.IProject;\r | |
21 | import org.eclipse.core.resources.IResource;\r | |
c3c5c786 | 22 | import org.eclipse.core.resources.IWorkspace;\r |
12c155f5 | 23 | import org.eclipse.core.resources.IWorkspaceRoot;\r |
c3c5c786 FC |
24 | import org.eclipse.core.resources.ResourcesPlugin;\r |
25 | import org.eclipse.core.runtime.CoreException;\r | |
26 | import org.eclipse.core.runtime.IPath;\r | |
27 | import org.eclipse.core.runtime.Path;\r | |
12c155f5 FC |
28 | import org.eclipse.core.runtime.Status;\r |
29 | import org.eclipse.core.runtime.preferences.IEclipsePreferences;\r | |
30 | import org.eclipse.core.runtime.preferences.InstanceScope;\r | |
c3c5c786 FC |
31 | import org.eclipse.jface.dialogs.Dialog;\r |
32 | import org.eclipse.jface.dialogs.IDialogConstants;\r | |
33 | import org.eclipse.jface.dialogs.MessageDialog;\r | |
34 | import org.eclipse.jface.wizard.WizardDialog;\r | |
35 | import org.eclipse.linuxtools.tmf.ui.TmfUiPlugin;\r | |
12c155f5 | 36 | import org.eclipse.linuxtools.tmf.ui.TmfUiPreferenceInitializer;\r |
c3c5c786 | 37 | import org.eclipse.linuxtools.tmf.ui.editors.TmfEventsEditor;\r |
7995b722 | 38 | import org.eclipse.linuxtools.tmf.ui.internal.Messages;\r |
c3c5c786 FC |
39 | import org.eclipse.linuxtools.tmf.ui.parsers.ParserProviderManager;\r |
40 | import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTraceDefinition;\r | |
41 | import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTxtTrace;\r | |
42 | import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomTxtTraceDefinition;\r | |
43 | import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomXmlTrace;\r | |
44 | import org.eclipse.linuxtools.tmf.ui.parsers.custom.CustomXmlTraceDefinition;\r | |
12c155f5 FC |
45 | import org.eclipse.linuxtools.tmf.ui.parsers.wizards.CustomTxtParserWizard;\r |
46 | import org.eclipse.linuxtools.tmf.ui.parsers.wizards.CustomXmlParserWizard;\r | |
47 | import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceFolder;\r | |
c3c5c786 FC |
48 | import org.eclipse.swt.SWT;\r |
49 | import org.eclipse.swt.events.SelectionEvent;\r | |
50 | import org.eclipse.swt.events.SelectionListener;\r | |
51 | import org.eclipse.swt.graphics.Image;\r | |
52 | import org.eclipse.swt.layout.GridData;\r | |
53 | import org.eclipse.swt.layout.GridLayout;\r | |
54 | import org.eclipse.swt.widgets.Button;\r | |
55 | import org.eclipse.swt.widgets.Composite;\r | |
56 | import org.eclipse.swt.widgets.Control;\r | |
57 | import org.eclipse.swt.widgets.Display;\r | |
58 | import org.eclipse.swt.widgets.FileDialog;\r | |
59 | import org.eclipse.swt.widgets.Label;\r | |
60 | import org.eclipse.swt.widgets.List;\r | |
61 | import org.eclipse.swt.widgets.Shell;\r | |
62 | import org.eclipse.ui.IEditorInput;\r | |
63 | import org.eclipse.ui.IEditorPart;\r | |
64 | import org.eclipse.ui.IReusableEditor;\r | |
65 | import org.eclipse.ui.IWorkbench;\r | |
66 | import org.eclipse.ui.IWorkbenchPage;\r | |
67 | import org.eclipse.ui.PlatformUI;\r | |
68 | import org.eclipse.ui.part.FileEditorInput;\r | |
69 | \r | |
70 | public class ManageCustomParsersDialog extends Dialog {\r | |
71 | \r | |
d7fcacc9 | 72 | private static final Image image = TmfUiPlugin.getDefault().getImageFromPath("/icons/etool16/customparser_wizard.gif"); //$NON-NLS-1$\r |
c3c5c786 FC |
73 | \r |
74 | Button txtButton;\r | |
75 | Button xmlButton;\r | |
76 | List parserList;\r | |
77 | Button newButton;\r | |
78 | Button editButton;\r | |
79 | Button deleteButton;\r | |
80 | Button importButton;\r | |
81 | Button exportButton;\r | |
82 | Button parseButton;\r | |
83 | \r | |
84 | public ManageCustomParsersDialog(Shell parent) {\r | |
85 | super(parent);\r | |
86 | setShellStyle(SWT.RESIZE | SWT.MAX | getShellStyle());\r | |
87 | }\r | |
88 | \r | |
89 | /* (non-Javadoc)\r | |
90 | * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)\r | |
91 | */\r | |
92 | @Override\r | |
93 | protected Control createDialogArea(Composite parent) {\r | |
b9763f53 | 94 | getShell().setText(Messages.ManageCustomParsersDialog_DialogHeader);\r |
c3c5c786 FC |
95 | getShell().setImage(image);\r |
96 | \r | |
97 | Composite composite = (Composite) super.createDialogArea(parent);\r | |
98 | composite.setLayout(new GridLayout(2, false));\r | |
99 | \r | |
100 | Composite listContainer = new Composite(composite, SWT.NONE);\r | |
101 | listContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\r | |
102 | GridLayout lcgl = new GridLayout();\r | |
103 | lcgl.marginHeight = 0;\r | |
104 | lcgl.marginWidth = 0;\r | |
105 | listContainer.setLayout(lcgl);\r | |
106 | \r | |
107 | Composite radioContainer = new Composite(listContainer, SWT.NONE);\r | |
108 | GridLayout rcgl = new GridLayout(2, true);\r | |
109 | rcgl.marginHeight = 0;\r | |
110 | rcgl.marginWidth = 0;\r | |
111 | radioContainer.setLayout(rcgl);\r | |
112 | \r | |
113 | txtButton = new Button(radioContainer, SWT.RADIO);\r | |
b9763f53 | 114 | txtButton.setText(Messages.ManageCustomParsersDialog_TextButtonLabel);\r |
c3c5c786 FC |
115 | txtButton.setSelection(true);\r |
116 | txtButton.addSelectionListener(new SelectionListener(){\r | |
d4011df2 FC |
117 | @Override\r |
118 | public void widgetDefaultSelected(SelectionEvent e) {}\r | |
119 | @Override\r | |
120 | public void widgetSelected(SelectionEvent e) {\r | |
c3c5c786 FC |
121 | fillParserList();\r |
122 | }});\r | |
123 | \r | |
124 | xmlButton = new Button(radioContainer, SWT.RADIO);\r | |
3b38ea61 | 125 | xmlButton.setText("XML"); //$NON-NLS-1$\r |
c3c5c786 | 126 | xmlButton.addSelectionListener(new SelectionListener(){\r |
d4011df2 FC |
127 | @Override\r |
128 | public void widgetDefaultSelected(SelectionEvent e) {}\r | |
129 | @Override\r | |
130 | public void widgetSelected(SelectionEvent e) {\r | |
c3c5c786 FC |
131 | fillParserList();\r |
132 | }});\r | |
133 | \r | |
134 | parserList = new List(listContainer, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\r | |
135 | parserList.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\r | |
136 | parserList.addSelectionListener(new SelectionListener(){\r | |
d4011df2 FC |
137 | @Override\r |
138 | public void widgetDefaultSelected(SelectionEvent e) {}\r | |
139 | @Override\r | |
140 | public void widgetSelected(SelectionEvent e) {\r | |
c3c5c786 FC |
141 | if (parserList.getSelectionCount() == 0) {\r |
142 | editButton.setEnabled(false);\r | |
143 | deleteButton.setEnabled(false);\r | |
144 | exportButton.setEnabled(false);\r | |
145 | parseButton.setEnabled(false);\r | |
146 | } else {\r | |
147 | editButton.setEnabled(true);\r | |
148 | deleteButton.setEnabled(true);\r | |
149 | exportButton.setEnabled(true);\r | |
150 | parseButton.setEnabled(true);\r | |
151 | }\r | |
152 | }});\r | |
153 | \r | |
154 | Composite buttonContainer = new Composite(composite, SWT.NULL);\r | |
155 | buttonContainer.setLayout(new GridLayout());\r | |
156 | buttonContainer.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false, false));\r | |
157 | \r | |
158 | newButton = new Button(buttonContainer, SWT.PUSH);\r | |
159 | newButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));\r | |
b9763f53 | 160 | newButton.setText(Messages.ManageCustomParsersDialog_NewButtonLabel);\r |
c3c5c786 | 161 | newButton.addSelectionListener(new SelectionListener(){\r |
d4011df2 FC |
162 | @Override\r |
163 | public void widgetDefaultSelected(SelectionEvent e) {}\r | |
164 | @Override\r | |
165 | public void widgetSelected(SelectionEvent e) {\r | |
c3c5c786 FC |
166 | WizardDialog dialog = null;\r |
167 | if (txtButton.getSelection()) {\r | |
168 | dialog = new WizardDialog(getShell(), new CustomTxtParserWizard());\r | |
169 | } else if (xmlButton.getSelection()) {\r | |
170 | dialog = new WizardDialog(getShell(), new CustomXmlParserWizard());\r | |
171 | }\r | |
172 | dialog.open();\r | |
173 | if (dialog.getReturnCode() == Dialog.OK) {\r | |
174 | fillParserList();\r | |
175 | }\r | |
176 | }});\r | |
177 | \r | |
178 | editButton = new Button(buttonContainer, SWT.PUSH);\r | |
179 | editButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));\r | |
b9763f53 | 180 | editButton.setText(Messages.ManageCustomParsersDialog_EditButtonLabel);\r |
c3c5c786 FC |
181 | editButton.setEnabled(false);\r |
182 | editButton.addSelectionListener(new SelectionListener(){\r | |
d4011df2 FC |
183 | @Override\r |
184 | public void widgetDefaultSelected(SelectionEvent e) {}\r | |
185 | @Override\r | |
186 | public void widgetSelected(SelectionEvent e) {\r | |
c3c5c786 FC |
187 | WizardDialog dialog = null;\r |
188 | if (txtButton.getSelection()) {\r | |
189 | dialog = new WizardDialog(getShell(),\r | |
190 | new CustomTxtParserWizard(CustomTxtTraceDefinition.load(parserList.getSelection()[0])));\r | |
191 | } else if (xmlButton.getSelection()) {\r | |
192 | dialog = new WizardDialog(getShell(),\r | |
193 | new CustomXmlParserWizard(CustomXmlTraceDefinition.load(parserList.getSelection()[0])));\r | |
194 | }\r | |
195 | dialog.open();\r | |
196 | if (dialog.getReturnCode() == Dialog.OK) {\r | |
197 | fillParserList();\r | |
198 | }\r | |
199 | }});\r | |
200 | \r | |
201 | deleteButton = new Button(buttonContainer, SWT.PUSH);\r | |
202 | deleteButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));\r | |
b9763f53 | 203 | deleteButton.setText(Messages.ManageCustomParsersDialog_DeleteButtonLabel);\r |
c3c5c786 FC |
204 | deleteButton.setEnabled(false);\r |
205 | deleteButton.addSelectionListener(new SelectionListener(){\r | |
d4011df2 FC |
206 | @Override\r |
207 | public void widgetDefaultSelected(SelectionEvent e) {}\r | |
208 | @Override\r | |
209 | public void widgetSelected(SelectionEvent e) {\r | |
c3c5c786 FC |
210 | boolean confirm = MessageDialog.openQuestion(\r |
211 | getShell(),\r | |
b9763f53 FC |
212 | Messages.ManageCustomParsersDialog_DeleteParserDialogHeader,\r |
213 | Messages.ManageCustomParsersDialog_DeleteConfirmation + parserList.getSelection()[0] + "?"); //$NON-NLS-1$\r | |
c3c5c786 FC |
214 | if (confirm) {\r |
215 | if (txtButton.getSelection()) {\r | |
216 | CustomTxtTraceDefinition.delete(parserList.getSelection()[0]);\r | |
217 | } else if (xmlButton.getSelection()) {\r | |
218 | CustomXmlTraceDefinition.delete(parserList.getSelection()[0]);\r | |
219 | }\r | |
220 | fillParserList();\r | |
221 | }\r | |
222 | }});\r | |
223 | \r | |
224 | new Label(buttonContainer, SWT.NONE); // filler\r | |
225 | \r | |
226 | importButton = new Button(buttonContainer, SWT.PUSH);\r | |
227 | importButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));\r | |
b9763f53 | 228 | importButton.setText(Messages.ManageCustomParsersDialog_ImportButtonLabel);\r |
c3c5c786 | 229 | importButton.addSelectionListener(new SelectionListener(){\r |
d4011df2 FC |
230 | @Override\r |
231 | public void widgetDefaultSelected(SelectionEvent e) {}\r | |
232 | @Override\r | |
233 | public void widgetSelected(SelectionEvent e) {\r | |
c3c5c786 | 234 | FileDialog dialog = new FileDialog(Display.getCurrent().getActiveShell(), SWT.OPEN);\r |
b9763f53 | 235 | dialog.setText(Messages.ManageCustomParsersDialog_ImportParserSelection);\r |
3b38ea61 | 236 | dialog.setFilterExtensions(new String[] {"*.xml", "*"}); //$NON-NLS-1$ //$NON-NLS-2$\r |
c3c5c786 FC |
237 | String path = dialog.open();\r |
238 | if (path != null) {\r | |
239 | CustomTraceDefinition[] defs = null;\r | |
240 | if (txtButton.getSelection()) {\r | |
241 | defs = CustomTxtTraceDefinition.loadAll(path);\r | |
242 | } else if (xmlButton.getSelection()) {\r | |
243 | defs = CustomXmlTraceDefinition.loadAll(path);\r | |
244 | }\r | |
245 | if (defs != null && defs.length > 0) {\r | |
246 | for (CustomTraceDefinition def : defs) {\r | |
247 | def.save();\r | |
248 | }\r | |
249 | fillParserList();\r | |
250 | }\r | |
251 | }\r | |
252 | }});\r | |
253 | \r | |
254 | exportButton = new Button(buttonContainer, SWT.PUSH);\r | |
255 | exportButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));\r | |
b9763f53 | 256 | exportButton.setText(Messages.ManageCustomParsersDialog_ExportButtonLabel);\r |
c3c5c786 FC |
257 | exportButton.setEnabled(false);\r |
258 | exportButton.addSelectionListener(new SelectionListener(){\r | |
d4011df2 FC |
259 | @Override\r |
260 | public void widgetDefaultSelected(SelectionEvent e) {}\r | |
261 | @Override\r | |
262 | public void widgetSelected(SelectionEvent e) {\r | |
c3c5c786 | 263 | FileDialog dialog = new FileDialog(Display.getCurrent().getActiveShell(), SWT.SAVE);\r |
b9763f53 | 264 | dialog.setText(Messages.ManageCustomParsersDialog_ExportParserSelection + parserList.getSelection()[0]);\r |
3b38ea61 | 265 | dialog.setFilterExtensions(new String[] {"*.xml", "*"}); //$NON-NLS-1$ //$NON-NLS-2$\r |
c3c5c786 FC |
266 | String path = dialog.open();\r |
267 | if (path != null) {\r | |
268 | CustomTraceDefinition def = null;\r | |
269 | if (txtButton.getSelection()) {\r | |
270 | def = CustomTxtTraceDefinition.load(parserList.getSelection()[0]);\r | |
271 | } else if (xmlButton.getSelection()) {\r | |
272 | def = CustomXmlTraceDefinition.load(parserList.getSelection()[0]);\r | |
273 | }\r | |
274 | if (def != null) {\r | |
275 | def.save(path);\r | |
276 | }\r | |
277 | }\r | |
278 | }});\r | |
279 | \r | |
280 | parseButton = new Button(buttonContainer, SWT.PUSH);\r | |
281 | parseButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));\r | |
b9763f53 | 282 | parseButton.setText(Messages.ManageCustomParsersDialog_ParseButtonLabel);\r |
c3c5c786 FC |
283 | parseButton.setEnabled(false);\r |
284 | parseButton.addSelectionListener(new SelectionListener(){\r | |
d4011df2 FC |
285 | @Override\r |
286 | public void widgetDefaultSelected(SelectionEvent e) {}\r | |
287 | @Override\r | |
288 | public void widgetSelected(SelectionEvent e) {\r | |
c3c5c786 | 289 | FileDialog dialog = new FileDialog(Display.getCurrent().getActiveShell(), SWT.OPEN);\r |
b9763f53 | 290 | dialog.setText(Messages.ManageCustomParsersDialog_TraceSelection + parserList.getSelection()[0]);\r |
c3c5c786 | 291 | if (xmlButton.getSelection()) {\r |
3b38ea61 | 292 | dialog.setFilterExtensions(new String[] {"*.xml", "*"}); //$NON-NLS-1$ //$NON-NLS-2$\r |
c3c5c786 FC |
293 | }\r |
294 | String path = dialog.open();\r | |
295 | String parser = null;\r | |
296 | if (path != null) {\r | |
297 | CustomTraceDefinition def = null;\r | |
298 | if (txtButton.getSelection()) {\r | |
299 | def = CustomTxtTraceDefinition.load(parserList.getSelection()[0]);\r | |
3b38ea61 | 300 | parser = CustomTxtTrace.class.getCanonicalName() + "." + def.definitionName; //$NON-NLS-1$\r |
c3c5c786 FC |
301 | } else if (xmlButton.getSelection()) {\r |
302 | def = CustomXmlTraceDefinition.load(parserList.getSelection()[0]);\r | |
3b38ea61 | 303 | parser = CustomXmlTrace.class.getCanonicalName() + "." + def.definitionName; //$NON-NLS-1$\r |
c3c5c786 FC |
304 | }\r |
305 | if (def != null) {\r | |
306 | try {\r | |
307 | IWorkspace workspace = ResourcesPlugin.getWorkspace();\r | |
308 | IPath location = Path.fromOSString(path);\r | |
309 | IFile file = workspace.getRoot().getFileForLocation(location);\r | |
310 | if (file == null) {\r | |
12c155f5 | 311 | file = createLink(new File(location.toPortableString()).toURI());\r |
c3c5c786 FC |
312 | }\r |
313 | file.setPersistentProperty(ParserProviderManager.PARSER_PROPERTY, parser);\r | |
314 | IEditorInput editorInput = new FileEditorInput(file);\r | |
315 | IWorkbench wb = PlatformUI.getWorkbench();\r | |
316 | IWorkbenchPage activePage = wb.getActiveWorkbenchWindow().getActivePage();\r | |
317 | \r | |
318 | String editorId = TmfEventsEditor.ID;\r | |
319 | IEditorPart editor = activePage.findEditor(editorInput);\r | |
320 | if (editor != null && editor instanceof IReusableEditor) {\r | |
321 | activePage.reuseEditor((IReusableEditor)editor, editorInput);\r | |
322 | activePage.activate(editor);\r | |
323 | } else {\r | |
324 | editor = activePage.openEditor(editorInput, editorId);\r | |
325 | }\r | |
326 | } catch (CoreException e1) {\r | |
b9763f53 | 327 | MessageDialog.openError(getShell(), "Parse Error", e1.getMessage()); //$NON-NLS-1$\r |
c3c5c786 FC |
328 | }\r |
329 | }\r | |
330 | }\r | |
331 | }});\r | |
332 | \r | |
333 | fillParserList();\r | |
334 | \r | |
335 | getShell().setMinimumSize(300, 275);\r | |
336 | return composite;\r | |
337 | }\r | |
338 | \r | |
12c155f5 FC |
339 | // /////////////////////////////////////////////////////////////////////////////\r |
340 | // FIXME: Duplicated in TmfEventsEditor\r | |
341 | // From the legacy ProjectView\r | |
342 | // /////////////////////////////////////////////////////////////////////////////\r | |
343 | \r | |
344 | // ------------------------------------------------------------------------\r | |
345 | // Static methods\r | |
346 | // ------------------------------------------------------------------------\r | |
347 | \r | |
348 | static public IFolder getActiveProjectTracesFolder() {\r | |
349 | IEclipsePreferences node = new InstanceScope()\r | |
350 | .getNode(TmfUiPlugin.PLUGIN_ID);\r | |
351 | String activeProjectName = node.get(\r | |
352 | TmfUiPreferenceInitializer.ACTIVE_PROJECT_PREFERENCE,\r | |
353 | TmfUiPreferenceInitializer.ACTIVE_PROJECT_DEFAULT);\r | |
354 | IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();\r | |
355 | IProject[] projects = root.getProjects();\r | |
356 | for (IProject project : projects) {\r | |
357 | if (project.isAccessible()\r | |
358 | && project.getName().equals(activeProjectName)) {\r | |
359 | return project.getFolder(TmfTraceFolder.TRACE_FOLDER_NAME);\r | |
360 | }\r | |
361 | }\r | |
362 | return null;\r | |
363 | }\r | |
364 | \r | |
365 | static public IFile createLink(URI uri) throws CoreException {\r | |
366 | IFolder folder = getActiveProjectTracesFolder();\r | |
367 | if (folder == null || !folder.exists()) {\r | |
368 | throw new CoreException(new Status(Status.ERROR,\r | |
369 | TmfUiPlugin.PLUGIN_ID, "No active project set")); //$NON-NLS-1$\r | |
370 | }\r | |
371 | String path = uri.getPath();\r | |
372 | // TODO: support duplicate file names\r | |
373 | IFile file = folder.getFile(path.substring(path\r | |
374 | .lastIndexOf(Path.SEPARATOR)));\r | |
375 | if (!file.exists()) {\r | |
376 | file.createLink(uri, IResource.NONE, null);\r | |
377 | }\r | |
378 | return file;\r | |
379 | }\r | |
380 | \r | |
381 | // /////////////////////////////////////////////////////////////////////////////\r | |
382 | \r | |
c3c5c786 FC |
383 | /* (non-Javadoc)\r |
384 | * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)\r | |
385 | */\r | |
386 | @Override\r | |
387 | protected void createButtonsForButtonBar(Composite parent) {\r | |
388 | createButton(parent, IDialogConstants.OK_ID, IDialogConstants.CLOSE_LABEL, false);\r | |
389 | }\r | |
390 | \r | |
391 | private void fillParserList() {\r | |
392 | parserList.removeAll();\r | |
393 | if (txtButton.getSelection()) {\r | |
394 | for (CustomTxtTraceDefinition def : CustomTxtTraceDefinition.loadAll()) {\r | |
395 | parserList.add(def.definitionName);\r | |
396 | }\r | |
397 | } else if (xmlButton.getSelection()) {\r | |
398 | for (CustomXmlTraceDefinition def : CustomXmlTraceDefinition.loadAll()) {\r | |
399 | parserList.add(def.definitionName);\r | |
400 | }\r | |
401 | }\r | |
402 | editButton.setEnabled(false);\r | |
403 | deleteButton.setEnabled(false);\r | |
404 | exportButton.setEnabled(false);\r | |
405 | parseButton.setEnabled(false);\r | |
406 | }\r | |
407 | \r | |
408 | }\r |