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 142643 Details for
Bug 284719
ToolItem writes unnecessary JS
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]
Proposed patch
patch.txt (text/plain), 2.58 KB, created by
Stefan Röck
on 2009-07-27 07:40:14 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Stefan Röck
Created:
2009-07-27 07:40:14 EDT
Size:
2.58 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.q07 >Index: src/org/eclipse/swt/internal/widgets/toolitemkit/DropDownToolItemLCA.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/toolitemkit/DropDownToolItemLCA.java,v >retrieving revision 1.4 >diff -u -r1.4 DropDownToolItemLCA.java >--- src/org/eclipse/swt/internal/widgets/toolitemkit/DropDownToolItemLCA.java 4 Jun 2009 11:48:55 -0000 1.4 >+++ src/org/eclipse/swt/internal/widgets/toolitemkit/DropDownToolItemLCA.java 27 Jul 2009 11:40:45 -0000 >@@ -46,6 +46,9 @@ > ToolItemLCAUtil.preserveValues( toolItem ); > ToolItemLCAUtil.preserveImages( toolItem ); > WidgetLCAUtil.preserveCustomVariant( toolItem ); >+ >+ final IWidgetAdapter adapter = WidgetUtil.getAdapter( toolItem ); >+ adapter.preserve( Props.MENU, toolItem.getParent().getMenu() ); > } > > void readData( final ToolItem toolItem ) { >Index: src/org/eclipse/swt/internal/widgets/toolitemkit/ToolItemLCAUtil.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/toolitemkit/ToolItemLCAUtil.java,v >retrieving revision 1.8 >diff -u -r1.8 ToolItemLCAUtil.java >--- src/org/eclipse/swt/internal/widgets/toolitemkit/ToolItemLCAUtil.java 4 Jun 2009 11:48:55 -0000 1.8 >+++ src/org/eclipse/swt/internal/widgets/toolitemkit/ToolItemLCAUtil.java 27 Jul 2009 11:40:45 -0000 >@@ -45,7 +45,7 @@ > boolean hasListener = SelectionEvent.hasListener( toolItem ); > adapter.preserve( Props.SELECTION_LISTENERS, > Boolean.valueOf( hasListener ) ); >- adapter.preserve( Props.BOUNDS, toolItem.getBounds() ); >+ adapter.preserve( Props.BOUNDS, getFixedBounds( toolItem ) ); > } > > //////////// >@@ -110,12 +110,17 @@ > // Bounds > > static void writeBounds( final ToolItem toolItem ) throws IOException { >+ final Rectangle bounds = getFixedBounds( toolItem ); >+ WidgetLCAUtil.writeBounds( toolItem, toolItem.getParent(), bounds ); >+ } >+ >+ private static Rectangle getFixedBounds( final ToolItem toolItem ) { > Rectangle bounds = toolItem.getBounds(); > // [rst] Chevron-button is created as a separate widget on the client side > if( ( toolItem.getStyle() & SWT.DROP_DOWN ) != 0 ) { > bounds.width -= 15; // ToolItem#DROP_DOWN_ARROW_WIDTH > } >- WidgetLCAUtil.writeBounds( toolItem, toolItem.getParent(), bounds ); >+ return bounds; > } > > ////////
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 284719
: 142643