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

Bug 312706: Update the enablement of the buttons after they are created.

This commit is contained in:
Marc Khouzam 2010-05-12 20:21:40 +00:00
parent 3eced97e4d
commit 25085b92c5
2 changed files with 4 additions and 7 deletions

View file

@ -73,7 +73,6 @@ public class GlobalActionsList extends Composite {
summaryTableColumn.setText(Messages.getString("GlobalActionsList.2")); //$NON-NLS-1$
ArrayList actions = CDebugCorePlugin.getDefault().getBreakpointActionManager().getBreakpointActions();
boolean hasActions = actions.size() > 0;
for (Iterator iter = CDebugCorePlugin.getDefault().getBreakpointActionManager().getBreakpointActions().iterator(); iter.hasNext();) {
IBreakpointAction element = (IBreakpointAction) iter.next();
@ -114,13 +113,12 @@ public class GlobalActionsList extends Composite {
});
if (!useAttachButton)
editButton.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL + GridData.HORIZONTAL_ALIGN_END));
editButton.setEnabled(hasActions);
deleteButton = new Button(this, SWT.NONE);
deleteButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
deleteButton.setText(Messages.getString("GlobalActionsList.6")); //$NON-NLS-1$
deleteButton.setEnabled(hasActions);
//
updateButtons();
}
public Button getAttachButton() {

View file

@ -79,7 +79,6 @@ public class TracepointGlobalActionsList extends Composite {
summaryTableColumn.setText(MessagesForTracepointActions.TracepointActions_Summary);
ArrayList<ITracepointAction> actions = TracepointActionManager.getInstance().getActions();
boolean hasActions = actions.size() > 0;
for (ITracepointAction element : actions) {
if (isSubAction && element instanceof WhileSteppingAction) continue;
@ -120,12 +119,12 @@ public class TracepointGlobalActionsList extends Composite {
});
if (!useAttachButton)
editButton.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL + GridData.HORIZONTAL_ALIGN_END));
editButton.setEnabled(hasActions);
deleteButton = new Button(this, SWT.NONE);
deleteButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
deleteButton.setText(MessagesForTracepointActions.TracepointActions_Delete);
deleteButton.setEnabled(hasActions);
updateButtons();
}
public Button getAttachButton() {