Package org.eclipse.php.internal.server.core

Examples of org.eclipse.php.internal.server.core.Server


          if (contentType.isAssociatedWith(file.getName())) {
            phpPathString = file.getFullPath().toString();
          }
        }

        Server defaultServer = ServersManager.getDefaultServer(project);
        if (defaultServer == null) {
          PHPDebugPlugin.createDefaultPHPServer();
          defaultServer = ServersManager.getDefaultServer(project);
          if (defaultServer == null) {
            // Sould not happen
View Full Code Here


              (String) null);
        } catch (CoreException e) {
          // TODO handle
        }
        if (serverName != null) {
          Server server = ServersManager.getServer(serverName);
          for (IDebugServerConnectionTest debugServerTester : debugTesters) {
            debugServerTester.testConnection(server, getShell());
          }
        }
      }
View Full Code Here

    filler.setLayoutData(gd);
  }

  protected void sideButtonPressed(int index) {
    if (index == IDX_ADD) {
      Server newServer = getServerFromWizard();
      if (newServer != null) {
        fServersList.addElement(newServer);
        ServersManager.addServer(newServer);
        ServersManager.save();
        Display.getDefault().asyncExec(new Runnable() {
          public void run() {
            fServersList.refresh();
          }
        });
      }
    } else if (index == IDX_EDIT) {
      handleEditServerButtonSelected();
      fServersList.refresh();
    } else if (index == IDX_DEFAULT) {
      List selectedElements = fServersList.getSelectedElements();
      if (selectedElements.size() > 0) {
        Server server = (Server) selectedElements.get(0);
        ServersManager.setDefaultServer(null, server);
        ServersManager.save();
        fServersList.refresh();
      }
    }
View Full Code Here

  protected Server getServerFromWizard() {
    Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
        .getShell();
    NullProgressMonitor monitor = new NullProgressMonitor();
    Server theServer = null;
    ServerWizard wizard = new ServerWizard();
    ClosableWizardDialog dialog = new ClosableWizardDialog(shell, wizard);
    if (dialog.open() == Window.CANCEL) {
      monitor.setCanceled(true);
      return null;
View Full Code Here

        .getObject(WizardModel.SERVER);
    return theServer;
  }

  protected void handleEditServerButtonSelected() {
    Server server = (Server) fServersList.getSelectedElements().get(0);
    Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
        .getShell();
    NullProgressMonitor monitor = new NullProgressMonitor();
    ServerEditDialog dialog = new ServerEditDialog(shell, server);
    if (dialog.open() == Window.CANCEL) {
View Full Code Here

    }
    ServersManager.save();
  }

  protected void handleRemoveServer() {
    Server server = (Server) fServersList.getSelectedElements().get(0);
    ServersManager.removeServer(server.getName());
    ServersManager.save();
    Display.getDefault().asyncExec(new Runnable() {
      public void run() {
        fServersList.refresh();
      }
View Full Code Here

      serverList = new ArrayList();

    if (servers != null) {
      int size = servers.length;
      for (int i = 0; i < size; i++) {
        Server server = servers[i];
        serverList.add(server);
      }
    }
  }
View Full Code Here

   * @param resource
   * @return true if this is a webpage project
   */
  private boolean isWebPageProjectLaunch(Object[] args, IProject resource) {
    try {
      final Server localServer = ServersManager.getLocalServer(resource);
      if (localServer == null) {
        return false;
      }
      return PHPToolkitUtil.isPhpProject((IProject) resource)
          && args.length > 0 && "webPage".equals(args[0]); //$NON-NLS-1$
View Full Code Here

          fDebugEncodingSettings.getText());
      debugUINode.put(PHPDebugCorePreferenceNames.OUTPUT_ENCODING,
          fOutputEncodingSettings.getText());

      ServersManager.setDefaultServer(project, fDefaultServer.getText());
      Server server = ServersManager.getServer(fDefaultServer.getText());
      setBasePathValue(project, fDefaultBasePath.getText());
    } else {
      if (project == null) {
        // Workspace settings
        prefs.setValue(PHPDebugCorePreferenceNames.STOP_AT_FIRST_LINE,
View Full Code Here

      return false;
    }
  }

  private void resolveAndSetBaseURL() throws MalformedURLException {
    Server server = getDefaultServer();
    IPath basePath = getDefaultBasePath();
    if (basePath != null) {
      URL baseURL = generateBaseURL(server, basePath);
      displayDefaultBaseURL(baseURL);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.server.core.Server

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.