/** * 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); }
@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); }
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); }
/** * 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); }
/** * 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); }
/** * 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)); }
/** * 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)); }
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)); } }
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)); } }
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)); } }
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)); } }
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)); } }
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)); } }
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)); }
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)); }
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)); }
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)); }
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; }
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(); } }
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(); } }