mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
[229131] Traditional Memory Rendering: Disable Copy To Clipboard action when no selection
This commit is contained in:
parent
1790d63fb3
commit
88f16a48e3
1 changed files with 6 additions and 2 deletions
|
@ -561,7 +561,7 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
|
||||||
TraditionalRenderingMessages
|
TraditionalRenderingMessages
|
||||||
.getString("TraditionalRendering.COPY_ADDRESS")) //$NON-NLS-1$
|
.getString("TraditionalRendering.COPY_ADDRESS")) //$NON-NLS-1$
|
||||||
{
|
{
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
Display.getDefault().asyncExec(new Runnable()
|
Display.getDefault().asyncExec(new Runnable()
|
||||||
{
|
{
|
||||||
|
@ -1063,6 +1063,10 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
|
||||||
manager.add(sub);
|
manager.add(sub);
|
||||||
manager.add(new Separator());
|
manager.add(new Separator());
|
||||||
|
|
||||||
|
BigInteger start = fRendering.getSelection().getStart();
|
||||||
|
BigInteger end = fRendering.getSelection().getEnd();
|
||||||
|
copyAction.setEnabled(start != null && end != null);
|
||||||
|
|
||||||
manager.add(copyAction);
|
manager.add(copyAction);
|
||||||
manager.add(copyAddressAction);
|
manager.add(copyAddressAction);
|
||||||
|
|
||||||
|
@ -1329,7 +1333,7 @@ class CopyAction extends Action
|
||||||
setDisabledImageDescriptor(DebugPluginImages
|
setDisabledImageDescriptor(DebugPluginImages
|
||||||
.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_COPY_VIEW_TO_CLIPBOARD));
|
.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_COPY_VIEW_TO_CLIPBOARD));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final String PANE_SPACING = " "; //$NON-NLS-1$
|
final String PANE_SPACING = " "; //$NON-NLS-1$
|
||||||
|
|
Loading…
Add table
Reference in a new issue