**********************************************************************/
package org.eclipse.linuxtools.lttng.ui.views.control.model.impl;
+import java.util.List;
+
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@Override
public void setTargetNodeState(TargetNodeState state) {
fState = state;
- fireCompenentChanged(TargetNodeComponent.this);
+ fireComponentChanged(TargetNodeComponent.this);
}
/*
return null;
}
+ /**
+ * @return remote host name
+ */
public String getHostName() {
return fHost.getHostName();
}
+ /**
+ * @return remote system proxy implementation
+ */
+ public IRemoteSystemProxy getRemoteSystemProxy() {
+ return fRemoteProxy;
+ }
+
+ /**
+ * @return all available sessions.
+ */
+ public TraceSessionComponent[] getSessions() {
+ List<ITraceControlComponent> compenents = getChildren(TraceSessionGroup.class);
+ if (compenents.size() > 0) {
+ TraceSessionGroup group = (TraceSessionGroup)compenents.get(0);
+ List<ITraceControlComponent> sessions = group.getChildren(TraceSessionComponent.class);
+ return (TraceSessionComponent[])sessions.toArray(new TraceSessionComponent[sessions.size()]);
+ }
+ return new TraceSessionComponent[0];
+ }
+
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
*
* @throws ExecutionException
*/
- public void getConfigurationFromNode() throws ExecutionException {
+ public void getConfigurationFromNode() {
Job job = new Job(Messages.TraceControl_RetrieveNodeConfigurationJob) {
@Override
protected IStatus run(IProgressMonitor monitor) {
};
job.setUser(true);
job.schedule();
+ }
+ public void refresh() {
+ removeAllChildren();
+ getConfigurationFromNode();
}
// ------------------------------------------------------------------------