tmf/lttng: Remove unneeded (non-Javadoc) comments
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / internal / tmf / ui / parsers / wizards / CustomTxtParserOutputWizardPage.java
index e6e464cb2018340ed3121e273aaac1ec8b0854dc..581de842926c846ad2fc34cb1268782e0f316079 100644 (file)
@@ -1,3 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Patrick Tassé - Initial API and implementation
+ *******************************************************************************/
+
 package org.eclipse.linuxtools.internal.tmf.ui.parsers.wizards;
 
 import java.io.File;
@@ -15,7 +27,7 @@ import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTraceDefiniti
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTrace;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTraceDefinition;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.custom.ScrolledComposite;
@@ -28,6 +40,11 @@ import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Text;
 
+/**
+ * Output wizard page for custom text trace parsers.
+ *
+ * @author Patrick Tassé
+ */
 public class CustomTxtParserOutputWizardPage extends WizardPage {
 
     private static final Image upImage = Activator.getDefault().getImageFromPath("/icons/elcl16/up_button.gif"); //$NON-NLS-1$
@@ -47,6 +64,12 @@ public class CustomTxtParserOutputWizardPage extends WizardPage {
     CustomEventsTable previewTable;
     File tmpFile;
 
+    /**
+     * Constructor
+     *
+     * @param wizard
+     *            The wizard to which this page belongs
+     */
     protected CustomTxtParserOutputWizardPage(final CustomTxtParserWizard wizard) {
         super("CustomParserOutputWizardPage"); //$NON-NLS-1$
         setTitle(wizard.inputPage.getTitle());
@@ -100,16 +123,13 @@ public class CustomTxtParserOutputWizardPage extends WizardPage {
         super.dispose();
     }
 
-    private void loadDefinition(final CustomTxtTraceDefinition definition) {
-        for (final OutputColumn outputColumn : definition.outputs) {
+    private void loadDefinition(final CustomTxtTraceDefinition def) {
+        for (final OutputColumn outputColumn : def.outputs) {
             final Output output = new Output(outputsContainer, outputColumn.name);
             outputs.add(output);
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
-     */
     @Override
     public void setVisible(final boolean visible) {
         if (visible) {
@@ -204,7 +224,8 @@ public class CustomTxtParserOutputWizardPage extends WizardPage {
             writer.write(wizard.inputPage.getInputText());
             writer.close();
 
-            final ITmfTrace trace = new CustomTxtTrace(null, definition, tmpFile.getAbsolutePath(), CACHE_SIZE);
+            final CustomTxtTrace trace = new CustomTxtTrace(null, definition, tmpFile.getAbsolutePath(), CACHE_SIZE);
+            trace.getIndexer().buildIndex(0, TmfTimeRange.ETERNITY, false);
             previewTable.dispose();
             previewTable = new CustomEventsTable(definition, tableContainer, CACHE_SIZE);
             previewTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
@@ -219,6 +240,11 @@ public class CustomTxtParserOutputWizardPage extends WizardPage {
         container.layout();
     }
 
+    /**
+     * Extract the list of output columns from the page's contents.
+     *
+     * @return The output columns
+     */
     public List<OutputColumn> extractOutputs() {
         int numColumns = 0;
         for (int i = 0; i < outputs.size(); i++) {
@@ -298,6 +324,11 @@ public class CustomTxtParserOutputWizardPage extends WizardPage {
         }
     }
 
+    /**
+     * Get the trace definition.
+     *
+     * @return The trace definition
+     */
     public CustomTxtTraceDefinition getDefinition() {
         return definition;
     }
This page took 0.02681 seconds and 5 git commands to generate.