コード例 #1
0
  /*
   * (non-Javadoc)
   *
   * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
   */
  @Override
  public void createControl(Composite parent) {
    Composite comp = new Composite(parent, SWT.NONE);
    setControl(comp);

    GdbUIPlugin.getDefault()
        .getWorkbench()
        .getHelpSystem()
        .setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_MAIN_TAB);

    GridLayout topLayout = new GridLayout();
    comp.setLayout(topLayout);

    createVerticalSpacer(comp, 1);
    createExeFileGroup(comp, 1);
    createProjectGroup(comp, 1);
    if (fIncludeBuildSettings) {
      createBuildOptionGroup(comp, 1);
    }
    createVerticalSpacer(comp, 1);
    if (fSpecifyCoreFile) {
      createCoreFileGroup(comp, 1);
    }

    GdbUIPlugin.setDialogShell(parent.getShell());
  }
コード例 #2
0
ファイル: ThreadVMNode.java プロジェクト: PARAG00991/cdt
 @Override
 public void dispose() {
   GdbUIPlugin.getDefault()
       .getPreferenceStore()
       .removePropertyChangeListener(fPropertyChangeListener);
   super.dispose();
 }
コード例 #3
0
ファイル: ThreadVMNode.java プロジェクト: PARAG00991/cdt
  public ThreadVMNode(AbstractDMVMProvider provider, DsfSession session) {
    super(provider, session);

    IPreferenceStore store = GdbUIPlugin.getDefault().getPreferenceStore();
    store.addPropertyChangeListener(fPropertyChangeListener);
    fHideRunningThreadsProperty =
        store.getBoolean(IGdbDebugPreferenceConstants.PREF_HIDE_RUNNING_THREADS);
  }
コード例 #4
0
  public GdbFullCliConsolePage(GdbFullCliConsole gdbConsole, IDebuggerConsoleView view, PTY pty) {
    fConsole = gdbConsole;
    fGdbTerminalControlConnector = gdbConsole.getTerminalControlConnector();
    fView = view;
    fLaunch = gdbConsole.getLaunch();
    fGdbPty = pty;

    GdbUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(fPreferenceListener);
  }
コード例 #5
0
 @Override
 public void dispose() {
   super.dispose();
   DebugUITools.getDebugContextManager()
       .getContextService(getSite().getWorkbenchWindow())
       .removeDebugContextListener(this);
   fTerminalControl.disposeTerminal();
   fMenuManager.dispose();
   GdbUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(fPreferenceListener);
 }
コード例 #6
0
ファイル: TracepointActionDialog.java プロジェクト: zhaog/cdt
 @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();
 }
コード例 #7
0
 private void setDefaults() {
   IPreferenceStore store = GdbUIPlugin.getDefault().getPreferenceStore();
   setInvertedColors(store.getBoolean(IGdbDebugPreferenceConstants.PREF_CONSOLE_INVERTED_COLORS));
   setBufferLineLimit(store.getInt(IGdbDebugPreferenceConstants.PREF_CONSOLE_BUFFERLINES));
 }
コード例 #8
0
ファイル: TracepointActionDialog.java プロジェクト: zhaog/cdt
  /** Create contents of the dialog */
  @Override
  protected Control createDialogArea(final Composite parent) {
    dialogArea = (Composite) super.createDialogArea(parent);
    final GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    dialogArea.setLayout(gridLayout);

    final Label actionNameLabel = new Label(dialogArea, SWT.NONE);
    actionNameLabel.setText(MessagesForTracepointActions.TracepointActions_ActionDialog_Name);

    actionNameTextWidget = new Text(dialogArea, SWT.BORDER);
    addDecorator(dialogArea, actionNameTextWidget);

    final Label breakpointActionTypeLabel = new Label(dialogArea, SWT.NONE);
    breakpointActionTypeLabel.setText(
        MessagesForTracepointActions.TracepointActions_ActionDialog_Type);

    combo = new Combo(dialogArea, SWT.READ_ONLY);
    combo.addSelectionListener(
        new SelectionAdapter() {
          @Override
          public void widgetSelected(final SelectionEvent e) {
            try {
              showActionComposite();
              Point p = parent.computeSize(MINIMUM_SIZE.x, MINIMUM_SIZE.y);
              getShell().setSize(getShell().computeSize(p.x, p.y));
            } catch (CoreException e1) {
            }
          }
        });
    combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

    tracepointActions = new Vector<ITracepointAction>(TRACEPOINT_ACTIONS_COUNT);
    tracepointActions.add(new CollectAction());
    tracepointActions.add(new EvaluateAction());
    // Sub actions of whileStepping cannot be whileStepping
    if (!isSubAction) tracepointActions.add(new WhileSteppingAction());

    actionPages = new IBreakpointActionPage[TRACEPOINT_ACTIONS_COUNT];
    actionComposites = new Composite[TRACEPOINT_ACTIONS_COUNT];

    if (!tracepointActions.isEmpty()) {

      String lastTypeName =
          GdbUIPlugin.getDefault()
              .getPreferenceStore()
              .getString(TRACEPOINT_ACTION_DIALOG_LAST_SELECTED);

      if (tracepointAction != null) {
        lastTypeName = tracepointAction.getTypeName();
        actionName = tracepointAction.getName();
      }

      for (int i = 0; i < tracepointActions.size(); i++) {
        tracepointActions.get(i).setName(tracepointActions.get(i).getDefaultName());
        String actionTypeName = tracepointActions.get(i).getTypeName();
        combo.add(actionTypeName);
        if (actionTypeName.equals(lastTypeName)) {
          lastSelectedActionTypeIndex = i;
          if (tracepointAction != null) {
            tracepointActions.add(i, tracepointAction);
            tracepointActions.remove(i + 1);
          }
        }
      }

      combo.select(lastSelectedActionTypeIndex);
      if (originalAction != null) combo.setEnabled(false);

      actionArea = new Composite(dialogArea, SWT.NONE);
      actionArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
      actionArea.setLayout(new StackLayout());
      try {
        showActionComposite();
      } catch (CoreException e) {
        e.printStackTrace();
      }
    }

    return dialogArea;
  }