ss: Move plugins to Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / internal / tmf / ui / project / wizards / tracepkg / TracePackageBookmarkElement.java
CommitLineData
6e651d8b
MAL
1/*******************************************************************************
2 * Copyright (c) 2013 Ericsson
3 *
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
8 *
9 * Contributors:
10 * Marc-Andre Laperle - Initial API and implementation
11 *******************************************************************************/
12
13package org.eclipse.linuxtools.internal.tmf.ui.project.wizards.tracepkg;
14
15import java.util.List;
16import java.util.Map;
17
18import org.eclipse.linuxtools.internal.tmf.ui.Activator;
19import org.eclipse.swt.graphics.Image;
20
21/**
22 * A trace package element representing the bookmarks of a trace
23 *
24 * @author Marc-Andre Laperle
25 */
26public class TracePackageBookmarkElement extends TracePackageElement {
27 private static final String BOOKMARK_IMAGE_PATH = "icons/elcl16/bookmark_obj.gif"; //$NON-NLS-1$
28 private final List<Map<String, String>> bookmarkAttribs;
29
30 /**
31 * Construct a bookmark element containing all the bookmarks
32 *
33 * @param parent
34 * the parent node
35 * @param bookmarkAttribs
36 * the bookmarks for the trace
37 */
38 public TracePackageBookmarkElement(TracePackageElement parent, List<Map<String, String>> bookmarkAttribs) {
39 super(parent);
40 this.bookmarkAttribs = bookmarkAttribs;
41 }
42
43 @Override
44 public long getSize(boolean checkedOnly) {
45 return 0;
46 }
47
48 @Override
49 public String getText() {
50 return Messages.TracePackage_Bookmarks;
51 }
52
53 @Override
54 public Image getImage() {
55 return Activator.getDefault().getImageFromImageRegistry(BOOKMARK_IMAGE_PATH);
56 }
57
58 /**
59 * Get all the bookmarks
60 *
61 * @return the bookmarks
62 */
63 public List<Map<String, String>> getBookmarks() {
64 return bookmarkAttribs;
65 }
66}
This page took 0.053901 seconds and 5 git commands to generate.