/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0 which
return 0;
}
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
return FileName + "/" + FunctionName + ":" + LineNumber; //$NON-NLS-1$ //$NON-NLS-2$
/*******************************************************************************
- * Copyright (c) 2011-2012 Ericsson, Ecole Polytechnique de Montreal and others
+ * Copyright (c) 2011, 2013 Ericsson, Ecole Polytechnique de Montreal and others
*
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0 which
// Operations
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.ctf.core.event.types.SimpleDatatypeDefinition#getLongValue()
- */
@Override
public Long getIntegerValue() {
return getValue();
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.ctf.core.event.types.SimpleDatatypeDefinition#getStringValue()
- */
@Override
public String getStringValue() {
return this.toString();
return "[declaration] struct[" + Integer.toHexString(hashCode()) + ']'; //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
/*******************************************************************************
- * Copyright (c) 2011-2012 Ericsson, Ecole Polytechnique de Montreal and others
+ * Copyright (c) 2011, 2013 Ericsson, Ecole Polytechnique de Montreal and others
*
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0 which
*/
public class CTFTrace implements IDefinitionScope {
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
@SuppressWarnings("nls")
@Override
public String toString() {
return true;
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
/* Only for debugging, shouldn't be externalized */
/*******************************************************************************
- * Copyright (c) 2011-2012 Ericsson, Ecole Polytechnique de Montreal and others
+ * Copyright (c) 2011, 2013 Ericsson, Ecole Polytechnique de Montreal and others
*
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0 which
inputs.add(input);
}
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
return "Stream [id=" + id + ", packetContextDecl=" + packetContextDecl //$NON-NLS-1$ //$NON-NLS-2$
/*******************************************************************************
- * Copyright (c) 2011-2012 Ericsson, Ecole Polytechnique de Montreal and others
+ * Copyright (c) 2011, 2013 Ericsson, Ecole Polytechnique de Montreal and others
*
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0 which
}
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
return packetReader;
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
/*******************************************************************************
- * Copyright (c) 2011-2012 Ericsson, Ecole Polytechnique de Montreal and others
+ * Copyright (c) 2011, 2013 Ericsson, Ecole Polytechnique de Montreal and others
*
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2011-2012 Ericsson, Ecole Polytechnique de Montreal and others
+ * Copyright (c) 2011, 2013 Ericsson, Ecole Polytechnique de Montreal and others
*
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0 which
return (ts >= timestampBegin) && (ts <= timestampEnd);
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
return "StreamInputPacketIndexEntry [offsetBytes=" + offsetBytes //$NON-NLS-1$
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Francois Chouinard - Initial API and implementation
*******************************************************************************/
// Attributes
// ------------------------------------------------------------------------
- /**
- * The plug-in ID
- */
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.core"; //$NON-NLS-1$
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.core"; //$NON-NLS-1$
+
+ /**
+ * The shared instance
+ */
+ private static Activator plugin;
- /**
- * The shared instance
- */
- private static Activator plugin;
-
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
- /**
- * The constructor
- */
- public Activator() {
- }
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
// ------------------------------------------------------------------------
// Operators
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
/**
* Logs a message with severity INFO in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
*/
public void logInfo(String message) {
getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
}
-
+
/**
* Logs a message and exception with severity INFO in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
* @param exception A exception to log
*/
/**
* Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
*/
public void logWarning(String message) {
getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
}
-
+
/**
* Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
* @param exception A exception to log
*/
/**
* Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
*/
public void logError(String message) {
getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
}
-
+
/**
* Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
* @param exception A exception to log
*/
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IBaseEventInfo#getEventType()
- */
+
@Override
public TraceEventType getEventType() {
return fEventType;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IBaseEventInfo#setEventType(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.TraceEventType)
- */
@Override
public void setEventType(TraceEventType type) {
fEventType = type;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IBaseEventInfo#setEventType(java.lang.String)
- */
@Override
public void setEventType(String typeName) {
if(TraceEventType.TRACEPOINT.getInName().equals(typeName)) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IBaseEventInfo#getLogLevel()
- */
@Override
public TraceLogLevel getLogLevel() {
return fLogLevel;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IBaseEventInfo#setLogLevel(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.TraceLogLevel)
- */
@Override
public void setLogLevel(TraceLogLevel level) {
fLogLevel = level;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IBaseEventInfo#setLogLevel(java.lang.String)
- */
@Override
public void setLogLevel(String levelName) {
if(TraceLogLevel.TRACE_EMERG.getInName().equals(levelName)) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.IBaseEventInfo#getFields()
- */
@Override
public IFieldInfo[] getFields() {
return fFields.toArray(new IFieldInfo[fFields.size()]);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.IBaseEventInfo#addField(org.eclipse.linuxtools.internal.lttng2.core.control.model.IFieldInfo)
- */
@Override
public void addField(IFieldInfo field) {
fFields.add(field);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.IBaseEventInfo#setFields(java.util.List)
- */
@Override
public void setFields(List<IFieldInfo> fields) {
fFields.clear();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.IBaseEventInfo#getFilterExpression()
- */
@Override
public String getFilterExpression() {
return fFilterExpression;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.IBaseEventInfo#setFilterExpression(java.lang.String)
- */
@Override
public void setFilterExpression(String filter) {
fFilterExpression = filter;
}
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.TraceInfo#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.TraceInfo#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#toString()
- */
@SuppressWarnings("nls")
@Override
public String toString() {
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#getOverwriteMode()
- */
+
@Override
public boolean isOverwriteMode() {
return fOverwriteMode;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#setOverwriteMode(boolean)
- */
@Override
public void setOverwriteMode(boolean mode) {
fOverwriteMode = mode;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#getSubBufferSize()
- */
@Override
public long getSubBufferSize() {
return fSubBufferSize;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#setSubBufferSize(long)
- */
@Override
public void setSubBufferSize(long bufferSize) {
fSubBufferSize = bufferSize;
-
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#getNumberOfSubBuffers()
- */
@Override
public int getNumberOfSubBuffers() {
return fNumberOfSubBuffers;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#setNumberOfSubBuffers(int)
- */
@Override
public void setNumberOfSubBuffers(int numberOfSubBuffers) {
fNumberOfSubBuffers = numberOfSubBuffers;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#getSwitchTimer()
- */
@Override
public long getSwitchTimer() {
return fSwitchTimer;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#setSwitchTimer(long)
- */
@Override
public void setSwitchTimer(long timer) {
fSwitchTimer = timer;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#getReadTimer()
- */
@Override
public long getReadTimer() {
return fReadTimer;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#setReadTimer(long)
- */
@Override
public void setReadTimer(long timer) {
fReadTimer = timer;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#getOutputType()
- */
@Override
public String getOutputType() {
return fOutputType;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#setOutputType(java.lang.String)
- */
@Override
public void setOutputType(String type) {
fOutputType = type;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#getState()
- */
@Override
public TraceEnablement getState() {
return fState;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#setState(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.TraceEnablement)
- */
@Override
public void setState(TraceEnablement state) {
fState = state;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#setState(java.lang.String)
- */
@Override
public void setState(String stateName) {
fState = TraceEnablement.ENABLED;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#getEvents()
- */
@Override
public IEventInfo[] getEvents() {
return fEvents.toArray(new IEventInfo[fEvents.size()]);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#setEvents(java.util.List)
- */
@Override
public void setEvents(List<IEventInfo> events) {
fEvents.clear();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo#addEvent(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IEventInfo)
- */
@Override
public void addEvent(IEventInfo channel) {
fEvents.add(channel);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#toString()
- */
@SuppressWarnings("nls")
@Override
public String toString() {
output.append(")]");
return output.toString();
}
-
-
}
fIsKernel = other.fIsKernel;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IDomainInfo#isKernel()
- */
@Override
public boolean isKernel() {
return fIsKernel;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IDomainInfo#setIsKernel(boolean)
- */
@Override
public void setIsKernel(boolean isKernel) {
fIsKernel = isKernel;
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IDomainInfo#getChannels()
- */
+
@Override
public IChannelInfo[] getChannels() {
return fChannels.toArray(new IChannelInfo[fChannels.size()]);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IDomainInfo#setChannels(java.util.List)
- */
@Override
public void setChannels(List<IChannelInfo> channels) {
fChannels.clear();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IDomainInfo#addChannel(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo)
- */
@Override
public void addChannel(IChannelInfo channel) {
fChannels.add(channel);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#toString()
- */
@SuppressWarnings("nls")
@Override
public String toString() {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.core.control.model.impl;
/**
* <p>
* Implementation of the trace event interface (IEventInfo) to store event
-* related data.
+* related data.
* </p>
-*
+*
* @author Bernd Hufmann
*/
public class EventInfo extends BaseEventInfo implements IEventInfo {
* The enable state of the event.
*/
private TraceEnablement fState = TraceEnablement.DISABLED;
-
+
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
public EventInfo(String name) {
super(name);
}
-
+
/**
* Copy constructor
* @param other - the instance to copy
super(other);
fState = other.fState;
}
-
+
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IEventInfo#getState()
- */
+
@Override
public TraceEnablement getState() {
return fState;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IEventInfo#setState(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.TraceEnablement)
- */
@Override
public void setState(TraceEnablement state) {
fState = state;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IEventInfo#setState(java.lang.String)
- */
@Override
public void setState(String stateName) {
fState = TraceEnablement.DISABLED;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.BaseEventInfo#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.BaseEventInfo#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.BaseEventInfo#toString()
- */
@SuppressWarnings("nls")
@Override
public String toString() {
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.IFieldInfo#getFieldType()
- */
@Override
public String getFieldType() {
return fFieldType;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.IFieldInfo#setFieldType(java.lang.String)
- */
@Override
public void setFieldType(String fieldType) {
fFieldType = fieldType;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.TraceInfo#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.TraceInfo#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#toString()
- */
@SuppressWarnings("nls")
@Override
public String toString() {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.core.control.model.impl;
/**
* <p>
* Implementation of the trace event interface (IProbeEventInfo) to store probe event
-* related data.
+* related data.
* </p>
-*
+*
* @author Bernd Hufmann
*/
public class ProbeEventInfo extends EventInfo implements IProbeEventInfo {
* The dynamic probe offset (if symbol is used).
*/
private String fOffset;
-
+
/**
* The symbol name (null if address is used)
*/
private String fSymbol;
-
-
+
+
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
public ProbeEventInfo(String name) {
super(name);
}
-
+
/**
* Copy constructor
* @param other - the instance to copy
fOffset = other.fOffset;
fSymbol = other.fSymbol;
}
-
+
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IProbeEventInfo#getAddress()
- */
@Override
public String getAddress() {
return fAddress;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IProbeEventInfo#setAddress(java.lang.String)
- */
@Override
public void setAddress(String address) {
fAddress = address;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IProbeEventInfo#getOffset()
- */
@Override
public String getOffset() {
return fOffset;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IProbeEventInfo#setOffset(java.lang.String)
- */
@Override
public void setOffset(String offset) {
fOffset = offset;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IProbeEventInfo#getSymbol()
- */
@Override
public String getSymbol() {
return fSymbol;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IProbeEventInfo#setSymbol(java.lang.String)
- */
@Override
public void setSymbol(String symbol) {
fSymbol = symbol;
// Operation
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.BaseEventInfo#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.BaseEventInfo#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.EventInfo#toString()
- */
@SuppressWarnings("nls")
@Override
public String toString() {
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ISessionInfo#getSessionState()
- */
+
@Override
public TraceSessionState getSessionState() {
return fState;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ISessionInfo#setSessionState(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.TraceSessionState)
- */
@Override
public void setSessionState(TraceSessionState state) {
fState = state;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ISessionInfo#setSessionState(java.lang.String)
- */
@Override
public void setSessionState(String stateName) {
if (TraceSessionState.INACTIVE.getInName().equals(stateName)) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ISessionInfo#getSessionPath()
- */
@Override
public String getSessionPath() {
return fSessionPath;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ISessionInfo#setSessionPath(java.lang.String)
- */
@Override
public void setSessionPath(String path) {
fSessionPath = path;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ISessionInfo#getDomains()
- */
@Override
public IDomainInfo[] getDomains() {
return fDomains.toArray(new IDomainInfo[fDomains.size()]);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ISessionInfo#setDomains(java.util.List)
- */
@Override
public void setDomains(List<IDomainInfo> domains) {
fDomains.clear();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.ISessionInfo#isStreamedTrace()
- */
@Override
public boolean isStreamedTrace() {
return fIsStreamedTrace;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.ISessionInfo#setIsStreamedTrace(boolean)
- */
-
@Override
public void setStreamedTrace(boolean isStreamedTrace) {
fIsStreamedTrace = isStreamedTrace;
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ISessionInfo#addDomain(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IDomainInfo)
- */
+
@Override
public void addDomain(IDomainInfo domainInfo) {
fDomains.add(domainInfo);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.TraceInfo#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.TraceInfo#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#toString()
- */
@SuppressWarnings("nls")
@Override
public String toString() {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceInfo#getName()
- */
+
@Override
public String getName() {
return fName;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceInfo#setName(java.lang.String)
- */
@Override
public void setName(String name) {
fName = name;
}
- /*
- * (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /*
- * (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
}
return true;
}
- /*
- * (non-Javadoc)
- * @see java.lang.Object#toString()
- */
+
@SuppressWarnings("nls")
@Override
public String toString() {
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The process ID of the UST provider.
*/
private int fPid = 0;
+
/**
* List of event information.
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Constructor
* @param name - name of UST provider
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IUstProviderInfo#getPid()
- */
@Override
public int getPid() {
return fPid;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IUstProviderInfo#setPid(int)
- */
@Override
public void setPid(int pid) {
fPid = pid;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IUstProviderInfo#getEvents()
- */
@Override
public IBaseEventInfo[] getEvents() {
return fEvents.toArray(new IBaseEventInfo[fEvents.size()]);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IUstProviderInfo#setEvents(java.util.List)
- */
@Override
public void setEvents(List<IBaseEventInfo> events) {
fEvents.clear();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IUstProviderInfo#addEvent(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IBaseEventInfo)
- */
@Override
public void addEvent(IBaseEventInfo event) {
fEvents.add(event);
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#toString()
- */
@SuppressWarnings("nls")
@Override
public String toString() {
return output.toString();
}
-
}
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Francois Chouinard - Initial API and implementation
*******************************************************************************/
// Attributes
// ------------------------------------------------------------------------
- /**
- * The plug-in ID
- */
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.core"; //$NON-NLS-1$
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.core"; //$NON-NLS-1$
+
+ /**
+ * The shared instance
+ */
+ private static Activator plugin;
- /**
- * The shared instance
- */
- private static Activator plugin;
-
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
- /**
- * The constructor
- */
- public Activator() {
- }
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
// ------------------------------------------------------------------------
// Operators
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
/**
* Logs a message with severity INFO in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
*/
public void logInfo(String message) {
getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
}
-
+
/**
* Logs a message and exception with severity INFO in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
* @param exception A exception to log
*/
/**
* Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
*/
public void logWarning(String message) {
getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
}
-
+
/**
* Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
* @param exception A exception to log
*/
/**
* Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
*/
public void logError(String message) {
getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
}
-
+
/**
* Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
* @param exception A exception to log
*/
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// AbstractUIPlugin
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
- */
@Override
protected void initializeImageRegistry(ImageRegistry reg) {
}
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
private static final String PROPERTIES_VIEW_ID = IPageLayout.ID_PROP_SHEET;
private static final String BOOKMARKS_VIEW_ID = IPageLayout.ID_BOOKMARKS;
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
- */
@Override
public void createInitialLayout(IPageLayout layout) {
// ViewPart
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.TmfView#createPartControl(org.eclipse.swt.widgets.Composite)
- */
@Override
public void createPartControl(Composite parent) {
fTimeGraphCombo = new TimeGraphCombo(parent, SWT.NONE);
getSite().setSelectionProvider(fTimeGraphCombo.getTreeViewer());
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
- */
@Override
public void setFocus() {
fTimeGraphCombo.setFocus();
// ViewPart
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.TmfView#createPartControl(org.eclipse.swt.widgets.Composite)
- */
@Override
public void createPartControl(Composite parent) {
fTimeGraphViewer = new TimeGraphViewer(parent, SWT.NONE);
}
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
- */
@Override
public void setFocus() {
fTimeGraphViewer.setFocus();
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.lttng.stubs.service.shells.TestCommandShell#executeCommand(java.lang.String, org.eclipse.core.runtime.IProgressMonitor, boolean)
- */
@Override
public synchronized ICommandResult executeCommand(String command, IProgressMonitor monitor, boolean checkReturnValue) throws ExecutionException {
Map<String, ICommandResult> commands = fScenarioMap.get(fScenario);
// ------------------------------------------------------------------------
// Helper methods
// ------------------------------------------------------------------------
+
private static boolean isComment(String line) {
if (line == null) {
throw new RuntimeException("line is null");
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Francois Chouinard - Initial API and implementation
*******************************************************************************/
// AbstractUIPlugin
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
ControlPreferences.getInstance().init(getPreferenceStore());
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
@Override
public void stop(BundleContext context) throws Exception {
ControlPreferences.getInstance().dispose();
super.stop(context);
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
- */
@Override
protected void initializeImageRegistry(ImageRegistry reg) {
}
/**
* Gets an image object using given path within plug-in.
- *
+ *
* @param path path to image file
- *
+ *
* @return image object
*/
public Image getImageFromPath(String path) {
/**
* Gets an image descriptor using given path within plug-in.
- *
- * @param path path to image file
- *
+ *
+ * @param path path to image file
+ *
* @return image descriptor object
*/
public ImageDescriptor getImageDescripterFromPath(String path) {
/**
* Gets a image object from the image registry based on the given path.
- * If the image is not in the registry it will be registered.
- *
- * @param path to the image file
+ * If the image is not in the registry it will be registered.
+ *
+ * @param path to the image file
* @return image object
*/
public Image getImageFromImageRegistry(String path) {
}
return icon;
}
-
+
/**
* Loads the image in the plug-ins image registry (if necessary) and returns the image
* @param url - URL relative to the Bundle
}
return icon;
}
-
+
/**
* Logs a message with severity INFO in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
*/
public void logInfo(String message) {
getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
}
-
+
/**
* Logs a message and exception with severity INFO in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
* @param exception A exception to log
*/
/**
* Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
*/
public void logWarning(String message) {
getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
}
-
+
/**
* Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
* @param exception A exception to log
*/
/**
* Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
*/
public void logError(String message) {
getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
}
-
+
/**
* Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
+ *
* @param message A message to log
* @param exception A exception to log
*/
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
+
/**
* View ID.
*/
*/
private ITraceControlComponent fRoot = null;
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
@Override
public void createPartControl(Composite parent) {
// Create tree viewer
RSECorePlugin.getTheSystemRegistry(); // to load RSE
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
- */
@Override
public void setFocus() {
fTreeViewer.getControl().setFocus();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponentChangedListener#componentAdded(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent, org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent)
- */
@Override
public void componentAdded(ITraceControlComponent parent, ITraceControlComponent component) {
componentChanged(parent);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponentChangedListener#componentRemoved(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent, org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent)
- */
@Override
public void componentRemoved(ITraceControlComponent parent, ITraceControlComponent component) {
componentChanged(parent);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponentChangedListener#componentChanged(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent)
- */
@Override
public void componentChanged(final ITraceControlComponent component) {
if (fTreeViewer.getTree().isDisposed()) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The dialog composite.
*/
private Composite fDialogComposite;
+
/**
* A tree viewer for displaying and selection of available contexts.
*/
private CheckboxTreeViewer fContextsViewer;
+
/**
* A Tree model for the checkbox tree viewer.
*/
private final ContextModel fContextModel = new ContextModel();
+
/**
* The contexts to add.
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Constructor
* @param shell - a shell for the display of the dialog
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IAddContextDialog#setAvalibleContexts(java.util.List)
- */
@Override
public void setAvalibleContexts(List<String> contexts) {
fContextModel.setAvalibleContexts(contexts);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IAddContextDialog#getContexts()
- */
@Override
public List<String> getContexts() {
List<String> ret = new ArrayList<String>();
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
+
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setImage(Activator.getDefault().loadIcon(ADD_CONTEXT_ICON_FILE));
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
return fDialogComposite;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
protected void okPressed() {
fSelectedContexts.clear();
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
* <p>
* Confirmation dialog implementation.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class ConfirmDialog implements IConfirmDialog {
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IConfirmDialog#openConfirm(org.eclipse.swt.widgets.Shell, java.lang.String, java.lang.String)
- */
@Override
public boolean openConfirm(Shell parent, String title, String message) {
- return MessageDialog.openConfirm(parent,
- Messages.TraceControl_DestroyConfirmationTitle,
+ return MessageDialog.openConfirm(parent,
+ Messages.TraceControl_DestroyConfirmationTitle,
Messages.TraceControl_DestroyConfirmationMessage);
}
}
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.ICreateSessionDialog#getSessionName()
- */
+
@Override
public String getSessionName() {
return fSessionName;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.ICreateSessionDialog#getSessionPath()
- */
@Override
public String getSessionPath() {
return fSessionPath;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.ICreateSessionDialog#isDefaultSessionPath()
- */
@Override
public boolean isDefaultSessionPath() {
return fIsDefaultPath;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.ICreateSessionDialog#initialze(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionGroup)
- */
@Override
public void initialize(TraceSessionGroup group) {
fParent = group;
// Operations
// ------------------------------------------------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createContents(Composite parent) {
fControl = super.createContents(parent);
return fControl;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
+
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setImage(Activator.getDefault().loadIcon(CREATE_SESSION_ICON_FILE));
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
protected void okPressed() {
// Validate input data
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.ICreateChannelDialog#getChannelInfo()
- */
+
@Override
public IChannelInfo getChannelInfo() {
return fChannelInfo;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.ICreateChannelDialog#setDomainComponent(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceDomainComponent)
- */
@Override
public void setDomainComponent(TraceDomainComponent domain) {
fDomain = domain;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.ICreateChannelDialog#isKernel()
- */
@Override
public boolean isKernel() {
return fIsKernel;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableChannelDialog#setHasKernel(boolean)
- */
@Override
public void setHasKernel(boolean hasKernel) {
if (fDomain != null) {
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
+
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setImage(Activator.getDefault().loadIcon(ENABLE_CHANNEL_ICON_FILE));
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
return fDialogComposite;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.DETAILS_ID, "&Default", true); //$NON-NLS-1$
createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
protected void okPressed() {
// Set channel information
super.okPressed();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
- */
@Override
protected void buttonPressed(int buttonId) {
if (buttonId == IDialogConstants.DETAILS_ID) {
// ------------------------------------------------------------------------
// Helper methods
// ------------------------------------------------------------------------
+
/**
* Sets default value depending on Kernel or UST
*/
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#isTracpoints()
- */
@Override
public boolean isTracepoints() {
if (fIsKernel) {
return fUstComposite.isTracepoints();
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#isAllTracePoints()
- */
@Override
public boolean isAllTracePoints() {
if (fIsKernel) {
return fUstComposite.isAllTracePoints();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#isSysCalls()
- */
@Override
public boolean isSysCalls() {
if (fIsKernel) {
return false;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#isAllSysCalls()
- */
@Override
public boolean isAllSysCalls() {
if (fIsKernel) {
return false;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#getEventNames()
- */
@Override
public List<String> getEventNames() {
if (fIsKernel) {
}
return fUstComposite.getEventNames();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#isDynamicProbe()
- */
+
@Override
public boolean isDynamicProbe() {
if (fIsKernel) {
return false;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#getProbeName()
- */
@Override
public String getProbeName() {
if (fIsKernel) {
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#getProbeEventName()
- */
@Override
public String getProbeEventName() {
if (fIsKernel) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#isDynamicFunctionProbe()
- */
@Override
public boolean isDynamicFunctionProbe() {
if (fIsKernel) {
return false;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#getFunctionEventName()
- */
@Override
public String getFunctionEventName() {
if (fIsKernel) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#getFunction()
- */
@Override
public String getFunction() {
if (fIsKernel) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#isWildcard()
- */
@Override
public boolean isWildcard() {
if (!fIsKernel) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#getWildcard()
- */
@Override
public String getWildcard() {
if (!fIsKernel) {
return fUstComposite.getWildcard();
}
return null;
-
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#isLogLevel()
- */
@Override
public boolean isLogLevel() {
if (!fIsKernel) {
return fUstComposite.isLogLevel();
}
return false;
-
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#getLogLevelType()
- */
@Override
public LogLevelType getLogLevelType() {
if (!fIsKernel) {
return fUstComposite.getLogLevelType();
}
return null;
-
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#getLogLevel()
- */
@Override
public TraceLogLevel getLogLevel() {
if (!fIsKernel) {
return fUstComposite.getLogLevel();
}
return null;
-
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#getLogLevelEventName()
- */
@Override
public String getLogLevelEventName() {
if (!fIsKernel) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableEventsDialog#isKernel()
- */
@Override
public boolean isKernel() {
return fIsKernel;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableEventsDialog#setTraceProviderGroup(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceProviderGroup)
- */
@Override
public void setTraceProviderGroup(TraceProviderGroup providerGroup) {
fProviderGroup = providerGroup;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableEventsDialog#setTraceDomainComponent(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceDomainComponent)
- */
@Override
public void setTraceDomainComponent(TraceDomainComponent domain) {
fDomain = domain;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#getFilterExpression()
- */
@Override
public String getFilterExpression() {
if (!fIsKernel) {
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
+
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setImage(Activator.getDefault().loadIcon(ENABLE_EVENT_ICON_FILE));
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
return fDialogComposite;
}
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
protected void okPressed() {
fIsKernel = fKernelButton.getSelection();
// ------------------------------------------------------------------------
// Helper methods
// ------------------------------------------------------------------------
+
/**
* Creates the kernel composite (if not existing)
*/
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Acessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#isTracpoints()
- */
+
@Override
public boolean isTracepoints() {
return fIsTracepoints;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#isAllTracePoints()
- */
@Override
public boolean isAllTracePoints() {
return fIsAllTracepoints;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#isSysCalls()
- */
@Override
public boolean isSysCalls() {
return fIsSysCalls;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#isAllSysCalls()
- */
@Override
public boolean isAllSysCalls() {
return fIsSysCalls;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#getEventNames()
- */
@Override
public List<String> getEventNames() {
return new ArrayList<String>(fSelectedEvents);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#isDynamicProbe()
- */
+
@Override
public boolean isDynamicProbe() {
return fIsDynamicProbe;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#getProbeName()
- */
@Override
public String getProbeName() {
return fProbeString;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#getProbeEventName()
- */
@Override
public String getProbeEventName() {
return fProbeEventName;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#isDynamicFunctionProbe()
- */
@Override
public boolean isDynamicFunctionProbe() {
return fIsDynamicFunctionProbe;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#getFunctionEventName()
- */
@Override
public String getFunctionEventName() {
return fFunctionEventName;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableKernelEvents#getFunction()
- */
@Override
public String getFunction() {
return fFunctionString;
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
+
/**
* Creates the composite content
*/
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#isTracepoints()
- */
@Override
public boolean isTracepoints() {
return fIsTracepoints;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#isAllTracePoints()
- */
@Override
public boolean isAllTracePoints() {
return fIsAllTracepoints;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#getEventNames()
- */
@Override
public List<String> getEventNames() {
return new ArrayList<String>(fSelectedEvents);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#isWildcard()
- */
@Override
public boolean isWildcard() {
return fIsWildcard;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#getWildcard()
- */
@Override
public String getWildcard() {
return fWildcard;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#isLogLevel()
- */
@Override
public boolean isLogLevel() {
return fIsLogLevel;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#getLogLevelType()
- */
@Override
public LogLevelType getLogLevelType() {
return fLogLevelType;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#getLogLevel()
- */
@Override
public TraceLogLevel getLogLevel() {
return fLogLevel;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#getLogLevelEventName()
- */
@Override
public String getLogLevelEventName() {
return fLogLevelEventName;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableUstEvents#getFilterExpression()
- */
@Override
public String getFilterExpression() {
return fFilterExpression;
}
/**
- * Validates the UST composite input data.
- * @return true if configured data is valid and can be retrieved.
- */
+ * Validates the UST composite input data.
+ *
+ * @return true if configured data is valid and can be retrieved.
+ */
public boolean isValid() {
fIsTracepoints = fTracepointsActivateButton.getSelection();
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableEventsDialog#getSession()
- */
+
@Override
public TraceSessionComponent getSession() {
return fSessions[fSessionIndex];
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableEventsDialog#getChannel()
- */
@Override
public TraceChannelComponent getChannel() {
return fChannel;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IGetEventInfoDialog#setIsKernel(boolean)
- */
@Override
public void setIsKernel(boolean isKernel) {
fIsKernel = isKernel;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IGetEventInfoDialog#setSessions(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent[])
- */
@Override
public void setSessions(TraceSessionComponent[] sessions) {
fSessions = Arrays.copyOf(sessions, sessions.length);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IGetEventInfoDialog#getFilterExpression()
- */
+
@Override
public String getFilterExpression() {
return fFilterExpression;
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
+
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setImage(Activator.getDefault().loadIcon(TARGET_NEW_CONNECTION_ICON_FILE));
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
return fDialogComposite;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
protected void okPressed() {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs;
* <p>
* Dialog box for collecting session creation information.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class ImportConfirmationDialog extends Dialog implements IImportConfirmationDialog {
*/
private Text fNewTraceNameText = null;
/**
- * The trace name which already exists in the project
+ * The trace name which already exists in the project
*/
private String fTraceName = null;
/**
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportConfirmationDialog#setTraceName(java.lang.String)
- */
+
@Override
public void setTraceName(String name) {
fTraceName = name;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportConfirmationDialog#getNewTraceName()
- */
@Override
public String getNewTraceName() {
return fNewTraceName;
}
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportConfirmationDialog#isOverwrite()
- */
+
@Override
public boolean isOverwrite() {
return fIsOverride;
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
+
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setImage(Activator.getDefault().loadIcon(IMPORT_ICON_FILE));
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
-
+
// Main dialog panel
fDialogComposite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout(1, true);
fOverwriteButton = new Button(fDialogComposite, SWT.RADIO);
fOverwriteButton.setText(Messages.TraceControl_ImportDialogConfirmationOverwriteLabel);
-
+
fOverwriteButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
fNewTraceNameText.setText(fTraceName);
}
});
-
+
fRenameButton = new Button(fDialogComposite, SWT.RADIO);
fRenameButton.setText(Messages.TraceControl_ImportDialogConfirmationRenameLabel);
-
+
fRenameButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
fNewTraceNameText.setEnabled(true);
}
});
-
+
fNewTraceNameText = new Text(fDialogComposite, SWT.NONE);
fNewTraceNameText.setToolTipText(Messages.TraceControl_ImportDialogConfirmationNewNameLabel);
fNewTraceNameText.setText(fTraceName);
// Default
fOverwriteButton.setSelection(true);
fNewTraceNameText.setEnabled(false);
-
+
// layout widgets
GridData data = new GridData(GridData.FILL_HORIZONTAL);
-
+
fNewTraceNameText.setLayoutData(data);
getShell().setMinimumSize(new Point(300, 150));
-
+
return fDialogComposite;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
protected void okPressed() {
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportDialog#getTracePathes()
- */
+
@Override
public List<ImportFileInfo> getTracePathes() {
List<ImportFileInfo> retList = new ArrayList<ImportFileInfo>();
return retList;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportDialog#getProject()
- */
@Override
public IProject getProject() {
return fProjects.get(fProjectIndex);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IImportDialog#setSession(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent)
- */
@Override
public void setSession(TraceSessionComponent session) {
fSession = session;
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
+
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setImage(Activator.getDefault().loadIcon(IMPORT_ICON_FILE));
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
return fDialogComposite;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
protected void okPressed() {
if (!fIsError) {
// ------------------------------------------------------------------------
// Helper methods and classes
// ------------------------------------------------------------------------
+
/**
* Helper class for the contents of a folder in a tracing project
*
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.INewConnectionDialog#getConnectionName()
- */
+
@Override
public String getConnectionName() {
return fConnectionName;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.INewConnectionDialog#getHostName()
- */
@Override
public String getHostName() {
return fHostName;
return fPort;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.INewConnectionDialog#setTraceControlParent(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent)
- */
@Override
public void setTraceControlParent(ITraceControlComponent parent) {
fParent = parent;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.INewConnectionDialog#setHosts(org.eclipse.rse.core.model.IHost[])
- */
@Override
public void setHosts(IHost[] hosts) {
if (hosts != null) {
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
+
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setImage(Activator.getDefault().loadIcon(TARGET_NEW_CONNECTION_ICON_FILE));
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
return fDialogComposite;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
protected void okPressed() {
// Validate input data
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseAddContextHandler#addContexts(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.util.List, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
public void addContexts(CommandParameter param, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException {
if (param instanceof ChannelCommandParameter) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
// Get workbench page for the Control View
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseAddContextHandler#addContexts(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.util.List, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
public void addContexts(CommandParameter param, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException {
if (param instanceof DomainCommandParameter) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseAddContextHandler#addContexts(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.util.List, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
public void addContexts(CommandParameter param, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException {
if (param instanceof EventCommandParameter) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
// Get workbench page for the Control View
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The command execution parameter.
*/
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
ArrayList<BaseEventComponent> events = new ArrayList<BaseEventComponent>();
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The command execution parameter.
*/
*/
abstract public void addContexts(CommandParameter param, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException;
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
abstract public TraceDomainComponent getDomain(CommandParameter param);
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
fLock.lock();
*/
abstract TraceDomainComponent getDomain(CommandParameter param);
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
* <p>
* Command handler implementation to delete a target host.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
abstract public class BaseNodeHandler extends BaseControlViewHandler {
// Attributes
// ------------------------------------------------------------------------
/**
- * The target node component the command is to be executed on.
+ * The target node component the command is to be executed on.
*/
protected TargetNodeComponent fTargetNode = null;
-
+
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
+
@Override
public boolean isEnabled() {
return isEnabled;
}
-
+
}
\ No newline at end of file
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
return Status.OK_STATUS;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
abstract protected void changeState(TraceDomainComponent domain, List<String> channelNames, IProgressMonitor monitor) throws ExecutionException;
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
abstract protected void changeState(TraceChannelComponent channel, List<String> eventNames, IProgressMonitor monitor) throws ExecutionException;
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
// Get workbench page for the Control View
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
abstract public void changeState(TraceSessionComponent session, IProgressMonitor monitor) throws ExecutionException;
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
// Get workbench page for the Control View
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see java.lang.Object#clone()
- */
@Override
public ChannelCommandParameter clone() {
ChannelCommandParameter clone = (ChannelCommandParameter) super.clone();
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
/**
* Class containing parameter for the command execution.
- *
- * @author Bernd Hufmann
+ *
+ * @author Bernd Hufmann
*/
public class CommandParameter implements Cloneable {
// ------------------------------------------------------------------------
/**
- * Constructor
+ * Constructor
* @param session a trace session component.
*/
public CommandParameter(TraceSessionComponent session) {
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see java.lang.Object#clone()
- */
@Override
public CommandParameter clone() {
CommandParameter clone = null;
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
* <p>
* Command handler implementation to connect to a target host.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class ConnectHandler extends BaseNodeHandler {
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseNodeHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
fLock.lock();
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseNodeHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
boolean isEnabled = false;
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The trace session group the command is to be executed on.
*/
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
+
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
* <p>
* Command handler implementation to delete a target host.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class DeleteHandler extends BaseNodeHandler {
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseNodeHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
+
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
fLock.lock();
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseNodeHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
boolean isEnabled = false;
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
+
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
// Get workbench page for the Control View
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
* <p>
* Command handler implementation to disable one or more trace channels per session and domain.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class DisableChannelHandler extends ChangeChannelStateHandler {
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseChangeChannelStateHandler#getNewState()
- */
+
@Override
protected TraceEnablement getNewState() {
return TraceEnablement.DISABLED;
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseChangeChannelStateHandler#changeState(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceDomainComponent, java.util.List, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
protected void changeState(TraceDomainComponent domain, List<String> channelNames, IProgressMonitor monitor) throws ExecutionException {
domain.disableChannels(channelNames, monitor);
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
* <p>
* Command handler implementation to disable one or more events session, domain and channel.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class DisableEventHandler extends ChangeEventStateHandler {
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.ChangeEventStateHandler#getNewState()
- */
+
@Override
protected TraceEnablement getNewState() {
return TraceEnablement.DISABLED;
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.ChangeEventStateHandler#changeState(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceChannelComponent, java.util.List, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
- protected void changeState(TraceChannelComponent channel, List<String> eventNames, IProgressMonitor monitor) throws ExecutionException{
+ protected void changeState(TraceChannelComponent channel, List<String> eventNames, IProgressMonitor monitor) throws ExecutionException{
channel.disableEvent(eventNames, monitor);
}
}
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
* <p>
* Command handler implementation to disconnect from a target host.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class DisconnectHandler extends BaseNodeHandler {
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseNodeHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
fLock.lock();
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseNodeHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
boolean isEnabled = false;
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
/**
* Class containing parameter for the command execution.
- *
+ *
* @author Bernd Hufmann
*/
public class DomainCommandParameter extends CommandParameter {
public TraceDomainComponent getDomain() {
return fDomain;
}
-
+
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see java.lang.Object#clone()
- */
@Override
public DomainCommandParameter clone() {
DomainCommandParameter clone = (DomainCommandParameter) super.clone();
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
* <p>
* Command handler implementation to enable one or more trace channels per session and domain.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class EnableChannelHandler extends ChangeChannelStateHandler {
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseChangeChannelStateHandler#getNewState()
- */
+
@Override
protected TraceEnablement getNewState() {
return TraceEnablement.ENABLED;
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseChangeChannelStateHandler#changeState(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceDomainComponent, java.util.List, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
protected void changeState(TraceDomainComponent domain, List<String> channelNames, IProgressMonitor monitor) throws ExecutionException {
domain.enableChannels(channelNames, null, monitor);
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseCreateChannelHandler#enableChannel(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.util.List, org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
public void enableChannel(CommandParameter param, List<String> channelNames, IChannelInfo info, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
if (param instanceof DomainCommandParameter) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseCreateChannelHandler#getDomain(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter)
- */
@Override
public TraceDomainComponent getDomain(CommandParameter param) {
if (param instanceof DomainCommandParameter) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseCreateChannelHandler#enableChannel(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.util.List, org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
public void enableChannel(CommandParameter param, List<String> channelNames, IChannelInfo info, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
param.getSession().enableChannels(channelNames, info, isKernel, monitor);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseCreateChannelHandler#getDomain(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter)
- */
@Override
public TraceDomainComponent getDomain(CommandParameter param) {
return null;
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
// Get workbench page for the Control View
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
* <p>
* Command handler implementation to enable one or more events session, domain and channel.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class EnableEventHandler extends ChangeEventStateHandler {
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.ChangeEventStateHandler#getNewState()
- */
+
@Override
protected TraceEnablement getNewState() {
return TraceEnablement.ENABLED;
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.ChangeEventStateHandler#changeState(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceChannelComponent, java.util.List, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
- protected void changeState(TraceChannelComponent channel, List<String> eventNames, IProgressMonitor monitor) throws ExecutionException{
+ protected void changeState(TraceChannelComponent channel, List<String> eventNames, IProgressMonitor monitor) throws ExecutionException{
channel.enableEvents(eventNames, monitor);
}
}
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#enableEvents(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.util.List, boolean, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
public void enableEvents(CommandParameter param, List<String> eventNames, boolean isKernel, String filterExression, IProgressMonitor monitor) throws ExecutionException {
if (param instanceof ChannelCommandParameter) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#enableSyscalls(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableSyscalls(CommandParameter param, IProgressMonitor monitor) throws ExecutionException {
if (param instanceof ChannelCommandParameter) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#enableProbe(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.lang.String, boolean, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableProbe(CommandParameter param, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
if (param instanceof ChannelCommandParameter) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#enableLogLevel(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.lang.String, org.eclipse.linuxtools.internal.lttng2.core.control.model.LogLevelType, org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceLogLevel, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableLogLevel(CommandParameter param, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExression, IProgressMonitor monitor) throws ExecutionException {
if (param instanceof ChannelCommandParameter) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#getDomain(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter)
- */
@Override
public TraceDomainComponent getDomain(CommandParameter param) {
if (param instanceof ChannelCommandParameter) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
// Get workbench page for the Control View
*/
public class EnableEventOnDomainHandler extends BaseEnableEventHandler {
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#enableEvents(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.util.List, boolean, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
public void enableEvents(CommandParameter param, List<String> eventNames, boolean isKernel, String filterExression, IProgressMonitor monitor) throws ExecutionException {
if (param instanceof DomainCommandParameter) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#enableSyscalls(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableSyscalls(CommandParameter param, IProgressMonitor monitor) throws ExecutionException {
if (param instanceof DomainCommandParameter) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#enableProbe(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.lang.String, boolean, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableProbe(CommandParameter param, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
if (param instanceof DomainCommandParameter) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#enableLogLevel(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.lang.String, org.eclipse.linuxtools.internal.lttng2.core.control.model.LogLevelType, org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceLogLevel, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableLogLevel(CommandParameter param, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExression, IProgressMonitor monitor) throws ExecutionException {
if (param instanceof DomainCommandParameter) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#getDomain(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter)
- */
@Override
public TraceDomainComponent getDomain(CommandParameter param) {
if (param instanceof DomainCommandParameter) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
// Get workbench page for the Control View
//-------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#enableEvents(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.util.List, boolean, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
public void enableEvents(CommandParameter param, List<String> eventNames, boolean isKernel, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
param.getSession().enableEvents(eventNames, isKernel, filterExpression, monitor);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#enableSyscalls(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableSyscalls(CommandParameter param, IProgressMonitor monitor) throws ExecutionException {
param.getSession().enableSyscalls(monitor);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#enableProbe(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.lang.String, boolean, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableProbe(CommandParameter param, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
param.getSession().enableProbe(eventName, isFunction, probe, monitor);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#enableLogLevel(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter, java.lang.String, org.eclipse.linuxtools.internal.lttng2.core.control.model.LogLevelType, org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceLogLevel, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableLogLevel(CommandParameter param, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
param.getSession().enableLogLevel(eventName, logLevelType, level, filterExpression, monitor);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.BaseEnableEventHandler#getDomain(org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.CommandParameter)
- */
@Override
public TraceDomainComponent getDomain(CommandParameter param) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
// Get workbench page for the Control View
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
/**
* Class containing parameter for a command execution.
- *
+ *
* @author Bernd Hufmann
*/
public class EventCommandParameter extends CommandParameter {
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
private TraceEventComponent fEvent;
// ------------------------------------------------------------------------
public TraceEventComponent getEvent() {
return fEvent;
}
-
+
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see java.lang.Object#clone()
- */
@Override
public EventCommandParameter clone() {
EventCommandParameter clone = (EventCommandParameter) super.clone();
*/
protected CommandParameter fParam;
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
// Get workbench page for the Control View
// ------------------------------------------------------------------------
// Helper methods
// ------------------------------------------------------------------------
+
/**
* Downloads a trace from the remote host to the given project.
*
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
+
/**
* The trace control system type defined for LTTng version 2.0 and later.
*/
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The parent trace control component the new node will be added to.
*/
private ITraceControlComponent fRoot = null;
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
assert (fRoot != null);
return result.toArray(new IHost[result.size()]);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The node component reference.
*/
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
fLock.lock();
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
* <p>
* Command handler implementation to start one or more trace sessions.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class StartHandler extends ChangeSessionStateHandler {
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.ChangeSessionStateHandler#getNewState()
- */
+
@Override
public TraceSessionState getNewState() {
return TraceSessionState.ACTIVE;
}
-
+
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.ChangeSessionStateHandler#changeState(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
public void changeState(TraceSessionComponent session, IProgressMonitor monitor) throws ExecutionException {
session.startSession(monitor);
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
* <p>
* Command handler implementation to stop one or more trace sessions.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class StopHandler extends ChangeSessionStateHandler {
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.ChangeSessionStateHandler#getNewState()
- */
+
@Override
public TraceSessionState getNewState() {
return TraceSessionState.INACTIVE;
}
-
+
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers.ChangeSessionStateHandler#changeState(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent, org.eclipse.core.runtime.IProgressMonitor)
- */
+
@Override
public void changeState(TraceSessionComponent session, IProgressMonitor monitor) throws ExecutionException {
session.stopSession(monitor);
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getAdapter(java.lang.Class)
- */
@Override
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
+
/**
* Path to icon file for this component.
*/
public static final String KERNEL_PROVIDER_ICON_FILE = "icons/obj16/targets.gif"; //$NON-NLS-1$
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Constructor
* @param name - the name of the component.
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
+
/**
* Sets the events information for this component.
* @param eventInfos - events information to set.
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getAdapter(java.lang.Class)
- */
@Override
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
return null;
}
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
}
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
+
/**
* Path to icon file for this component (state connected).
*/
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The node connection state.
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Constructor
* @param name - the name of the component
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getImage()
- */
+
@Override
public Image getImage() {
if (fState == TargetNodeState.CONNECTED) {
return fDisconnectedImage;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getTargetNodeState()
- */
@Override
public TargetNodeState getTargetNodeState() {
return fState;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#setTargetNodeState(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent.TargetNodeState)
- */
@Override
public void setTargetNodeState(TargetNodeState state) {
fState = state;
fireComponentChanged(TargetNodeComponent.this);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getControlService()
- */
@Override
public ILttngControlService getControlService() {
return fService;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#setControlService(org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService)
- */
@Override
public void setControlService(ILttngControlService service) {
fService = service;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getAdapter(java.lang.Class)
- */
@Override
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
// Operations
// ------------------------------------------------------------------------
- /*
- * @see org.eclipse.rse.core.subsystems.ICommunicationsListener#communicationsStateChange(org.eclipse.rse.core.subsystems.CommunicationsEvent)
- */
@Override
public void communicationsStateChange(CommunicationsEvent e) {
if (e.getState() == CommunicationsEvent.AFTER_DISCONNECT ||
}
}
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICommunicationsListener#isPassiveCommunicationsListener()
- */
@Override
public boolean isPassiveCommunicationsListener() {
return true;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.TraceControlComponent#dispose()
- */
@Override
public void dispose() {
fRemoteProxy.removeCommunicationListener(this);
// ------------------------------------------------------------------------
// Helper function
// ------------------------------------------------------------------------
+
/**
* @return returns the control service for LTTng specific commands.
* @throws ExecutionException
* @author Bernd Hufmann
*/
public class TraceChannelComponent extends TraceControlComponent {
+
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
+
/**
* Path to icon file for this component (state enabled).
*/
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The channel information.
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Constructor
* @param name - the name of the component.
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getImage()
- */
+
@Override
public Image getImage() {
if (fChannelInfo.getState() == TraceEnablement.DISABLED) {
public void setState(String stateName) {
fChannelInfo.setState(stateName);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getAdapter(java.lang.Class)
- */
+
@Override
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#getName()
- */
+
@Override
public String getName() {
return fName;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#setName(java.lang.String)
- */
@Override
public void setName(String name) {
fName = name;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#getImage()
- */
@Override
public Image getImage() {
return fImage;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#setImage(java.lang.String)
- */
@Override
public void setImage(String path) {
fImage = Activator.getDefault().loadIcon(path);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#setImage(org.eclipse.swt.graphics.Image)
- */
@Override
public void setImage(Image image) {
fImage = image;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#getToolTip()
- */
@Override
public String getToolTip() {
return fToolTip;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#setToolTip(java.lang.String)
- */
@Override
public void setToolTip(String toolTip) {
fToolTip = toolTip;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#getTargetNodeState()
- */
@Override
public TargetNodeState getTargetNodeState() {
if (getParent() != null) {
return TargetNodeState.DISCONNECTED;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#setTargetNodeState(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent.TargetNodeState)
- */
@Override
public void setTargetNodeState(TargetNodeState state) {
if (getParent() != null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#getParent()
- */
@Override
public ITraceControlComponent getParent() {
return fParent;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#setParent(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent)
- */
@Override
public void setParent(ITraceControlComponent parent) {
fParent = parent;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#getChildren()
- */
@Override
public ITraceControlComponent[] getChildren() {
return fChildren.toArray(new ITraceControlComponent[fChildren.size()]);
}
- /*
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponents#etChildren(java.util.List)
- */
@Override
public void setChildren(List<ITraceControlComponent> children) {
for (Iterator<ITraceControlComponent> iterator = children.iterator(); iterator.hasNext();) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#getChild(java.lang.String)
- */
@Override
public ITraceControlComponent getChild(String name) {
ITraceControlComponent child = null;
}
return child;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#getChildren(java.lang.Class)
- */
+
@Override
public List<ITraceControlComponent> getChildren(Class<? extends ITraceControlComponent> clazz) {
List<ITraceControlComponent> list = new ArrayList<ITraceControlComponent>();
return list;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#getControlService()
- */
@Override
public ILttngControlService getControlService() {
if (getParent() != null) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#setControlService(org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService)
- */
@Override
public void setControlService(ILttngControlService service) {
if (getParent() != null) {
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#dispose()
- */
+
@Override
public void dispose() {
// default implementation
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#addChild(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent)
- */
@Override
public void addChild(ITraceControlComponent component) {
if (component != null) {
fireComponentAdded(this, component);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#removeChild(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent)
- */
@Override
public void removeChild(ITraceControlComponent component) {
if (component != null) {
fireComponentRemoved(this, component);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#removeAllChildren()
- */
@Override
public void removeAllChildren() {
for (Iterator<ITraceControlComponent> iterator = fChildren.iterator(); iterator.hasNext();) {
// fireCompenentChanged(this);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#containsChild(java.lang.String)
- */
@Override
public boolean containsChild(String name) {
boolean retValue = false;
return retValue;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#hasChildren()
- */
@Override
public boolean hasChildren() {
return !fChildren.isEmpty();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#addComponentListener(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponentChangedListener)
- */
@Override
public void addComponentListener(ITraceControlComponentChangedListener listener) {
if (fParent != null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#removeComponentListener(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponentChangedListener)
- */
@Override
public void removeComponentListener(ITraceControlComponentChangedListener listener) {
if (fParent != null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#fireCompenentAdded(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent, org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent)
- */
@Override
public void fireComponentAdded(ITraceControlComponent parent, ITraceControlComponent component) {
if (component == null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#fireCompenentRemoved(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent, org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent)
- */
@Override
public void fireComponentRemoved(ITraceControlComponent parent, ITraceControlComponent component) {
if (component == null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent#fireCompenentChanged(org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent)
- */
@Override
public void fireComponentChanged(ITraceControlComponent component) {
if (component == null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
@Override
public Object getAdapter(Class adapter) {
return null;
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl;
* <p>
* Tree content provider implementation for trace control view.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class TraceControlContentProvider implements ITreeContentProvider {
+
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
+
@Override
public void dispose() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
- */
@Override
public Object[] getElements(Object inputElement) {
return getChildren(inputElement);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
@Override
public Object[] getChildren(Object parentElement) {
-
+
if (parentElement instanceof ITraceControlComponent) {
return ((ITraceControlComponent)parentElement).getChildren();
}
return new Object[0];
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
@Override
public Object getParent(Object element) {
if (element instanceof ITraceControlComponent) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
@Override
public boolean hasChildren(Object element) {
if (element instanceof ITraceControlComponent) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl;
* <p>
* Label provider for trace control tree viewer.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class TraceControlLabelProvider extends ColumnLabelProvider {
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
- */
+
@Override
public Image getImage(Object element) {
if ((element != null) && (element instanceof ITraceControlComponent)) {
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- */
@Override
public String getText(Object element) {
if ((element != null) && (element instanceof ITraceControlComponent)) {
return "";//$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipText(java.lang.Object)
- */
@Override
public String getToolTipText(Object element) {
if ((element != null) && (element instanceof ITraceControlComponent)) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getAdapter(java.lang.Class)
- */
@Override
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getImage()
- */
+
@Override
public Image getImage() {
if (fEventInfo.getState() == TraceEnablement.DISABLED) {
fEventInfo.setFilterExpression(filter);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getAdapter(java.lang.Class)
- */
@Override
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
throw new IllegalArgumentException("Invalid type passed. Only class of type ProbeEventInfo allowed:\n" + eventInfo.getClass()); //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getAdapter(java.lang.Class)
- */
@Override
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getImage()
- */
+
@Override
public Image getImage() {
if (fIsDestroyed) {
fSessionInfo.setStreamedTrace(isStreamedTrace);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getAdapter(java.lang.Class)
- */
@Override
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
fProviderInfo.setPid(pid);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceControlComponent#getAdapter(java.lang.Class)
- */
@Override
public Object getAdapter(Class adapter) {
if (adapter == IPropertySource.class) {
return null;
}
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
}
-
-
* @author Bernd Hufmann
*/
public class ControlPreferenceInitializer extends AbstractPreferenceInitializer {
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
+
@Override
public void initializeDefaultPreferences() {
final IPreferenceStore store = ControlPreferences.getInstance().getPreferenceStore();
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
+
@Override
public void init(IWorkbench workbench) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
- */
@Override
protected void createFieldEditors() {
addField(commandTimeout);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
@Override
public void propertyChange(PropertyChangeEvent event) {
super.propertyChange(event);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performDefaults()
- */
@Override
protected void performDefaults() {
super.performDefaults();
fIsAppend.setEnabled(false, getFieldEditorParent());
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
- */
@Override
public boolean performOk() {
boolean ret = super.performOk();
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyDescriptors()
- */
+
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
List<IPropertyDescriptor> list = new ArrayList<IPropertyDescriptor> ();
return list.toArray(new IPropertyDescriptor[list.size()]);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
if(BASE_EVENT_NAME_PROPERTY_ID.equals(id)) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.property;
* <p>
* Base property source implementation.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
abstract public class BasePropertySource implements IPropertySource {
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
- */
+
@Override
public Object getEditableValue() {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
- */
@Override
abstract public IPropertyDescriptor[] getPropertyDescriptors();
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
@Override
abstract public Object getPropertyValue(Object id);
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang.Object)
- */
@Override
public boolean isPropertySet(Object id) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
- */
@Override
public void resetPropertyValue(Object id) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
- */
@Override
public void setPropertyValue(Object id, Object value) {
}
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
+
/**
* The kernel provider 'name' property ID.
*/
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The kernel provider component which this property source is for.
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Constructor
* @param component - the kernel provider component
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyDescriptors()
- */
+
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
return new IPropertyDescriptor[] {
new ReadOnlyTextPropertyDescriptor(KERNEL_PROVIDER_NAME_PROPERTY_ID, KERNEL_PROVIDER_NAME_PROPERTY_NAME)};
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
if(KERNEL_PROVIDER_NAME_PROPERTY_ID.equals(id)) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyDescriptors()
- */
+
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
return new IPropertyDescriptor[] {
new ReadOnlyTextPropertyDescriptor(TARGET_NODE_VERSION_PROPERTY_ID, TARGET_NODE_VERSION_PROPERTY_NAME)};
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
if(TARGET_NODE_NAME_PROPERTY_ID.equals(id)) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyDescriptors()
- */
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
return new IPropertyDescriptor[] {
new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_OUTPUT_TYPE_PROPERTY_ID, TRACE_CHANNEL_OUTPUT_TYPEPROPERTY_NAME)};
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
if(TRACE_CHANNEL_NAME_PROPERTY_ID.equals(id)) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The trace domain component which this property source is for.
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Constructor
* @param component - the trace domain component
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyDescriptors()
- */
+
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
return new IPropertyDescriptor[] {
new ReadOnlyTextPropertyDescriptor(TRACE_DOMAIN_NAME_PROPERTY_ID, TRACE_DOMAIN_NAME_PROPERTY_NAME)};
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
if(TRACE_DOMAIN_NAME_PROPERTY_ID.equals(id)) {
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The event component which this property source is for.
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Constructor
* @param component - the base event component
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyDescriptors()
- */
+
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
List<IPropertyDescriptor> list = new ArrayList<IPropertyDescriptor> ();
return list.toArray(new IPropertyDescriptor[list.size()]);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
if(TRACE_EVENT_NAME_PROPERTY_ID.equals(id)) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyDescriptors()
- */
+
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
IPropertyDescriptor[] superProperties = super.getPropertyDescriptors();
return list.toArray(new IPropertyDescriptor[list.size()]);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
if(TRACE_EVENT_PROBE_ADDRESS_PROPERTY_ID.equals(id)) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The session component which this property source is for.
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Constructor
* @param component - the session component
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
- */
+
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
return new IPropertyDescriptor[] {
new ReadOnlyTextPropertyDescriptor(TRACE_SESSION_STATE_PROPERTY_ID, TRACE_SESSION_STATE_PROPERTY_NAME)};
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
if(TRACE_SESSION_NAME_PROPERTY_ID.equals(id)) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The UST provider component which this property source is for.
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Constructor
* @param component - the UST provider component
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyDescriptors()
- */
+
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
return new IPropertyDescriptor[] {
new ReadOnlyTextPropertyDescriptor(UST_PROVIDER_PID_PROPERTY_ID, UST_PROVIDER_PID_PROPERTY_NAME)};
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
if(UST_PROVIDER_NAME_PROPERTY_ID.equals(id)) {
/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ICommandResult#getResult()
- */
+
@Override
public int getResult() {
return fResult;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ICommandResult#setResult(int)
- */
@Override
public void setResult(int result) {
fResult = result;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ICommandResult#getOutput()
- */
@Override
public String[] getOutput() {
return Arrays.copyOf(fOutput, fOutput.length);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ICommandResult#setOutput(java.lang.String[])
- */
@Override
public void setOutput(String[] output) {
fOutput = new String[0];
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ICommandShell#connect()
- */
+
@Override
public void connect() throws ExecutionException {
IShellService shellService = fProxy.getShellService();
fIsConnected = true;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ICommandShell#disconnect()
- */
@Override
public void disconnect() {
fIsConnected = false;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ICommandShell#executeCommand(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public ICommandResult executeCommand(String command, IProgressMonitor monitor) throws ExecutionException {
return executeCommand(command, monitor, true);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ICommandShell#executeCommand(java.lang.String, org.eclipse.core.runtime.IProgressMonitor, boolean)
- */
@Override
public ICommandResult executeCommand(final String command, final IProgressMonitor monitor, final boolean checkReturnValue) throws ExecutionException {
if (fIsConnected) {
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
private final IHost fHost;
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.util.IRemoteSystemProxy#getShellService(org.eclipse.rse.core.model.IHost)
- */
+
@Override
public IShellService getShellService() {
ISubSystem ss = getShellServiceSubSystem();
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.util.IRemoteSystemProxy#getTerminalService()
- */
@Override
public ITerminalService getTerminalService() {
ISubSystem ss = getTerminalServiceSubSystem();
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.util.IRemoteSystemProxy#getShellServiceSubSystem()
- */
@Override
public ISubSystem getShellServiceSubSystem() {
if (fHost == null) {
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.util.IRemoteSystemProxy#getTerminalServiceSubSystem()
- */
@Override
public ISubSystem getTerminalServiceSubSystem() {
if (fHost == null) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.remote.IRemoteSystemProxy#getFileServiceSubSystem()
- */
@Override
public IFileServiceSubSystem getFileServiceSubSystem() {
if (fHost == null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.remote.IRemoteSystemProxy#connect(org.eclipse.rse.core.model.IRSECallback)
- */
@Override
public void connect(IRSECallback callback) throws ExecutionException {
ISubSystem shellSubSystem = getShellServiceSubSystem();
}
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.util.IRemoteSystemProxy#disconnect()
- */
@Override
public void disconnect() throws ExecutionException {
ISubSystem shellSubSystem = getShellServiceSubSystem();
}
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.util.IRemoteSystemProxy#createCommandShell()
- */
@Override
public ICommandShell createCommandShell() throws ExecutionException {
ICommandShell shell = new CommandShell(this);
return shell;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.util.IRemoteSystemProxy#addCommunicationListener(org.eclipse.rse.core.subsystems.ICommunicationsListener)
- */
@Override
public void addCommunicationListener(ICommunicationsListener listener) {
IConnectorService[] css = fHost.getConnectorServices();
}
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.util.IRemoteSystemProxy#removeCommunicationListener(org.eclipse.rse.core.subsystems.ICommunicationsListener)
- */
@Override
public void removeCommunicationListener(ICommunicationsListener listener) {
IConnectorService[] css = fHost.getConnectorServices();
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#getVersion()
- */
+
@Override
public String getVersion() {
if (fVersion == null) {
fVersion = new Version(version);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#isVersionSupported(java.lang.String)
- */
@Override
public boolean isVersionSupported(String version) {
Version tmp = new Version(version);
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService
- * #getSessionNames(org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public String[] getSessionNames(IProgressMonitor monitor) throws ExecutionException {
StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST);
return retArray.toArray(new String[retArray.size()]);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService
- * #getSession(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public ISessionInfo getSession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST, sessionName);
return sessionInfo;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService
- * #getKernelProvider(org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException {
StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_KERNEL);
return events;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService
- * #getUstProvider()
- */
@Override
public List<IUstProviderInfo> getUstProvider() throws ExecutionException {
return getUstProvider(new NullProgressMonitor());
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService
- * #getUstProvider(org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException {
StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_UST);
return allProviders;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#createSession(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public ISessionInfo createSession(String sessionName, String sessionPath, IProgressMonitor monitor) throws ExecutionException {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#createSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public ISessionInfo createSession(String sessionName, String networkUrl, String controlUrl, String dataUrl, IProgressMonitor monitor) throws ExecutionException {
//Session <sessionName> destroyed
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#startSession(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void startSession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
//Session <sessionName> started
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#stopSession(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void stopSession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
String newSessionName = formatParameter(sessionName);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#enableChannel(java.lang.String, java.util.List, boolean, org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.IChannelInfo, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableChannels(String sessionName, List<String> channelNames, boolean isKernel, IChannelInfo info, IProgressMonitor monitor) throws ExecutionException {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#disableChannel(java.lang.String, java.util.List, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void disableChannels(String sessionName, List<String> channelNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
executeCommand(command.toString(), monitor);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#enableEvents(java.lang.String, java.lang.String, java.util.List, boolean, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableEvents(String sessionName, String channelName, List<String> eventNames, boolean isKernel, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#enableSyscalls(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableSyscalls(String sessionName, String channelName, IProgressMonitor monitor) throws ExecutionException {
executeCommand(command.toString(), monitor);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#enableProbe(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableProbe(String sessionName, String channelName, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_EVENT);
executeCommand(command.toString(), monitor);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#enableLogLevel(java.lang.String, java.lang.String, java.lang.String, org.eclipse.linuxtools.internal.lttng2.core.control.model.LogLevelType, org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceLogLevel, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void enableLogLevel(String sessionName, String channelName, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_EVENT);
executeCommand(command.toString(), monitor);
}
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#disableEvent(java.lang.String, java.lang.String, java.util.List, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void disableEvent(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_DISABLE_EVENT);
executeCommand(command.toString(), monitor);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#getContexts(org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public List<String> getContextList(IProgressMonitor monitor) throws ExecutionException {
return contexts;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#addContexts(java.lang.String, java.lang.String, java.lang.String, boolean, java.util.List, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void addContexts(String sessionName, String channelName, String eventName, boolean isKernel, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException {
StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ADD_CONTEXT);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ILttngControlService#calibrate(boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void calibrate(boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
// String newSessionName = formatParameter(sessionName);
// ------------------------------------------------------------------------
// Helper methods
// ------------------------------------------------------------------------
+
/**
* Checks if command result is an error result.
*
/**********************************************************************
- * Copyright (c) 2012. 2013 Ericsson
+ * Copyright (c) 2012, 2013. 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
super(other.getLocationInfo());
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfLocation#getLocationInfo()
- */
@Override
public String getLocationInfo() {
return (String) super.getLocationInfo();
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0 which
super(dataType, index, nbRequested, blockSize);
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.request.TmfDataRequest#handleData(org.eclipse.linuxtools.tmf.core.event.ITmfEvent)
- */
@Override
public void handleData(final ITmfEvent data) {
super.handleData(data);
super(dataType, range, index, nbRequested, blockSize);
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.request.TmfDataRequest#handleData(org.eclipse.linuxtools.tmf.core.event.ITmfEvent)
- */
@Override
public void handleData(final ITmfEvent data) {
super.handleData(data);
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
public class Activator extends Plugin {
- // ------------------------------------------------------------------------
+ // ------------------------------------------------------------------------
// Attributes
- // ------------------------------------------------------------------------
+ // ------------------------------------------------------------------------
/**
* The plug-in ID
*/
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.core"; //$NON-NLS-1$
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.core"; //$NON-NLS-1$
- /**
+ /**
* The shared instance
*/
- private static Activator fPlugin;
+ private static Activator fPlugin;
- // ------------------------------------------------------------------------
+ // ------------------------------------------------------------------------
// Constructors
- // ------------------------------------------------------------------------
+ // ------------------------------------------------------------------------
- /**
+ /**
* Constructor
*/
- public Activator() {
- setDefault(this);
- }
+ public Activator() {
+ setDefault(this);
+ }
- // ------------------------------------------------------------------------
+ // ------------------------------------------------------------------------
// Accessors
- // ------------------------------------------------------------------------
+ // ------------------------------------------------------------------------
- /**
+ /**
* Returns the TMF Core plug-in instance.
*
* @return the TMF Core plug-in instance.
}
// Sets plug-in instance
- private static void setDefault(Activator plugin) {
- fPlugin = plugin;
- }
+ private static void setDefault(Activator plugin) {
+ fPlugin = plugin;
+ }
- // ------------------------------------------------------------------------
+ // ------------------------------------------------------------------------
// Plugin
- // ------------------------------------------------------------------------
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- setDefault(this);
- TmfCoreTracer.init();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- TmfCoreTracer.stop();
- setDefault(null);
- super.stop(context);
- }
-
- // ------------------------------------------------------------------------
- // Log INFO
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ setDefault(this);
+ TmfCoreTracer.init();
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ TmfCoreTracer.stop();
+ setDefault(null);
+ super.stop(context);
+ }
+
+ // ------------------------------------------------------------------------
+ // Log INFO
// ------------------------------------------------------------------------
/**
* Logs a message with severity INFO in the runtime log of the plug-in.
*
- * @param message A message to log
+ * @param message
+ * A message to log
*/
public static void logInfo(String message) {
fPlugin.getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
}
/**
- * Logs a message and exception with severity INFO in the runtime log of the plug-in.
+ * Logs a message and exception with severity INFO in the runtime log of the
+ * plug-in.
*
- * @param message A message to log
- * @param exception The corresponding exception
+ * @param message
+ * A message to log
+ * @param exception
+ * The corresponding exception
*/
public static void logInfo(String message, Throwable exception) {
fPlugin.getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
// ------------------------------------------------------------------------
/**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ * Logs a message and exception with severity WARNING in the runtime log of
+ * the plug-in.
*
- * @param message A message to log
+ * @param message
+ * A message to log
*/
public static void logWarning(String message) {
fPlugin.getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
}
/**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ * Logs a message and exception with severity WARNING in the runtime log of
+ * the plug-in.
*
- * @param message A message to log
- * @param exception The corresponding exception
+ * @param message
+ * A message to log
+ * @param exception
+ * The corresponding exception
*/
public static void logWarning(String message, Throwable exception) {
fPlugin.getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
// ------------------------------------------------------------------------
/**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ * Logs a message and exception with severity ERROR in the runtime log of
+ * the plug-in.
*
- * @param message A message to log
+ * @param message
+ * A message to log
*/
public static void logError(String message) {
fPlugin.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
}
/**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ * Logs a message and exception with severity ERROR in the runtime log of
+ * the plug-in.
*
- * @param message A message to log
- * @param exception The corresponding exception
+ * @param message
+ * A message to log
+ * @param exception
+ * The corresponding exception
*/
public static void logError(String message, Throwable exception) {
fPlugin.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
// Runnable
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see java.lang.Runnable#run()
- */
@Override
public void run() {
// ------------------------------------------------------------------------
// The request executor
- private final ExecutorService fExecutor = Executors.newFixedThreadPool(2);
- private final String fExecutorName;
+ private final ExecutorService fExecutor = Executors.newFixedThreadPool(2);
+ private final String fExecutorName;
- // The request queues
- private final Queue<TmfEventThread> fHighPriorityTasks = new ArrayBlockingQueue<TmfEventThread>(100);
- private final Queue<TmfEventThread> fLowPriorityTasks = new ArrayBlockingQueue<TmfEventThread>(100);
+ // The request queues
+ private final Queue<TmfEventThread> fHighPriorityTasks = new ArrayBlockingQueue<TmfEventThread>(100);
+ private final Queue<TmfEventThread> fLowPriorityTasks = new ArrayBlockingQueue<TmfEventThread>(100);
- // The tasks
- private TmfEventThread fActiveTask;
+ // The tasks
+ private TmfEventThread fActiveTask;
private TmfEventThread fSuspendedTask;
// ------------------------------------------------------------------------
/**
* Standard constructor
*
- * @param executor The executor service to use
+ * @param executor
+ * The executor service to use
*/
@Deprecated
public TmfRequestExecutor(ExecutorService executor) {
// Getters
// ------------------------------------------------------------------------
- /**
- * @return the number of pending requests
- */
+ /**
+ * @return the number of pending requests
+ */
@Deprecated
- public synchronized int getNbPendingRequests() {
- return fHighPriorityTasks.size() + fLowPriorityTasks.size();
- }
-
- /**
- * @return the shutdown state (i.e. if it is accepting new requests)
- */
- public synchronized boolean isShutdown() {
- return fExecutor.isShutdown();
- }
-
- /**
- * @return the termination state
- */
- public synchronized boolean isTerminated() {
- return fExecutor.isTerminated();
- }
+ public synchronized int getNbPendingRequests() {
+ return fHighPriorityTasks.size() + fLowPriorityTasks.size();
+ }
+
+ /**
+ * @return the shutdown state (i.e. if it is accepting new requests)
+ */
+ public synchronized boolean isShutdown() {
+ return fExecutor.isShutdown();
+ }
+
+ /**
+ * @return the termination state
+ */
+ public synchronized boolean isTerminated() {
+ return fExecutor.isTerminated();
+ }
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see java.util.concurrent.Executor#execute(java.lang.Runnable)
- */
- @Override
- public synchronized void execute(final Runnable command) {
+ @Override
+ public synchronized void execute(final Runnable command) {
// We are expecting MyEventThread:s
if (!(command instanceof TmfEventThread)) {
fSuspendedTask = fActiveTask;
scheduleNext();
}
- }
-
- /**
- * Executes the next pending request, if applicable.
- */
- protected synchronized void scheduleNext() {
- if (!isShutdown()) {
- if ((fActiveTask = fHighPriorityTasks.poll()) != null) {
- fExecutor.execute(fActiveTask);
- } else if (fSuspendedTask != null) {
- fActiveTask = fSuspendedTask;
- fSuspendedTask = null;
- fActiveTask.getThread().resume();
- } else if ((fActiveTask = fLowPriorityTasks.poll()) != null) {
- fExecutor.execute(fActiveTask);
- }
- }
- }
+ }
+
+ /**
+ * Executes the next pending request, if applicable.
+ */
+ protected synchronized void scheduleNext() {
+ if (!isShutdown()) {
+ if ((fActiveTask = fHighPriorityTasks.poll()) != null) {
+ fExecutor.execute(fActiveTask);
+ } else if (fSuspendedTask != null) {
+ fActiveTask = fSuspendedTask;
+ fSuspendedTask = null;
+ fActiveTask.getThread().resume();
+ } else if ((fActiveTask = fLowPriorityTasks.poll()) != null) {
+ fExecutor.execute(fActiveTask);
+ }
+ }
+ }
/**
* Stops the executor
}
}
- // ------------------------------------------------------------------------
- // Object
- // ------------------------------------------------------------------------
+ // ------------------------------------------------------------------------
+ // Object
+ // ------------------------------------------------------------------------
- @Override
+ @Override
@SuppressWarnings("nls")
- public String toString() {
- return "[TmfRequestExecutor(" + fExecutorName + ")]";
- }
+ public String toString() {
+ return "[TmfRequestExecutor(" + fExecutorName + ")]";
+ }
}
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
* Copyright (c) 2010, 2011 École Polytechnique de Montréal
* Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
*
fLastTraceRead = NO_TRACE;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfContext#dispose()
- */
@Override
public void dispose() {
for (ITmfContext context : fContexts) {
// Object
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfLocation#toString()
- */
@Override
@SuppressWarnings("nls")
public String toString() {
return result.toString();
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfLocation#hashCode()
- */
@Override
public int hashCode() {
return super.hashCode();
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfLocation#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfLocation#getLocationData()
- */
@Override
public TmfLocationArray getLocationInfo() {
return fLocation;
// Object
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
@SuppressWarnings("nls")
public String toString() {
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
- *
+ * Copyright (c) 2009, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Francois Chouinard - Initial API and implementation
*******************************************************************************/
/**
* The TMF basic tracing project nature.
- *
+ *
* @version 1.0
* @author Francois Chouinard
*/
// Constants
// ------------------------------------------------------------------------
- /**
- * The nature ID
- */
- public static final String ID = "org.eclipse.linuxtools.tmf.project.nature"; //$NON-NLS-1$
+ /**
+ * The nature ID
+ */
+ public static final String ID = "org.eclipse.linuxtools.tmf.project.nature"; //$NON-NLS-1$
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
- private IProject fProject;
-
+ private IProject fProject;
+
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IProjectNature#configure()
- */
- @Override
- public void configure() throws CoreException {
- }
+ @Override
+ public void configure() throws CoreException {
+ }
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IProjectNature#deconfigure()
- */
- @Override
- public void deconfigure() throws CoreException {
- }
+ @Override
+ public void deconfigure() throws CoreException {
+ }
- @Override
- public IProject getProject() {
- return fProject;
- }
+ @Override
+ public IProject getProject() {
+ return fProject;
+ }
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core.resources.IProject)
- */
- @Override
- public void setProject(IProject project) {
- fProject = project;
- }
+ @Override
+ public void setProject(IProject project) {
+ fProject = project;
+ }
}
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// Attributes
// ------------------------------------------------------------------------
- private String fName;
+ private String fName;
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
+ // ------------------------------------------------------------------------
+ // Constructor
+ // ------------------------------------------------------------------------
/**
* Default constructor. To be used in conjunction with init()
*/
public TmfComponent() {
- this(""); //$NON-NLS-1$
+ this(""); //$NON-NLS-1$
}
/**
* Perform component initialization and register it as a signal listener.
* Need to be called when the default constructor was used.
*
- * @param name the component name
+ * @param name
+ * the component name
*/
public void init(String name) {
TmfCoreTracer.traceComponent(this, "created"); //$NON-NLS-1$
TmfSignalManager.register(this);
}
- /**
- * The standard constructor
- *
- * @param name the component name
- */
- public TmfComponent(String name) {
- init(name);
- }
-
- /**
- * The copy constructor
- *
- * @param other the other component
- */
- public TmfComponent(TmfComponent other) {
+ /**
+ * The standard constructor
+ *
+ * @param name
+ * the component name
+ */
+ public TmfComponent(String name) {
+ init(name);
+ }
+
+ /**
+ * The copy constructor
+ *
+ * @param other
+ * the other component
+ */
+ public TmfComponent(TmfComponent other) {
init(other.fName);
- }
+ }
// ------------------------------------------------------------------------
// Getters/setters
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#getName()
- */
@Override
public String getName() {
return fName;
}
- /**
- * @param name the new component name
- */
- protected void setName(String name) {
- fName = name;
- }
-
- // ------------------------------------------------------------------------
- // ITmfComponent
- // ------------------------------------------------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#dispose()
- */
- @Override
- public void dispose() {
- TmfSignalManager.deregister(this);
- TmfCoreTracer.traceComponent(this, "disposed"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#broadcast(org.eclipse.linuxtools.tmf.core.signal.TmfSignal)
- */
- @Override
- public void broadcast(TmfSignal signal) {
- TmfSignalManager.dispatchSignal(signal);
- }
+ /**
+ * @param name
+ * the new component name
+ */
+ protected void setName(String name) {
+ fName = name;
+ }
+
+ // ------------------------------------------------------------------------
+ // ITmfComponent
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void dispose() {
+ TmfSignalManager.deregister(this);
+ TmfCoreTracer.traceComponent(this, "disposed"); //$NON-NLS-1$
+ }
+
+ @Override
+ public void broadcast(TmfSignal signal) {
+ TmfSignalManager.dispatchSignal(signal);
+ }
}
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
return getSecond();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.util.Pair#toString()
- */
@Override
public String toString() {
return getFirst();
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader#seek(long)
- */
@Override
public boolean seek(long timestamp) {
return seek(new CtfLocationInfo(timestamp, 0));
curRank = rank;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfContext#clone()
- */
@Override
public CtfIterator clone() {
CtfIterator clone = null;
return 0;
}
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfTrace#dispose()
- */
@Override
public synchronized void dispose() {
CtfIteratorManager.removeTrace(this);
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ITmfEventField
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getName()
- */
@Override
public String getName() {
return fName;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getValue()
- */
@Override
public Object getValue() {
return fValue;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getFieldNames()
- */
@Override
public String[] getFieldNames() {
return fFieldNames;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getFieldName(int)
- */
@Override
public String getFieldName(final int index) {
final ITmfEventField field = getField(index);
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getFields()
- */
@Override
public ITmfEventField[] getFields() {
return (fFields != null) ? fFields : new ITmfEventField[0];
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getField(java.lang.String)
- */
@Override
public ITmfEventField getField(final String name) {
return fNameMapping.get(name);
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getField(int)
- */
@Override
public ITmfEventField getField(final int index) {
if (fFields != null && index >= 0 && index < fFields.length) {
// Object
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
StringBuilder ret = new StringBuilder();
// ITmfEventType
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventType#getContext()
- */
@Override
public String getContext() {
return fContext;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventType#getName()
- */
@Override
public String getName() {
return fTypeId;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventType#getRootField()
- */
@Override
public ITmfEventField getRootField() {
return fRootField;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventType#getFieldNames()
- */
@Override
public String[] getFieldNames() {
return (fRootField != null) ? fRootField.getFieldNames() : new String[0];
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventType#getFieldName(int)
- */
@Override
public String getFieldName(final int index) {
return (fRootField != null) ? fRootField.getFieldName(index) : null;
// Object
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
@SuppressWarnings("nls")
public String toString() {
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
- *
+ * Copyright (c) 2012, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Francois Chouinard - Initial API and implementation
*******************************************************************************/
/**
* A central repository for the available event types. Types are managed by
* context space.
- *
+ *
* @version 1.0
* @author Francois Chouinard
- *
+ *
* @see ITmfEventType
*/
public final class TmfEventTypeManager {
/**
* Add a context:type pair to the available types
- *
+ *
* @param context the target context
* @param type the type to add
*/
/**
* Return the list of currently defined contexts
- *
+ *
* @return the list of contexts
*/
public synchronized String[] getContexts() {
/**
* Return the list of types defined for a given context
- *
+ *
* @param context the context to look into
* @return the list of types defined for that context
*/
/**
* Return an event type
- *
+ *
* @param context the context to look into
* @param typeId the type ID
* @return the corresponding type
/**
* Remove the types associated to a context
- *
+ *
* @param context the context to remove
*/
public synchronized void clear(final String context) {
// Object
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
@SuppressWarnings("nls")
public String toString() {
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
public abstract class TmfFilterTreeNode implements ITmfFilterTreeNode, Cloneable {
- private static final String[] VALID_CHILDREN = {
- TmfFilterEventTypeNode.NODE_NAME,
- TmfFilterAndNode.NODE_NAME,
- TmfFilterOrNode.NODE_NAME,
- TmfFilterContainsNode.NODE_NAME,
- TmfFilterEqualsNode.NODE_NAME,
- TmfFilterMatchesNode.NODE_NAME,
- TmfFilterCompareNode.NODE_NAME
- };
+ private static final String[] VALID_CHILDREN = {
+ TmfFilterEventTypeNode.NODE_NAME,
+ TmfFilterAndNode.NODE_NAME,
+ TmfFilterOrNode.NODE_NAME,
+ TmfFilterContainsNode.NODE_NAME,
+ TmfFilterEqualsNode.NODE_NAME,
+ TmfFilterMatchesNode.NODE_NAME,
+ TmfFilterCompareNode.NODE_NAME
+ };
- private ITmfFilterTreeNode parent = null;
- private ArrayList<ITmfFilterTreeNode> children = new ArrayList<ITmfFilterTreeNode>();
+ private ITmfFilterTreeNode parent = null;
+ private ArrayList<ITmfFilterTreeNode> children = new ArrayList<ITmfFilterTreeNode>();
/**
- * @param parent the parent node
+ * @param parent
+ * the parent node
*/
public TmfFilterTreeNode(final ITmfFilterTreeNode parent) {
- if (parent != null) {
- parent.addChild(this);
- }
+ if (parent != null) {
+ parent.addChild(this);
+ }
+ }
+
+ @Override
+ public ITmfFilterTreeNode getParent() {
+ return parent;
+ }
+
+ @Override
+ public abstract String getNodeName();
+
+ @Override
+ public boolean hasChildren() {
+ return (children.size() > 0);
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode#getParent()
- */
- @Override
- public ITmfFilterTreeNode getParent() {
- return parent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode#getNodeName()
- */
- @Override
- public abstract String getNodeName();
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode#hasChildren()
- */
- @Override
- public boolean hasChildren() {
- return (children.size() > 0);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode#getChildrenCount()
- */
- @Override
- public int getChildrenCount() {
- return children.size();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode#getChildren()
- */
- @Override
- public ITmfFilterTreeNode[] getChildren() {
- return children.toArray(new ITmfFilterTreeNode[0]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode#getChild(int)
- */
- @Override
- public ITmfFilterTreeNode getChild(final int index) throws IndexOutOfBoundsException {
- return children.get(index);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode#remove()
- */
- @Override
- public ITmfFilterTreeNode remove() {
- if (getParent() != null) {
- getParent().removeChild(this);
- }
- return this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode#removeChild(org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode)
- */
- @Override
- public ITmfFilterTreeNode removeChild(ITmfFilterTreeNode node) {
- children.remove(node);
- node.setParent(null);
- return node;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode#addChild(org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode)
- */
- @Override
- public int addChild(final ITmfFilterTreeNode node) {
- node.setParent(this);
- if(children.add(node)) {
- return (children.size() - 1);
- }
- return -1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode#replaceChild(int, org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode)
- */
- @Override
- public ITmfFilterTreeNode replaceChild(final int index, final ITmfFilterTreeNode node) throws IndexOutOfBoundsException {
- node.setParent(this);
- return children.set(index, node);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode#setParent(org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode)
- */
- @Override
- public void setParent(final ITmfFilterTreeNode parent) {
- this.parent = parent;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode#matches(org.eclipse.linuxtools.tmf.event.TmfEvent)
- */
- @Override
- public abstract boolean matches(ITmfEvent event);
+ @Override
+ public int getChildrenCount() {
+ return children.size();
+ }
+
+ @Override
+ public ITmfFilterTreeNode[] getChildren() {
+ return children.toArray(new ITmfFilterTreeNode[0]);
+ }
+
+ @Override
+ public ITmfFilterTreeNode getChild(final int index) throws IndexOutOfBoundsException {
+ return children.get(index);
+ }
+
+ @Override
+ public ITmfFilterTreeNode remove() {
+ if (getParent() != null) {
+ getParent().removeChild(this);
+ }
+ return this;
+ }
+
+ @Override
+ public ITmfFilterTreeNode removeChild(ITmfFilterTreeNode node) {
+ children.remove(node);
+ node.setParent(null);
+ return node;
+ }
+
+ @Override
+ public int addChild(final ITmfFilterTreeNode node) {
+ node.setParent(this);
+ if (children.add(node)) {
+ return (children.size() - 1);
+ }
+ return -1;
+ }
+
+ @Override
+ public ITmfFilterTreeNode replaceChild(final int index, final ITmfFilterTreeNode node) throws IndexOutOfBoundsException {
+ node.setParent(this);
+ return children.set(index, node);
+ }
+
+ @Override
+ public void setParent(final ITmfFilterTreeNode parent) {
+ this.parent = parent;
+ }
+
+ @Override
+ public abstract boolean matches(ITmfEvent event);
/**
* @param event the event
return value;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.filter.model.ITmfFilterTreeNode#getValidChildren()
- *
- * By default, all node types are valid children. Override if different.
- */
- @Override
- public List<String> getValidChildren() {
- return Arrays.asList(VALID_CHILDREN);
- }
-
- @Override
- public ITmfFilterTreeNode clone() {
- try {
- TmfFilterTreeNode clone = (TmfFilterTreeNode) super.clone();
- clone.parent = null;
- clone.children = new ArrayList<ITmfFilterTreeNode>(children.size());
- for (ITmfFilterTreeNode child : getChildren()) {
- clone.addChild(child.clone());
- }
- return clone;
- } catch (CloneNotSupportedException e) {
- return null;
- }
- }
+ @Override
+ public List<String> getValidChildren() {
+ return Arrays.asList(VALID_CHILDREN);
+ }
+
+ @Override
+ public ITmfFilterTreeNode clone() {
+ try {
+ TmfFilterTreeNode clone = (TmfFilterTreeNode) super.clone();
+ clone.parent = null;
+ clone.children = new ArrayList<ITmfFilterTreeNode>(children.size());
+ for (ITmfFilterTreeNode child : getChildren()) {
+ clone.addChild(child.clone());
+ }
+ return clone;
+ } catch (CloneNotSupportedException e) {
+ return null;
+ }
+ }
}
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
- *
+ * Copyright (c) 2010, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Yuriy Vashchuk (yvashchuk@gmail.com) - Initial API and implementation
* based on http://smeric.developpez.com/java/cours/xml/sax/
/**
* The SAX Content Handler
- *
+ *
* @version 1.0
* @author Yuriy Vashchuk
* @author Patrick Tasse
*/
public class TmfFilterContentHandler extends DefaultHandler {
-
+
private ITmfFilterTreeNode fRoot = null;
private Stack<ITmfFilterTreeNode> fFilterTreeStack = null;
/**
* The default constructor
- */
+ */
public TmfFilterContentHandler() {
super();
fFilterTreeStack = new Stack<ITmfFilterTreeNode>();
/**
* Getter of tree
- *
+ *
* @return The builded tree
- */
+ */
public ITmfFilterTreeNode getTree() {
return fRoot;
}
-
- /*
- * (non-Javadoc)
- * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
- */
+
+
@Override
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
ITmfFilterTreeNode node = null;
-
+
if (localName.equalsIgnoreCase(TmfFilterRootNode.NODE_NAME)) {
-
+
node = new TmfFilterRootNode();
-
+
} else if (localName.equals(TmfFilterNode.NODE_NAME)) {
-
+
node = new TmfFilterNode(atts.getValue(TmfFilterNode.NAME_ATTR));
-
+
} else if (localName.equals(TmfFilterEventTypeNode.NODE_NAME)) {
-
+
node = new TmfFilterEventTypeNode(null);
((TmfFilterEventTypeNode) node).setEventType(atts.getValue(TmfFilterEventTypeNode.TYPE_ATTR));
((TmfFilterEventTypeNode) node).setName(atts.getValue(TmfFilterEventTypeNode.NAME_ATTR));
-
+
} else if (localName.equals(TmfFilterAndNode.NODE_NAME)) {
-
+
node = new TmfFilterAndNode(null);
String value = atts.getValue(TmfFilterAndNode.NOT_ATTR);
if (value != null && value.equalsIgnoreCase(Boolean.TRUE.toString())) {
((TmfFilterAndNode) node).setNot(true);
}
-
+
} else if (localName.equals(TmfFilterOrNode.NODE_NAME)) {
-
+
node = new TmfFilterOrNode(null);
String value = atts.getValue(TmfFilterOrNode.NOT_ATTR);
if (value != null && value.equalsIgnoreCase(Boolean.TRUE.toString())) {
((TmfFilterOrNode) node).setNot(true);
}
-
+
} else if (localName.equals(TmfFilterContainsNode.NODE_NAME)) {
-
+
node = new TmfFilterContainsNode(null);
String value = atts.getValue(TmfFilterContainsNode.NOT_ATTR);
if (value != null && value.equalsIgnoreCase(Boolean.TRUE.toString())) {
if (value != null && value.equalsIgnoreCase(Boolean.TRUE.toString())) {
((TmfFilterContainsNode) node).setIgnoreCase(true);
}
-
+
} else if (localName.equals(TmfFilterEqualsNode.NODE_NAME)) {
-
+
node = new TmfFilterEqualsNode(null);
String value = atts.getValue(TmfFilterEqualsNode.NOT_ATTR);
if (value != null && value.equalsIgnoreCase(Boolean.TRUE.toString())) {
if (value != null && value.equalsIgnoreCase(Boolean.TRUE.toString())) {
((TmfFilterEqualsNode) node).setIgnoreCase(true);
}
-
+
} else if (localName.equals(TmfFilterMatchesNode.NODE_NAME)) {
-
+
node = new TmfFilterMatchesNode(null);
String value = atts.getValue(TmfFilterMatchesNode.NOT_ATTR);
if (value != null && value.equalsIgnoreCase(Boolean.TRUE.toString())) {
}
((TmfFilterMatchesNode) node).setField(atts.getValue(TmfFilterMatchesNode.FIELD_ATTR));
((TmfFilterMatchesNode) node).setRegex(atts.getValue(TmfFilterMatchesNode.REGEX_ATTR));
-
+
} else if (localName.equals(TmfFilterCompareNode.NODE_NAME)) {
-
+
node = new TmfFilterCompareNode(null);
String value = atts.getValue(TmfFilterCompareNode.NOT_ATTR);
if (value != null && value.equalsIgnoreCase(Boolean.TRUE.toString())) {
}
}
((TmfFilterCompareNode) node).setValue(atts.getValue(TmfFilterCompareNode.VALUE_ATTR));
-
+
}
fFilterTreeStack.push(node);
}
- /*
- * (non-Javadoc)
- * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String, java.lang.String)
- */
@Override
public void endElement(String uri, String localName, String qName) throws SAXException {
ITmfFilterTreeNode node = fFilterTreeStack.pop();
node instanceof TmfFilterTreeNode) {
fFilterTreeStack.lastElement().addChild(node);
}
-
+
}
}
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
super(source);
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
@SuppressWarnings("nls")
public String toString() {
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
return fCurrentTime;
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
return "[TmfTimeSynchSignal (" + fCurrentTime.toString() + ")]"; //$NON-NLS-1$ //$NON-NLS-2$
return fTimeRange;
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
@SuppressWarnings("nls")
public String toString() {
return fTimeRange;
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
@Override
@SuppressWarnings("nls")
public String toString() {
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
* Copyright (c) 2010, 2011 École Polytechnique de Montréal
* Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
*
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
* Copyright (c) 2010, 2011 École Polytechnique de Montréal
* Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
*
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
* Copyright (c) 2010, 2011 École Polytechnique de Montréal
* Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
*
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
* Copyright (c) 2010, 2011 École Polytechnique de Montréal
* Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
*
// ITmfTimestamp
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#normalize(long, int)
- */
@Override
public ITmfTimestamp normalize(final long offset, final int scale) {
if (scale == 0) {
return super.normalize(offset, scale);
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#compareTo(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp, boolean)
- */
@Override
public int compareTo(final ITmfTimestamp ts, final boolean withinPrecision) {
if (ts instanceof TmfSimpleTimestamp) {
return super.compareTo(ts, withinPrecision);
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#getDelta(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
- */
@Override
public ITmfTimestamp getDelta(final ITmfTimestamp ts) {
if (ts instanceof TmfSimpleTimestamp) {
// Object
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#hashCode()
- */
@Override
public int hashCode() {
return super.hashCode();
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#equals(java.lang.Object)
- */
@Override
public boolean equals(final Object other) {
if (this == other) {
// Object
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
@SuppressWarnings("nls")
public String toString() {
// ITmfTimestamp
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getValue()
- */
@Override
public long getValue() {
return fValue;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getScale()
- */
@Override
public int getScale() {
return fScale;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getPrecision()
- */
@Override
public int getPrecision() {
return fPrecision;
1000000000000000000L,
};
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#normalize(long, int)
- */
@Override
public ITmfTimestamp normalize(final long offset, final int scale) {
return new TmfTimestamp(value, scale, precision);
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#compareTo(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp, boolean)
- */
@Override
public int compareTo(final ITmfTimestamp ts, final boolean withinPrecision) {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#getDelta(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
- */
@Override
public ITmfTimestamp getDelta(final ITmfTimestamp ts) {
final ITmfTimestamp nts = ts.normalize(0, fScale);
// Comparable
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#compareTo(org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp)
- */
@Override
public int compareTo(final ITmfTimestamp ts) {
return compareTo(ts, false);
// Object
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(final Object other) {
if (this == other) {
return compareTo(ts, false) == 0;
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
return toString(TmfTimestampFormat.getDefaulTimeFormat());
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#toString(org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat)
- */
/**
* @since 2.0
*/
// Operations
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp#normalize(long, int)
- */
@Override
public ITmfTimestamp normalize(final long offset, final int scale) {
ITmfTimestamp nts = super.normalize(offset, scale);
return new TmfTimestampDelta(nts.getValue(), nts.getScale(), nts.getPrecision());
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
return toString(TmfTimestampFormat.getDefaulIntervalFormat());
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.event.TmfTimestamp#toString(org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat)
- */
@Override
public String toString(TmfTimestampFormat format) {
if (getValue() < 0) {
return fDefaultIntervalFormat;
}
- /* (non-Javadoc)
- * @see java.text.SimpleDateFormat#applyPattern(java.lang.String)
- */
@Override
public void applyPattern(String pattern) {
fPattern = pattern;
super.applyPattern(quotedPattern);
}
- /* (non-Javadoc)
- * @see java.text.SimpleDateFormat#toPattern()
- */
@Override
public String toPattern() {
return fPattern;
return fTimestamp;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfCheckpoint#getLocation()
- */
@Override
public ITmfLocation getLocation() {
return fLocation;
// Comparable
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfCheckpoint#compareTo(org.eclipse.linuxtools.tmf.core.trace.ITmfCheckpoint)
- *
- * Compares the checkpoints timestamp. If either is null, compares the
- * trace checkpoints locations.
- */
@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public int compareTo(final ITmfCheckpoint other) {
// Object
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
@SuppressWarnings("nls")
public String toString() {
fIsIndexing = false;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTraceIndexer#dispose()
- */
@Override
public void dispose() {
if ((fIndexingRequest != null) && !fIndexingRequest.isCompleted()) {
// ITmfTraceIndexer - isIndexing
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTraceIndexer#isIndexing()
- */
@Override
public boolean isIndexing() {
return fIsIndexing;
return restoreCheckpoint(index);
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTraceIndexer#seekIndex(long)
- */
@Override
public ITmfContext seekIndex(final long rank) {
// ITmfContext
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfContext#getLocation()
- */
@Override
public ITmfLocation getLocation() {
return fLocation;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfContext#setLocation(org.eclipse.linuxtools.tmf.core.trace.ITmfLocation)
- */
@Override
public void setLocation(final ITmfLocation location) {
fLocation = location;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfContext#getRank()
- */
@Override
public long getRank() {
return fRank;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfContext#setRank(long)
- */
@Override
public void setRank(final long rank) {
fRank = rank;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfContext#increaseRank()
- */
@Override
public void increaseRank() {
if (hasValidRank()) {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfContext#hasValidRank()
- */
@Override
public boolean hasValidRank() {
return fRank != UNKNOWN_RANK;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfContext#dispose()
- */
@Override
public void dispose() {
}
// Object
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
@SuppressWarnings("nls")
public String toString() {
// ITmfTrace - Initializers
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfTrace#initTrace(org.eclipse.core.resources.IResource, java.lang.String, java.lang.Class)
- */
@Override
public void initTrace(final IResource resource, final String path, final Class<? extends ITmfEvent> type) {
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#validate(org.eclipse.core.resources.IProject, java.lang.String)
- */
/**
* @since 2.0
*/
// ITmfTrace trace positioning
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- *
- * Returns a brand new context based on the location provided and
- * initializes the event queues
- *
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#seekEvent(org.eclipse.linuxtools.tmf.core.trace.ITmfLocation)
- */
@Override
public synchronized ITmfContext seekEvent(final ITmfLocation location) {
// Validate the location
// ITmfTrace - SeekEvent operations (returning a trace context)
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#seekEvent(double)
- */
@Override
public ITmfContext seekEvent(final double ratio) {
final ITmfContext context = seekEvent(Math.round(ratio * getNbEvents()));
return context;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getLocationRatio(org.eclipse.linuxtools.tmf.core.trace.ITmfLocation)
- */
@Override
public double getLocationRatio(final ITmfLocation location) {
if (location instanceof TmfExperimentLocation) {
return 0.0;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getCurrentLocation()
- */
@Override
public ITmfLocation getCurrentLocation() {
// never used
// ITmfTrace trace positioning
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfEventParser#parseEvent(org.eclipse.linuxtools.tmf.core.trace.ITmfContext)
- */
@Override
public synchronized ITmfEvent parseEvent(final ITmfContext context) {
final ITmfContext tmpContext = seekEvent(context.getLocation());
return event;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfTrace#getNext(org.eclipse.linuxtools.tmf.core.trace.ITmfContext)
- */
@Override
public synchronized ITmfEvent getNext(ITmfContext context) {
return event;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfTrace#getInitialRangeOffset()
- */
/**
* @since 2.0
*/
return initTs;
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
@SuppressWarnings("nls")
public synchronized String toString() {
thread.start();
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.trace.ITmfTrace#getStreamingInterval()
- */
@Override
public long getStreamingInterval() {
long interval = 0;
// Signal handlers
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.TmfTrace#traceOpened(org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal)
- */
@Override
@TmfSignalHandler
public void traceOpened(TmfTraceOpenedSignal signal) {
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
super(other.getLocationInfo());
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfLocation#getLocationInfo()
- */
@Override
public Long getLocationInfo() {
return (Long) super.getLocationInfo();
super(other.getLocationInfo());
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfLocation#getLocationInfo()
- */
@Override
public ITmfTimestamp getLocationInfo() {
return (ITmfTimestamp) super.getLocationInfo();
// ITmfTrace - Initializers
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#initTrace(org.eclipse.core.resources.IResource, java.lang.String, java.lang.Class)
- */
@Override
public void initTrace(final IResource resource, final String path, final Class<? extends ITmfEvent> type) throws TmfTraceException {
fIndexer = new TmfCheckpointIndexer(this, fCacheSize);
return new ITmfTrace[] { this };
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getEventType()
- */
@Override
public Class<ITmfEvent> getEventType() {
return (Class<ITmfEvent>) super.getType();
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getResource()
- */
@Override
public IResource getResource() {
return fResource;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getPath()
- */
@Override
public String getPath() {
return fPath;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getIndexPageSize()
- */
@Override
public int getCacheSize() {
return fCacheSize;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getStreamingInterval()
- */
@Override
public long getStreamingInterval() {
return fStreamingInterval;
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.uml2sd.ITmfSyncSequenceDiagramEvent#getSender()
- */
+
@Override
public String getSender() {
return fSender;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.uml2sd.ITmfSyncSequenceDiagramEvent#getReceiver()
- */
@Override
public String getReceiver() {
return fReceiver;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.uml2sd.ITmfSyncSequenceDiagramEvent#getName()
- */
@Override
public String getName() {
return fName;
fSdView.setFrame(testFrame);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPagingProvider#hasNextPage()
- */
@Override
public boolean hasNextPage() {
return page == 0;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPagingProvider#hasPrevPage()
- */
@Override
public boolean hasPrevPage() {
return page == 1;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPagingProvider#nextPage()
- */
@Override
public void nextPage() {
page = 1;
createSecondFrame();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPagingProvider#prevPage()
- */
@Override
public void prevPage() {
page = 0;
createFrame();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPagingProvider#firstPage()
- */
@Override
public void firstPage() {
page = 0;
createFrame();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPagingProvider#lastPage()
- */
@Override
public void lastPage() {
page = 1;
fSdView.setSDFindProvider(this);
createFrame();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDGraphNodeSupporter#isNodeSupported(int)
- */
+
@Override
public boolean isNodeSupported(int nodeType) {
switch (nodeType) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDGraphNodeSupporter#getNodeName(int, java.lang.String)
- */
@Override
public String getNodeName(int nodeType, String loaderClassName) {
switch (nodeType) {
return "";
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDFindProvider#find(org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.widgets.Criteria)
- */
@Override
public boolean find(Criteria criteria) {
Frame frame = fSdView.getFrame();
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDFindProvider#cancel()
- */
@Override
public void cancel() {
// reset find parameters
createFrame();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDFilterProvider#filter(java.util.List)
- */
@Override
public boolean filter(List<?> list) {
return false;
createFrame();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDExtendedActionBarProvider#supplementCoolbarContent(org.eclipse.ui.IActionBars)
- */
@Override
public void supplementCoolbarContent(IActionBars iactionbars) {
Action action = new Action("Refresh") {
createFrame();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
@Override
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
ISelection sel = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
super(test);
}
- /*
- * (non-Javadoc)
- * @see junit.extensions.TestSetup#setUp()
- */
@Override
protected void setUp() throws Exception {
Uml2SDTestFacility.getInstance().init();
}
- /*
- * (non-Javadoc)
- * @see junit.extensions.TestSetup#tearDown()
- */
@Override
protected void tearDown() throws Exception {
Uml2SDTestFacility.getInstance().dispose();
v.setFrame(testFrame);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.hyades.uml2sd.ui.actions.provider.ISDFindProvider#find(org.eclipse.hyades.uml2sd.ui.actions.widgets.Criteria)
- */
@Override
public boolean find(Criteria toSearch) {
Frame frame = v.getFrame();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.hyades.uml2sd.ui.actions.provider.ISDGraphNodeSupporter#isNodeSupported(int)
- */
@Override
public boolean isNodeSupported(int nodeType) {
switch (nodeType) {
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// Attributes
// ------------------------------------------------------------------------
- /**
- * The plug-in ID
- */
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.ui"; //$NON-NLS-1$
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.ui"; //$NON-NLS-1$
- /**
- * The shared instance
- */
- private static Activator plugin;
+ /**
+ * The shared instance
+ */
+ private static Activator plugin;
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
- /**
- * Constructor
- */
- public Activator() {
- }
+ /**
+ * Constructor
+ */
+ public Activator() {
+ }
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
- /**
- * Returns the TMF UI plug-in instance.
- *
- * @return the TMF UI plug-in instance.
- */
- public static Activator getDefault() {
- return plugin;
- }
+ /**
+ * Returns the TMF UI plug-in instance.
+ *
+ * @return the TMF UI plug-in instance.
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
// ------------------------------------------------------------------------
// AbstractUIPlugin
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- TmfUiTracer.init();
- TmfTraceElement.init();
- TmfTimePreferences.init();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- TmfUiTracer.stop();
- plugin = null;
- super.stop(context);
- }
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ TmfUiTracer.init();
+ TmfTraceElement.init();
+ TmfTimePreferences.init();
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ TmfUiTracer.stop();
+ plugin = null;
+ super.stop(context);
+ }
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /**
- * Gets an image object using given path within plug-in.
- *
- * @param path path to image file
- *
- * @return image object
- */
- public Image getImageFromPath(String path){
+ /**
+ * Gets an image object using given path within plug-in.
+ *
+ * @param path
+ * path to image file
+ *
+ * @return image object
+ */
+ public Image getImageFromPath(String path) {
return getImageDescripterFromPath(path).createImage();
}
/**
* Gets an image descriptor using given path within plug-in.
*
- * @param path path to image file
+ * @param path
+ * path to image file
*
* @return image descriptor object
*/
- public ImageDescriptor getImageDescripterFromPath(String path){
+ public ImageDescriptor getImageDescripterFromPath(String path) {
return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
}
/**
- * Gets a image object from the image registry based on the given path.
- * If the image is not in the registry it will be registered.
+ * Gets a image object from the image registry based on the given path. If
+ * the image is not in the registry it will be registered.
*
- * @param path to the image file
+ * @param path
+ * to the image file
* @return image object
*/
public Image getImageFromImageRegistry(String path) {
return icon;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
- */
@Override
protected void initializeImageRegistry(ImageRegistry reg) {
reg.put(ITmfImageConstants.IMG_UI_ZOOM, getImageFromPath(ITmfImageConstants.IMG_UI_ZOOM));
/**
* Logs a message with severity INFO in the runtime log of the plug-in.
*
- * @param message A message to log
+ * @param message
+ * A message to log
*/
public void logInfo(String message) {
getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
}
/**
- * Logs a message and exception with severity INFO in the runtime log of the plug-in.
+ * Logs a message and exception with severity INFO in the runtime log of the
+ * plug-in.
*
- * @param message A message to log
- * @param exception A exception to log
+ * @param message
+ * A message to log
+ * @param exception
+ * A exception to log
*/
public void logInfo(String message, Throwable exception) {
getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
}
/**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ * Logs a message and exception with severity WARNING in the runtime log of
+ * the plug-in.
*
- * @param message A message to log
+ * @param message
+ * A message to log
*/
public void logWarning(String message) {
getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
}
/**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ * Logs a message and exception with severity WARNING in the runtime log of
+ * the plug-in.
*
- * @param message A message to log
- * @param exception A exception to log
+ * @param message
+ * A message to log
+ * @param exception
+ * A exception to log
*/
public void logWarning(String message, Throwable exception) {
getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
}
/**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ * Logs a message and exception with severity ERROR in the runtime log of
+ * the plug-in.
*
- * @param message A message to log
+ * @param message
+ * A message to log
*/
public void logError(String message) {
getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
}
/**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ * Logs a message and exception with severity ERROR in the runtime log of
+ * the plug-in.
*
- * @param message A message to log
- * @param exception A exception to log
+ * @param message
+ * A message to log
+ * @param exception
+ * A exception to log
*/
public void logError(String message, Throwable exception) {
getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
setShellStyle(SWT.RESIZE | SWT.MAX | getShellStyle());
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
getShell().setText(Messages.ManageCustomParsersDialog_DialogHeader);
return composite;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.CLOSE_LABEL, false);
this.dialogMessage = dialogMessage;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.InputDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
return composite;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createContents(Composite parent) {
Control control = super.createContents(parent);
return control;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.InputDialog#getInputTextStyle()
- */
@Override
protected int getInputTextStyle() {
return SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.BORDER;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#isResizable()
- */
@Override
protected boolean isResizable() {
return true;
return fDefinition;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#validate(org.eclipse.core.resources.IProject, java.lang.String)
- */
@Override
public IStatus validate(IProject project, String path) {
if( fileExists(path)) {
super(location, rank);
}
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
return fDefinition;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#validate(org.eclipse.core.resources.IProject, java.lang.String)
- */
@Override
public IStatus validate(IProject project, String path) {
if (fileExists(path)) {
super(location, rank);
}
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
return super.hashCode();
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.DialogPage#dispose()
- */
@Override
public void dispose() {
if (fixedFont != null) {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
- */
@Override
public void setVisible(final boolean visible) {
if (visible) {
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.DialogPage#dispose()
- */
@Override
public void dispose() {
if (fixedFont != null) {
return getName(inputElement) + " : " + name; //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
- */
@Override
public void setVisible(boolean visible) {
if (visible) {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
- */
@Override
public void setVisible(final boolean visible) {
if (visible) {
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
- *
+ * Copyright (c) 2011, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Bernd Hufmann - Initial API and implementation
******************************************************************************/
import org.eclipse.ui.IWorkbenchPreferencePage;
/**
- * Top Level Preference Page for Tracing.
- *
+ * Top Level Preference Page for Tracing.
+ *
* @version 1.0
* @author Bernd Hufmann
*/
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
-
+
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
-
+
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
+
@Override
protected Control createContents(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
- // No content yet!
+ // No content yet!
return composite;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
@Override
public void init(IWorkbench workbench) {
// Nothing to do yet!
// Dialog
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
return composite;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
/*******************************************************************************
-* Copyright (c) 2012 Ericsson
+* Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
this.selectionProvider = selectionProvider;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#isEnabled()
- */
@Override
public boolean isEnabled() {
ISelection selection = selectionProvider.getSelection();
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
@Override
public void run() {
try {
public DropAdapterAssistant() {
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#isSupportedType(org.eclipse.swt.dnd.TransferData)
- */
@Override
public boolean isSupportedType(TransferData aTransferType) {
return super.isSupportedType(aTransferType) || FileTransfer.getInstance().isSupportedType(aTransferType);
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#validateDrop(java.lang.Object, int, org.eclipse.swt.dnd.TransferData)
- */
@Override
public IStatus validateDrop(Object target, int operation, TransferData transferType) {
if (target instanceof TmfTraceFolder) {
return Status.CANCEL_STATUS;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#handleDrop(org.eclipse.ui.navigator.CommonDropAdapter, org.eclipse.swt.dnd.DropTargetEvent, java.lang.Object)
- */
@Override
public IStatus handleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, Object aTarget) {
boolean ok = false;
/*******************************************************************************
-* Copyright (c) 2012 Ericsson
+* Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
this.selectionProvider = selectionProvider;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#isEnabled()
- */
@Override
public boolean isEnabled() {
ISelection selection = selectionProvider.getSelection();
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
@Override
public void run() {
try {
/*******************************************************************************
-* Copyright (c) 2012 Ericsson
+* Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
this.selectionProvider = selectionProvider;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#isEnabled()
- */
@Override
public boolean isEnabled() {
ISelection selection = selectionProvider.getSelection();
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
@Override
public void run() {
try {
public TmfActionProvider() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.CommonActionProvider#init(org.eclipse.ui.navigator.ICommonActionExtensionSite)
- */
@Override
public void init(ICommonActionExtensionSite aSite) {
ICommonViewerSite viewSite = aSite.getViewSite();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
- */
@Override
public void fillActionBars(IActionBars actionBars) {
if (openAction.isEnabled()) {
// IPropertyTester
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
@Override
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
*/
public class TmfEditorLinkHelper implements ILinkHelper {
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.ILinkHelper#findSelection(org.eclipse.ui.IEditorInput)
- */
@Override
public IStructuredSelection findSelection(IEditorInput anInput) {
IFile file = ResourceUtil.getFile(anInput);
return StructuredSelection.EMPTY;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.ILinkHelper#activateEditor(org.eclipse.ui.IWorkbenchPage, org.eclipse.jface.viewers.IStructuredSelection)
- */
@Override
public void activateEditor(IWorkbenchPage aPage, IStructuredSelection aSelection) {
if (aSelection == null || aSelection.isEmpty()) {
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
return fTrace;
}
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
return result;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
// ISelectionProvider
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
/**
* @since 2.0
*/
fSelectionChangedListeners.add(listener);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
- */
/**
* @since 2.0
*/
return fEventsTable.getSelection();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
/**
* @since 2.0
*/
fSelectionChangedListeners.remove(listener);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
- */
/**
* @since 2.0
*/
// ISelectionChangedListener
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
/**
* @since 2.0
*/
// IPartListener
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IPartListener#partActivated(org.eclipse.ui.IWorkbenchPart)
- */
/**
* @since 2.0
*/
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IPartListener#partBroughtToTop(org.eclipse.ui.IWorkbenchPart)
- */
/**
* @since 2.0
*/
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart)
- */
/**
* @since 2.0
*/
public void partClosed(IWorkbenchPart part) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IPartListener#partDeactivated(org.eclipse.ui.IWorkbenchPart)
- */
/**
* @since 2.0
*/
public void partDeactivated(IWorkbenchPart part) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IPartListener#partOpened(org.eclipse.ui.IWorkbenchPart)
- */
/**
* @since 2.0
*/
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
public class UnsortedPropertySheetPage extends PropertySheetPage {
- /* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.PropertySheetPage#createControl(org.eclipse.swt.widgets.Composite)
- */
@Override
public void createControl(Composite parent) {
super.createControl(parent);
// TmfProjectModelElement
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#getResource()
- */
@Override
public IFolder getResource() {
return (IFolder) fResource;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getProject()
- */
@Override
public TmfProjectElement getProject() {
return (TmfProjectElement) getParent().getParent();
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
+
/**
* Returns a list of TmfTraceElements contained in this experiment.
* @return a list of TmfTraceElements
// IPropertySource2
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
- */
@Override
public Object getEditableValue() {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
- */
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
return Arrays.copyOf(sfDescriptors, sfDescriptors.length);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
- */
@Override
public void resetPropertyValue(Object id) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
- */
@Override
public void setPropertyValue(Object id, Object value) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertyResettable(java.lang.Object)
- */
@Override
public boolean isPropertyResettable(Object id) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertySet(java.lang.Object)
- */
@Override
public boolean isPropertySet(Object id) {
return false;
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
+
/**
* The name of the experiment folder.
*/
// ------------------------------------------------------------------------
// TmfProjectModelElement
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#getResource()
- */
+
@Override
public IFolder getResource() {
return (IFolder) fResource;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getProject()
- */
@Override
public TmfProjectElement getProject() {
return (TmfProjectElement) getParent();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#refresh()
- */
@Override
public void refresh() {
TmfProjectElement project = (TmfProjectElement) getParent();
// ------------------------------------------------------------------------
// IPropertySource2
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
- */
+
@Override
public Object getEditableValue() {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
- */
+
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
return Arrays.copyOf(sfDescriptors, sfDescriptors.length);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
- */
+
@Override
public void resetPropertyValue(Object id) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
- */
+
@Override
public void setPropertyValue(Object id, Object value) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertyResettable(java.lang.Object)
- */
+
@Override
public boolean isPropertyResettable(Object id) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertySet(java.lang.Object)
- */
+
@Override
public boolean isPropertySet(Object id) {
return false;
}
}
-
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// ICommonContentProvider
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
- */
+
@Override
public Object[] getElements(Object inputElement) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
@Override
public Object getParent(Object element) {
if (element instanceof IProject) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
@Override
public boolean hasChildren(Object element) {
if (element instanceof IProject) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
@Override
public void dispose() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
- */
@Override
public void restoreState(IMemento aMemento) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
- */
@Override
public void saveState(IMemento aMemento) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.ICommonContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
- */
@Override
public void init(ICommonContentExtensionSite aConfig) {
}
// ------------------------------------------------------------------------
// ICommonContentProvider - getChildren()
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
+
@Override
public synchronized Object[] getChildren(Object parentElement) {
// ------------------------------------------------------------------------
// Helper method
// ------------------------------------------------------------------------
+
private Object[] getProjectChildren(IProject project) {
// The children structure
List<Object> children = new ArrayList<Object>();
// IPipelinedTreeContentProvider
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedChildren(java.lang.Object, java.util.Set)
- */
@Override
public void getPipelinedChildren(Object parent, Set currentChildren) {
customizeTmfElements(getChildren(parent), currentChildren);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedElements(java.lang.Object, java.util.Set)
- */
@Override
public void getPipelinedElements(Object input, Set currentElements) {
customizeTmfElements(getElements(input), currentElements);
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedParent(java.lang.Object, java.lang.Object)
- */
@Override
public Object getPipelinedParent(Object anObject, Object aSuggestedParent) {
return aSuggestedParent;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptAdd(org.eclipse.ui.navigator.PipelinedShapeModification)
- */
@Override
public PipelinedShapeModification interceptAdd(PipelinedShapeModification anAddModification) {
return anAddModification;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptRemove(org.eclipse.ui.navigator.PipelinedShapeModification)
- */
@Override
public PipelinedShapeModification interceptRemove(PipelinedShapeModification aRemoveModification) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptRefresh(org.eclipse.ui.navigator.PipelinedViewerUpdate)
- */
@Override
public boolean interceptRefresh(PipelinedViewerUpdate aRefreshSynchronization) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptUpdate(org.eclipse.ui.navigator.PipelinedViewerUpdate)
- */
@Override
public boolean interceptUpdate(PipelinedViewerUpdate anUpdateSynchronization) {
return false;
// ------------------------------------------------------------------------
// ICommonLabelProvider
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
- */
+
@Override
public Image getImage(Object element) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- */
@Override
public String getText(Object element) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
@Override
public void addListener(ILabelProviderListener listener) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
@Override
public void dispose() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
- */
@Override
public boolean isLabelProperty(Object element, String property) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
@Override
public void removeListener(ILabelProviderListener listener) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
- */
@Override
public void restoreState(IMemento aMemento) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
- */
@Override
public void saveState(IMemento aMemento) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.IDescriptionProvider#getDescription(java.lang.Object)
- */
@Override
public String getDescription(Object anElement) {
return getText(anElement);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.navigator.ICommonLabelProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
- */
@Override
public void init(ICommonContentExtensionSite aConfig) {
}
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// TmfProjectModelElement
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#getResource()
- */
@Override
public IProject getResource() {
return (IProject) fResource;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#addChild(org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement)
- */
@Override
public void addChild(ITmfProjectModelElement child) {
super.addChild(child);
// ------------------------------------------------------------------------
// Accessors
// ------------------------------------------------------------------------
+
/**
* Returns the containing trace folder element.
* @return the TMF trace folder element.
// TmfProjectElement
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#refresh()
- */
@Override
public void refresh() {
Display.getDefault().asyncExec(new Runnable(){
}});
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
@Override
public void resourceChanged(IResourceChangeEvent event) {
if (event.getType() == IResourceChangeEvent.POST_CHANGE) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getProject()
- */
@Override
public TmfProjectElement getProject() {
return this;
// ------------------------------------------------------------------------
// ITmfProjectModelElement
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getName()
- */
+
@Override
public String getName() {
return fName;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getResource()
- */
+
@Override
public IResource getResource() {
return fResource;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getPath()
- */
+
@Override
public IPath getPath() {
return fPath;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getLocation()
- */
+
@Override
public URI getLocation() {
return fLocation;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getParent()
- */
+
@Override
public ITmfProjectModelElement getParent() {
return fParent;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#hasChildren()
- */
+
@Override
public boolean hasChildren() {
return fChildren.size() > 0;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getChildren()
- */
+
@Override
public List<ITmfProjectModelElement> getChildren() {
return fChildren;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#addChild(org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement)
- */
+
@Override
public void addChild(ITmfProjectModelElement child) {
fChildren.add(child);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#removeChild(org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement)
- */
+
@Override
public void removeChild(ITmfProjectModelElement child) {
fChildren.remove(child);
}
refresh();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#refresh()
- */
+
@Override
public void refresh() {
// Do nothing by default: sub-classes override this on an "as-needed"
// ------------------------------------------------------------------------
// IResourceChangeListener
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
+
@Override
public void resourceChanged(IResourceChangeEvent event) {
// Do nothing by default: sub-classes override this on an "as-needed"
// ------------------------------------------------------------------------
// Object
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
+
@Override
public int hashCode() {
final int prime = 31;
result = prime * result + ((fPath == null) ? 0 : fPath.hashCode());
return result;
}
- /*
- * (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
+
@Override
public boolean equals(Object other) {
if (this == other) {
// ------------------------------------------------------------------------
// TmfTraceElement
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getProject()
- */
+
@Override
public TmfProjectElement getProject() {
if (getParent() instanceof TmfTraceFolder) {
// IPropertySource2
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
- */
@Override
public Object getEditableValue() {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
- */
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
return Arrays.copyOf(sfDescriptors, sfDescriptors.length);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
return "[no category]"; //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
- */
@Override
public void resetPropertyValue(Object id) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
- */
@Override
public void setPropertyValue(Object id, Object value) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertyResettable(java.lang.Object)
- */
@Override
public boolean isPropertyResettable(Object id) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertySet(java.lang.Object)
- */
@Override
public boolean isPropertySet(Object id) {
return false;
return new TmfTraceElement(string, res, folder);
}
-
}
// TmfProjectModelElement
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#getResource()
- */
@Override
public IFolder getResource() {
return (IFolder) fResource;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement#getProject()
- */
@Override
public TmfProjectElement getProject() {
return (TmfProjectElement) getParent();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement#refresh()
- */
@Override
public void refresh() {
TmfProjectElement project = (TmfProjectElement) getParent();
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
+
/**
* Returns a list of trace model elements under the traces folder.
* @return list of trace model elements
// IPropertySource2
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
- */
@Override
public Object getEditableValue() {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
- */
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
return Arrays.copyOf(sfDescriptors, sfDescriptors.length);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
- */
@Override
public void resetPropertyValue(Object id) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
- */
@Override
public void setPropertyValue(Object id, Object value) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertyResettable(java.lang.Object)
- */
@Override
public boolean isPropertyResettable(Object id) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource2#isPropertySet(java.lang.Object)
- */
@Override
public boolean isPropertySet(Object id) {
return false;
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
public class TraceFolderContentProvider implements IStructuredContentProvider {
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
@Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof TmfTraceFolder) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
@Override
public void dispose() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
public class TraceFolderLabelProvider extends LabelProvider implements ITableLabelProvider {
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
@Override
public Image getColumnImage(Object element, int columnIndex) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
@Override
public String getColumnText(Object element, int columnIndex) {
if (element instanceof TmfTraceElement) {
/**
* Implementation of the copy experiement dialog box.
* <p>
+ *
* @version 1.0
* @author Francois Chouinard
*/
// Members
// ------------------------------------------------------------------------
- private final TmfExperimentElement fExperiment;
- private Text fNewExperimentName;
+ private final TmfExperimentElement fExperiment;
+ private Text fNewExperimentName;
private IFolder fExperimentFolder;
private TmfProjectElement fProject;
/**
* Constructor
- * @param shell The parent shell
- * @param experiment The TMF experiment model element
+ *
+ * @param shell
+ * The parent shell
+ * @param experiment
+ * The TMF experiment model element
*/
public CopyExperimentDialog(Shell shell, TmfExperimentElement experiment) {
super(shell);
// Dialog
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
fNewExperimentName.addListener(SWT.Modify, new Listener() {
@Override
public void handleEvent(Event event) {
- validateNewExperimentName();
+ validateNewExperimentName();
}
});
}
private void validateNewExperimentName() {
- String name = fNewExperimentName.getText();
+ String name = fNewExperimentName.getText();
IWorkspace workspace = fExperimentFolder.getWorkspace();
IStatus nameStatus = workspace.validateName(name, IResource.FOLDER);
if ("".equals(name)) { //$NON-NLS-1$
- updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_EmptyNameError, null));
- return;
+ updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_EmptyNameError, null));
+ return;
}
if (!nameStatus.isOK()) {
- updateStatus(nameStatus);
- return;
+ updateStatus(nameStatus);
+ return;
}
IPath path = new Path(name);
// ------------------------------------------------------------------------
// SelectionStatusDialog
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
- */
+
@Override
protected void computeResult() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#create()
- */
@Override
public void create() {
super.create();
getButton(IDialogConstants.OK_ID).setEnabled(false);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#okPressed()
- */
@Override
protected void okPressed() {
IFolder folder = copyExperiment(fNewExperimentName.getText());
private IFolder copyExperiment(final String newName) {
- WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
+ WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
@Override
public void execute(IProgressMonitor monitor) throws CoreException {
try {
// ------------------------------------------------------------------------
// Dialog
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
+
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
// SelectionStatusDialog
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
- */
@Override
protected void computeResult() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#create()
- */
@Override
public void create() {
super.create();
getButton(IDialogConstants.OK_ID).setEnabled(false);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#okPressed()
- */
@Override
protected void okPressed() {
IResource trace = copyTrace(fNewTraceName.getText());
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// Wizard
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
- */
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
fWorkbench = workbench;
setNeedsProgressMonitor(true);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
@Override
public void addPages() {
super.addPages();
addPage(fTraceImportWizardPage);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
@Override
public boolean performFinish() {
return fTraceImportWizardPage.finish();
// ------------------------------------------------------------------------
// WizardResourceImportPage
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.dialogs.WizardResourceImportPage#createControl(org.eclipse
- * .swt.widgets.Composite)
- */
+
@Override
public void createControl(Composite parent) {
super.createControl(parent);
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.dialogs.WizardResourceImportPage#createSourceGroup(org
- * .eclipse.swt.widgets.Composite)
- */
@Override
protected void createSourceGroup(Composite parent) {
createDirectorySelectionGroup(parent);
validateSourceGroup();
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.dialogs.WizardResourceImportPage#createFileSelectionGroup
- * (org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createFileSelectionGroup(Composite parent) {
});
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.dialogs.WizardResourceImportPage#getFolderProvider()
- */
@Override
protected ITreeContentProvider getFolderProvider() {
return null;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.dialogs.WizardResourceImportPage#getFileProvider()
- */
@Override
protected ITreeContentProvider getFileProvider() {
return new WorkbenchContentProvider() {
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.dialogs.WizardResourceImportPage#getSelectedResources()
- */
@Override
protected List<FileSystemElement> getSelectedResources() {
List<FileSystemElement> resources = new ArrayList<FileSystemElement>();
// Browse for the source directory
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.dialogs.WizardResourceImportPage#handleEvent(org.eclipse
- * .swt.widgets.Event)
- */
@Override
public void handleEvent(Event event) {
if (event.widget == directoryBrowseButton) {
private Button overwriteExistingResourcesCheckbox;
private Button createLinksInWorkspaceButton;
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.dialogs.WizardDataTransferPage#createOptionsGroupButtons
- * (org.eclipse.swt.widgets.Group)
- */
@Override
protected void createOptionsGroupButtons(Group optionsGroup) {
// Determine if the finish button can be enabled
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.dialogs.WizardDataTransferPage#validateSourceGroup()
- */
@Override
public boolean validateSourceGroup() {
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/**
* Implementation of new experiment dialog that creates the experiment element.
* <p>
+ *
* @version 1.0
* @author Francois Chouinard
-
*/
public class NewExperimentDialog extends SelectionStatusDialog {
// ------------------------------------------------------------------------
/**
* Constructor
- * @param shell The parent shell
- * @param experimentFolder The parent experiment folder element
+ *
+ * @param shell
+ * The parent shell
+ * @param experimentFolder
+ * The parent experiment folder element
*/
public NewExperimentDialog(Shell shell, TmfExperimentFolder experimentFolder) {
super(shell);
// ------------------------------------------------------------------------
// Dialog
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
+
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
fExperimentName.addListener(SWT.Modify, new Listener() {
@Override
public void handleEvent(Event event) {
- validateNewExperimentName();
+ validateNewExperimentName();
}
});
}
private void validateNewExperimentName() {
- String name = fExperimentName.getText();
+ String name = fExperimentName.getText();
IWorkspace workspace = fExperimentFolder.getWorkspace();
IStatus nameStatus = workspace.validateName(name, IResource.FOLDER);
if ("".equals(name)) { //$NON-NLS-1$
- updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_EmptyNameError, null));
- return;
+ updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_EmptyNameError, null));
+ return;
}
if (!nameStatus.isOK()) {
- updateStatus(nameStatus);
- return;
+ updateStatus(nameStatus);
+ return;
}
IPath path = new Path(name);
// ------------------------------------------------------------------------
// SelectionStatusDialog
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
- */
+
@Override
protected void computeResult() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#create()
- */
@Override
public void create() {
super.create();
getButton(IDialogConstants.OK_ID).setEnabled(false);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#okPressed()
- */
@Override
protected void okPressed() {
IFolder folder = createNewExperiment(fExperimentName.getText());
private IFolder createNewExperiment(String experimentName) {
- final IFolder experimentFolder = createExperiment(experimentName);
+ final IFolder experimentFolder = createExperiment(experimentName);
WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
@Override
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// Wizard
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
@Override
public void addPages() {
fMainPage = new NewTmfProjectMainWizardPage(Messages.NewProjectWizard_DialogHeader);
addPage(fMainPage);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.Wizard#performCancel()
- */
@Override
public boolean performCancel() {
return true;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
@Override
public boolean performFinish() {
fProjectName = fMainPage.getProjectName();
// INewWizard
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
- */
@Override
public void init(IWorkbench iworkbench, IStructuredSelection istructuredselection) {
}
// IExecutableExtension
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
- */
@Override
public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
fConfigElement = config;
/**
* Implementation of a dialog box to rename an experiment.
* <p>
+ *
* @version 1.0
* @author Francois Chouinard
*/
// Members
// ------------------------------------------------------------------------
- private final TmfExperimentElement fExperiment;
- private Text fNewExperimentName;
+ private final TmfExperimentElement fExperiment;
+ private Text fNewExperimentName;
private final IContainer fExperimentFolder;
private final TmfProjectElement fProject;
/**
* Constructor
- * @param shell The parent shell
- * @param experiment The experiment element rename
+ *
+ * @param shell
+ * The parent shell
+ * @param experiment
+ * The experiment element rename
*/
public RenameExperimentDialog(Shell shell, TmfExperimentElement experiment) {
super(shell);
// ------------------------------------------------------------------------
// Dialog
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
+
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
fNewExperimentName.addListener(SWT.Modify, new Listener() {
@Override
public void handleEvent(Event event) {
- validateNewExperimentName();
+ validateNewExperimentName();
}
});
}
private void validateNewExperimentName() {
- String name = fNewExperimentName.getText();
+ String name = fNewExperimentName.getText();
IWorkspace workspace = fExperimentFolder.getWorkspace();
IStatus nameStatus = workspace.validateName(name, IResource.FOLDER);
if ("".equals(name)) { //$NON-NLS-1$
- updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_EmptyNameError, null));
- return;
+ updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_EmptyNameError, null));
+ return;
}
if (!nameStatus.isOK()) {
- updateStatus(nameStatus);
- return;
+ updateStatus(nameStatus);
+ return;
}
IPath path = new Path(name);
// ------------------------------------------------------------------------
// SelectionStatusDialog
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
- */
+
@Override
protected void computeResult() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#create()
- */
@Override
public void create() {
super.create();
getButton(IDialogConstants.OK_ID).setEnabled(false);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#okPressed()
- */
@Override
protected void okPressed() {
IFolder folder = renameExperiment(fNewExperimentName.getText());
private IFolder renameExperiment(final String newName) {
- IPath oldPath = fExperiment.getResource().getFullPath();
- final IPath newPath = oldPath.append("../" + newName); //$NON-NLS-1$
+ IPath oldPath = fExperiment.getResource().getFullPath();
+ final IPath newPath = oldPath.append("../" + newName); //$NON-NLS-1$
- WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
+ WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
@Override
public void execute(IProgressMonitor monitor) throws CoreException {
try {
}
fExperiment.renameSupplementaryFolder(newName);
- fExperiment.getResource().move(newPath, IResource.FORCE | IResource.SHALLOW, null);
+ fExperiment.getResource().move(newPath, IResource.FORCE | IResource.SHALLOW, null);
if (monitor.isCanceled()) {
throw new OperationCanceledException();
}
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Dialog
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
+
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
// ------------------------------------------------------------------------
// SelectionStatusDialog
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
- */
+
@Override
protected void computeResult() {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#create()
- */
+
@Override
public void create() {
super.create();
getButton(IDialogConstants.OK_ID).setEnabled(false);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionStatusDialog#okPressed()
- */
+
@Override
protected void okPressed() {
IResource trace = renameTrace(fNewTraceNameText.getText());
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
+
/**
* Constructor
* @param project The project model element
// Wizard
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
- */
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
setWindowTitle(Messages.SelectTracesWizard_WindowTitle);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
@Override
public void addPages() {
super.addPages();
addPage(fSelectTraceWizardPage);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
@Override
public boolean performFinish() {
return fSelectTraceWizardPage.performFinish();
/*******************************************************************************
- * Copyright (c) 2009, 2012, 2013 Ericsson, École Polytechnique de Montréal
+ * Copyright (c) 2009, 2013 Ericsson, École Polytechnique de Montréal
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Dialog
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
+
@Override
public void createControl(Composite parent) {
Composite container = new Composite(parent, SWT.NULL);
// IWorkbenchPreferencePage
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
@Override
public void init(IWorkbench workbench) {
}
// PreferencePage
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createContents(Composite parent) {
return fPage;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
@Override
protected void performDefaults() {
fDateTimeFields.loadDefault();
displayExample();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performApply()
- */
@Override
protected void performApply() {
fDateTimeFields.store();
displayExample();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performOk()
- */
@Override
public boolean performOk() {
performApply();
// SelectionListener
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent e) {
}
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetDefaultSelected(SelectionEvent e) {
}
// IPropertyChangeListener
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
@Override
public void propertyChange(PropertyChangeEvent event) {
Object source = event.getSource();
// ISelectionProvider
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
/**
* @since 2.0
*/
selectionChangedListeners.add(listener);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
- */
/**
* @since 2.0
*/
return new StructuredSelection(list);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
/**
* @since 2.0
*/
selectionChangedListeners.remove(listener);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
- */
/**
* @since 2.0
*/
// Listeners
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.linuxtools.tmf.ui.views.colors.IColorSettingsListener#colorSettingsChanged(org.eclipse.linuxtools.tmf.ui.views.colors.ColorSetting[])
- */
@Override
public void colorSettingsChanged(final ColorSetting[] colorSettings) {
fTable.refresh();
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
initInput();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.linuxtools.tmf.core.component.TmfComponent#dispose()
- */
@Override
public void dispose() {
super.dispose();
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
fPercentageProvider = p;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.ITmfStatisticsColumnData#getHeader()
- */
@Override
public String getHeader() {
return fHeader;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.ITmfStatisticsColumnData#getWidth()
- */
@Override
public int getWidth() {
return fWidth;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.ITmfStatisticsColumnData#getAlignment()
- */
@Override
public int getAlignment() {
return fAlignment;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.ITmfStatisticsColumnData#getTooltip()
- */
@Override
public String getTooltip() {
return fTooltip;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.ITmfStatisticsColumnData#getLabelProvider()
- */
@Override
public ColumnLabelProvider getLabelProvider() {
return fLabelProvider;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.ITmfStatisticsColumnData#getComparator()
- */
@Override
public ViewerComparator getComparator() {
return fComparator;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.ITmfStatisticsColumnData#getPercentageProvider()
- */
@Override
public ITmfColumnPercentageProvider getPercentageProvider() {
return fPercentageProvider;
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
public class TmfTreeContentProvider implements ITreeContentProvider {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
@Override
public Object[] getChildren(Object parentElement) {
return ((TmfStatisticsTreeNode) parentElement).getChildren().toArray();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
@Override
public Object getParent(Object element) {
return ((TmfStatisticsTreeNode) element).getParent();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
@Override
public boolean hasChildren(Object element) {
return ((TmfStatisticsTreeNode) element).hasChildren();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
@Override
public Object[] getElements(Object inputElement) {
return getChildren(inputElement);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
@Override
public void dispose() {
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
- *
+ * Copyright (c) 2010, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Patrick Tasse - Initial API and implementation
* Bernd Hufmann - Updated to use RGB for the tick color
/**
* Class for saving and loading of color settings to/from file.
- *
+ *
* @version 1.0
* @author Patrick Tasse
*
public class ColorSettingsXML {
// XML Tags and attributes
- private static final String COLOR_SETTINGS_TAG = "COLOR_SETTINGS"; //$NON-NLS-1$
- private static final String COLOR_SETTING_TAG = "COLOR_SETTING"; //$NON-NLS-1$
- private static final String FG_TAG = "FG"; //$NON-NLS-1$
- private static final String BG_TAG = "BG"; //$NON-NLS-1$
- private static final String R_ATTR = "R"; //$NON-NLS-1$
- private static final String G_ATTR = "G"; //$NON-NLS-1$
- private static final String B_ATTR = "B"; //$NON-NLS-1$
- private static final String TICK_TAG = "TICK"; //$NON-NLS-1$
- private static final String FILTER_TAG = "FILTER"; //$NON-NLS-1$
-
- /**
- * Saves the given color settings to file.
- *
- * @param pathName A file name with path
- * @param colorSettings -An array of color settings to save.
- */
- public static void save(String pathName, ColorSetting[] colorSettings) {
- try {
- DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
- Document document = documentBuilder.newDocument();
-
- Element rootElement = document.createElement(COLOR_SETTINGS_TAG);
- document.appendChild(rootElement);
-
- for (ColorSetting colorSetting : colorSettings) {
- Element colorSettingElement = document.createElement(COLOR_SETTING_TAG);
- rootElement.appendChild(colorSettingElement);
-
- Element fgElement = document.createElement(FG_TAG);
- colorSettingElement.appendChild(fgElement);
- RGB foreground = colorSetting.getForegroundRGB();
- fgElement.setAttribute(R_ATTR, Integer.toString(foreground.red));
- fgElement.setAttribute(G_ATTR, Integer.toString(foreground.green));
- fgElement.setAttribute(B_ATTR, Integer.toString(foreground.blue));
-
- Element bgElement = document.createElement(BG_TAG);
- colorSettingElement.appendChild(bgElement);
- RGB background = colorSetting.getBackgroundRGB();
- bgElement.setAttribute(R_ATTR, Integer.toString(background.red));
- bgElement.setAttribute(G_ATTR, Integer.toString(background.green));
- bgElement.setAttribute(B_ATTR, Integer.toString(background.blue));
-
- Element tickColorElement = document.createElement(TICK_TAG);
- colorSettingElement.appendChild(tickColorElement);
+ private static final String COLOR_SETTINGS_TAG = "COLOR_SETTINGS"; //$NON-NLS-1$
+ private static final String COLOR_SETTING_TAG = "COLOR_SETTING"; //$NON-NLS-1$
+ private static final String FG_TAG = "FG"; //$NON-NLS-1$
+ private static final String BG_TAG = "BG"; //$NON-NLS-1$
+ private static final String R_ATTR = "R"; //$NON-NLS-1$
+ private static final String G_ATTR = "G"; //$NON-NLS-1$
+ private static final String B_ATTR = "B"; //$NON-NLS-1$
+ private static final String TICK_TAG = "TICK"; //$NON-NLS-1$
+ private static final String FILTER_TAG = "FILTER"; //$NON-NLS-1$
+
+ /**
+ * Saves the given color settings to file.
+ *
+ * @param pathName
+ * A file name with path
+ * @param colorSettings
+ * -An array of color settings to save.
+ */
+ public static void save(String pathName, ColorSetting[] colorSettings) {
+ try {
+ DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
+ Document document = documentBuilder.newDocument();
+
+ Element rootElement = document.createElement(COLOR_SETTINGS_TAG);
+ document.appendChild(rootElement);
+
+ for (ColorSetting colorSetting : colorSettings) {
+ Element colorSettingElement = document.createElement(COLOR_SETTING_TAG);
+ rootElement.appendChild(colorSettingElement);
+
+ Element fgElement = document.createElement(FG_TAG);
+ colorSettingElement.appendChild(fgElement);
+ RGB foreground = colorSetting.getForegroundRGB();
+ fgElement.setAttribute(R_ATTR, Integer.toString(foreground.red));
+ fgElement.setAttribute(G_ATTR, Integer.toString(foreground.green));
+ fgElement.setAttribute(B_ATTR, Integer.toString(foreground.blue));
+
+ Element bgElement = document.createElement(BG_TAG);
+ colorSettingElement.appendChild(bgElement);
+ RGB background = colorSetting.getBackgroundRGB();
+ bgElement.setAttribute(R_ATTR, Integer.toString(background.red));
+ bgElement.setAttribute(G_ATTR, Integer.toString(background.green));
+ bgElement.setAttribute(B_ATTR, Integer.toString(background.blue));
+
+ Element tickColorElement = document.createElement(TICK_TAG);
+ colorSettingElement.appendChild(tickColorElement);
RGB tickColor = colorSetting.getTickColorRGB();
tickColorElement.setAttribute(R_ATTR, Integer.toString(tickColor.red));
tickColorElement.setAttribute(G_ATTR, Integer.toString(tickColor.green));
tickColorElement.setAttribute(B_ATTR, Integer.toString(tickColor.blue));
- if (colorSetting.getFilter() != null) {
- Element filterElement = document.createElement(FILTER_TAG);
- colorSettingElement.appendChild(filterElement);
- TmfFilterXMLWriter.buildXMLTree(document, colorSetting.getFilter(), filterElement);
- }
- }
-
- TransformerFactory transformerFactory = TransformerFactory.newInstance();
-
- Transformer transformer = transformerFactory.newTransformer();
- DOMSource source = new DOMSource(document);
- StreamResult result = new StreamResult(new File(pathName));
- transformer.transform(source, result);
- } catch (ParserConfigurationException e) {
- Activator.getDefault().logError("Error saving color xml file: " + pathName, e); //$NON-NLS-1$
- } catch (TransformerConfigurationException e) {
- Activator.getDefault().logError("Error saving color xml file: " + pathName, e); //$NON-NLS-1$
- } catch (TransformerException e) {
- Activator.getDefault().logError("Error saving color xml file: " + pathName, e); //$NON-NLS-1$
- }
- }
-
- /**
- * Loads color settings from file and returns it in an array.
- *
- * @param pathName A file name with path
- *
- * @return the color settings array loaded from file
- */
- public static ColorSetting[] load(String pathName) {
- if (! new File(pathName).canRead()) {
- return new ColorSetting[0];
- }
- SAXParserFactory parserFactory = SAXParserFactory.newInstance();
- parserFactory.setNamespaceAware(true);
+ if (colorSetting.getFilter() != null) {
+ Element filterElement = document.createElement(FILTER_TAG);
+ colorSettingElement.appendChild(filterElement);
+ TmfFilterXMLWriter.buildXMLTree(document, colorSetting.getFilter(), filterElement);
+ }
+ }
+
+ TransformerFactory transformerFactory = TransformerFactory.newInstance();
+
+ Transformer transformer = transformerFactory.newTransformer();
+ DOMSource source = new DOMSource(document);
+ StreamResult result = new StreamResult(new File(pathName));
+ transformer.transform(source, result);
+ } catch (ParserConfigurationException e) {
+ Activator.getDefault().logError("Error saving color xml file: " + pathName, e); //$NON-NLS-1$
+ } catch (TransformerConfigurationException e) {
+ Activator.getDefault().logError("Error saving color xml file: " + pathName, e); //$NON-NLS-1$
+ } catch (TransformerException e) {
+ Activator.getDefault().logError("Error saving color xml file: " + pathName, e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Loads color settings from file and returns it in an array.
+ *
+ * @param pathName
+ * A file name with path
+ *
+ * @return the color settings array loaded from file
+ */
+ public static ColorSetting[] load(String pathName) {
+ if (!new File(pathName).canRead()) {
+ return new ColorSetting[0];
+ }
+ SAXParserFactory parserFactory = SAXParserFactory.newInstance();
+ parserFactory.setNamespaceAware(true);
ColorSettingsContentHandler handler = new ColorSettingsContentHandler();
- try {
- XMLReader saxReader = parserFactory.newSAXParser().getXMLReader();
- saxReader.setContentHandler(handler);
- saxReader.parse(pathName);
- return handler.colorSettings.toArray(new ColorSetting[0]);
- } catch (ParserConfigurationException e) {
- Activator.getDefault().logError("Error loading color xml file: " + pathName, e); //$NON-NLS-1$
- } catch (SAXException e) {
- Activator.getDefault().logError("Error loading color xml file: " + pathName, e); //$NON-NLS-1$
- } catch (IOException e) {
- Activator.getDefault().logError("Error loading color xml file: " + pathName, e); //$NON-NLS-1$
- }
- // In case of error, dispose the partial list of color settings
- for (ColorSetting colorSetting : handler.colorSettings) {
- colorSetting.dispose();
- }
- return new ColorSetting[0];
- }
-
- // Helper class
- private static class ColorSettingsContentHandler extends DefaultHandler {
-
- private List<ColorSetting> colorSettings = new ArrayList<ColorSetting>(0);
- private RGB fg = new RGB(0, 0, 0);
- private RGB bg = new RGB(255, 255, 255);
- private RGB tickColor = new RGB(0, 0, 0);
- private ITmfFilterTreeNode filter;
- private TmfFilterContentHandler filterContentHandler;
-
- /* (non-Javadoc)
- * @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
- */
- @Override
- public void startElement(String uri, String localName, String qName, Attributes attributes)
- throws SAXException {
- if (localName.equals(COLOR_SETTINGS_TAG)) {
- colorSettings = new ArrayList<ColorSetting>();
- } else if (localName.equals(COLOR_SETTING_TAG)) {
- fg = null;
- bg = null;
- filter = null;
- } else if (localName.equals(FG_TAG)) {
- int r = Integer.valueOf(attributes.getValue(R_ATTR));
- int g = Integer.valueOf(attributes.getValue(G_ATTR));
- int b = Integer.valueOf(attributes.getValue(B_ATTR));
- fg = new RGB(r, g, b);
- } else if (localName.equals(BG_TAG)) {
- int r = Integer.valueOf(attributes.getValue(R_ATTR));
- int g = Integer.valueOf(attributes.getValue(G_ATTR));
- int b = Integer.valueOf(attributes.getValue(B_ATTR));
- bg = new RGB(r, g, b);
+ try {
+ XMLReader saxReader = parserFactory.newSAXParser().getXMLReader();
+ saxReader.setContentHandler(handler);
+ saxReader.parse(pathName);
+ return handler.colorSettings.toArray(new ColorSetting[0]);
+ } catch (ParserConfigurationException e) {
+ Activator.getDefault().logError("Error loading color xml file: " + pathName, e); //$NON-NLS-1$
+ } catch (SAXException e) {
+ Activator.getDefault().logError("Error loading color xml file: " + pathName, e); //$NON-NLS-1$
+ } catch (IOException e) {
+ Activator.getDefault().logError("Error loading color xml file: " + pathName, e); //$NON-NLS-1$
+ }
+ // In case of error, dispose the partial list of color settings
+ for (ColorSetting colorSetting : handler.colorSettings) {
+ colorSetting.dispose();
+ }
+ return new ColorSetting[0];
+ }
+
+ // Helper class
+ private static class ColorSettingsContentHandler extends DefaultHandler {
+
+ private List<ColorSetting> colorSettings = new ArrayList<ColorSetting>(0);
+ private RGB fg = new RGB(0, 0, 0);
+ private RGB bg = new RGB(255, 255, 255);
+ private RGB tickColor = new RGB(0, 0, 0);
+ private ITmfFilterTreeNode filter;
+ private TmfFilterContentHandler filterContentHandler;
+
+ @Override
+ public void startElement(String uri, String localName, String qName, Attributes attributes)
+ throws SAXException {
+ if (localName.equals(COLOR_SETTINGS_TAG)) {
+ colorSettings = new ArrayList<ColorSetting>();
+ } else if (localName.equals(COLOR_SETTING_TAG)) {
+ fg = null;
+ bg = null;
+ filter = null;
+ } else if (localName.equals(FG_TAG)) {
+ int r = Integer.valueOf(attributes.getValue(R_ATTR));
+ int g = Integer.valueOf(attributes.getValue(G_ATTR));
+ int b = Integer.valueOf(attributes.getValue(B_ATTR));
+ fg = new RGB(r, g, b);
+ } else if (localName.equals(BG_TAG)) {
+ int r = Integer.valueOf(attributes.getValue(R_ATTR));
+ int g = Integer.valueOf(attributes.getValue(G_ATTR));
+ int b = Integer.valueOf(attributes.getValue(B_ATTR));
+ bg = new RGB(r, g, b);
} else if (localName.equals(TICK_TAG)) {
int r = Integer.valueOf(attributes.getValue(R_ATTR));
int g = Integer.valueOf(attributes.getValue(G_ATTR));
int b = Integer.valueOf(attributes.getValue(B_ATTR));
tickColor = new RGB(r, g, b);
- } else if (localName.equals(FILTER_TAG)) {
- filterContentHandler = new TmfFilterContentHandler();
- } else if (filterContentHandler != null) {
- filterContentHandler.startElement(uri, localName, qName, attributes);
- }
- }
-
- /* (non-Javadoc)
- * @see org.xml.sax.helpers.DefaultHandler#endElement(java.lang.String, java.lang.String, java.lang.String)
- */
- @Override
- public void endElement(String uri, String localName, String qName)
- throws SAXException {
- if (localName.equals(COLOR_SETTINGS_TAG)) {
- // Nothing to do
- } else if (localName.equals(COLOR_SETTING_TAG)) {
- ColorSetting colorSetting = new ColorSetting(fg, bg, tickColor, filter);
- colorSettings.add(colorSetting);
- } else if (localName.equals(FILTER_TAG)) {
- filter = filterContentHandler.getTree();
- filterContentHandler = null;
- } else if (filterContentHandler != null) {
- filterContentHandler.endElement(uri, localName, qName);
- }
- }
-
- }
+ } else if (localName.equals(FILTER_TAG)) {
+ filterContentHandler = new TmfFilterContentHandler();
+ } else if (filterContentHandler != null) {
+ filterContentHandler.startElement(uri, localName, qName, attributes);
+ }
+ }
+
+ @Override
+ public void endElement(String uri, String localName, String qName)
+ throws SAXException {
+ if (localName.equals(COLOR_SETTINGS_TAG)) {
+ // Nothing to do
+ } else if (localName.equals(COLOR_SETTING_TAG)) {
+ ColorSetting colorSetting = new ColorSetting(fg, bg, tickColor, filter);
+ colorSettings.add(colorSetting);
+ } else if (localName.equals(FILTER_TAG)) {
+ filter = filterContentHandler.getTree();
+ filterContentHandler = null;
+ } else if (filterContentHandler != null) {
+ filterContentHandler.endElement(uri, localName, qName);
+ }
+ }
+
+ }
}
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
super("Colors"); //$NON-NLS-1$
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(Composite)
- */
@Override
public void createPartControl(Composite parent) {
fShell = parent.getShell();
fillToolBar();
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
- */
@Override
public void setFocus() {
fScrolledComposite.setFocus();
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
}
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
- */
@Override
public void setFocus() {
fTree.setFocus();
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
public class FilterDialog extends Dialog {
- TmfFilterNode fRoot;
- FilterViewer fViewer;
+ TmfFilterNode fRoot;
+ FilterViewer fViewer;
/**
* Constructor.
* @param shell
* The shell to which this dialog is attached
*/
- public FilterDialog(Shell shell) {
- super(shell);
- setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX);
- }
+ public FilterDialog(Shell shell) {
+ super(shell);
+ setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX);
+ }
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createDialogArea(Composite parent) {
+ @Override
+ protected Control createDialogArea(Composite parent) {
getShell().setText(Messages.FilterDialog_FilterDialogTitle);
- getShell().setMinimumSize(getShell().computeSize(500, 200));
+ getShell().setMinimumSize(getShell().computeSize(500, 200));
Composite composite = (Composite) super.createDialogArea(parent);
fViewer = new FilterViewer(composite, SWT.BORDER);
fViewer.setInput(fRoot);
return composite;
- }
+ }
- /**
- * @param filter the filter to set
- */
- public void setFilter(ITmfFilterTreeNode filter) {
- fRoot = new TmfFilterNode(null);
- if (filter != null) {
- fRoot.addChild(filter.clone());
- }
- if (fViewer != null) {
- fViewer.setInput(fRoot);
- }
- }
+ /**
+ * @param filter
+ * the filter to set
+ */
+ public void setFilter(ITmfFilterTreeNode filter) {
+ fRoot = new TmfFilterNode(null);
+ if (filter != null) {
+ fRoot.addChild(filter.clone());
+ }
+ if (fViewer != null) {
+ fViewer.setInput(fRoot);
+ }
+ }
- /**
- * @return the filter
- */
- public ITmfFilterTreeNode getFilter() {
- if (fRoot != null && fRoot.hasChildren()) {
- return fRoot.getChild(0).clone();
- }
- return null;
- }
+ /**
+ * @return the filter
+ */
+ public ITmfFilterTreeNode getFilter() {
+ if (fRoot != null && fRoot.hasChildren()) {
+ return fRoot.getChild(0).clone();
+ }
+ return null;
+ }
}
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
public class FilterTreeContentProvider implements ITreeContentProvider {
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- @Override
+ @Override
public void dispose() {
- // TODO Auto-generated method stub
- }
+ // TODO Auto-generated method stub
+ }
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- @Override
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- // TODO Auto-generated method stub
- }
+ // TODO Auto-generated method stub
+ }
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
- */
- @Override
+ @Override
public Object[] getElements(Object inputElement) {
- if (inputElement instanceof ITmfFilterTreeNode) {
- ArrayList<ITmfFilterTreeNode> result = new ArrayList<ITmfFilterTreeNode>();
- for(int i = 0; i < ((ITmfFilterTreeNode)inputElement).getChildrenCount(); i++) {
- result.add(((ITmfFilterTreeNode)inputElement).getChild(i));
- }
+ if (inputElement instanceof ITmfFilterTreeNode) {
+ ArrayList<ITmfFilterTreeNode> result = new ArrayList<ITmfFilterTreeNode>();
+ for (int i = 0; i < ((ITmfFilterTreeNode) inputElement).getChildrenCount(); i++) {
+ result.add(((ITmfFilterTreeNode) inputElement).getChild(i));
+ }
- return result.toArray();
- }
+ return result.toArray();
+ }
return null;
- }
+ }
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
- @Override
+ @Override
public Object[] getChildren(Object parentElement) {
- ArrayList<ITmfFilterTreeNode> result = new ArrayList<ITmfFilterTreeNode>();
- for(int i = 0; i < ((ITmfFilterTreeNode)parentElement).getChildrenCount(); i++) {
- result.add(((ITmfFilterTreeNode)parentElement).getChild(i));
- }
- return result.toArray();
- }
+ ArrayList<ITmfFilterTreeNode> result = new ArrayList<ITmfFilterTreeNode>();
+ for (int i = 0; i < ((ITmfFilterTreeNode) parentElement).getChildrenCount(); i++) {
+ result.add(((ITmfFilterTreeNode) parentElement).getChild(i));
+ }
+ return result.toArray();
+ }
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
- @Override
+ @Override
public Object getParent(Object element) {
- return ((ITmfFilterTreeNode) element).getParent();
- }
+ return ((ITmfFilterTreeNode) element).getParent();
+ }
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
- @Override
+ @Override
public boolean hasChildren(Object element) {
- return ((ITmfFilterTreeNode) element).hasChildren();
- }
+ return ((ITmfFilterTreeNode) element).hasChildren();
+ }
}
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*/
public class FilterTreeLabelProvider implements ILabelProvider {
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- @Override
+ @Override
public void addListener(ILabelProviderListener listener) {
- // TODO Auto-generated method stub
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- @Override
+ // TODO Auto-generated method stub
+ }
+
+ @Override
public void dispose() {
- // TODO Auto-generated method stub
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
- */
- @Override
+ // TODO Auto-generated method stub
+ }
+
+ @Override
public boolean isLabelProperty(Object element, String property) {
- // TODO Auto-generated method stub
- return false;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- @Override
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
public void removeListener(ILabelProviderListener listener) {
- // TODO Auto-generated method stub
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
- */
- @Override
+ // TODO Auto-generated method stub
+ }
+
+ @Override
public Image getImage(Object element) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- */
- @Override
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
public String getText(Object element) {
- String label = null;
+ String label = null;
- if (element instanceof TmfFilterNode) {
+ if (element instanceof TmfFilterNode) {
- TmfFilterNode node = (TmfFilterNode) element;
- label = node.getNodeName() + " " + node.getFilterName(); //$NON-NLS-1$
+ TmfFilterNode node = (TmfFilterNode) element;
+ label = node.getNodeName() + " " + node.getFilterName(); //$NON-NLS-1$
- } else if (element instanceof TmfFilterEventTypeNode) {
+ } else if (element instanceof TmfFilterEventTypeNode) {
- TmfFilterEventTypeNode node = (TmfFilterEventTypeNode) element;
- label = "WITH " + node.getNodeName() + (node.getName() != null ? " " + node.getName() : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TmfFilterEventTypeNode node = (TmfFilterEventTypeNode) element;
+ label = "WITH " + node.getNodeName() + (node.getName() != null ? " " + node.getName() : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- } else if (element instanceof TmfFilterAndNode) {
+ } else if (element instanceof TmfFilterAndNode) {
- TmfFilterAndNode node = (TmfFilterAndNode) element;
- label = (node.isNot() ? "NOT " : "") + node.getNodeName(); //$NON-NLS-1$ //$NON-NLS-2$
+ TmfFilterAndNode node = (TmfFilterAndNode) element;
+ label = (node.isNot() ? "NOT " : "") + node.getNodeName(); //$NON-NLS-1$ //$NON-NLS-2$
- } else if (element instanceof TmfFilterOrNode) {
+ } else if (element instanceof TmfFilterOrNode) {
- TmfFilterOrNode node = (TmfFilterOrNode) element;
- label = (node.isNot() ? "NOT " : "") + node.getNodeName(); //$NON-NLS-1$ //$NON-NLS-2$
+ TmfFilterOrNode node = (TmfFilterOrNode) element;
+ label = (node.isNot() ? "NOT " : "") + node.getNodeName(); //$NON-NLS-1$ //$NON-NLS-2$
- } else if (element instanceof TmfFilterContainsNode) {
+ } else if (element instanceof TmfFilterContainsNode) {
- TmfFilterContainsNode node = (TmfFilterContainsNode) element;
- label = (node.isNot() ? "NOT " : "") + //$NON-NLS-1$ //$NON-NLS-2$
- (node.getField() != null ? node.getField() + " " : "") + //$NON-NLS-1$ //$NON-NLS-2$
- node.getNodeName() +
- (node.getValue() != null && node.getValue().length() > 0 ? " \"" + node.getValue() + "\"" : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TmfFilterContainsNode node = (TmfFilterContainsNode) element;
+ label = (node.isNot() ? "NOT " : "") + //$NON-NLS-1$ //$NON-NLS-2$
+ (node.getField() != null ? node.getField() + " " : "") + //$NON-NLS-1$ //$NON-NLS-2$
+ node.getNodeName() +
+ (node.getValue() != null && node.getValue().length() > 0 ? " \"" + node.getValue() + "\"" : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- } else if (element instanceof TmfFilterEqualsNode) {
+ } else if (element instanceof TmfFilterEqualsNode) {
- TmfFilterEqualsNode node = (TmfFilterEqualsNode) element;
- label = (node.isNot() ? "NOT " : "") + //$NON-NLS-1$ //$NON-NLS-2$
- (node.getField() != null ? node.getField() + " " : "") + //$NON-NLS-1$ //$NON-NLS-2$
- node.getNodeName() +
- (node.getValue() != null && node.getValue().length() > 0 ? " \"" + node.getValue() + "\"" : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TmfFilterEqualsNode node = (TmfFilterEqualsNode) element;
+ label = (node.isNot() ? "NOT " : "") + //$NON-NLS-1$ //$NON-NLS-2$
+ (node.getField() != null ? node.getField() + " " : "") + //$NON-NLS-1$ //$NON-NLS-2$
+ node.getNodeName() +
+ (node.getValue() != null && node.getValue().length() > 0 ? " \"" + node.getValue() + "\"" : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- } else if (element instanceof TmfFilterMatchesNode) {
+ } else if (element instanceof TmfFilterMatchesNode) {
- TmfFilterMatchesNode node = (TmfFilterMatchesNode) element;
- label = (node.isNot() ? "NOT " : "") + //$NON-NLS-1$ //$NON-NLS-2$
- (node.getField() != null ? node.getField() + " " : "") + //$NON-NLS-1$ //$NON-NLS-2$
- node.getNodeName() +
- (node.getRegex() != null && node.getRegex().length() > 0 ? " \"" + node.getRegex() + "\"" : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TmfFilterMatchesNode node = (TmfFilterMatchesNode) element;
+ label = (node.isNot() ? "NOT " : "") + //$NON-NLS-1$ //$NON-NLS-2$
+ (node.getField() != null ? node.getField() + " " : "") + //$NON-NLS-1$ //$NON-NLS-2$
+ node.getNodeName() +
+ (node.getRegex() != null && node.getRegex().length() > 0 ? " \"" + node.getRegex() + "\"" : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- } else if (element instanceof TmfFilterCompareNode) {
+ } else if (element instanceof TmfFilterCompareNode) {
- TmfFilterCompareNode node = (TmfFilterCompareNode) element;
- label = (node.isNot() ? "NOT " : "") + //$NON-NLS-1$ //$NON-NLS-2$
- (node.getField() != null ? node.getField() + " " : "") + //$NON-NLS-1$ //$NON-NLS-2$
- (node.getResult() < 0 ? "<" : (node.getResult() > 0 ? ">" : "=")) + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- (node.getValue() != null && node.getValue().length() > 0 ?
- (node.getType() == Type.ALPHA ? " \"" + node.getValue() + "\"" : //$NON-NLS-1$ //$NON-NLS-2$
- (node.getType() == Type.TIMESTAMP ? " [" + node.getValue() + "]" : //$NON-NLS-1$ //$NON-NLS-2$
- " " + node.getValue())) : ""); //$NON-NLS-1$//$NON-NLS-2$
+ TmfFilterCompareNode node = (TmfFilterCompareNode) element;
+ label = (node.isNot() ? "NOT " : "") + //$NON-NLS-1$ //$NON-NLS-2$
+ (node.getField() != null ? node.getField() + " " : "") + //$NON-NLS-1$ //$NON-NLS-2$
+ (node.getResult() < 0 ? "<" : (node.getResult() > 0 ? ">" : "=")) + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ (node.getValue() != null && node.getValue().length() > 0 ?
+ (node.getType() == Type.ALPHA ? " \"" + node.getValue() + "\"" : //$NON-NLS-1$ //$NON-NLS-2$
+ (node.getType() == Type.TIMESTAMP ? " [" + node.getValue() + "]" : //$NON-NLS-1$ //$NON-NLS-2$
+ " " + node.getValue())) : ""); //$NON-NLS-1$//$NON-NLS-2$
- }
- return label;
- }
+ }
+ return label;
+ }
}
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* @return The root of builded tree
*/
public ITmfFilterTreeNode getFilterRoot() {
- return fRoot;
+ return fRoot;
}
-
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
fRoot = new TmfFilterRootNode();
for (ITmfFilterTreeNode node : FilterManager.getSavedFilters()) {
- fRoot.addChild(node);
+ fRoot.addChild(node);
}
- }
-
-
- /**
- * Refresh the tree widget
- */
- public void refresh() {
- fViewer.refresh();
- }
-
- /**
- * Setter for selection
- *
- * @param node The node to select
- */
- public void setSelection(ITmfFilterTreeNode node) {
- fViewer.setSelection(node, true);
- }
-
- // ------------------------------------------------------------------------
- // ViewPart
- // ------------------------------------------------------------------------
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(Composite)
+ }
+
+ /**
+ * Refresh the tree widget
*/
- @Override
- public void createPartControl(Composite parent) {
-
- fViewer = new FilterViewer(parent, SWT.NONE);
- fViewer.setInput(fRoot);
-
- contributeToActionBars();
-
- fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- if (!(event.getSelection().isEmpty()) && event.getSelection() instanceof IStructuredSelection) {
- fDeleteAction.setEnabled(true);
- fExportAction.setEnabled(true);
- } else {
- fDeleteAction.setEnabled(false);
- fExportAction.setEnabled(false);
- }
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+ public void refresh() {
+ fViewer.refresh();
+ }
+
+ /**
+ * Setter for selection
+ *
+ * @param node
+ * The node to select
*/
+ public void setSelection(ITmfFilterTreeNode node) {
+ fViewer.setSelection(node, true);
+ }
+
+ // ------------------------------------------------------------------------
+ // ViewPart
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void createPartControl(Composite parent) {
+
+ fViewer = new FilterViewer(parent, SWT.NONE);
+ fViewer.setInput(fRoot);
+
+ contributeToActionBars();
+
+ fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ if (!(event.getSelection().isEmpty()) && event.getSelection() instanceof IStructuredSelection) {
+ fDeleteAction.setEnabled(true);
+ fExportAction.setEnabled(true);
+ } else {
+ fDeleteAction.setEnabled(false);
+ fExportAction.setEnabled(false);
+ }
+ }
+ });
+ }
+
@Override
public void setFocus() {
fViewer.setFocus();
}
- /*
- * (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return "[FilterView]"; //$NON-NLS-1$
- }
-
+ @Override
+ public String toString() {
+ return "[FilterView]"; //$NON-NLS-1$
+ }
/**
* Builds the menu toolbar
*/
- private void contributeToActionBars() {
- IActionBars bars = getViewSite().getActionBars();
- //fillLocalPullDown(bars.getMenuManager());
- fillLocalToolBar(bars.getToolBarManager());
- }
-
-
- /**
- * Build the popup menu
- *
- * @param manager The manager to build
- */
- private void fillLocalToolBar(IToolBarManager manager) {
-
- fSaveAction = new SaveAction();
- fSaveAction.setImageDescriptor(ImageDescriptor.createFromImage(SAVE_IMAGE));
- fSaveAction.setToolTipText(Messages.FilterView_SaveActionToolTipText);
-
- fAddAction = new AddAction();
- fAddAction.setImageDescriptor(ImageDescriptor.createFromImage(ADD_IMAGE));
- fAddAction.setToolTipText(Messages.FilterView_AddActionToolTipText);
-
- fDeleteAction = new DeleteAction();
- fDeleteAction.setImageDescriptor(ImageDescriptor.createFromImage(DELETE_IMAGE));
- fDeleteAction.setToolTipText(Messages.FilterView_DeleteActionToolTipText);
- fDeleteAction.setEnabled(false);
-
- fExportAction = new ExportAction();
- fExportAction.setImageDescriptor(ImageDescriptor.createFromImage(EXPORT_IMAGE));
- fExportAction.setToolTipText(Messages.FilterView_ExportActionToolTipText);
-
- fImportAction = new ImportAction();
- fImportAction.setImageDescriptor(ImageDescriptor.createFromImage(IMPORT_IMAGE));
- fImportAction.setToolTipText(Messages.FilterView_ImportActionToolTipText);
-
- manager.add(fSaveAction);
- manager.add(new Separator());
- manager.add(fAddAction);
- manager.add(fDeleteAction);
- manager.add(new Separator());
- manager.add(fExportAction);
- manager.add(fImportAction);
- }
-
- private class SaveAction extends Action {
- @Override
- public void run() {
- FilterManager.setSavedFilters(fRoot.getChildren());
- }
- }
-
- private class AddAction extends Action {
- @Override
- public void run() {
-
- TmfFilterNode newNode = new TmfFilterNode(fRoot, ""); //$NON-NLS-1$
- refresh();
- setSelection(newNode);
- }
- }
-
- private class DeleteAction extends Action {
- @Override
- public void run() {
- ITmfFilterTreeNode node = fViewer.getSelection();
- if (node != null) {
- node.remove();
- }
- refresh();
- }
- }
-
- private class ExportAction extends Action {
- @Override
- public void run() {
- try {
- FileDialog dlg = new FileDialog(new Shell(), SWT.SAVE);
- dlg.setFilterNames(new String[] {Messages.FilterView_FileDialogFilterName + " (*.filter.xml)"}); //$NON-NLS-1$
- dlg.setFilterExtensions(new String[] {"*.filter.xml"}); //$NON-NLS-1$
-
- String fn = dlg.open();
- if (fn != null) {
- TmfFilterXMLWriter writerXML = new TmfFilterXMLWriter(fRoot);
- writerXML.saveTree(fn);
- }
-
- } catch (ParserConfigurationException e) {
- Activator.getDefault().logError("Error parsing filter xml file", e); //$NON-NLS-1$
- }
- }
- }
-
- private class ImportAction extends Action {
- @Override
- public void run() {
- if (fViewer != null) {
- ITmfFilterTreeNode root = null;
- try {
- FileDialog dlg = new FileDialog(new Shell(), SWT.OPEN);
- dlg.setFilterNames(new String[] {Messages.FilterView_FileDialogFilterName + " (*.filter.xml)"}); //$NON-NLS-1$
- dlg.setFilterExtensions(new String[] {"*.filter.xml"}); //$NON-NLS-1$
-
- TmfFilterXMLParser parserXML = null;
- String fn = dlg.open();
- if (fn != null) {
- parserXML = new TmfFilterXMLParser(fn);
- root = parserXML.getTree();
- }
-
- } catch (SAXException e) {
- Activator.getDefault().logError("Error importing filter xml file", e); //$NON-NLS-1$
- } catch (IOException e) {
- Activator.getDefault().logError("Error importing filter xml file", e); //$NON-NLS-1$
- }
-
- if (root != null) {
- for (ITmfFilterTreeNode node : root.getChildren()) {
- if (node instanceof TmfFilterNode) {
- fRoot.addChild(node);
- refresh();
- fViewer.setSelection(node);
- }
- }
- }
- }
- }
- }
+ private void contributeToActionBars() {
+ IActionBars bars = getViewSite().getActionBars();
+ // fillLocalPullDown(bars.getMenuManager());
+ fillLocalToolBar(bars.getToolBarManager());
+ }
+
+ /**
+ * Build the popup menu
+ *
+ * @param manager
+ * The manager to build
+ */
+ private void fillLocalToolBar(IToolBarManager manager) {
+
+ fSaveAction = new SaveAction();
+ fSaveAction.setImageDescriptor(ImageDescriptor.createFromImage(SAVE_IMAGE));
+ fSaveAction.setToolTipText(Messages.FilterView_SaveActionToolTipText);
+
+ fAddAction = new AddAction();
+ fAddAction.setImageDescriptor(ImageDescriptor.createFromImage(ADD_IMAGE));
+ fAddAction.setToolTipText(Messages.FilterView_AddActionToolTipText);
+
+ fDeleteAction = new DeleteAction();
+ fDeleteAction.setImageDescriptor(ImageDescriptor.createFromImage(DELETE_IMAGE));
+ fDeleteAction.setToolTipText(Messages.FilterView_DeleteActionToolTipText);
+ fDeleteAction.setEnabled(false);
+
+ fExportAction = new ExportAction();
+ fExportAction.setImageDescriptor(ImageDescriptor.createFromImage(EXPORT_IMAGE));
+ fExportAction.setToolTipText(Messages.FilterView_ExportActionToolTipText);
+
+ fImportAction = new ImportAction();
+ fImportAction.setImageDescriptor(ImageDescriptor.createFromImage(IMPORT_IMAGE));
+ fImportAction.setToolTipText(Messages.FilterView_ImportActionToolTipText);
+
+ manager.add(fSaveAction);
+ manager.add(new Separator());
+ manager.add(fAddAction);
+ manager.add(fDeleteAction);
+ manager.add(new Separator());
+ manager.add(fExportAction);
+ manager.add(fImportAction);
+ }
+
+ private class SaveAction extends Action {
+ @Override
+ public void run() {
+ FilterManager.setSavedFilters(fRoot.getChildren());
+ }
+ }
+
+ private class AddAction extends Action {
+ @Override
+ public void run() {
+
+ TmfFilterNode newNode = new TmfFilterNode(fRoot, ""); //$NON-NLS-1$
+ refresh();
+ setSelection(newNode);
+ }
+ }
+
+ private class DeleteAction extends Action {
+ @Override
+ public void run() {
+ ITmfFilterTreeNode node = fViewer.getSelection();
+ if (node != null) {
+ node.remove();
+ }
+ refresh();
+ }
+ }
+
+ private class ExportAction extends Action {
+ @Override
+ public void run() {
+ try {
+ FileDialog dlg = new FileDialog(new Shell(), SWT.SAVE);
+ dlg.setFilterNames(new String[] { Messages.FilterView_FileDialogFilterName + " (*.filter.xml)" }); //$NON-NLS-1$
+ dlg.setFilterExtensions(new String[] { "*.filter.xml" }); //$NON-NLS-1$
+
+ String fn = dlg.open();
+ if (fn != null) {
+ TmfFilterXMLWriter writerXML = new TmfFilterXMLWriter(fRoot);
+ writerXML.saveTree(fn);
+ }
+
+ } catch (ParserConfigurationException e) {
+ Activator.getDefault().logError("Error parsing filter xml file", e); //$NON-NLS-1$
+ }
+ }
+ }
+
+ private class ImportAction extends Action {
+ @Override
+ public void run() {
+ if (fViewer != null) {
+ ITmfFilterTreeNode root = null;
+ try {
+ FileDialog dlg = new FileDialog(new Shell(), SWT.OPEN);
+ dlg.setFilterNames(new String[] { Messages.FilterView_FileDialogFilterName + " (*.filter.xml)" }); //$NON-NLS-1$
+ dlg.setFilterExtensions(new String[] { "*.filter.xml" }); //$NON-NLS-1$
+
+ TmfFilterXMLParser parserXML = null;
+ String fn = dlg.open();
+ if (fn != null) {
+ parserXML = new TmfFilterXMLParser(fn);
+ root = parserXML.getTree();
+ }
+
+ } catch (SAXException e) {
+ Activator.getDefault().logError("Error importing filter xml file", e); //$NON-NLS-1$
+ } catch (IOException e) {
+ Activator.getDefault().logError("Error importing filter xml file", e); //$NON-NLS-1$
+ }
+
+ if (root != null) {
+ for (ITmfFilterTreeNode node : root.getChildren()) {
+ if (node instanceof TmfFilterNode) {
+ fRoot.addChild(node);
+ refresh();
+ fViewer.setSelection(node);
+ }
+ }
+ }
+ }
+ }
+ }
}
\ No newline at end of file
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// Operations
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.histogram.Histogram#clear()
- */
@Override
public void clear() {
fRangeStartTime = 0L;
fDataModel.complete();
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.histogram.Histogram#updateTimeRange(long, long)
- */
@Override
public void updateTimeRange(long startTime, long endTime) {
((HistogramView) fParentView).updateTimeRange(startTime, endTime);
TmfSignalManager.register(this);
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramTextControl#dispose()
- */
@Override
public void dispose() {
TmfSignalManager.deregister(this);
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.distribution.model.IBaseDistributionModel#complete()
- */
@Override
public void complete() {
fireModelUpdateNotification();
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// FocusListener
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
- */
@Override
public void focusGained(FocusEvent event) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
- */
@Override
public void focusLost(FocusEvent event) {
updateValue();
// KeyListener
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.KeyListener#keyPressed(org.eclipse.swt.events.KeyEvent)
- */
@Override
public void keyPressed(KeyEvent event) {
switch (event.keyCode) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.KeyListener#keyReleased(org.eclipse.swt.events.KeyEvent)
- */
@Override
public void keyReleased(KeyEvent e) {
}
TmfSignalManager.register(this);
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramTextControl#dispose()
- */
@Override
public void dispose() {
TmfSignalManager.deregister(this);
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramTextControl#updateValue()
- */
@Override
protected void updateValue() {
if (getValue() == Long.MIN_VALUE) {
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.histogram.Histogram#updateTimeRange(long, long)
- */
@Override
public void updateTimeRange(long startTime, long endTime) {
((HistogramView) fParentView).updateTimeRange(startTime, endTime);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.histogram.Histogram#clear()
- */
@Override
public synchronized void clear() {
if (fZoom != null) {
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
this(TMF_STATISTICS_VIEW);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
@Override
public void createPartControl(Composite parent) {
fStatsViewers.setParent(parent);
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.linuxtools.tmf.ui.views.TmfView#dispose()
- */
@Override
public void dispose() {
super.dispose();
fStatsViewers.layout();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
- */
@Override
public void setFocus() {
fStatsViewers.setFocus();
/*******************************************************************************
- * Copyright (c) 2010, 2012 Ericsson
+ * Copyright (c) 2010, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.PaintListener#paintControl(org.eclipse.swt.events.PaintEvent)
- */
@Override
public void paintControl(PaintEvent event) {
fMessage = SDMessages._138 + " " + fCurrentValue.toString(); //$NON-NLS-1$
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#setLineStyle(int)
- */
@Override
public void setLineStyle(int style) {
fContext.setLineStyle(style);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getLineStyle()
- */
@Override
public int getLineStyle() {
return fContext.getLineStyle();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getContentsX()
- */
@Override
public int getContentsX() {
return Math.round(fView.getContentsX() / fView.fZoomValue);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getContentsY()
- */
@Override
public int getContentsY() {
return Math.round(fView.getContentsY() / fView.fZoomValue);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getVisibleWidth()
- */
@Override
public int getVisibleWidth() {
return Math.round(fView.getVisibleWidth() / fView.fZoomValue);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getVisibleHeight()
- */
@Override
public int getVisibleHeight() {
return Math.round(fView.getVisibleHeight() / fView.fZoomValue);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#contentsToViewX(int)
- */
@Override
public int contentsToViewX(int x) {
return fView.contentsToViewX(x);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#contentsToViewY(int)
- */
@Override
public int contentsToViewY(int y) {
return fView.contentsToViewY(y);
return c;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#drawLine(int, int, int, int)
- */
@Override
public void drawLine(int x1, int y1, int x2, int y2) {
int localX1 = x1;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#drawRectangle(int, int, int, int)
- */
@Override
public void drawRectangle(int x, int y, int width, int height) {
int localX = x;
fContext.drawRectangle(localX, localY, localWidth, localHeight);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#drawFocus(int, int, int, int)
- */
@Override
public void drawFocus(int x, int y, int width, int height) {
int localX = x;
setForeground(fC);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#fillPolygon(int[])
- */
@Override
public void fillPolygon(int[] points) {
int len = (points.length / 2) * 2;
fContext.fillPolygon(localPoint);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#drawPolygon(int[])
- */
@Override
public void drawPolygon(int[] points) {
int len = (points.length / 2) * 2;
fContext.drawPolygon(localPoint);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#fillRectangle(int, int, int, int)
- */
@Override
public void fillRectangle(int x, int y, int width, int height) {
int localX = x;
localHeight = fView.getVisibleHeight() + fVisibleScreenBounds - localY;
}
fContext.fillRectangle(localX, localY, localWidth, localHeight);
-
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#fillGradientRectangle(int, int, int, int, boolean)
- */
@Override
public void fillGradientRectangle(int x, int y, int width, int height, boolean isVertical) {
int localX = x;
setForeground(tempColor);
}
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#textExtent(java.lang.String)
- */
@Override
public int textExtent(String name) {
return fContext.textExtent(name).x;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#drawText(java.lang.String, int, int, boolean)
- */
@Override
public void drawText(String string, int x, int y, boolean isTrans) {
int localX = x;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#drawText(java.lang.String, int, int)
- */
@Override
public void drawText(String string, int x, int y) {
int localX = x;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#fillOval(int, int, int, int)
- */
@Override
public void fillOval(int x, int y, int width, int height) {
int localX = x;
fContext.fillOval(fView.contentsToViewX(localX), fView.contentsToViewY(localY), localWidth, localHeight);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getBackground()
- */
@Override
public IColor getBackground() {
if ((fBackground != null) && (fBackground.getColor() instanceof Color) && (!((Color) (fBackground.getColor())).isDisposed())) {
return ColorImpl.getSystemColor(SWT.COLOR_WHITE);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getForeground()
- */
@Override
public IColor getForeground() {
if ((fForeground != null) && (fForeground.getColor() instanceof Color) && (!((Color) (fForeground.getColor())).isDisposed())) {
return ColorImpl.getSystemColor(SWT.COLOR_WHITE);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#setBackground(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IColor)
- */
@Override
public void setBackground(IColor color) {
if (color == null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#setForeground(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IColor)
- */
@Override
public void setForeground(IColor color) {
if (color == null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#setGradientColor(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IColor)
- */
@Override
public void setGradientColor(IColor color) {
if (color == null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#setLineWidth(int)
- */
@Override
public void setLineWidth(int width) {
if (fView.isPrinting()) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getLineWidth()
- */
@Override
public int getLineWidth() {
return fContext.getLineWidth();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#drawTextTruncatedCentred(java.lang.String, int, int, int, int, boolean)
- */
@Override
public void drawTextTruncatedCentred(String name, int xValue, int yValue, int width, int height, boolean trans) {
int localX = xValue;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#drawTextTruncated(java.lang.String, int, int, int, int, boolean)
- */
@Override
public void drawTextTruncated(String name, int xValue, int yValue, int width, int height, boolean trans) {
int localX = xValue;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#drawImage(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IImage, int, int, int, int)
- */
@Override
public void drawImage(IImage image, int xValue, int yValue, int maxWith, int maxHeight) {
int localX = xValue;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#drawArc(int, int, int, int, int, int)
- */
@Override
public void drawArc(int x, int y, int width, int height, int startAngle, int endAngle) {
int localX = x;
fContext.drawArc(fView.contentsToViewX(localX), fView.contentsToViewY(localY), localWidth, localHeight, startAngle, endAngle);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#setFont(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IFont)
- */
@Override
public void setFont(IFont font) {
if (font.getFont() != null && ((Font) font.getFont()).getFontData().length > 0) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getFontHeight(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IFont)
- */
@Override
public int getFontHeight(IFont font) {
if (font.getFont() != null && (font.getFont() instanceof Font) && ((Font) font.getFont()).getFontData().length > 0) {
return fContext.textExtent("lp").y; //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getFontWidth(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IFont)
- */
@Override
public int getFontWidth(IFont font) {
if ((font.getFont() != null) && (font.getFont() instanceof Font)) {
fContext = null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getZoom()
- */
@Override
public float getZoom() {
if (fView != null) {
return 1;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getLineDotStyle()
- */
@Override
public int getLineDotStyle() {
return SWT.LINE_DOT;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getLineDashStyle()
- */
@Override
public int getLineDashStyle() {
return SWT.LINE_DASH;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#getLineSolidStyle()
- */
@Override
public int getLineSolidStyle() {
return SWT.LINE_SOLID;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#createColor(int, int, int)
- */
@Override
public IColor createColor(int r, int g, int b) {
return new ColorImpl(Display.getDefault(), r, g, b);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC#setDrawTextWithFocusStyle(boolean)
- */
@Override
public void setDrawTextWithFocusStyle(boolean focus) {
fDrawWithFocus = focus;
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
@Override
public void createPartControl(Composite c) {
Composite parent = new Composite(c, SWT.NONE);
setContentDescription(loader.getTitleString());
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
- */
@Override
public void setFocus() {
if (fSdWidget != null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#dispose()
- */
@Override
public void dispose() {
KeyBindingsManager.getInstance().remove(this.getSite().getId());
bar.getMenuManager().add(new Separator("UML2SD_OTHER_PLUGINS_COMMANDS")); //$NON-NLS-1$
}
- /*
- * Gets adapter for this view for properties.
- * (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#getAdapter(java.lang.Class)
- */
@Override
public Object getAdapter(Class adapter) {
Object obj = super.getAdapter(adapter);
* @version 1.0
*/
public static class BlankUml2SdLoader implements IUml2SDLoader {
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.load.IUml2SDLoader#setViewer(org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView)
- */
@Override
public void setViewer(SDView viewer) {
// Nothing to do
viewer.setFrame(f);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.load.IUml2SDLoader#getTitleString()
- */
@Override
public String getTitleString() {
return ""; //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.load.IUml2SDLoader#dispose()
- */
@Override
public void dispose() {
}
fAccessible = getViewControl().getAccessible();
fAccessible.addAccessibleListener(new AccessibleAdapter() {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.accessibility.AccessibleAdapter#getName(org.eclipse.swt.accessibility.AccessibleEvent)
- */
@Override
public void getName(AccessibleEvent e) {
// Case toolTip
});
fAccessible.addAccessibleControlListener(new AccessibleControlAdapter() {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.accessibility.AccessibleControlAdapter#getFocus(org.eclipse.swt.accessibility.AccessibleControlEvent)
- */
@Override
public void getFocus(AccessibleControlEvent e) {
if (fFocusedWidget == -1) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.accessibility.AccessibleControlAdapter#getRole(org.eclipse.swt.accessibility.AccessibleControlEvent)
- */
@Override
public void getRole(AccessibleControlEvent e) {
switch (e.childID) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.accessibility.AccessibleControlAdapter#getState(org.eclipse.swt.accessibility.AccessibleControlEvent)
- */
@Override
public void getState(AccessibleControlEvent e) {
e.detail = ACC.STATE_FOCUSABLE;
getViewControl().addFocusListener(new FocusListener() {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
- */
@Override
public void focusGained(FocusEvent e) {
SDViewPref.getInstance().setNoFocusSelection(false);
redraw();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
- */
@Override
public void focusLost(FocusEvent e) {
SDViewPref.getInstance().setNoFocusSelection(true);
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
+
/**
* Sets the time compression bar.
*
return dbuffer;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#keyPressedEvent(org.eclipse.swt.events.KeyEvent)
- */
@Override
protected void keyPressedEvent(KeyEvent event) {
if (!(isFocusControl() || getViewControl().isFocusControl())) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#keyReleasedEvent(org.eclipse.swt.events.KeyEvent)
- */
@Override
protected void keyReleasedEvent(KeyEvent event) {
setFocus(-1);
setFocus(1);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.widgets.Control#isFocusControl()
- */
@Override
public boolean isFocusControl() {
Control[] child = getChildren();
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#setContentsPos(int, int)
- */
@Override
public boolean setContentsPos(int x, int y) {
int localX = x;
return super.setContentsPos(localX, localY);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#contentsMouseHover(org.eclipse.swt.events.MouseEvent)
- */
@Override
protected void contentsMouseHover(MouseEvent event) {
GraphNode graphNode = null;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#contentsMouseMoveEvent(org.eclipse.swt.events.MouseEvent)
- */
@Override
protected void contentsMouseMoveEvent(MouseEvent e) {
fScrollToolTip.hideToolTip();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#contentsMouseUpEvent(org.eclipse.swt.events.MouseEvent)
- */
@Override
protected void contentsMouseUpEvent(MouseEvent event) {
// Just in case the diagram highlight a time compression region
super.contentsMouseUpEvent(event);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#contentsMouseDownEvent(org.eclipse.swt.events.MouseEvent)
- */
@Override
protected void contentsMouseDownEvent(MouseEvent event) {
if (fCurrentGraphNode != null) {
fDeltaY = dy;
}
- /*
- * (non-Javadoc)
- * @see java.util.TimerTask#run()
- */
@Override
public void run() {
Display.getDefault().asyncExec(new Runnable() {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#drawContents(org.eclipse.swt.graphics.GC, int, int, int, int)
- */
@Override
protected void drawContents(GC gc, int clipx, int clipy, int clipw, int cliph) {
if (fFrame == null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetDefaultSelected(SelectionEvent event) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent event) {
if (event.widget == fZoomIn) {
redraw();
}
- /*
- * Called when property changed occurs in the preference page. "PREFOK" is fired when the user press the ok or apply button
- *
- * (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+ /**
+ * Called when property changed occurs in the preference page. "PREFOK" is
+ * fired when the user press the ok or apply button
*/
@Override
public void propertyChange(PropertyChangeEvent e) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
- */
@Override
public void widgetDisposed(DisposeEvent e) {
if (fOverView != null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#drawOverview(org.eclipse.swt.graphics.GC, org.eclipse.swt.graphics.Rectangle)
- */
@Override
protected void drawOverview(GC gc, Rectangle r) {
float oldzoom = fZoomValue;
super.drawOverview(gc, r);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ITimeCompressionListener#deltaSelected(org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.Lifeline, int, int, org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IColor)
- */
@Override
public void deltaSelected(Lifeline lifeline, int startEvent, int nbEvent, IColor color) {
fFrame.highlightTimeCompression(lifeline, startEvent, nbEvent, color);
update();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#getVisibleWidth()
- */
@Override
public int getVisibleWidth() {
if (fIsPrinting) {
return super.getVisibleWidth();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#getVisibleHeight()
- */
@Override
public int getVisibleHeight() {
if (fIsPrinting) {
return super.getVisibleHeight();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#contentsToViewX(int)
- */
@Override
public int contentsToViewX(int x) {
if (fIsPrinting) {
return x - getContentsX();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#contentsToViewY(int)
- */
@Override
public int contentsToViewY(int y) {
if (fIsPrinting) {
return y - getContentsY();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#getContentsX()
- */
@Override
public int getContentsX() {
if (fIsPrinting) {
return Math.round(fPrinterX * fPrinterZoom);
}
return super.getContentsX();
-
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#getContentsY()
- */
@Override
public int getContentsY() {
if (fIsPrinting) {
* Traverse Listener implementation.
*/
protected static class LocalTraverseListener implements TraverseListener {
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.TraverseListener#keyTraversed(org.eclipse.swt.events.TraverseEvent)
- */
@Override
public void keyTraversed(TraverseEvent e) {
if ((e.detail == SWT.TRAVERSE_TAB_NEXT) || (e.detail == SWT.TRAVERSE_TAB_PREVIOUS)) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* The listener list
*/
protected List<ISelectionChangedListener> fListenerList = null;
+
/**
* The current selection
*/
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
+
/**
* Standard constructor
*/
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
@Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
if (!fListenerList.contains(listener)) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
@Override
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
fListenerList.remove(listener);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
- */
@Override
public void setSelection(ISelection selection) {
fCurrentSelection = selection;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
- */
@Override
public ISelection getSelection() {
return fCurrentSelection;
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.widgets.Composite#setFocus()
- */
@Override
public boolean setFocus() {
return fViewControl.forceFocus();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.widgets.Control#setCursor(org.eclipse.swt.graphics.Cursor)
- */
@Override
public void setCursor(Cursor cursor) {
fViewControl.setCursor(cursor);
}
- /*
- * Dispose controls used in scroll view
- *
- * (non-Javadoc)
- * @see org.eclipse.swt.widgets.Widget#dispose()
- */
@Override
public void dispose() {
if (fAutoScroll != null) {
super.dispose();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.widgets.Composite#getClientArea()
- */
@Override
public Rectangle getClientArea() {
return fViewControl.getClientArea();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.widgets.Control#setBackground(org.eclipse.swt.graphics.Color)
- */
@Override
public void setBackground(Color c) {
super.setBackground(c);
fViewControl.setBackground(c);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.widgets.Control#setToolTipText(java.lang.String)
- */
@Override
public void setToolTipText(String text) {
fViewControl.setToolTipText(text);
return true;
}
- // redefined to return our vertical bar
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.widgets.Scrollable#getVerticalBar()
- */
@Override
public ScrollBar getVerticalBar() {
return fVertScrollBar.getVerticalBar();
}
- // redefined to return out horizontal bar
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.widgets.Scrollable#getHorizontalBar()
- */
@Override
public ScrollBar getHorizontalBar() {
return fHorScrollBar.getHorizontalBar();
return bh + 1;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.widgets.Scrollable#computeTrim(int, int, int, int)
- */
@Override
public Rectangle computeTrim(int x, int y, int w, int h) {
Rectangle r = new Rectangle(x, y, w, h);
*/
boolean dontLayout = false;
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.widgets.Layout#computeSize(org.eclipse.swt.widgets.Composite, int, int, boolean)
- */
@Override
protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
Point p = new Point(250, 250);
return p;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.widgets.Layout#layout(org.eclipse.swt.widgets.Composite, boolean)
- */
@Override
protected void layout(Composite composite, boolean flushCache) {
if (dontLayout) {
});
fAccessible.addAccessibleControlListener(new AccessibleControlAdapter() {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.accessibility.AccessibleControlAdapter#getFocus(org.eclipse.swt.accessibility.AccessibleControlEvent)
- */
@Override
public void getFocus(AccessibleControlEvent e) {
if (fFocusedWidget == -1) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.accessibility.AccessibleControlAdapter#getRole(org.eclipse.swt.accessibility.AccessibleControlEvent)
- */
@Override
public void getRole(AccessibleControlEvent e) {
switch (e.childID) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.accessibility.AccessibleControlAdapter#getState(org.eclipse.swt.accessibility.AccessibleControlEvent)
- */
@Override
public void getState(AccessibleControlEvent e) {
e.detail = ACC.STATE_FOCUSABLE;
addTraverseListener(new LocalTraverseListener());
getViewControl().addFocusListener(new FocusListener() {
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
- */
@Override
public void focusGained(FocusEvent e) {
redraw();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
- */
@Override
public void focusLost(FocusEvent e) {
redraw();
fMaxTime = fFrame.getMaxTime();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#drawContents(org.eclipse.swt.graphics.GC, int, int, int, int)
- */
@Override
protected void drawContents(GC gc, int clipx, int clipy, int clipw, int cliph) {
if (fFrame == null) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.widgets.Control#isFocusControl()
- */
@Override
public boolean isFocusControl() {
Control[] child = getChildren();
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#contentsMouseMoveEvent(org.eclipse.swt.events.MouseEvent)
- */
@Override
protected void contentsMouseMoveEvent(MouseEvent event) {
if (fTooltip != null) {
setFocus(-1);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#contentsMouseHover(org.eclipse.swt.events.MouseEvent)
- */
@Override
protected void contentsMouseHover(MouseEvent e) {
if (fTooltip == null) {
setFocus(0);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#contentsMouseExit(org.eclipse.swt.events.MouseEvent)
- */
@Override
protected void contentsMouseExit(MouseEvent e) {
if (fTooltip != null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#contentsMouseUpEvent(org.eclipse.swt.events.MouseEvent)
- */
@Override
protected void contentsMouseUpEvent(MouseEvent event) {
selectTimeDelta(event.y, 0);
});
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#scrollBy(int, int)
- */
@Override
public void scrollBy(int x, int y) {
}
fListenerList.remove(listener);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
- */
@Override
public void widgetDisposed(DisposeEvent e) {
if (fTooltip != null) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#keyPressedEvent(org.eclipse.swt.events.KeyEvent)
- */
@Override
protected void keyPressedEvent(KeyEvent event) {
if (fTooltip != null) {
* Traverse Listener implementation.
*/
protected static class LocalTraverseListener implements TraverseListener {
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.TraverseListener#keyTraversed(org.eclipse.swt.events.TraverseEvent)
- */
@Override
public void keyTraversed(TraverseEvent e) {
if ((e.detail == SWT.TRAVERSE_TAB_NEXT) || (e.detail == SWT.TRAVERSE_TAB_PREVIOUS)) {
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage#getX()
- */
+
@Override
public int getX() {
int x = super.getX(true);
return x;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage#getY()
- */
@Override
public int getY() {
if ((fStartLifeline != null) && (fEndLifeline != null)) {
return super.getY();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage#getWidth()
- */
@Override
public int getWidth() {
int width = super.getWidth(true);
return width;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage#getHeight()
- */
@Override
public int getHeight() {
if ((fStartLifeline != null) && (fEndLifeline != null)) {
setEndLifeline(lifeline);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage#setStartLifeline(org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.Lifeline)
- */
@Override
public void setStartLifeline(Lifeline lifeline) {
super.setStartLifeline(lifeline);
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage#setEndLifeline(org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.Lifeline)
- */
@Override
public void setEndLifeline(Lifeline lifeline) {
super.setEndLifeline(lifeline);
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage#contains(int, int)
- */
@Override
public boolean contains(int x, int y) {
// Is it a self message?
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage#draw(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void draw(IGC context) {
if (!isVisible()) {
return fHasTime;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage#isVisible(int, int, int, int)
- */
@Override
public boolean isVisible(int x, int y, int width, int height) {
int toDrawY = getY();
return super.isVisible(x, y, width, height);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getComparator()
- */
@Override
public Comparator<GraphNode> getComparator() {
return new SortAsyncMessageComparator();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getArrayId()
- */
@Override
public String getArrayId() {
return ASYNC_MESS_TAG;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getBackComparator()
- */
@Override
public Comparator<GraphNode> getBackComparator() {
return new SortAsyncForBackward();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#positiveDistanceToPoint(int, int)
- */
@Override
public boolean positiveDistanceToPoint(int x, int y) {
int mY = getY();
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
fMessage = parentMessage;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessage#draw(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void draw(IGC context) {
if (!isVisible()) {
context.setLineStyle(oldStyle);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessage#getArrayId()
- */
@Override
public String getArrayId() {
return ASYNC_MESS_RET_TAG;
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getX()
- */
+
@Override
public int getX() {
// returns the exact x coordinate
return getX(false);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getY()
- */
@Override
public int getY() {
/*
return 0;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getWidth()
- */
@Override
public int getWidth() {
// Returns the exact width
return getWidth(false);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getHeight()
- */
@Override
public int getHeight() {
return 0;
return width;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#isVisible(int, int, int, int)
- */
@Override
public boolean isVisible(int x, int y, int width, int height) {
// ***Common*** syncMessages visibility
return inActivation;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#contains(int, int)
- */
@Override
public boolean contains(int xValue, int yValue) {
int x = getX();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNodee#draw(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void draw(IGC context) {
if (!isVisible()) {
context.drawPolygon(points);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#drawFocus(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void drawFocus(IGC context) {
// Constants
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getX()
- */
@Override
public int getX() {
if (fLifeline == null) {
return fLifeline.getX() + Metrics.getLifelineWidth() / 2 - Metrics.EXECUTION_OCCURRENCE_WIDTH / 2;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getY()
- */
@Override
public int getY() {
if (fLifeline == null) {
return fLifeline.getY() + fLifeline.getHeight() + (Metrics.getMessageFontHeigth() + Metrics.getMessagesSpacing()) * fStartEventOccurrence;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getWidth()
- */
@Override
public int getWidth() {
if (fLifeline == null) {
return Metrics.EXECUTION_OCCURRENCE_WIDTH;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getHeight()
- */
@Override
public int getHeight() {
if (fLifeline == null) {
return ((Metrics.getMessageFontHeigth() + Metrics.getMessagesSpacing())) * (fEndEventOccurrence - fStartEventOccurrence);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#contains(int, int)
- */
@Override
public boolean contains(int xValue, int yValue) {
int x = getX();
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getName()
- */
@Override
public String getName() {
if (super.getName() == null || super.getName().equals("")) { //$NON-NLS-1$
fEndEventOccurrence = occurrence;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#draw(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void draw(IGC context) {
int x = getX();
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getArrayId()
- */
@Override
public String getArrayId() {
return EXEC_OCC_TAG;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#positiveDistanceToPoint(int, int)
- */
@Override
public boolean positiveDistanceToPoint(int x, int y) {
if (getY() + getHeight() > y) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#isVisible(int, int, int, int)
- */
@Override
public boolean isVisible(int x, int y, int width, int height) {
if ((getLifeline() != null) && (getLifeline().isVisible(x, y, width, height))) {
return fHorizontalIndex;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#addNode(org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode)
- */
@Override
public void addNode(GraphNode nodeToAdd) {
fComputeMinMax = true;
super.addNode(nodeToAdd);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getX()
- */
@Override
public int getX() {
return Metrics.FRAME_H_MARGIN;
}
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getY()
- */
@Override
public int getY() {
return Metrics.FRAME_V_MARGIN;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getWidth()
- */
@Override
public int getWidth() {
if (fHorizontalIndex == 0) {
return fHorizontalIndex * Metrics.swimmingLaneWidth() + Metrics.LIFELINE_H_MAGIN * 2 + 1 - Metrics.LIFELINE_SPACING;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getHeight()
- */
@Override
public int getHeight() {
// The Frame height depends on the maximum number of messages added to a lifeline
context.setForeground(pref.getForeGroundColor(ISDPreferences.PREF_FRAME));
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#draw(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void draw(IGC context) {
draw(context, true);
return timeArray;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getArrayId()
- */
@Override
public String getArrayId() {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#contains(int, int)
- */
@Override
public boolean contains(int x, int y) {
return false;
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*/
public class EllipsisMessage extends AsyncMessage {
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessage#getX()
- */
@Override
public int getX() {
if (fStartLifeline == null) {
return super.getX();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessage#getY()
- */
@Override
public int getY() {
return super.getY() + 3;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessage#getWidth()
- */
@Override
public int getWidth() {
return 16;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessage#drawMessage(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
protected void drawMessage(IGC context) {
// temporary store the coordinates to avoid more methods calls
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessage#draw(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void draw(IGC context) {
if (!isVisible()) {
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* Set the red, green and blue value of the optional color to be used for filling the execution occurrence.
*/
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BasicExecutionOccurrence#setLifeline(org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.Lifeline)
- */
+
@Override
public void setLifeline(Lifeline theLifeline) {
super.setLifeline(theLifeline);
return fEndTime;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.ITimeRange#hasTimeInfo()
- */
@Override
public boolean hasTimeInfo() {
return fHasTimeInfo;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BasicExecutionOccurrence#draw(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void draw(IGC context) {
super.draw(context);
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BasicExecutionOccurrence#setUnselectedFillColor(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
protected IColor setUnselectedFillColor(IGC context) {
ISDPreferences pref = SDViewPref.getInstance();
return super.setUnselectedFillColor(context);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BasicExecutionOccurrence#setUnselectedStrokeColor(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
protected IColor setUnselectedStrokeColor(IGC context) {
if (fStrokeRGB != null) {
fHighlightColor = null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BasicFrame#computeMinMax()
- */
@Override
protected void computeMinMax() {
List<SDTimeEvent> timeArray = buildTimeArray();
addNode(message);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BasicFrame#draw(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void draw(IGC context) {
drawFrame(context);
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BasicFrame#buildTimeArray()
- */
@Override
protected List<SDTimeEvent> buildTimeArray() {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
fImage = img;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getX()
- */
@Override
public int getX() {
if (fExecOcc != null) {
return 0;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getY()
- */
@Override
public int getY() {
if (fExecOcc != null){
return 0;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getWidth()
- */
@Override
public int getWidth() {
if (fExecOcc != null) {
return 0;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getHeight()
- */
@Override
public int getHeight() {
if (fExecOcc != null) {
fOccurrence = occ;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#draw(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void draw(IGC context) {
context.drawImage(fImage, getX(), getY(), getWidth(), getHeight());
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getArrayId()
- */
@Override
public String getArrayId() {
return GLYPH;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#isVisible(int, int, int, int)
- */
@Override
public boolean isVisible(int x, int y, int width, int height) {
return true;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#contains(int, int)
- */
@Override
public boolean contains(int xValue, int yValue) {
int x = getX();
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getX()
- */
+
@Override
public int getX() {
return Metrics.FRAME_H_MARGIN + Metrics.LIFELINE_H_MAGIN + (fIndexInFrame - 1) * Metrics.swimmingLaneWidth();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getY()
- */
@Override
public int getY() {
return 2 * Metrics.FRAME_NAME_H_MARGIN + Metrics.LIFELINE_VT_MAGIN / 2 + Metrics.getFrameFontHeigth() + Metrics.getLifelineHeaderFontHeigth() + Metrics.FRAME_V_MARGIN + 2 * Metrics.LIFELINE_HEARDER_TEXT_V_MARGIN;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getWidth()
- */
@Override
public int getWidth() {
return Metrics.getLifelineWidth();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getHeight()
- */
@Override
public int getHeight() {
// Set room for two text lines
return new ArrayList<GraphNode>();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#contains(int, int)
- */
@Override
public boolean contains(int xValue, int yValue) {
int x = getX();
context.setBackground(backupColor);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#draw(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void draw(IGC context) {
draw(context, getX(), getY());
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getArrayId()
- */
@Override
public String getArrayId() {
return LIFELINE_TAG;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#positiveDistanceToPoint(int, int)
- */
@Override
public boolean positiveDistanceToPoint(int x, int y) {
if (getX() > x - Metrics.swimmingLaneWidth()) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getNodeAt(int, int)
- */
@Override
public GraphNode getNodeAt(int x, int y) {
int vy = 0;
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getX()
- */
@Override
public int getX() {
if (fLifeline == null) {
return fLifeline.getX() + Metrics.getLifelineWidth() / 2 - Metrics.STOP_WIDTH / 2;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getY()
- */
@Override
public int getY() {
if (fLifeline == null) {
return fLifeline.getY() + fLifeline.getHeight() + (Metrics.getMessageFontHeigth() + Metrics.getMessagesSpacing()) * fEventOccurrence - Metrics.STOP_WIDTH / 2;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getWidth()
- */
@Override
public int getWidth() {
if (fLifeline == null) {
return Metrics.STOP_WIDTH;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getHeight()
- */
@Override
public int getHeight() {
if (fLifeline == null) {
fEventOccurrence = occurrence;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#draw(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void draw(IGC context) {
context.setLineWidth(lastWidth);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getArrayId()
- */
@Override
public String getArrayId() {
return STOP;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#contains(int, int)
- */
@Override
public boolean contains(int x, int y) {
return false;
return fEventTime;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.ITimeRange#hasTimeInfo()
- */
@Override
public boolean hasTimeInfo() {
return fHasTimeInfo;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage#draw(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void draw(IGC context) {
if (!isVisible()) {
super.draw(context);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage#isVisible(int, int, int, int)
- */
@Override
public boolean isVisible(int x, int y, int width, int height) {
if (getY() > y + height +
return super.isVisible(x, y, width, height);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getComparator()
- */
@Override
public Comparator<GraphNode> getComparator() {
return new SortSyncMessageComparator();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#getArrayId()
- */
@Override
public String getArrayId() {
return SYNC_MESS_TAG;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode#positiveDistanceToPoint(int, int)
- */
@Override
public boolean positiveDistanceToPoint(int x, int y) {
if (getY() > y) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
return fMessage;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.SyncMessage#draw(org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC)
- */
@Override
public void draw(IGC context) {
if (!isVisible()) {
context.setLineStyle(oldStyle);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.SyncMessage#getArrayId()
- */
@Override
public String getArrayId() {
return SYNC_MESS_RET_TAG;
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see java.lang.Object#toString()
- */
+
@Override
public String toString() {
StringBuffer sb = new StringBuffer(super.toString());
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
fRemove.setEnabled(count > 0);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
public Control createDialogArea(Composite parent) {
fTable.setLayoutData(new RowData(220, 84));
fTable.setHeaderVisible(false);
fTable.addSelectionListener(new SelectionListener() {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
+
@Override
public void widgetDefaultSelected(SelectionEvent e) {
int count = fTable.getSelectionCount();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent e) {
handleTableSelectionCount();
fAdd = new Button(commands, SWT.NONE);
fAdd.setText(SDMessages._61);
fAdd.addSelectionListener(new SelectionListener() {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
+
@Override
public void widgetDefaultSelected(SelectionEvent e) {
// Nothing to do
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent e) {
Criteria init = new Criteria();
fEdit = new Button(commands, SWT.NONE);
fEdit.setText(SDMessages._60);
fEdit.addSelectionListener(new SelectionListener() {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
+
@Override
public void widgetDefaultSelected(SelectionEvent e) {
// Nothing to do
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent e) {
Criteria c = openFilterDialog(((CriteriaTableItem) fTable.getSelection()[0].getData()).getCriteria(), SDMessages._63);
fRemove = new Button(commands, SWT.NONE);
fRemove.setText(SDMessages._64);
fRemove.addSelectionListener(new SelectionListener() {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
+
@Override
public void widgetDefaultSelected(SelectionEvent e) {
// Nothing to do
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent e) {
fTable.remove(fTable.getSelectionIndices());
return filter.getCriteria();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.window.Window#open()
- */
@Override
public int open() {
create();
return super.open();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
public void okPressed() {
if (fTable.getItemCount() > 0) {
return data;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite p) {
p.getShell().setText(SDMessages._123);
return parent;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
protected void okPressed() {
long min = 0;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
createButton(parent, IDialogConstants.CLIENT_ID, SDMessages._126, false);
getButton(IDialogConstants.CLIENT_ID).addSelectionListener(new SelectionListener() {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
+
@Override
public void widgetSelected(SelectionEvent e) {
fSdWidget.getFrame().resetCustomMinMax();
fMaxText.getParent().layout(true);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetDefaultSelected(SelectionEvent e) {
// nothing to do
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
public Control createDialogArea(Composite parent) {
return ret;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
public void okPressed() {
int currentPageValue = fCurrentPage.getValue() - 1;
// ------------------------------------------------------------------------
// Helper classes
// ------------------------------------------------------------------------
+
/**
* This is a Text Control that accepts only digits and ensures that bounds are respected
*/
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
+
@Override
protected Control createDialogArea(Composite p) {
p.getShell().setText(SDMessages._114);
return parent;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
protected void okPressed() {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.CLIENT_ID, SDMessages._115, false);
getButton(IDialogConstants.CLIENT_ID).addSelectionListener(new SelectionListener() {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent e) {
-
fDialogUI.printButtonSelected();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
+
@Override
public void widgetDefaultSelected(SelectionEvent e) {
}
super(c, s);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#getContentsHeight()
- */
@Override
public int getContentsHeight() {
if (fSdView.getContentsHeight() > fSdView.getContentsHeight()) {
return super.getContentsHeight();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#getContentsWidth()
- */
@Override
public int getContentsWidth() {
if (fSdView.getVisibleWidth() > fSdView.getContentsWidth()) {
return super.getContentsWidth();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDWidget#contentsMouseHover(org.eclipse.swt.events.MouseEvent)
- */
@Override
protected void contentsMouseHover(MouseEvent event) {
}
return over;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDWidget#drawContents(org.eclipse.swt.graphics.GC, int, int, int, int)
- */
@Override
protected void drawContents(GC gc, int clipx, int clipy, int clipw, int cliph) {
dbuffer.dispose();
d.dispose();
gc.dispose();
-
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDWidget#keyPressedEvent(org.eclipse.swt.events.KeyEvent)
- */
@Override
protected void keyPressedEvent(KeyEvent e) {
if (e.keyCode == SWT.CTRL) {
fOverviewCanvas.redraw();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDWidget#keyReleasedEvent(org.eclipse.swt.events.KeyEvent)
- */
@Override
protected void keyReleasedEvent(KeyEvent e) {
if (e.keyCode == SWT.CTRL) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDWidget#contentsMouseDownEvent(org.eclipse.swt.events.MouseEvent)
- */
@Override
protected void contentsMouseDownEvent(MouseEvent event) {
redraw();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDWidget#contentsMouseMoveEvent(org.eclipse.swt.events.MouseEvent)
- */
@Override
protected void contentsMouseMoveEvent(MouseEvent e) {
fToolTip.hideToolTip();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.ScrollView#resizeContents(int, int)
- */
@Override
public void resizeContents(int w, int h) {
super.resizeContents(w, h);
* A traverse listener implementation.
*/
protected static class LocalTraverseListener implements TraverseListener {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.TraverseListener#keyTraversed(org.eclipse.swt.events.TraverseEvent)
- */
@Override
public void keyTraversed(TraverseEvent e) {
if ((e.detail == SWT.TRAVERSE_TAB_NEXT) || (e.detail == SWT.TRAVERSE_TAB_PREVIOUS)) {
fOverviewCanvas.update();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetDefaultSelected(SelectionEvent e) {
fPagesList = new int[0];
};
fModifyListener = new ModifyListener() {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
- */
@Override
public void modifyText(ModifyEvent e) {
fPagesList = new int[0];
fToolTip = new DiagramToolTip(fOverviewCanvas);
fOverviewCanvas.getViewControl().addMouseTrackListener(new MouseTrackListener() {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.MouseTrackListener#mouseEnter(org.eclipse.swt.events.MouseEvent)
- */
@Override
public void mouseEnter(MouseEvent e) {
fToolTip.hideToolTip();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.MouseTrackListener#mouseExit(org.eclipse.swt.events.MouseEvent)
- */
@Override
public void mouseExit(MouseEvent e) {
fToolTip.hideToolTip();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.MouseTrackListener#mouseHover(org.eclipse.swt.events.MouseEvent)
- */
@Override
public void mouseHover(MouseEvent e) {
int x1 = (int) (fOverviewCanvas.viewToContentsX(e.x) / fOverviewCanvas.fZoomValue / fStepX);
fOverviewCanvas.addTraverseListener(new LocalTraverseListener());
fOverviewCanvas.addFocusListener(new FocusListener() {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
- */
@Override
public void focusGained(FocusEvent e) {
fOverviewCanvas.redraw();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
- */
@Override
public void focusLost(FocusEvent e) {
fOverviewCanvas.redraw();
fPrinterDialog.setText(SDMessages._115);
fPrinterDialog.addSelectionListener(new SelectionListener() {
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent e) {
printButtonSelected();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetDefaultSelected(SelectionEvent e) {
}
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
protected ISDGraphNodeSupporter fProvider = null;
/**
- * The okText is the text for the Ok button and title is the title of the dialog.<br>
- * Both depend (okText and title (below)) on the usage that is done of this dialog
- * (find or filter).
+ * The okText is the text for the Ok button and title is the title of the
+ * dialog.<br>
+ * Both depend (okText and title (below)) on the usage that is done of this
+ * dialog (find or filter).
*/
protected String fOkText;
protected String[] fExpressionList;
/**
- * find is true if the dialog is for the find feature and false for filter feature
+ * find is true if the dialog is for the find feature and false for filter
+ * feature
*/
protected boolean fIsFind;
/**
* Standard constructor
*
- * @param view A sequence diagram view reference
- * @param provider A graph node supporter provider
- * @param filter A flag to indicate filtering (true) or finding (false)
- * @param style Style bits
+ * @param view
+ * A sequence diagram view reference
+ * @param provider
+ * A graph node supporter provider
+ * @param filter
+ * A flag to indicate filtering (true) or finding (false)
+ * @param style
+ * Style bits
*/
public SearchFilterDialog(SDView view, ISDGraphNodeSupporter provider, boolean filter, int style) {
super(view.getSDWidget().getShell());
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
public Control createDialogArea(Composite arg0) {
if (fIsFind) {
}
/**
- * Loads criteria from the dialog settings which are saved in the workspace.
- */
+ * Loads criteria from the dialog settings which are saved in the workspace.
+ */
@SuppressWarnings("rawtypes")
protected void loadCriteria() {
}
/**
- * Called when the dialog box ok button is pressed and calls back
- * the appropriate action provider (ISDFilterProvider or ISDFindProvider).
+ * Called when the dialog box ok button is pressed and calls back the
+ * appropriate action provider (ISDFilterProvider or ISDFindProvider).
*/
@Override
public void okPressed() {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#cancelPressed()
- */
@Override
public void cancelPressed() {
if (fIsFind) {
}
/**
- * Saves the criteria to the dialog settings within the workspace.
- */
+ * Saves the criteria to the dialog settings within the workspace.
+ */
public void saveCriteria() {
String CRITERIA = FIND_CRITERIA;
String EXPRESSION_LIST = FIND_EXPRESSION_LIST;
}
/**
- * Returns the criteria
- *
- * @return the criteria
- */
+ * Returns the criteria
+ *
+ * @return the criteria
+ */
public Criteria getCriteria() {
return fCriteria;
}
/**
* Sets the criteria.
*
- * @param criteria the criteria to set.
+ * @param criteria
+ * the criteria to set.
*/
public void setCriteria(Criteria criteria) {
fCriteria = criteria;
* Initialize the dialog with the settings of an existing Criteria<br>
* Criteria must not be null and the TabContents must have been created
*
- * @param from the criteria to copy from
+ * @param from
+ * the criteria to copy from
*/
public void copyFromCriteria(Criteria from) {
TabContents content = getTabContents();
/**
* Sets the text to be used for the ok button
*
- * @param okText text to set
+ * @param okText
+ * text to set
*/
public void setOkText(String okText) {
fOkText = okText;
/**
* Sets the title to be used for the dialog box.
*
- * @param title The title to set
+ * @param title
+ * The title to set
*/
public void setTitle(String title) {
fTitle = title;
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* @version 1.0
*/
protected class GraphNodeTypeListener implements SelectionListener {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetDefaultSelected(SelectionEvent e) {
// Nothing to do
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent e) {
updateOkButton();
* @version 1.0
*/
protected class ExpressionListener implements ModifyListener {
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
- */
@Override
public void modifyText(ModifyEvent e) {
updateOkButton();
return new ColorImpl(Display.getDefault().getSystemColor(color));
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IColor#getColor()
- */
@Override
public Object getColor() {
return fColor;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IColor#dispose()
- */
@Override
public void dispose() {
if ((fColor != null) && (fManageColor)) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
+
/**
* Returns a font implementation based system font.
*
return new FontImpl(Display.getDefault().getSystemFont());
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IFont#getFont()
- */
@Override
public Object getFont() {
return fFont;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IFont#dispose()
- */
@Override
public void dispose() {
if (fFont != null) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
return createResourceImage(name);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IImage#getImage()
- */
@Override
public Object getImage() {
return fImage;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IImage#dispose()
- */
@Override
public void dispose() {
if (fImage != null) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
@Override
public void run() {
if ((fView != null) && (fView.getSDWidget() != null)) {
/**********************************************************************
- * Copyright (c) 2011, 2012 Ericsson
- *
+ * Copyright (c) 2011, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
/**
* Action class implementation to move the focus to the first page of the whole sequence diagram.
- *
+ *
* @version 1.0
* @author Bernd Hufmann
*/
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
+
/**
* The action ID.
*/
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The sequence diagram view reference
*/
protected SDView fView = null;
-
+
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
- * Default constructor
- *
+ * Default constructor
+ *
* @param view the view reference
*/
public FirstPage(SDView view) {
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
public void run() {
if ((fView == null) || (fView.getSDWidget()) == null) {
/**********************************************************************
- * Copyright (c) 2011, 2012 Ericsson
- *
+ * Copyright (c) 2011, 2013 Ericsson
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
/**
* Action class implementation to move the focus to the last page of the whole sequence diagram.
- *
+ *
* @version 1.0
* @author Bernd Hufmann
*/
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
+
/**
* The action ID.
*/
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The sequence diagram view reference
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Standard constructor
- *
+ *
* @param view the view reference
*/
public LastPage(SDView view) {
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
public void run() {
if ((fView == null) || (fView.getSDWidget()) == null) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
public void run() {
if (fView == null) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
public void run() {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
public void run() {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
public void run() {
if (fView == null) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
@Override
public void run() {
if (fView == null) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
public void run() {
if ((fView == null) || (fView.getSDWidget()) == null) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
public void run() {
if (fView == null) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
public void run() {
if (fView == null) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
+
/**
* The action ID.
*/
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The sequence diagram view reference
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Constructor
*
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
public void run() {
if (fView == null) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
public void run() {
if ((fView == null) || (fView.getSDWidget()) == null) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
+
/**
* The action ID.
*/
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The sequence diagram view reference
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Constructor
*
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
public void run() {
if ((fView == null) || fView.getSDWidget() == null){
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
@SuppressWarnings("rawtypes")
public void run() {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The sequence diagram view reference
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Default constructor
*/
/**
* Constructor
*
- * @param view The sequence diagram view reference
+ * @param view
+ * The sequence diagram view reference
*/
public ShowNodeStart(IViewPart view) {
super();
if (view instanceof SDView) {
- fView = (SDView)view;
+ fView = (SDView) view;
}
setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NODE_START));
}
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- @Override
+
+ @Override
@SuppressWarnings("rawtypes")
public void run() {
if (fView == null) {
}
}
- /**
- * Sets the active SD view.
- *
- * @param view The SD view.
- */
- public void setView(SDView view) {
- fView = view;
- }
+ /**
+ * Sets the active SD view.
+ *
+ * @param view
+ * The SD view.
+ */
+ public void setView(SDView view) {
+ fView = view;
+ }
}
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
+
@Override
public void run() {
/**********************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* A asynchronous sequence diagram event implementation
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Standard constructor
*
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.ust.examples.event.ISequenceDiagramEvent#getSender()
- */
@Override
public String getSender() {
return fSdEvent.getSender();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.ust.examples.event.ISequenceDiagramEvent#getReceiver()
- */
@Override
public String getReceiver() {
return fSdEvent.getReceiver();
/**********************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* A synchronous sequence diagram event implementation
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Standard constructor
*
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.ust.examples.event.ISequenceDiagramEvent#getSender()
- */
+
@Override
public String getSender() {
return fSdEvent.getSender();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.ust.examples.event.ISequenceDiagramEvent#getReceiver()
- */
@Override
public String getReceiver() {
return fSdEvent.getReceiver();
}
-}
\ No newline at end of file
+}
private int fNbSeqEvents = 0;
private final List<ITmfSyncSequenceDiagramEvent> fSdEvents = new ArrayList<ITmfSyncSequenceDiagramEvent>(MAX_NUM_OF_MSG);
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.request.TmfDataRequest#handleData(org.eclipse.linuxtools.tmf.core.event.ITmfEvent)
- */
@Override
public void handleData(ITmfEvent event) {
super.handleData(event);
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.request.TmfDataRequest#handleSuccess()
- */
@Override
public void handleSuccess() {
if ((fFirstTime != null) && (fLastTime != null)) {
super.handleSuccess();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.core.request.TmfDataRequest#handleCompleted()
- */
@Override
public void handleCompleted() {
if (fEvents.isEmpty()) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.load.IUml2SDLoader#setViewer(org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView)
- */
@Override
public void setViewer(SDView viewer) {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.load.IUml2SDLoader#getTitleString()
- */
@Override
public String getTitleString() {
return getName();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.component.TmfComponent#dispose()
- */
@Override
public void dispose() {
super.dispose();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.hyades.uml2sd.ui.actions.provider.ISDGraphNodeSupporter#isNodeSupported(int)
- */
@Override
public boolean isNodeSupported(int nodeType) {
switch (nodeType) {
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDGraphNodeSupporter#getNodeName(int, java.lang.String)
- */
@Override
public String getNodeName(int nodeType, String loaderClassName) {
switch (nodeType) {
return ""; //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
@Override
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
ISelection sel = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
}
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.hyades.uml2sd.ui.actions.provider.ISDFindProvider#find(org.eclipse.hyades.uml2sd.ui.actions.widgets.Criteria)
- */
@Override
public boolean find(Criteria toSearch) {
fLock.lock();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDFindProvider#cancel()
- */
@Override
public void cancel() {
cancelOngoingRequests();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDFilterProvider#filter(java.util.List)
- */
@SuppressWarnings("unchecked")
@Override
public boolean filter(List<?> filters) {
return true;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPagingProvider#hasNextPage()
- */
@Override
public boolean hasNextPage() {
fLock.lock();
return false;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPagingProvider#hasPrevPage()
- */
@Override
public boolean hasPrevPage() {
fLock.lock();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPagingProvider#nextPage()
- */
@Override
public void nextPage() {
fLock.lock();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPagingProvider#prevPage()
- */
@Override
public void prevPage() {
fLock.lock();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPagingProvider#firstPage()
- */
@Override
public void firstPage() {
fLock.lock();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDPagingProvider#lastPage()
- */
@Override
public void lastPage() {
fLock.lock();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDAdvancedPagingProvider#currentPage()
- */
@Override
public int currentPage() {
fLock.lock();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDAdvancedPagingProvider#pagesCount()
- */
@Override
public int pagesCount() {
fLock.lock();
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDAdvancedPagingProvider#pageNumberChanged(int)
- */
@Override
public void pageNumberChanged(int pagenNumber) {
int localPageNumber = pagenNumber;
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.component.TmfComponent#broadcast(org.eclipse.linuxtools.tmf.signal.TmfSignal)
- */
@Override
public void broadcast(TmfSignal signal) {
fIsSignalSent = true;
fSearchRequest = new SearchEventRequest(window, TmfDataRequest.ALL_DATA, 1, ITmfDataRequest.ExecutionType.FOREGROUND, findCriteria);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
protected IStatus run(IProgressMonitor monitor) {
fSearchRequest.setMonitor(monitor);
return status;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#canceling()
- */
@Override
protected void canceling() {
fSearchRequest.cancel();
fMonitor = monitor;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.request.TmfDataRequest#handleData(org.eclipse.linuxtools.tmf.event.TmfData)
- */
@Override
public void handleData(ITmfEvent event) {
super.handleData(event);
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
return fHandle;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.ISDPreferences#getForeGroundColor(java.lang.String)
- */
@Override
public IColor getForeGroundColor(String prefName) {
if ((fForeColorPref.get(prefName + FORE_COLOR_POSTFIX) != null) && (fForeColorPref.get(prefName + FORE_COLOR_POSTFIX) instanceof ColorImpl)) {
return ColorImpl.getSystemColor(SWT.COLOR_BLACK);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.ISDPreferences#getBackGroundColor(java.lang.String)
- */
@Override
public IColor getBackGroundColor(String prefName) {
if ((fBackColorPref.get(prefName + BACK_COLOR_POSTFIX) != null) && (fBackColorPref.get(prefName + BACK_COLOR_POSTFIX) instanceof ColorImpl)) {
return ColorImpl.getSystemColor(SWT.COLOR_WHITE);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.ISDPreferences#getFontColor(java.lang.String)
- */
@Override
public IColor getFontColor(String prefName) {
if ((fTextColorPref.get(prefName + TEXT_COLOR_POSTFIX) != null) && (fTextColorPref.get(prefName + TEXT_COLOR_POSTFIX) instanceof ColorImpl)) {
return ColorImpl.getSystemColor(SWT.COLOR_BLACK);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.ISDPreferences#getForeGroundColorSelection()
- */
@Override
public IColor getForeGroundColorSelection() {
if (fNoFocusSelection) {
return ColorImpl.getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.ISDPreferences#getBackGroundColorSelection()
- */
@Override
public IColor getBackGroundColorSelection() {
if (fNoFocusSelection) {
return ColorImpl.getSystemColor(SWT.COLOR_LIST_SELECTION);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.ISDPreferences#getFont(java.lang.String)
- */
@Override
public IFont getFont(String prefName) {
if (fFontPref.get(prefName) != null) {
return fPrefStore.getBoolean(PREF_EXCLUDE_EXTERNAL_TIME);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.ISDPreferences#useGradienColor()
- */
@Override
public boolean useGradienColor() {
return fPrefStore.getBoolean(PREF_USE_GRADIENT);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.ISDPreferences#getTimeCompressionSelectionColor()
- */
@Override
public IColor getTimeCompressionSelectionColor() {
return fTimeCompressionSelectionColor;
fPrefStore.removePropertyChangeListener(listener);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
@Override
public void propertyChange(PropertyChangeEvent event) {
if (!event.getProperty().equals("PREFOK")) { //$NON-NLS-1$
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createContents(Composite parent) {
parent.setLayout(new GridLayout());
return page;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
@Override
public void init(IWorkbench workbench) {
fPreferences = SDViewPref.getInstance();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performApply()
- */
@Override
protected void performApply() {
// Store the prefrences in the PreferenceStore
swapPref(true);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performOk()
- */
@Override
public boolean performOk() {
performApply();
return true;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
@Override
protected void performDefaults() {
fLink.loadDefault();
fTextColor.load();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent e) {
// Store the past set font preference or else the
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetDefaultSelected(SelectionEvent e) {
}
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
@Override
public int compare(GraphNode arg0, GraphNode arg1) {
if (arg0 instanceof AsyncMessage && arg1 instanceof AsyncMessage) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
+
@Override
public int compare(GraphNode arg0, GraphNode arg1) {
if (arg0 instanceof AsyncMessage && arg1 instanceof AsyncMessage) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
+
/**
* Serial version UID
*/
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
+
@Override
public int compare(GraphNode arg0, GraphNode arg1) {
if (arg0 instanceof SyncMessage && arg1 instanceof SyncMessage) {
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
// Methods
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
@Override
public int compare(SDTimeEvent arg0, SDTimeEvent arg1) {
SDTimeEvent t1 = arg0;
/*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
initFolder();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.widgets.Widget#dispose()
- */
@Override
public void dispose() {
super.dispose();
// Control
// ------------------------------------------------------------------------
- /* (non-Javadoc)
- * @see org.eclipse.swt.widgets.Control#redraw()
- */
@Override
public void redraw() {
fTimeGraphViewer.getControl().redraw();
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getStateTypeName()
- */
@Override
public String getStateTypeName() {
return Messages.TmfTimeLegend_TRACE_STATES;
public String getStateTypeName(ITimeGraphEntry entry) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getStateTable()
- */
+
@Override
public StateItem[] getStateTable() {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getEventTableIndex(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent)
- */
@Override
public int getStateTableIndex(ITimeEvent event) {
return 0;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#postDrawControl(org.eclipse.swt.graphics.Rectangle, org.eclipse.swt.graphics.GC)
- */
@Override
public void postDrawControl(Rectangle bounds, GC gc) {
// Override to add own drawing code
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#postDrawEntry(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry, org.eclipse.swt.graphics.Rectangle, org.eclipse.swt.graphics.GC)
- */
@Override
public void postDrawEntry(ITimeGraphEntry entry, Rectangle bounds, GC gc) {
// Override to add own drawing code
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#postDrawEvent(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent, org.eclipse.swt.graphics.Rectangle, org.eclipse.swt.graphics.GC)
- */
@Override
public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {
// Override to add own drawing code
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getItemHeight(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry)
- */
@Override
public int getItemHeight(ITimeGraphEntry entry) {
return DEFAULT_ITEM_HEIGHT;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getItemImage(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry)
- */
@Override
public Image getItemImage(ITimeGraphEntry entry) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getEventName(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent)
- */
@Override
public String getEventName(ITimeEvent event) {
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getEventHoverToolTipInfo(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent)
- */
@Override
public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event) {
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getEventHoverToolTipInfo(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent, long)
- */
/**
* @since 2.0
*/
return _time0_;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.widgets.ITimeDataProvider
- * #setStartFinishTimeNotify(long, long)
- */
@Override
public void setStartFinishTimeNotify(long time0, long time1) {
setStartFinishTime(time0, time1);
notifyRangeListeners(time0, time1);
}
-
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.widgets.ITimeDataProvider#notifyStartFinishTime()
- */
@Override
public void notifyStartFinishTime() {
notifyRangeListeners(_time0, _time1);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.widgets.ITimeDataProvider
- * #setStartFinishTime(long, long)
- */
@Override
public void setStartFinishTime(long time0, long time1) {
_time0 = time0;
/*******************************************************************************
- * Copyright (c) 2009, 2012 Ericsson.
+ * Copyright (c) 2009, 2013 Ericsson.
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which