private void updateStyles() {
    TextStyle theme = getTheme();
    textAttributeProvider.changeTheme(theme);

    StyledText textWidget = getSourceViewer().getTextWidget();
    textWidget.setBackground(colorManager.getColor(theme.getBackgroundOrDefault()));
    textWidget.setForeground(colorManager.getColor(theme.getForegroundOrDefault()));

    adjustCurrentLineColor(theme);
    getSourceViewer().invalidateTextPresentation();
  }
 private void adjustCurrentLineColor(TextStyle theme) {
   if (AttemptToChangeCurrentLineColorAccordingToTheme) {
     PreferenceConverter.setValue( //
         getPreferenceStore(), //
         PreferenceConstants.CUSTOM_CURRENT_LINE_COLOR,
         theme.getCurrentLineHighlight());
   }
 }