mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Implementation of the 'Memory Unit Size' action.
This commit is contained in:
parent
dff4a9566b
commit
ddce619def
3 changed files with 16 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2002-10-24 Mikhail Khodjaiants
|
||||
Implementation of the 'Memory Unit Size' action.
|
||||
* MemorySizeAction.java
|
||||
* MemoryView.java
|
||||
|
||||
2002-10-24 Mikhail Khodjaiants
|
||||
Implementing Memory view formatting actions.
|
||||
* MemoryActionSelectionGroup.java: implementation of a toggle action group.
|
||||
|
|
|
@ -77,6 +77,7 @@ public class MemorySizeAction extends Action implements IUpdate
|
|||
public void run()
|
||||
{
|
||||
fGroup.setCurrentSelection( this );
|
||||
fMemoryViewer.setWordSize( fId );
|
||||
}
|
||||
|
||||
public String getActionId()
|
||||
|
|
|
@ -215,4 +215,14 @@ public class MemoryViewer extends ContentViewer
|
|||
IFormattedMemoryBlock block = ((MemoryControlArea)fTabFolder.getSelection().getControl()).getMemoryBlock();
|
||||
return ( block != null ) ? block.getWordSize() : 0;
|
||||
}
|
||||
|
||||
public void setWordSize( int size )
|
||||
{
|
||||
IFormattedMemoryBlock block = ((MemoryControlArea)fTabFolder.getSelection().getControl()).getMemoryBlock();
|
||||
if ( block != null )
|
||||
{
|
||||
block.setWordSize( size );
|
||||
((MemoryControlArea)fTabFolder.getSelection().getControl()).refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue