mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Bug 341632 - Trad mem rendering keyboard access
Change-Id: Iae09285e88f76d1155fd28a6aa25b818ae0164dd Reviewed-on: https://git.eclipse.org/r/11349 Reviewed-by: Chris Recoskie <recoskie@ca.ibm.com> IP-Clean: Chris Recoskie <recoskie@ca.ibm.com> Tested-by: Chris Recoskie <recoskie@ca.ibm.com>
This commit is contained in:
parent
d11a8c4902
commit
440e2e87bf
2 changed files with 24 additions and 0 deletions
18
memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/AbstractPane.java
Normal file → Executable file
18
memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/AbstractPane.java
Normal file → Executable file
|
@ -229,6 +229,14 @@ public abstract class AbstractPane extends Canvas
|
||||||
|
|
||||||
editCell(fCaretAddress, fSubCellCaretPosition, ke.character);
|
editCell(fCaretAddress, fSubCellCaretPosition, ke.character);
|
||||||
}
|
}
|
||||||
|
else if (ke.keyCode == SWT.TAB && (ke.stateMask & SWT.SHIFT) != 0) {
|
||||||
|
// move backward cursor to the first position in the following pane
|
||||||
|
switchTo(fRendering.incrPane(AbstractPane.this,-1));
|
||||||
|
}
|
||||||
|
else if (ke.keyCode == SWT.TAB) {
|
||||||
|
// move forward cursor to the first position in the following pane
|
||||||
|
switchTo(fRendering.incrPane(AbstractPane.this,1));
|
||||||
|
}
|
||||||
|
|
||||||
if((ke.stateMask & SWT.SHIFT) != 0)
|
if((ke.stateMask & SWT.SHIFT) != 0)
|
||||||
{
|
{
|
||||||
|
@ -434,6 +442,16 @@ public abstract class AbstractPane extends Canvas
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void switchTo(AbstractPane pane)
|
||||||
|
{
|
||||||
|
pane.setCaretAddress(this.fCaretAddress);
|
||||||
|
pane.fOldSubCellCaretPosition = 0;
|
||||||
|
pane.fSubCellCaretPosition = 0;
|
||||||
|
pane.updateCaret();
|
||||||
|
pane.ensureCaretWithinViewport();
|
||||||
|
pane.setFocus();
|
||||||
|
}
|
||||||
|
|
||||||
protected boolean isPaneVisible()
|
protected boolean isPaneVisible()
|
||||||
{
|
{
|
||||||
return fPaneVisible;
|
return fPaneVisible;
|
||||||
|
|
6
memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java
Normal file → Executable file
6
memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java
Normal file → Executable file
|
@ -14,8 +14,10 @@ package org.eclipse.cdt.debug.ui.memory.traditional;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.math.MathContext;
|
import java.math.MathContext;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
|
@ -2259,4 +2261,8 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AbstractPane incrPane(AbstractPane currentPane, int offset) {
|
||||||
|
final List<AbstractPane> panes = Arrays.asList(getRenderingPanes());
|
||||||
|
return panes.get((panes.indexOf(currentPane) + offset) % panes.size());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue