Beispiel #1
0
  private IBreakpointActionPage getActionPage(IBreakpointAction breakpointAction) {
    IExtension[] actionExtensions = getBreakpointActionPageExtensions();

    IBreakpointActionPage actionPageResult = null;
    try {

      for (int i = 0; i < actionExtensions.length && actionPageResult == null; i++) {
        IConfigurationElement[] elements = actionExtensions[i].getConfigurationElements();
        for (int j = 0; j < elements.length && actionPageResult == null; j++) {
          IConfigurationElement element = elements[j];
          if (element.getName().equals(ACTION_PAGE_ELEMENT)) {
            if (element
                .getAttribute("actionType")
                .equals(breakpointAction.getIdentifier())) { // $NON-NLS-1$
              actionPageResult =
                  (IBreakpointActionPage) element.createExecutableExtension("class"); // $NON-NLS-1$
            }
          }
        }
      }

    } catch (CoreException e) {
    }
    return actionPageResult;
  }
Beispiel #2
0
 @Override
 protected void configureShell(Shell newShell) {
   super.configureShell(newShell);
   if (originalAction == null)
     newShell.setText(MessagesForTracepointActions.TracepointActions_ActionDialog_New);
   else newShell.setText(originalAction.getName());
 }
Beispiel #3
0
 @Override
 protected void okPressed() {
   if (originalAction == null)
     GdbUIPlugin.getDefault()
         .getPreferenceStore()
         .setValue(TRACEPOINT_ACTION_DIALOG_LAST_SELECTED, tracepointAction.getTypeName());
   String newName = actionNameTextWidget.getText();
   if (originalAction == null || !originalAction.getName().equals(newName)) {
     actionName = TracepointActionManager.getInstance().makeUniqueActionName(newName);
     tracepointAction.setName(actionName);
   }
   actionPage.actionDialogOK();
   super.okPressed();
 }