Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 66210 Details for
Bug 181168
[Viewers] Line number ruler should use editor font and same color as in text editors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch to Compare
patch181168.txt (text/plain), 2.81 KB, created by
Michael Valenta
on 2007-05-07 16:27:52 EDT
(
hide
)
Description:
Patch to Compare
Filename:
MIME Type:
Creator:
Michael Valenta
Created:
2007-05-07 16:27:52 EDT
Size:
2.81 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.compare >Index: compare/org/eclipse/compare/internal/MergeSourceViewer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java,v >retrieving revision 1.42 >diff -u -r1.42 MergeSourceViewer.java >--- compare/org/eclipse/compare/internal/MergeSourceViewer.java 7 May 2007 18:04:53 -0000 1.42 >+++ compare/org/eclipse/compare/internal/MergeSourceViewer.java 7 May 2007 20:26:30 -0000 >@@ -17,6 +17,8 @@ > import org.eclipse.compare.ICompareContainer; > import org.eclipse.core.commands.operations.*; > import org.eclipse.jface.action.*; >+import org.eclipse.jface.preference.IPreferenceStore; >+import org.eclipse.jface.preference.PreferenceConverter; > import org.eclipse.jface.text.*; > import org.eclipse.jface.text.source.*; > import org.eclipse.jface.util.IPropertyChangeListener; >@@ -143,12 +145,16 @@ > StyledText te= getTextWidget(); > if (te != null) > te.setFont(font); >+ if (fLineNumberColumn != null) >+ fLineNumberColumn.setFont(font); > } > > public void setBackgroundColor(Color color) { > StyledText te= getTextWidget(); > if (te != null) > te.setBackground(color); >+ if (fLineNumberColumn != null) >+ fLineNumberColumn.setBackground(color); > } > > public void setEnabled(boolean enabled) { >@@ -533,6 +539,8 @@ > if (b != fShowLineNumber){ > toggleLineNumberRuler(); > } >+ } else if (key.equals(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR)) { >+ updateLineNumberColumnPresentation(true); > } > } > >@@ -552,12 +560,41 @@ > } else { > if(fLineNumberColumn==null){ > fLineNumberColumn = new LineNumberRulerColumn(); >+ updateLineNumberColumnPresentation(false); > } > c.addDecorator(0, fLineNumberColumn); > } > } > } > >+ 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 ISharedTextColors getSharedColors() { >+ return EditorsUI.getSharedTextColors(); >+ } >+ >+ private RGB getColorFromStore(IPreferenceStore store, String key) { >+ RGB rgb= null; >+ if (store.contains(key)) { >+ if (store.isDefault(key)) >+ rgb= PreferenceConverter.getDefaultColor(store, key); >+ else >+ rgb= PreferenceConverter.getColor(store, key); >+ } >+ return rgb; >+ } >+ > /** > * Toggles line number ruler column. > */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 181168
: 66210