1 /*******************************************************************************
2 * Copyright (c) 2011 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 * Polytechnique Montréal - Initial API and implementation
11 * Bernd Hufmann - Productification, enhancements and fixes
13 *******************************************************************************/
14 package org
.eclipse
.linuxtools
.lttng
.ui
.tracecontrol
.subsystems
;
16 import java
.util
.List
;
17 import java
.util
.Vector
;
19 import org
.eclipse
.linuxtools
.lttng
.ui
.tracecontrol
.Messages
;
20 import org
.eclipse
.linuxtools
.lttng
.ui
.tracecontrol
.connectorservice
.TraceConnectorServiceManager
;
21 import org
.eclipse
.rse
.core
.filters
.ISystemFilter
;
22 import org
.eclipse
.rse
.core
.filters
.ISystemFilterPool
;
23 import org
.eclipse
.rse
.core
.filters
.ISystemFilterPoolManager
;
24 import org
.eclipse
.rse
.core
.model
.IHost
;
25 import org
.eclipse
.rse
.core
.subsystems
.IConnectorService
;
26 import org
.eclipse
.rse
.core
.subsystems
.ISubSystem
;
27 import org
.eclipse
.rse
.core
.subsystems
.SubSystemConfiguration
;
30 * <b><u>TraceSubSystemConfiguration</u></b>
32 * Implementation of the subsystem configuration to define the trace subsystem configuration.
35 public class TraceSubSystemConfiguration
extends SubSystemConfiguration
{
37 // ------------------------------------------------------------------------
39 // ------------------------------------------------------------------------
41 // ------------------------------------------------------------------------
43 // ------------------------------------------------------------------------
46 * Constructor for TraceSubSystemConfiguration.
48 public TraceSubSystemConfiguration() {
52 // ------------------------------------------------------------------------
54 // ------------------------------------------------------------------------
58 * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createSubSystemInternal(org.eclipse.rse.core.model.IHost)
61 public ISubSystem
createSubSystemInternal(IHost conn
) {
62 return new TraceSubSystem(conn
, getConnectorService(conn
));
67 * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#getConnectorService(org.eclipse.rse.core.model.IHost)
70 public IConnectorService
getConnectorService(IHost host
) {
71 return TraceConnectorServiceManager
.getInstance().getConnectorService(host
, ITCFSubSystem
.class);
76 * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#createDefaultFilterPool(org.eclipse.rse.core.filters.ISystemFilterPoolManager)
79 protected ISystemFilterPool
createDefaultFilterPool(ISystemFilterPoolManager mgr
) {
80 ISystemFilterPool defaultPool
= null;
82 defaultPool
= mgr
.createSystemFilterPool(getDefaultFilterPoolName(mgr
.getName(), getId()), false); // true=>is deletable by user
83 defaultPool
.setDeletable(false);
84 defaultPool
.setNonRenamable(true);
85 List
<String
> strings
= new Vector
<String
>();
86 strings
.add("*"); //$NON-NLS-1$
87 ISystemFilter filter
= mgr
.createSystemFilter(defaultPool
, Messages
.AllProviders
, strings
);
88 filter
.setNonChangable(false);
89 filter
.setSingleFilterStringOnly(false);
90 filter
.setNonDeletable(true);
91 filter
.setNonRenamable(true);
92 } catch (Exception exc
) {
99 * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#getTranslatedFilterTypeProperty(org.eclipse.rse.core.filters.ISystemFilter)
101 * Intercept of parent method so we can supply our own value shown in the property sheet for the "type" property when a filter is selected within our subsystem.
103 * Requires this line in LTTngServicesResources.properties: property.type.providerfilter=Lttng_Resource_Provider filter
106 public String
getTranslatedFilterTypeProperty(ISystemFilter selectedFilter
) {
107 return Messages
.Property_Type_Provider_Filter
;
110 public boolean supportsUserId() {
116 * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.core.model.IHost)
119 public boolean supportsServerLaunchProperties(IHost host
) {
125 * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()
128 public boolean supportsFilters() {
134 * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilterChildren()
137 public boolean supportsFilterChildren() {