Search in sources :

Example 41 with TracePackageElement

use of org.eclipse.tracecompass.internal.tmf.ui.project.wizards.tracepkg.TracePackageElement in project tracecompass by tracecompass.

the class RemoteImportProfilesWriterTest method generateElements.

private static TracePackageElement[] generateElements() {
    RemoteImportProfileElement profileElement = new RemoteImportProfileElement(null, // $NON-NLS-1$
    "myProfile");
    RemoteImportConnectionNodeElement nodeElement = new RemoteImportConnectionNodeElement(profileElement, "myhost", // $NON-NLS-1$//$NON-NLS-2$
    "ssh://user@127.0.0.1:22");
    RemoteImportTraceGroupElement traceGroupElement = new RemoteImportTraceGroupElement(nodeElement, // $NON-NLS-1$
    "/home/user/traces/test/test_with_lttng");
    traceGroupElement.setRecursive(true);
    // Profile 1 > Node 1 > Group 1
    TracePackageTraceElement traceElement = new TracePackageTraceElement(traceGroupElement, "test.log.(group1)", // $NON-NLS-1$//$NON-NLS-2$
    "org.eclipse.tracecompass.tmf.remote.ui.test.tracetype1");
    // $NON-NLS-1$
    new TracePackageFilesElement(traceElement, ".*test\\.log\\.(\\d+)");
    traceElement = new TracePackageTraceElement(traceGroupElement, "TestLog.(group1)", // $NON-NLS-1$//$NON-NLS-2$
    "org.eclipse.tracecompass.tmf.remote.ui.test.tracetype2");
    // $NON-NLS-1$
    new TracePackageFilesElement(traceElement, ".*TestLog\\.(\\d+)");
    // Profile 1 > Node 1 > Group 2
    traceGroupElement = new RemoteImportTraceGroupElement(nodeElement, // $NON-NLS-1$
    "/home/user/traces/test/");
    traceGroupElement.setRecursive(false);
    traceElement = new TracePackageTraceElement(traceGroupElement, "lttng/(group1)", // $NON-NLS-1$//$NON-NLS-2$
    "org.eclipse.linuxtools.tmf.ui.type.ctf");
    // $NON-NLS-1$
    new TracePackageFilesElement(traceElement, "lttng/(.*)");
    // Profile 1 > Node 2 > Group 1
    // $NON-NLS-1$//$NON-NLS-2$
    nodeElement = new RemoteImportConnectionNodeElement(profileElement, "myhost3", "ssh://user@127.0.0.1:22");
    // $NON-NLS-1$
    traceGroupElement = new RemoteImportTraceGroupElement(nodeElement, "/home");
    traceGroupElement.setRecursive(false);
    // $NON-NLS-1$//$NON-NLS-2$
    traceElement = new TracePackageTraceElement(traceGroupElement, "", "trace.type");
    // $NON-NLS-1$
    new TracePackageFilesElement(traceElement, ".*");
    // Profile 2 > Node 1 > Group 1
    RemoteImportProfileElement profileElement2 = new RemoteImportProfileElement(null, // $NON-NLS-1$
    "myProfile2");
    RemoteImportConnectionNodeElement nodeElement2 = new RemoteImportConnectionNodeElement(profileElement2, "myhost2", // $NON-NLS-1$//$NON-NLS-2$
    "ssh://user@142.111.222.333:22");
    traceGroupElement = new RemoteImportTraceGroupElement(nodeElement2, // $NON-NLS-1$
    "/home/user/traces/test/");
    traceGroupElement.setRecursive(false);
    traceElement = new TracePackageTraceElement(traceGroupElement, "lttng/(group1)", // $NON-NLS-1$//$NON-NLS-2$
    "org.eclipse.linuxtools.tmf.ui.type.ctf");
    // $NON-NLS-1$
    new TracePackageFilesElement(traceElement, "lttng/(.*)");
    return new TracePackageElement[] { profileElement, profileElement2 };
}
Also used : RemoteImportConnectionNodeElement(org.eclipse.tracecompass.internal.tmf.remote.ui.wizards.fetch.model.RemoteImportConnectionNodeElement) TracePackageFilesElement(org.eclipse.tracecompass.internal.tmf.ui.project.wizards.tracepkg.TracePackageFilesElement) TracePackageElement(org.eclipse.tracecompass.internal.tmf.ui.project.wizards.tracepkg.TracePackageElement) TracePackageTraceElement(org.eclipse.tracecompass.internal.tmf.ui.project.wizards.tracepkg.TracePackageTraceElement) RemoteImportTraceGroupElement(org.eclipse.tracecompass.internal.tmf.remote.ui.wizards.fetch.model.RemoteImportTraceGroupElement) RemoteImportProfileElement(org.eclipse.tracecompass.internal.tmf.remote.ui.wizards.fetch.model.RemoteImportProfileElement)

Aggregations

TracePackageElement (org.eclipse.tracecompass.internal.tmf.ui.project.wizards.tracepkg.TracePackageElement)41 TracePackageTraceElement (org.eclipse.tracecompass.internal.tmf.ui.project.wizards.tracepkg.TracePackageTraceElement)26 TracePackageFilesElement (org.eclipse.tracecompass.internal.tmf.ui.project.wizards.tracepkg.TracePackageFilesElement)20 ArrayList (java.util.ArrayList)12 Element (org.w3c.dom.Element)11 RemoteImportProfileElement (org.eclipse.tracecompass.internal.tmf.remote.ui.wizards.fetch.model.RemoteImportProfileElement)9 IStatus (org.eclipse.core.runtime.IStatus)8 RemoteImportConnectionNodeElement (org.eclipse.tracecompass.internal.tmf.remote.ui.wizards.fetch.model.RemoteImportConnectionNodeElement)8 TracePackageExperimentElement (org.eclipse.tracecompass.internal.tmf.ui.project.wizards.tracepkg.TracePackageExperimentElement)8 IPath (org.eclipse.core.runtime.IPath)7 Status (org.eclipse.core.runtime.Status)6 RemoteImportTraceGroupElement (org.eclipse.tracecompass.internal.tmf.remote.ui.wizards.fetch.model.RemoteImportTraceGroupElement)6 TracePackageBookmarkElement (org.eclipse.tracecompass.internal.tmf.ui.project.wizards.tracepkg.TracePackageBookmarkElement)6 TracePackageSupplFileElement (org.eclipse.tracecompass.internal.tmf.ui.project.wizards.tracepkg.TracePackageSupplFileElement)6 TracePackageSupplFilesElement (org.eclipse.tracecompass.internal.tmf.ui.project.wizards.tracepkg.TracePackageSupplFilesElement)6 TmfCommonProjectElement (org.eclipse.tracecompass.tmf.ui.project.model.TmfCommonProjectElement)6 HashMap (java.util.HashMap)5 Path (org.eclipse.core.runtime.Path)5 Document (org.w3c.dom.Document)5 IFileStore (org.eclipse.core.filesystem.IFileStore)4