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 192492 Details for
Bug 292198
[Viewers] Enable optimizations in font support for StyledCellLabelProvider
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix 2 (catch up with bug 228376)
292198_patch2.txt (text/plain), 2.40 KB, created by
Markus Keller
on 2011-04-04 14:28:28 EDT
(
hide
)
Description:
Fix 2 (catch up with bug 228376)
Filename:
MIME Type:
Creator:
Markus Keller
Created:
2011-04-04 14:28:28 EDT
Size:
2.40 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jface >Index: src/org/eclipse/jface/viewers/StyledCellLabelProvider.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface/src/org/eclipse/jface/viewers/StyledCellLabelProvider.java,v >retrieving revision 1.12 >diff -u -r1.12 StyledCellLabelProvider.java >--- src/org/eclipse/jface/viewers/StyledCellLabelProvider.java 28 Jun 2010 13:54:03 -0000 1.12 >+++ src/org/eclipse/jface/viewers/StyledCellLabelProvider.java 4 Apr 2011 18:28:19 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2010 IBM Corporation and others. >+ * Copyright (c) 2007, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -271,7 +271,7 @@ > return; > > ViewerCell cell= getViewerCell(event, element); >- boolean applyColors = useColors(event); // returns false because of bug 228376 >+ boolean applyColors = useColors(event); > > TextLayout layout = getSharedTextLayout(event.display); > >@@ -288,8 +288,8 @@ > */ > private int updateTextLayout(TextLayout layout, ViewerCell cell, > boolean applyColors) { >- layout.setText(""); //$NON-NLS-1$ //make sure all previous ranges are cleared (see bug 226090) >- >+ layout.setStyle(null, 0, Integer.MAX_VALUE); // clear old styles >+ > layout.setText(cell.getText()); > layout.setFont(cell.getFont()); // set also if null to clear previous usages > >@@ -361,19 +361,6 @@ > Rectangle textBounds = cell.getTextBounds(); > if (textBounds != null) { > TextLayout textLayout= getSharedTextLayout(event.display); >- >- /* remove-begin if bug 228376 fixed */ >- if (!applyColors) { >- // need to remove colors for selected elements: measure doesn't provide that information, see bug 228376 >- StyleRange[] styleRanges= cell.getStyleRanges(); >- if (styleRanges != null) { >- for (int i= 0; i < styleRanges.length; i++) { >- StyleRange curr = prepareStyleRange(styleRanges[i], applyColors); >- textLayout.setStyle(curr, curr.start, curr.start + curr.length - 1); >- } >- } >- } >- /* remove-end if bug 228376 fixed */ > > Rectangle layoutBounds = textLayout.getBounds(); >
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 292198
:
172445
| 192492