Source:
public static void loadValue(ITimeGraphPresentationProvider presentationProvider, StateItem stateItem) { IPreferenceStore store = getStore(); String oldFillColorKey = getPreferenceName(presentationProvider, stateItem, ITimeEventStyleStrings.fillColor()); String oldHeightFactorKey = getPreferenceName(presentationProvider, stateItem, ITimeEventStyleStrings.heightFactor()); String fillColorKey = getPreferenceName(presentationProvider, stateItem, StyleProperties.BACKGROUND_COLOR); String heightFactorKey = getPreferenceName(presentationProvider, stateItem, StyleProperties.HEIGHT); Map<String, Object> styleMap = stateItem.getStyleMap(); String prefRgbColor = store.getString(fillColorKey); if (!prefRgbColor.isEmpty()) { styleMap.put(StyleProperties.BACKGROUND_COLOR, prefRgbColor); styleMap.put(StyleProperties.COLOR, prefRgbColor); } else { String oldPrefRgbColor = store.getString(oldFillColorKey); if (!oldPrefRgbColor.isEmpty()) { RGBAColor prefRgba = RGBAColor.fromString(oldPrefRgbColor); if (prefRgba != null) { String hexColor = X11ColorUtils.toHexColor(prefRgba.getRed(), prefRgba.getGreen(), prefRgba.getBlue()); styleMap.put(StyleProperties.BACKGROUND_COLOR, hexColor); styleMap.put(StyleProperties.COLOR, hexColor); store.setValue(fillColorKey, hexColor); } } } store.setDefault(heightFactorKey, -1.0f); store.setDefault(oldHeightFactorKey, -1.0f); float prefHeightFactor = store.getFloat(heightFactorKey); if (prefHeightFactor != -1.0f) { styleMap.put(StyleProperties.HEIGHT, prefHeightFactor); } else { prefHeightFactor = store.getFloat(oldHeightFactorKey); if (prefHeightFactor != -1.0f) { styleMap.put(StyleProperties.HEIGHT, prefHeightFactor); store.setValue(heightFactorKey, prefHeightFactor); } } }

Target:
public static void loadValue(ITimeGraphPresentationProvider presentationProvider, StateItem stateItem) { IPreferenceStore store = getStore(); String oldFillColorKey = getPreferenceName(presentationProvider, stateItem, ITimeEventStyleStrings.fillColor()); String oldHeightFactorKey = getPreferenceName(presentationProvider, stateItem, ITimeEventStyleStrings.heightFactor()); String fillColorKey = getPreferenceName(presentationProvider, stateItem, StyleProperties.BACKGROUND_COLOR); String heightFactorKey = getPreferenceName(presentationProvider, stateItem, StyleProperties.HEIGHT); Map<String, Object> styleMap = stateItem.getStyleMap(); String prefRgbColor = store.getString(fillColorKey); if (!prefRgbColor.isEmpty()) { styleMap.put(StyleProperties.BACKGROUND_COLOR, prefRgbColor); styleMap.put(StyleProperties.COLOR, prefRgbColor); } else { String oldPrefRgbColor = store.getString(oldFillColorKey); if (!oldPrefRgbColor.isEmpty()) { RGBAColor prefRgba = RGBAColor.fromString(oldPrefRgbColor); if (prefRgba != null) { String hexColor = ColorUtils.toHexColor(prefRgba.getRed(), prefRgba.getGreen(), prefRgba.getBlue()); styleMap.put(StyleProperties.BACKGROUND_COLOR, hexColor); styleMap.put(StyleProperties.COLOR, hexColor); store.setValue(fillColorKey, hexColor); } } } store.setDefault(heightFactorKey, -1.0f); store.setDefault(oldHeightFactorKey, -1.0f); float prefHeightFactor = store.getFloat(heightFactorKey); if (prefHeightFactor != -1.0f) { styleMap.put(StyleProperties.HEIGHT, prefHeightFactor); } else { prefHeightFactor = store.getFloat(oldHeightFactorKey); if (prefHeightFactor != -1.0f) { styleMap.put(StyleProperties.HEIGHT, prefHeightFactor); store.setValue(heightFactorKey, prefHeightFactor); } } }