1 /*******************************************************************************
2 * Copyright (c) 2010 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 * Patrick Tasse - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.ui
.parsers
;
17 import org
.eclipse
.core
.resources
.IResource
;
18 import org
.eclipse
.linuxtools
.tmf
.trace
.ITmfTrace
;
19 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.events
.TmfEventsTable
;
20 import org
.eclipse
.swt
.widgets
.Composite
;
22 public interface IParserProvider
{
25 * Return the readable category name for this parser provider
27 * @return the category name
29 public String
getCategory();
32 * Return a trace instance for a resource given a parser id
34 * @param parser the parser id
35 * @param resource the resource
36 * @return a trace instance or null if the parser id is not handled by this parser provider
38 public ITmfTrace
getTraceForParser(String parser
, IResource resource
);
41 * Return a trace instance for a resource given a content type id
43 * @param contentTypeId the content type id
44 * @param resource the resource
45 * @return a trace instance or null if the content type id is not handled by this parser provider
47 public ITmfTrace
getTraceForContentType(String contentTypeId
, IResource resource
);
50 * Return the parser map for this parser provider
51 * Map key: readable parser name
52 * Map value: unique parser id
54 * @return the parser map
56 public Map
<String
, String
> getParserMap();
59 * Return the event type map given a parser id
60 * Map key: readable event type name
61 * Map value: unique event type id
63 * @param parser the parser id
64 * @return the event type map or null if the parser id is not handled by this parser provider
66 public Map
<String
, String
> getEventTypeMapForParser(String parser
);
69 * Return the field label array given an event type id
70 * Array value: readable field label
72 * @param eventType the event type id
73 * @return the field label array or null if the event type id is not handled by this parser provider
75 public String
[] getFieldLabelsForEventType(String eventType
);
78 * Return the editor id given a parser id
80 * @param parser the parser id
81 * @return an editor id or null to use the default trace editor
83 public String
getEditorIdForParser(String parser
);
86 * Return an events table instance for a given trace
88 * @param parser the parser id
89 * @param parent the parent composite for the table
90 * @param cacheSize the desired cache size for the table
91 * @return an events table instance or null if the trace is not handled by this parser provider
93 public TmfEventsTable
getEventsTable(ITmfTrace trace
, Composite parent
, int cacheSize
);
This page took 0.040466 seconds and 5 git commands to generate.