|
Lines 652-657
Link Here
|
| 652 |
getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(), HTNActionGroup.getRefreshAction()); |
652 |
getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(), HTNActionGroup.getRefreshAction()); |
| 653 |
IActionBars actionBars = getViewSite().getActionBars(); |
653 |
IActionBars actionBars = getViewSite().getActionBars(); |
| 654 |
IToolBarManager viewMenu = actionBars.getToolBarManager(); |
654 |
IToolBarManager viewMenu = actionBars.getToolBarManager(); |
|
|
655 |
|
| 656 |
/* Set the enablement of the copy/paste options when the Test Navigator opens */ |
| 657 |
if ( HTNActionGroup != null && currentViewIndex == VIEW_ID_LOGICAL ) { |
| 658 |
HTNActionGroup.getPasteAction().setEnabled( false ); |
| 659 |
HTNActionGroup.getCopyAction().setEnabled( false ); |
| 660 |
} else if ( HTNActionGroup != null && currentViewIndex == VIEW_ID_RESOURCE ) { |
| 661 |
HTNActionGroup.getPasteAction().setEnabled( true ); |
| 662 |
HTNActionGroup.getCopyAction().setEnabled( true ); |
| 663 |
} |
| 664 |
|
| 655 |
for (int i = 0; i < viewActions.length; i++) { |
665 |
for (int i = 0; i < viewActions.length; i++) { |
| 656 |
ToggleViewAction action = viewActions[i]; |
666 |
ToggleViewAction action = viewActions[i]; |
| 657 |
viewMenu.add(action); |
667 |
viewMenu.add(action); |
|
Lines 1001-1006
Link Here
|
| 1001 |
ToggleViewAction action = viewActions[i]; |
1011 |
ToggleViewAction action = viewActions[i]; |
| 1002 |
action.setChecked(currentViewIndex == action.getViewerIndex()); |
1012 |
action.setChecked(currentViewIndex == action.getViewerIndex()); |
| 1003 |
} |
1013 |
} |
|
|
1014 |
/* Change the enablement of the copy/past options when the view changes */ |
| 1015 |
TestNavigatorActionGroup HTNActionGroup = (TestNavigatorActionGroup)getActionGroup(); |
| 1016 |
if ( HTNActionGroup != null && currentViewIndex == VIEW_ID_LOGICAL ) { |
| 1017 |
HTNActionGroup.getPasteAction().setEnabled( false ); |
| 1018 |
HTNActionGroup.getCopyAction().setEnabled( false ); |
| 1019 |
} else if ( HTNActionGroup != null && currentViewIndex == VIEW_ID_RESOURCE ) { |
| 1020 |
HTNActionGroup.getPasteAction().setEnabled( true ); |
| 1021 |
HTNActionGroup.getCopyAction().setEnabled( true ); |
| 1022 |
} |
| 1004 |
} |
1023 |
} |
| 1005 |
|
1024 |
|
| 1006 |
/** |
1025 |
/** |