use of org.eclipse.tracecompass.tmf.core.model.IOutputElement in project tracecompass by tracecompass.
the class FlameGraphPresentationProvider method getElementStyle.
@Override
@Nullable
public OutputElementStyle getElementStyle(ITimeEvent event) {
if (event instanceof NullTimeEvent) {
return null;
}
if (event instanceof FlamegraphEvent) {
IOutputElement model = ((FlamegraphEvent) event).getModel();
OutputElementStyle eventStyle = model.getStyle();
if (eventStyle == null) {
String name = event.getLabel();
Object key = name == null ? model.getValue() : name;
eventStyle = FlameDefaultPalette.getStyleFor(key);
}
return eventStyle;
}
return TRANSPARENT_STYLE;
}
use of org.eclipse.tracecompass.tmf.core.model.IOutputElement in project tracecompass by tracecompass.
the class BaseDataProviderTimeGraphPresentationProvider method getElementStyle.
@Override
@Nullable
public OutputElementStyle getElementStyle(ITimeEvent event) {
if (event instanceof NullTimeEvent) {
return null;
}
if (event instanceof TimeEvent) {
IOutputElement model = ((TimeEvent) event).getModel();
OutputElementStyle eventStyle = model.getStyle();
if (eventStyle == null && event.getEntry() instanceof TimeGraphEntry) {
eventStyle = ((TimeGraphEntry) event.getEntry()).getEntryModel().getStyle();
}
if (eventStyle != null) {
return eventStyle;
}
}
return TRANSPARENT_STYLE;
}
Aggregations