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 185158 Details for
Bug 332482
[Forms] Revert Fix for Bug #284393
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
patch332482.txt (text/plain), 5.53 KB, created by
Chris Goldthorpe
on 2010-12-14 14:10:58 EST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Goldthorpe
Created:
2010-12-14 14:10:58 EST
Size:
5.53 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.forms >Index: src/org/eclipse/ui/forms/widgets/FormText.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.java,v >retrieving revision 1.88 >diff -u -r1.88 FormText.java >--- src/org/eclipse/ui/forms/widgets/FormText.java 21 Sep 2010 18:57:58 -0000 1.88 >+++ src/org/eclipse/ui/forms/widgets/FormText.java 14 Dec 2010 19:01:51 -0000 >@@ -8,7 +8,6 @@ > * Contributors: > * IBM Corporation - initial API and implementation > * Martin Donnelly (m2a3@eircom.net) - patch (see Bugzilla #145997) >- * Ling Hao - Fix for Bug 284393 > *******************************************************************************/ > package org.eclipse.ui.forms.widgets; > >@@ -18,6 +17,7 @@ > import java.util.Hashtable; > > import org.eclipse.core.runtime.ListenerList; >+ > import org.eclipse.swt.SWT; > import org.eclipse.swt.SWTException; > import org.eclipse.swt.accessibility.ACC; >@@ -61,6 +61,7 @@ > import org.eclipse.swt.widgets.Menu; > import org.eclipse.swt.widgets.MenuItem; > import org.eclipse.swt.widgets.TypedListener; >+ > import org.eclipse.ui.forms.HyperlinkSettings; > import org.eclipse.ui.forms.events.HyperlinkEvent; > import org.eclipse.ui.forms.events.IHyperlinkListener; >@@ -363,7 +364,7 @@ > * the widget style > */ > public FormText(Composite parent, int style) { >- super(parent, SWT.DOUBLE_BUFFERED | SWT.WRAP | style); >+ super(parent, SWT.NO_BACKGROUND | SWT.WRAP | style); > setLayout(new FormTextLayout()); > model = new FormTextModel(); > addDisposeListener(new DisposeListener() { >@@ -1574,7 +1575,19 @@ > } > > private void repaint(GC gc, int x, int y, int width, int height) { >- Rectangle repaintRegion = new Rectangle(0, 0, getSize().x, getSize().y); >+ Image textBuffer = new Image(getDisplay(), width, height); >+ Color bg = getBackground(); >+ Color fg = getForeground(); >+ if (!getEnabled()) { >+ bg = getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); >+ fg = getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); >+ } >+ GC textGC = new GC(textBuffer, gc.getStyle()); >+ textGC.setForeground(fg); >+ textGC.setBackground(bg); >+ textGC.setFont(getFont()); >+ textGC.fillRectangle(0, 0, width, height); >+ Rectangle repaintRegion = new Rectangle(x, y, width, height); > > Paragraph[] paragraphs = model.getParagraphs(); > IHyperlinkSegment selectedLink = getSelectedLink(); >@@ -1583,11 +1596,14 @@ > for (int i = 0; i < paragraphs.length; i++) { > Paragraph p = paragraphs[i]; > p >- .paint(gc, repaintRegion, resourceTable, selectedLink, >+ .paint(textGC, repaintRegion, resourceTable, selectedLink, > selData); > } > if (hasFocus && !model.hasFocusSegments()) >- gc.drawFocus(x, y, width, height); >+ textGC.drawFocus(x, y, width, height); >+ textGC.dispose(); >+ gc.drawImage(textBuffer, x, y); >+ textBuffer.dispose(); > } > > private int getParagraphSpacing(int lineHeight) { >Index: src/org/eclipse/ui/internal/forms/widgets/BulletParagraph.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/BulletParagraph.java,v >retrieving revision 1.12 >diff -u -r1.12 BulletParagraph.java >--- src/org/eclipse/ui/internal/forms/widgets/BulletParagraph.java 21 Sep 2010 18:57:58 -0000 1.12 >+++ src/org/eclipse/ui/internal/forms/widgets/BulletParagraph.java 14 Dec 2010 19:01:51 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2010 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 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 >@@ -7,7 +7,6 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >- * Ling Hao - Fix for Bug 284393 > *******************************************************************************/ > package org.eclipse.ui.internal.forms.widgets; > >@@ -153,7 +152,7 @@ > gc.fillRectangle(x + 1, y, 3, 5); > gc.setBackground(bg); > } else if (style == TEXT && text != null) { >- gc.drawText(text, x, y, true); >+ gc.drawText(text, x, y); > } else if (style == IMAGE && text != null) { > Image image = (Image) resourceTable.get(text); > if (image != null) >Index: src/org/eclipse/ui/internal/forms/widgets/TextHyperlinkSegment.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextHyperlinkSegment.java,v >retrieving revision 1.17 >diff -u -r1.17 TextHyperlinkSegment.java >--- src/org/eclipse/ui/internal/forms/widgets/TextHyperlinkSegment.java 21 Sep 2010 18:57:58 -0000 1.17 >+++ src/org/eclipse/ui/internal/forms/widgets/TextHyperlinkSegment.java 14 Dec 2010 19:01:51 -0000 >@@ -7,7 +7,6 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >- * Ling Hao - Fix for Bug 284393 > *******************************************************************************/ > package org.eclipse.ui.internal.forms.widgets; > >@@ -68,7 +67,7 @@ > } > > protected void drawText(GC gc, String s, int clipX, int clipY) { >- gc.drawText(s, clipX, clipY, true); >+ gc.drawText(s, clipX, clipY, false); > } > > public String getTooltipText() {
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 332482
: 185158