/**
  * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(ILaunchConfigurationWorkingCopy)
  */
 public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
   setErrorMessage(null);
   try {
     selectDefaultServer(configuration);
   } catch (CoreException e) {
     Logger.logException(e);
   }
 }
 protected void updateURLComponents(String urlStr) {
   try {
     URL url = new URL(urlStr);
     String port = url.getPort() == -1 ? "" : ":" + url.getPort(); // $NON-NLS-1$ //$NON-NLS-2$
     fURLHost.setText(
         url.getProtocol() + "://" + url.getHost() + port + "/"); // $NON-NLS-1$ //$NON-NLS-2$
     if (url.getQuery() != null) {
       fURLPath.setText(url.getPath() + "?" + url.getQuery()); // $NON-NLS-1$
     } else {
       fURLPath.setText(url.getPath());
     }
   } catch (MalformedURLException e) {
     Logger.logException(e);
   }
 }
 /**
  * Apply the launch configuration delegate class that will be used when using this launch with the
  * {@link PHPLaunchDelegateProxy}. This method sets the class name of the launch delegate that is
  * associated with the debugger that was defined to this launch configuration. The class name is
  * retrieved from the debugger's {@link IDebuggerConfiguration}.
  *
  * @param configuration A ILaunchConfigurationWorkingCopy
  */
 protected void applyLaunchDelegateConfiguration(
     final ILaunchConfigurationWorkingCopy configuration) {
   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.getWebLaunchDelegateClass());
   } catch (Exception e) {
     Logger.logException(e);
   }
 }
  /** @see IActionDelegate#run(IAction) */
  public void run(IAction action) {
    IStructuredSelection selection = getCurrentSelection();
    if (selection == null) {
      return;
    }
    Iterator itr = selection.iterator();
    if (!itr.hasNext()) {
      return;
    }

    while (itr.hasNext()) {
      IBreakpoint breakpoint = (IBreakpoint) itr.next();
      if (breakpoint instanceof PHPConditionalBreakpoint) {
        try {
          ConditionDialog((PHPConditionalBreakpoint) breakpoint);
        } catch (CoreException ce) {
          // ConditionDialog doesn't throw CoreException. Just Log
          Logger.logException(
              "PHP: Exception setting condition in breakpoint", //$NON-NLS-1$
              ce);
        }
      }
    }
  }