Codota Logo
ISharedTextColors
Code IndexAdd Codota to your IDE (free)

How to use
ISharedTextColors
in
org.eclipse.jface.text.source

Best Java code snippets using org.eclipse.jface.text.source.ISharedTextColors (Showing top 20 results out of 315)

  • Common ways to obtain ISharedTextColors
private void myMethod () {
ISharedTextColors i =
  • Codota IconEditorsUI.getSharedTextColors()
  • Smart code suggestions by Codota
}
origin: org.eclipse/org.eclipse.ui.workbench.texteditor

/**
 * Returns the shared color for the given RGB.
 *
 * @param rgb the RGB
 * @return the shared color for the given RGB
 */
private Color getColor(RGB rgb) {
  return fSharedTextColors.getColor(rgb);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.editors

@Override
public void stop(BundleContext context) throws Exception {
  if (fSharedTextColors != null) {
    fSharedTextColors.dispose();
    fSharedTextColors= null;
  }
  if (fThemeListener != null) {
    if (PlatformUI.isWorkbenchRunning())
      PlatformUI.getWorkbench().getThemeManager().removePropertyChangeListener(fThemeListener);
    fThemeListener= null;
  }
  fAnnotationTypeLookup= null;
  fAnnotationPreferenceLookup= null;
  fAnnotationTypeHierarchy= null;
  fMarkerAnnotationPreferences= null;
  fHyperlinkDetectorRegistry= null;
  super.stop(context);
}
origin: org.eclipse/org.eclipse.ui.editors

public void stop(BundleContext context) throws Exception {
  if (fSharedTextColors != null) {
    fSharedTextColors.dispose();
    fSharedTextColors= null;
  }
  if (fThemeListener != null) {
    if (PlatformUI.isWorkbenchRunning())
      PlatformUI.getWorkbench().getThemeManager().removePropertyChangeListener(fThemeListener);
    fThemeListener= null;
  }
  
  fAnnotationTypeLookup= null;
  fAnnotationPreferenceLookup= null;
  fAnnotationTypeHierarchy= null;
  fMarkerAnnotationPreferences= null;
  fHyperlinkDetectorRegistry= null;
  super.stop(context);
}
origin: org.eclipse.platform/org.eclipse.ui.workbench.texteditor

/**
 * Returns the shared color for the given RGB.
 *
 * @param rgb the RGB
 * @return the shared color for the given RGB
 */
private Color getColor(RGB rgb) {
  return fSharedTextColors.getColor(rgb);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor

/**
 * Returns the shared color for the given RGB.
 *
 * @param rgb the RGB
 * @return the shared color for the given RGB
 */
private Color getColor(RGB rgb) {
  return fSharedTextColors.getColor(rgb);
}
origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Looks up the color for a certain revision.
 *
 * @param revision the revision to get the color for
 * @param focus <code>true</code> if it is the focus revision
 * @return the color for the revision
 */
private Color lookupColor(Revision revision, boolean focus) {
  return fSharedColors.getColor(fColorTool.getColor(revision, focus));
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Looks up the color for a certain revision.
 *
 * @param revision the revision to get the color for
 * @param focus <code>true</code> if it is the focus revision
 * @return the color for the revision
 */
private Color lookupColor(Revision revision, boolean focus) {
  return fSharedColors.getColor(fColorTool.getColor(revision, focus));
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.editors

private void updateDeletedColor(AnnotationPreference pref, IPreferenceStore store, IVerticalRulerColumn column) {
  if (pref != null && column instanceof IChangeRulerColumn) {
    RGB rgb= getColorFromAnnotationPreference(store, pref);
    ((IChangeRulerColumn) column).setDeletedColor(getSharedColors().getColor(rgb));
  }
}
origin: org.eclipse/org.eclipse.ui.editors

private void updateChangedColor(AnnotationPreference pref, IPreferenceStore store, IVerticalRulerColumn column) {
  if (pref != null && column instanceof IChangeRulerColumn) {
    RGB rgb= getColorFromAnnotationPreference(store, pref);
    ((IChangeRulerColumn) column).setChangedColor(getSharedColors().getColor(rgb));
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.editors

private void updateChangedColor(AnnotationPreference pref, IPreferenceStore store, IVerticalRulerColumn column) {
  if (pref != null && column instanceof IChangeRulerColumn) {
    RGB rgb= getColorFromAnnotationPreference(store, pref);
    ((IChangeRulerColumn) column).setChangedColor(getSharedColors().getColor(rgb));
  }
}
origin: org.eclipse/org.eclipse.ui.editors

private void updateAddedColor(AnnotationPreference pref, IPreferenceStore store, IVerticalRulerColumn column) {
  if (pref != null && column instanceof IChangeRulerColumn) {
    RGB rgb= getColorFromAnnotationPreference(store, pref);
    ((IChangeRulerColumn) column).setAddedColor(getSharedColors().getColor(rgb));
  }
}

origin: org.eclipse/org.eclipse.ui.editors

private void updateDeletedColor(AnnotationPreference pref, IPreferenceStore store, IVerticalRulerColumn column) {
  if (pref != null && column instanceof IChangeRulerColumn) {
    RGB rgb= getColorFromAnnotationPreference(store, pref);
    ((IChangeRulerColumn) column).setDeletedColor(getSharedColors().getColor(rgb));
  }
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.editors

private void updateAddedColor(AnnotationPreference pref, IPreferenceStore store, IVerticalRulerColumn column) {
  if (pref != null && column instanceof IChangeRulerColumn) {
    RGB rgb= getColorFromAnnotationPreference(store, pref);
    ((IChangeRulerColumn) column).setAddedColor(getSharedColors().getColor(rgb));
  }
}
origin: org.eclipse/org.eclipse.ui.editors

private void updateForegroundColor(IPreferenceStore store, IVerticalRulerColumn column) {
  RGB rgb=  getColorFromStore(store, FG_COLOR_KEY);
  if (rgb == null)
    rgb= new RGB(0, 0, 0);
  ISharedTextColors sharedColors= getSharedColors();
  if (column instanceof LineNumberRulerColumn)
    ((LineNumberRulerColumn) column).setForeground(sharedColors.getColor(rgb));
}

origin: org.eclipse/org.eclipse.ui.editors

private void updateBackgroundColor(IPreferenceStore store, IVerticalRulerColumn column) {
  // background color: same as editor, or system default
  RGB rgb;
  if (store.getBoolean(USE_DEFAULT_BG_KEY))
    rgb= null;
  else
    rgb= getColorFromStore(store, BG_COLOR_KEY);
  ISharedTextColors sharedColors= getSharedColors();
  if (column instanceof LineNumberRulerColumn)
    ((LineNumberRulerColumn) column).setBackground(sharedColors.getColor(rgb));
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.editors

private void updateBackgroundColor(IPreferenceStore store, IVerticalRulerColumn column) {
  // background color: same as editor, or system default
  RGB rgb;
  if (store.getBoolean(USE_DEFAULT_BG_KEY))
    rgb= null;
  else
    rgb= getColorFromStore(store, BG_COLOR_KEY);
  ISharedTextColors sharedColors= getSharedColors();
  if (column instanceof LineNumberRulerColumn)
    ((LineNumberRulerColumn) column).setBackground(sharedColors.getColor(rgb));
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.editors

private void updateForegroundColor(IPreferenceStore store, IVerticalRulerColumn column) {
  RGB rgb=  getColorFromStore(store, FG_COLOR_KEY);
  if (rgb == null)
    rgb= new RGB(0, 0, 0);
  ISharedTextColors sharedColors= getSharedColors();
  if (column instanceof LineNumberRulerColumn)
    ((LineNumberRulerColumn) column).setForeground(sharedColors.getColor(rgb));
}
origin: org.eclipse/org.eclipse.ui.editors

public Color getBackground(Object element) {
  String key= ((ListItem) element).highlightKey;
  if (key != null && fStore.getBoolean(key)) {
    RGB color= PreferenceConverter.getColor(fStore, ((ListItem)element).colorKey);
    color= interpolate(color, new RGB(255, 255, 255), 0.6);
    return EditorsPlugin.getDefault().getSharedTextColors().getColor(color);
  }
  return null;
}
origin: org.eclipse.platform/org.eclipse.compare

private void updateLineNumberColumnPresentation(boolean refresh) {
  if (fLineNumberColumn == null)
    return;
  RGB rgb=  getColorFromStore(EditorsUI.getPreferenceStore(), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR);
  if (rgb == null)
    rgb= new RGB(0, 0, 0);
  ISharedTextColors sharedColors= getSharedColors();
  fLineNumberColumn.setForeground(sharedColors.getColor(rgb));
  if (refresh) {
    fLineNumberColumn.redraw();
  }
}
origin: org.eclipse/org.eclipse.compare

private void updateLineNumberColumnPresentation(boolean refresh) {
  if (fLineNumberColumn == null)
    return;
  RGB rgb=  getColorFromStore(EditorsUI.getPreferenceStore(), AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR);
  if (rgb == null)
    rgb= new RGB(0, 0, 0);
  ISharedTextColors sharedColors= getSharedColors();
  fLineNumberColumn.setForeground(sharedColors.getColor(rgb));
  if (refresh) {
    fLineNumberColumn.redraw();
  }
}

org.eclipse.jface.text.sourceISharedTextColors

Javadoc

Manages SWT color objects. Until the dispose method is called, the same color object is returned for equal RGB values.

This interface may be implemented by clients.

Most used methods

  • getColor
    Returns the color object for the value represented by the givenRGB object.
  • dispose
    Tells this object to dispose all its managed colors.

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now