// Check if the selected elements are in the trace folder
if (IS_IN_TRACE_FOLDER.equals(property)) {
- if (receiver != null && receiver instanceof IStructuredSelection) {
+ if (receiver instanceof IStructuredSelection) {
Iterator<?> iter = ((IStructuredSelection) receiver).iterator();
while (iter.hasNext()) {
Object item = iter.next();
// Check if the parent of a trace element is an experiment
if (IS_EXPERIMENT_TRACE.equals(property)) {
- if (receiver != null && receiver instanceof TmfTraceElement) {
+ if (receiver instanceof TmfTraceElement) {
TmfTraceElement trace = (TmfTraceElement) receiver;
return trace.getParent() instanceof TmfExperimentElement;
}
// Check if traces has supplementary files
if (HAS_SUPPLEMENTARY_FILES.equals(property)) {
- if (receiver == null) {
- return false;
- }
-
if (receiver instanceof TmfTraceElement) {
TmfTraceElement trace = (TmfTraceElement) receiver;
return trace.hasSupplementaryResources();
// Check if the trace element is of a specific trace type
if (TRACE_TYPE.equals(property)) {
- if (receiver != null && receiver instanceof TmfTraceElement) {
+ if (receiver instanceof TmfTraceElement) {
TmfTraceElement trace = (TmfTraceElement) receiver;
if (expectedValue instanceof String && expectedValue.equals(trace.getTraceType())) {
return true;