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 96608 Details for
Bug 227780
Traditional Rendering refactoring request
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 for Rendering.java
Rendering.java.patch (text/plain), 8.11 KB, created by
Alain Lee
on 2008-04-18 11:09:51 EDT
(
hide
)
Description:
patch for Rendering.java
Filename:
MIME Type:
Creator:
Alain Lee
Created:
2008-04-18 11:09:51 EDT
Size:
8.11 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.dd.debug.memory.renderings >Index: plugins/org.eclipse.dd.debug.memory.renderings.traditional/src/org/eclipse/dd/debug/memory/renderings/traditional/Rendering.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.dd.debug.memory.renderings/plugins/org.eclipse.dd.debug.memory.renderings.traditional/src/org/eclipse/dd/debug/memory/renderings/traditional/Rendering.java,v >retrieving revision 1.18 >diff -u -r1.18 Rendering.java >--- plugins/org.eclipse.dd.debug.memory.renderings.traditional/src/org/eclipse/dd/debug/memory/renderings/traditional/Rendering.java 11 Mar 2008 05:10:29 -0000 1.18 >+++ plugins/org.eclipse.dd.debug.memory.renderings.traditional/src/org/eclipse/dd/debug/memory/renderings/traditional/Rendering.java 18 Apr 2008 15:03:00 -0000 >@@ -208,83 +208,9 @@ > > this.fAddressBarControl.setVisible(false); > >- getHorizontalBar().addSelectionListener(new SelectionListener() >- { >- public void widgetSelected(SelectionEvent se) >- { >- Rendering.this.layout(); >- } >- >- public void widgetDefaultSelected(SelectionEvent se) >- { >- // do nothing >- } >- }); >+ getHorizontalBar().addSelectionListener(createHorizontalBarSelectionListener()); > >- getVerticalBar().addSelectionListener( >- new SelectionListener() >- { >- public void widgetSelected(SelectionEvent se) >- { >- int addressableSize = getAddressableSize(); >- >- switch(se.detail) >- { >- case SWT.ARROW_DOWN: >- handleDownArrow(); >- break; >- case SWT.PAGE_DOWN: >- handlePageDown(); >- break; >- case SWT.ARROW_UP: >- handleUpArrow(); >- break; >- case SWT.PAGE_UP: >- handlePageUp(); >- break; >- case SWT.SCROLL_LINE: >- // See: BUG 203068 selection event details broken on GTK < 2.6 >- default: >- if(getVerticalBar().getSelection() == getVerticalBar().getMinimum()) >- { >- // Set view port start address to the start address of the Memory Block >- fViewportAddress = Rendering.this.getMemoryBlockStartAddress(); >- } >- else if(getVerticalBar().getSelection() == getVerticalBar().getMaximum()) >- { >- // The view port end address should be less or equal to the the end address of the Memory Block >- // Set view port address to be bigger than the end address of the Memory Block for now >- // and let ensureViewportAddressDisplayable() to figure out the correct view port start address >- fViewportAddress = Rendering.this.getMemoryBlockEndAddress(); >- } >- else >- { >- // Figure out the delta >- int delta = getVerticalBar().getSelection() - fCurrentScrollSelection; >- fViewportAddress = fViewportAddress.add(BigInteger.valueOf( >- getAddressableCellsPerRow() * delta)); >- } >- ensureViewportAddressDisplayable(); >- // Update tooltip >- // FIXME conversion from slider to scrollbar >- // getVerticalBar().setToolTipText(Rendering.this.getAddressString(fViewportAddress)); >- >- // Update the addresses on the Address pane. >- if(fAddressPane.isPaneVisible()) >- { >- fAddressPane.redraw(); >- } >- redrawPanes(); >- break; >- } >- >- } >- >- public void widgetDefaultSelected(SelectionEvent se) >- { >- // do nothing >- } >- }); >+ getVerticalBar().addSelectionListener(createVerticalBarSelectinListener()); > > this.addPaintListener(new PaintListener() > { >@@ -421,6 +347,89 @@ > redrawPanes(); > } > >+ protected SelectionListener createHorizontalBarSelectionListener() >+ { >+ return new SelectionListener() >+ { >+ public void widgetSelected(SelectionEvent se) >+ { >+ Rendering.this.layout(); >+ } >+ >+ public void widgetDefaultSelected(SelectionEvent se) >+ { >+ // do nothing >+ } >+ }; >+ } >+ >+ protected SelectionListener createVerticalBarSelectinListener() >+ { >+ return new SelectionListener() >+ { >+ public void widgetSelected(SelectionEvent se) >+ { >+ int addressableSize = getAddressableSize(); >+ >+ switch(se.detail) >+ { >+ case SWT.ARROW_DOWN: >+ handleDownArrow(); >+ break; >+ case SWT.PAGE_DOWN: >+ handlePageDown(); >+ break; >+ case SWT.ARROW_UP: >+ handleUpArrow(); >+ break; >+ case SWT.PAGE_UP: >+ handlePageUp(); >+ break; >+ case SWT.SCROLL_LINE: >+ // See: BUG 203068 selection event details broken on GTK < 2.6 >+ default: >+ if(getVerticalBar().getSelection() == getVerticalBar().getMinimum()) >+ { >+ // Set view port start address to the start address of the Memory Block >+ fViewportAddress = Rendering.this.getMemoryBlockStartAddress(); >+ } >+ else if(getVerticalBar().getSelection() == getVerticalBar().getMaximum()) >+ { >+ // The view port end address should be less or equal to the the end address of the Memory Block >+ // Set view port address to be bigger than the end address of the Memory Block for now >+ // and let ensureViewportAddressDisplayable() to figure out the correct view port start address >+ fViewportAddress = Rendering.this.getMemoryBlockEndAddress(); >+ } >+ else >+ { >+ // Figure out the delta >+ int delta = getVerticalBar().getSelection() - fCurrentScrollSelection; >+ fViewportAddress = fViewportAddress.add(BigInteger.valueOf( >+ getAddressableCellsPerRow() * delta)); >+ } >+ ensureViewportAddressDisplayable(); >+ // Update tooltip >+ // FIXME conversion from slider to scrollbar >+ // getVerticalBar().setToolTipText(Rendering.this.getAddressString(fViewportAddress)); >+ >+ // Update the addresses on the Address pane. >+ if(fAddressPane.isPaneVisible()) >+ { >+ fAddressPane.redraw(); >+ } >+ redrawPanes(); >+ break; >+ } >+ >+ } >+ >+ public void widgetDefaultSelected(SelectionEvent se) >+ { >+ // do nothing >+ } >+ }; >+ } >+ > protected AddressPane createAddressPane() > { > return new AddressPane(this);
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 227780
:
96608
|
97973
|
98342