Package org.pdtextensions.semanticanalysis.ui.launch

Source Code of org.pdtextensions.semanticanalysis.ui.launch.SysPhpPrjPhar

/*******************************************************************************
* Copyright (c) 2013 The PDT Extension Group (https://github.com/pdt-eg)
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
package org.pdtextensions.semanticanalysis.ui.launch;

import org.apache.commons.exec.CommandLine;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.pdtextensions.core.launch.environment.PrjPharEnvironment;

public class SysPhpPrjPhar extends PrjPharEnvironment {

  private String php;
 
  public SysPhpPrjPhar(String executable) {
    php = executable;
  }

  public boolean isAvailable() {
    return php != null;
  }

  public CommandLine getCommand() {
    CommandLine cmd = new CommandLine(php.trim());
    cmd.addArgument(phar.trim());
   
    return cmd;
  }
  @Override
  protected IResource getScript(IProject project) {
    return project.findMember("csfixer.phar");
  }
}
TOP

Related Classes of org.pdtextensions.semanticanalysis.ui.launch.SysPhpPrjPhar

TOP
Copyright © 2018 www.massapi.com. 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.