1 /*******************************************************************************
2 * Copyright (c) 2015 Ericsson
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
10 * Marc-Andre Laperle - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.internal
.tmf
.remote
.ui
.wizards
.fetch
.model
;
15 import org
.eclipse
.swt
.graphics
.Image
;
16 import org
.eclipse
.tracecompass
.internal
.tmf
.remote
.ui
.Activator
;
17 import org
.eclipse
.tracecompass
.internal
.tmf
.ui
.project
.wizards
.tracepkg
.TracePackageElement
;
20 * An RemoteImportTraceGroupElement representing the a group of traces under a
23 * @author Marc-Andre Laperle
25 public class RemoteImportTraceGroupElement
extends TracePackageElement
{
27 private static final String IMAGE_PATH
= "icons/obj/trace_group.gif"; //$NON-NLS-1$
28 private String fRootImportPath
;
29 private boolean fRecursive
;
32 * Constructs an instance of RemoteImportTraceGroupElement
35 * the parent of this element, can be set to null
36 * @param rootImportPath
37 * the root path where the traces should be imported from
39 public RemoteImportTraceGroupElement(TracePackageElement parent
,
40 String rootImportPath
) {
42 fRootImportPath
= rootImportPath
;
47 public String
getText() {
48 return fRootImportPath
+ (isRecursive() ?
" (recursive)" : ""); //$NON-NLS-1$ //$NON-NLS-2$
52 * Returns whether or not the group of traces should be imported recursively
55 * @return whether or not the trace group is recursive
57 public boolean isRecursive() {
62 * Sets whether or not the group of traces should be imported recursively
66 * if the element should be recursive
68 public void setRecursive(boolean recursive
) {
69 fRecursive
= recursive
;
73 public Image
getImage() {
74 return Activator
.getDefault().getImageFromImageRegistry(IMAGE_PATH
);
78 * Get the root path where the traces should be imported from.
80 * @return the root import path
82 public String
getRootImportPath() {
83 return fRootImportPath
;
87 * Set the root path where the traces should be imported from.
89 * @param rootImportPath
90 * the root import path
92 public void setRootImportPath(String rootImportPath
) {
93 fRootImportPath
= rootImportPath
;