Package org.eclipse.php.internal.debug.core.debugger

Examples of org.eclipse.php.internal.debug.core.debugger.AbstractDebuggerConfiguration


        }
       
        ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, project.getName());
        String debuggerID = PHPProjectPreferences.getDefaultDebuggerID(project);
        String URL = server.getBaseURL() + "/app_dev.php";
        AbstractDebuggerConfiguration debuggerConfiguration = PHPDebuggersRegistry.getDebuggerConfiguration(debuggerID);
       
        wc.setAttribute(PHPDebugCorePreferenceNames.PHP_DEBUGGER_ID, debuggerID);
        wc.setAttribute(PHPDebugCorePreferenceNames.CONFIGURATION_DELEGATE_CLASS, debuggerConfiguration.getWebLaunchDelegateClass());
        wc.setAttribute(Server.NAME, server.getName());
        wc.setAttribute(Server.FILE_NAME, file.getFullPath().toOSString());
        wc.setAttribute(IPHPDebugConstants.RUN_WITH_DEBUG_INFO, PHPDebugPlugin.getDebugInfoOption());
        wc.setAttribute(IPHPDebugConstants.OPEN_IN_BROWSER, PHPDebugPlugin.getOpenInBrowserOption());
        wc.setAttribute(IDebugParametersKeys.FIRST_LINE_BREAKPOINT, false);
View Full Code Here


        if (filter) {
          continue;
        }
        debuggers.put(id, name);
        try {
          AbstractDebuggerConfiguration configuration = (AbstractDebuggerConfiguration) element
              .createExecutableExtension(CONFIGURATION_CLASS_ATTRIBUTE);
          configuration.setDebuggerId(id);
          configuration.setName(name);
          try {
            ICommunicationDaemon[] daemons = CommunicationDaemonRegistry
                .getBestMatchCommunicationDaemons();
            // find the daemon that fits this configuration (match
            // by debugger-id)
            for (ICommunicationDaemon daemon : daemons) {
              if (daemon.isDebuggerDaemon()
                  && id.equals(daemon.getDebuggerID())) {
                configuration.setCommunicationDaemon(daemon); // Attach
                                        // the
                                        // daemon
                                        // reference
                                        // to
                                        // the
                                        // configuration.
                break;
              }
            }
          } catch (Exception e) {
            configuration.setPort(-1);
          }
          configurations.put(id, configuration);
          if (!isPDT) {
            nonPDTConfigurations.put(id, configuration);
          }
        } catch (CoreException e) {
          Logger.logException(e);
        }
      }
    }
    // Override any PDT debugger settings with any extension of debugger
    // configuration.
    for (Entry<String, AbstractDebuggerConfiguration> entry : nonPDTConfigurations
        .entrySet()) {
      AbstractDebuggerConfiguration configuration = entry.getValue();
      configurations.put(entry.getKey(), configuration);
      debuggers.put(configuration.getDebuggerId(),
          configuration.getName());
    }
  }
View Full Code Here

   *
   * @param debuggerId
   * @return The debug port, or -1.
   */
  public static int getDebugPort(String debuggerId) {
    AbstractDebuggerConfiguration debuggerConfiguration = PHPDebuggersRegistry
        .getDebuggerConfiguration(debuggerId);
    if (debuggerConfiguration == null) {
      return -1;
    }
    return debuggerConfiguration.getPort();
  }
View Full Code Here

    String debuggerID = null;
    try {
      debuggerID = configuration.getAttribute(
          PHPDebugCorePreferenceNames.PHP_DEBUGGER_ID,
          PHPDebugPlugin.getCurrentDebuggerId());
      AbstractDebuggerConfiguration debuggerConfiguration = PHPDebuggersRegistry
          .getDebuggerConfiguration(debuggerID);
      configuration.setAttribute(
          PHPDebugCorePreferenceNames.CONFIGURATION_DELEGATE_CLASS,
          debuggerConfiguration.getScriptLaunchDelegateClass());
    } catch (Exception e) {
      Logger.logException(e);
    }
  }
View Full Code Here

   * Edit the settings for the selected PHP debugger.
   */
  private void editSettings() {
    final IStructuredSelection selection = (IStructuredSelection) fPHPDebuggers
        .getSelection();
    final AbstractDebuggerConfiguration phpDebuggerConfiguration = (AbstractDebuggerConfiguration) selection
        .getFirstElement();
    if (phpDebuggerConfiguration == null) {
      return;
    }
    // Open the edit dialog after creating it's content by calling the
    // AbstractDebuggerConfiguration#openConfigurationDialog
    phpDebuggerConfiguration.openConfigurationDialog(Display.getDefault()
        .getActiveShell());
    fPHPDebuggers.refresh(phpDebuggerConfiguration);
    commitChanges();
  }
View Full Code Here

        getNewConfigurationName(phpPathString));

    // Set the delegate class according to selected executable.
    wc.setAttribute(PHPDebugCorePreferenceNames.PHP_DEBUGGER_ID,
        defaultEXE.getDebuggerID());
    AbstractDebuggerConfiguration debuggerConfiguration = PHPDebuggersRegistry
        .getDebuggerConfiguration(defaultEXE.getDebuggerID());
    wc.setAttribute(
        PHPDebugCorePreferenceNames.CONFIGURATION_DELEGATE_CLASS,
        debuggerConfiguration.getScriptLaunchDelegateClass());
    wc.setAttribute(IPHPDebugConstants.ATTR_FILE, phpPathString);
    wc.setAttribute(IPHPDebugConstants.ATTR_FILE_FULL_PATH,
        phpFileFullLocation);
    wc.setAttribute(IPHPDebugConstants.ATTR_EXECUTABLE_LOCATION, defaultEXE
        .getExecutable().getAbsolutePath().toString());
View Full Code Here

      if (debuggerID == null) {
        String serverName = configuration.getAttribute(Server.NAME,
            (String) null);
        debuggerID = PHPDebugPlugin.getDebuggerId(serverName);
      }
      AbstractDebuggerConfiguration debuggerConfiguration = PHPDebuggersRegistry
          .getDebuggerConfiguration(debuggerID);
      configuration.setAttribute(
          PHPDebugCorePreferenceNames.CONFIGURATION_DELEGATE_CLASS,
          debuggerConfiguration.getWebLaunchDelegateClass());
    } catch (Exception e) {
      Logger.logException(e);
    }
  }
View Full Code Here

    // Set the debugger ID and the configuration delegate for this launch
    // configuration
    String debuggerID = PHPDebugPlugin.getDebuggerId(server.getName());
    wc.setAttribute(PHPDebugCorePreferenceNames.PHP_DEBUGGER_ID, debuggerID);
    AbstractDebuggerConfiguration debuggerConfiguration = PHPDebuggersRegistry
        .getDebuggerConfiguration(debuggerID);
    wc.setAttribute(
        PHPDebugCorePreferenceNames.CONFIGURATION_DELEGATE_CLASS,
        debuggerConfiguration.getWebLaunchDelegateClass());

    wc.setAttribute(Server.NAME, server.getName());
    wc.setAttribute(Server.FILE_NAME, fileName);
    wc.setAttribute(Server.BASE_URL, URL);
    wc.setAttribute(IPHPDebugConstants.RUN_WITH_DEBUG_INFO,
View Full Code Here

  public static int getDebugPort(ILaunchConfiguration launchConfiguration) {
    try {
      String debuggerID = launchConfiguration.getAttribute(
          PHPDebugCorePreferenceNames.PHP_DEBUGGER_ID,
          PHPDebugPlugin.getCurrentDebuggerId());
      AbstractDebuggerConfiguration debuggerConfiguration = PHPDebuggersRegistry
          .getDebuggerConfiguration(debuggerID);
      return debuggerConfiguration.getPort();
    } catch (Exception e) {
      Logger.logException(
          "Could not retrieve the debugger's port number", e);//$NON-NLS-1$
    }
    return -1;
View Full Code Here

      wc.setAttribute(IPHPDebugConstants.ATTR_EXECUTABLE_LOCATION, item
          .getExecutable().toString());
      String debuggerId = item.getDebuggerID();
      wc.setAttribute(PHPDebugCorePreferenceNames.PHP_DEBUGGER_ID,
          debuggerId);
      AbstractDebuggerConfiguration debuggerConfiguration = PHPDebuggersRegistry
          .getDebuggerConfiguration(debuggerId);
      wc.setAttribute(
          PHPDebugCorePreferenceNames.CONFIGURATION_DELEGATE_CLASS,
          debuggerConfiguration.getScriptLaunchDelegateClass());
      if (item.getINILocation() != null) {
        wc.setAttribute(IPHPDebugConstants.ATTR_INI_LOCATION, item
            .getINILocation().toString());
      } else {
        wc.setAttribute(IPHPDebugConstants.ATTR_INI_LOCATION,
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.debug.core.debugger.AbstractDebuggerConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.