tmf: Introduce "External Analyses" and "Reports" project elements
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / project / model / TmfReportsElement.java
1 /*******************************************************************************
2 * Copyright (c) 2016 EfficiOS Inc., Alexandre Montplaisir
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
10 package org.eclipse.tracecompass.tmf.ui.project.model;
11
12 import org.eclipse.core.resources.IResource;
13 import org.eclipse.swt.graphics.Image;
14
15 /**
16 * Project model element for the "Reports" element, which lists the analysis
17 * reports that were generated for this trace.
18 *
19 * It acts like a directory for the reports, where each one can be opened or
20 * deleted.
21 *
22 * @author Alexandre Montplaisir
23 * @since 2.0
24 */
25 public class TmfReportsElement extends TmfProjectModelElement {
26
27 /**
28 * Element of the resource path
29 */
30 public static final String PATH_ELEMENT = ".reports"; //$NON-NLS-1$
31
32 private static final String ELEMENT_NAME = Messages.TmfReportsElement_Name;
33
34 /**
35 * Constructor
36 *
37 * @param resource
38 * The resource to be associated with this element
39 * @param parent
40 * The parent element
41 */
42 protected TmfReportsElement(IResource resource, TmfCommonProjectElement parent) {
43 super(ELEMENT_NAME, resource, parent);
44 }
45
46 @Override
47 public TmfCommonProjectElement getParent() {
48 /* Type enforced at constructor */
49 return (TmfCommonProjectElement) super.getParent();
50 }
51
52 @Override
53 public Image getIcon() {
54 return TmfProjectModelIcons.REPORTS_ICON;
55 }
56
57 @Override
58 protected void refreshChildren() {
59 /* No children at the moment */
60 }
61
62 }
This page took 0.034778 seconds and 5 git commands to generate.