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 34577 Details for
Bug 19602
[Printing] Line numbers aren't printed
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]
UI Editors portion of the patch
uiEditorsPrintMarginsPatch.txt (text/plain), 3.43 KB, created by
Steven Wasleski
on 2006-02-13 11:11:22 EST
(
hide
)
Description:
UI Editors portion of the patch
Filename:
MIME Type:
Creator:
Steven Wasleski
Created:
2006-02-13 11:11:22 EST
Size:
3.43 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.editors >Index: src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java,v >retrieving revision 1.56 >diff -u -r1.56 AbstractDecoratedTextEditor.java >--- src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java 2 Feb 2006 15:41:00 -0000 1.56 >+++ src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java 13 Feb 2006 15:49:41 -0000 >@@ -15,6 +15,7 @@ > import org.eclipse.osgi.util.NLS; > > import org.eclipse.swt.SWT; >+import org.eclipse.swt.custom.StyledTextPrintOptions; > import org.eclipse.swt.graphics.Color; > import org.eclipse.swt.graphics.RGB; > import org.eclipse.swt.layout.GridData; >@@ -49,6 +50,8 @@ > > import org.eclipse.jface.text.BadLocationException; > import org.eclipse.jface.text.IDocument; >+import org.eclipse.jface.text.IPrintOptionsConsumer; >+import org.eclipse.jface.text.IPrintOptionsProvider; > import org.eclipse.jface.text.ITextViewerExtension6; > import org.eclipse.jface.text.Position; > import org.eclipse.jface.text.revisions.IRevisionRulerColumn; >@@ -162,6 +165,35 @@ > AbstractDecoratedTextEditor.this.gotoMarker(marker); > } > } >+ >+ /** >+ * This implementation of <code>IPrintOptionsProvider</code> returns a set >+ * of options appropriate to the current state of the line number ruler. >+ * Subclasses of {@link AbstractDecoratedTextEditor} may create subclasses >+ * of this class or define completely new implementations of the >+ * <code>IPrintOptionsProvider</code>. See >+ * {@link AbstractDecoratedTextEditor#createPrintOptionsProvider()} for >+ * information. >+ */ >+ protected class PrintOptionsProvider implements IPrintOptionsProvider { >+ public StyledTextPrintOptions getPrintOptions() { >+ StyledTextPrintOptions options = null; >+ if (isLineNumberRulerVisible()) { >+ options = new StyledTextPrintOptions(); >+ options.printTextForeground = true; >+ options.printTextBackground = true; >+ options.printTextFontStyle = true; >+ options.printLineBackground = true; >+ ISourceViewer sourceViewer = AbstractDecoratedTextEditor.super >+ .getSourceViewer(); >+ if (sourceViewer instanceof IPrintOptionsConsumer) { >+ options.printLeadMarginDecorator = ((IPrintOptionsConsumer) sourceViewer) >+ .getPreferredLineNumberDecorator(); >+ } >+ } >+ return options; >+ } >+ } > > /** > * The annotation preferences. >@@ -352,6 +384,12 @@ > getSourceViewer().removeRangeIndication(); > getSourceViewer().setRangeIndicator(null); > } >+ >+ ISourceViewer sourceViewer = getSourceViewer(); >+ if (sourceViewer instanceof IPrintOptionsConsumer) { >+ ((IPrintOptionsConsumer) sourceViewer) >+ .setPrintOptionProvider(createPrintOptionsProvider()); >+ } > } > > >@@ -406,6 +444,19 @@ > // > return composite; > } >+ >+ /** >+ * Creates the print options provider. This implementation creates an >+ * instance of the inner class <code>PrintOptionsProvider</code>. >+ * Subclasses may override this method to create a different provider. A >+ * return value of <code>null</code> is permissible. >+ * >+ * @return the provider >+ * @since 3.2 >+ */ >+ protected IPrintOptionsProvider createPrintOptionsProvider() { >+ return new PrintOptionsProvider(); >+ } > > /** > * Tells whether the overview ruler is visible.
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 19602
:
26998
|
34574
|
34575
|
34576
| 34577 |
59913
|
80953