1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Implementation of the 'Memory Unit Size' action.

This commit is contained in:
Mikhail Khodjaiants 2002-10-25 04:04:10 +00:00
parent dff4a9566b
commit ddce619def
3 changed files with 16 additions and 0 deletions

View file

@ -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.

View file

@ -77,6 +77,7 @@ public class MemorySizeAction extends Action implements IUpdate
public void run()
{
fGroup.setCurrentSelection( this );
fMemoryViewer.setWordSize( fId );
}
public String getActionId()

View file

@ -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();
}
}
}