예제 #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
 /** @since 2.0 */
 protected void updateCoreFromConfig(ILaunchConfiguration config) {
   if (fCoreText != null) {
     String coreName = EMPTY_STRING;
     String coreType = IGDBLaunchConfigurationConstants.DEBUGGER_POST_MORTEM_TYPE_DEFAULT;
     try {
       coreName =
           config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, EMPTY_STRING);
       coreType =
           config.getAttribute(
               IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_POST_MORTEM_TYPE,
               IGDBLaunchConfigurationConstants.DEBUGGER_POST_MORTEM_TYPE_DEFAULT);
     } catch (CoreException ce) {
       GdbUIPlugin.log(ce);
     }
     fCoreText.setText(coreName);
     if (coreType.equals(IGDBLaunchConfigurationConstants.DEBUGGER_POST_MORTEM_CORE_FILE)) {
       fCoreTypeCombo.setText(CORE_FILE);
     } else if (coreType.equals(
         IGDBLaunchConfigurationConstants.DEBUGGER_POST_MORTEM_TRACE_FILE)) {
       fCoreTypeCombo.setText(TRACE_FILE);
     } else {
       assert false : "Unknown core file type"; // $NON-NLS-1$
       fCoreTypeCombo.setText(CORE_FILE);
     }
     updateCoreFileLabel();
   }
 }
예제 #3
0
 @Override
 public void dispose() {
   GdbUIPlugin.getDefault()
       .getPreferenceStore()
       .removePropertyChangeListener(fPropertyChangeListener);
   super.dispose();
 }
예제 #4
0
  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);
  }
예제 #5
0
 public ConsoleSaveAction(TextConsole console) {
   super();
   setToolTipText(ConsoleMessages.ConsoleMessages_save_action_tooltip);
   setImageDescriptor(
       GdbUIPlugin.imageDescriptorFromPlugin(
           GdbUIPlugin.PLUGIN_ID, IConsoleImagesConst.IMG_SAVE_CONSOLE));
   fConsole = console;
 }
  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);
  }
예제 #7
0
 private static URL makeIconFileURL(String prefix, String name) {
   StringBuilder buffer = new StringBuilder(prefix);
   buffer.append(name);
   try {
     return new URL(fgIconBaseURL, buffer.toString());
   } catch (MalformedURLException e) {
     GdbUIPlugin.log(e);
     return null;
   }
 }
 @Override
 public void dispose() {
   super.dispose();
   DebugUITools.getDebugContextManager()
       .getContextService(getSite().getWorkbenchWindow())
       .removeDebugContextListener(this);
   fTerminalControl.disposeTerminal();
   fMenuManager.dispose();
   GdbUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(fPreferenceListener);
 }
예제 #9
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();
 }
예제 #10
0
 public GdbConnectCommand(DsfSession session) {
   fExecutor = session.getExecutor();
   fTracker = new DsfServicesTracker(GdbUIPlugin.getBundleContext(), session.getId());
 }
 private void setDefaults() {
   IPreferenceStore store = GdbUIPlugin.getDefault().getPreferenceStore();
   setInvertedColors(store.getBoolean(IGdbDebugPreferenceConstants.PREF_CONSOLE_INVERTED_COLORS));
   setBufferLineLimit(store.getInt(IGdbDebugPreferenceConstants.PREF_CONSOLE_BUFFERLINES));
 }
 public GdbSelectPrevTraceRecordCommand(DsfSession session) {
   fExecutor = session.getExecutor();
   fTracker = new DsfServicesTracker(GdbUIPlugin.getBundleContext(), session.getId());
   fSession = session;
 }
예제 #13
0
  /** 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;
  }