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 commit fdf0396, since v8.0.0.

Fix the Eclipse formatting in ITimeGraphPresentationProvider while here.

[Removed] o.e.t.tmf.ui.widgets.timegraph.model.ITimeEventStyleStrings

Change-Id: I9d3352cb6c40ddfffef0dcd3292c4e7253de91f0
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/201601
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 c7f3ea1 commit a2bd70b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 118 deletions.
Expand Up @@ -24,8 +24,8 @@
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.tracecompass.internal.tmf.ui.Messages;
import org.eclipse.tracecompass.tmf.core.model.OutputElementStyle;
import org.eclipse.tracecompass.tmf.core.model.StyleProperties;
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.ITimeGraphEntry;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeEvent;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.ITmfTimeGraphDrawingHelper;
Expand Down Expand Up @@ -200,14 +200,14 @@ default String getLinkTypeName() {
*
* @param event
* the time event
* @return the style map, as detailed in {@link ITimeEventStyleStrings}
* @return the style map, as detailed in {@link StyleProperties}
* @since 3.0
*/
default Map<String, Object> getEventStyle(ITimeEvent event) {
if (event instanceof TimeEvent) {
TimeEvent timeEvent = (TimeEvent) event;
OutputElementStyle style = timeEvent.getModel().getStyle();
if (style!= null) {
if (style != null) {
Map<@NonNull String, @NonNull Object> styleValues = style.getStyleValues();
if (!styleValues.isEmpty()) {
return styleValues;
Expand Down Expand Up @@ -250,7 +250,7 @@ default String getPreferenceKey() {
* @param event
* the time event
* @return a style map containing the elements as detailed in
* {@link ITimeEventStyleStrings} to override
* {@link StyleProperties} to override
* @since 3.0
*/
default Map<String, Object> getSpecificEventStyle(ITimeEvent event) {
Expand All @@ -259,13 +259,13 @@ default Map<String, Object> getSpecificEventStyle(ITimeEvent event) {

/**
* Signal the provider that its color settings have changed
*
* @since 3.2
*/
default void refresh(){
default void refresh() {
// do nothing
}


/**
* Returns the drawing helper for this presentation provider.
*
Expand All @@ -275,9 +275,8 @@ default void refresh(){
ITmfTimeGraphDrawingHelper getDrawingHelper();

/**
* Sets this presentation provider's drawing helper.
* This helper be needed to know where to draw items, get its coordinates
* given a time, etc.
* Sets this presentation provider's drawing helper. This helper be needed
* to know where to draw items, get its coordinates given a time, etc.
*
* @param helper
* The drawing helper
Expand Down

This file was deleted.

0 comments on commit a2bd70b

Please sign in to comment.