Skip to content

Commit

Permalink
Bug 581856: Remove the deprecated ITimeEventStyleStrings
Browse files Browse the repository at this point in the history
Replace it with StyleProperties use, as prescribed by the deprecation
notice.

Deprecated in org.eclipse.tracecompass commit fdf0396d9c, since v8.0.0.

This change accompanies the corresponding removal in o.e.tracecompass.

Change-Id: I8aadb9e2b6c95041a6bee13d54efbd6d69522738
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/201602
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
marco-miller committed Apr 28, 2023
1 parent bc0b54f commit 1f1002f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.StateItem;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEventStyleStrings;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeEvent;

import com.google.common.collect.ImmutableMap;
Expand Down Expand Up @@ -72,11 +71,11 @@ private State(RGB rgb) {
State state = State.values()[i];

RGB stateColor = state.rgb;
String stateType = state.name().toLowerCase().contains(ARROW_STATE) ? ITimeEventStyleStrings.linkType() : ITimeEventStyleStrings.stateType();
String stateType = state.name().toLowerCase().contains(ARROW_STATE) ? StyleProperties.linkType() : StyleProperties.stateType();
ImmutableMap<String, Object> styleMap = ImmutableMap.of(
StyleProperties.BACKGROUND_COLOR, X11ColorUtils.toHexColor(stateColor.red, stateColor.green, stateColor.blue),
StyleProperties.STYLE_NAME, String.valueOf(state.toString()),
ITimeEventStyleStrings.itemTypeProperty(), stateType);
StyleProperties.itemTypeProperty(), stateType);
STATE_TABLE[i] = new StateItem(styleMap);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.StateItem;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEventStyleStrings;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.NullTimeEvent;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeEvent;

Expand Down Expand Up @@ -98,10 +97,10 @@ public String getLabel() {

/**
* Get a map of the values corresponding to the fields in
* {@link ITimeEventStyleStrings}
* {@link StyleProperties}
*
* @return the map corresponding to the api defined in
* {@link ITimeEventStyleStrings}
* {@link StyleProperties}
*/
public Map<String, Object> toMap() {
return fMap;
Expand Down

0 comments on commit 1f1002f

Please sign in to comment.