Package org.eclipse.php.internal.core

Examples of org.eclipse.php.internal.core.PHPVersion


   * @see org.eclipse.jface.preference.IPreferencePage#performOk()
   */
  public boolean performOk() {
    for (Iterator<PHPVersion> iterator = versionToDefaultItem.keySet()
        .iterator(); iterator.hasNext();) {
      PHPVersion version = iterator.next();
      phpExes.setItemDefaultForPHPVersion(versionToDefaultItem
          .get(version), version);
    }
    phpExes.save();
    return true;
View Full Code Here


   * @param page
   *            pref page
   */
  private void showPrefPage(String id/* , IPreferencePage page */) {
    PHPexeItem prevPHP = getPHPexe();
    PHPVersion prevEnv = getEnvironment();
    PreferencesUtil.createPreferenceDialogOn(getShell(), id,
        new String[] { id }, null).open();
    // PHPDebugUIPlugin.showPreferencePage(id);
    fillWithWorkspacePHPexes();
    // fillWithWorkspacePHPs();
View Full Code Here

      return fErrorPath;
    }
    if (fEnvironmentsButton.getSelection()) {
      int index = fEnvironmentsCombo.getSelectionIndex();
      if (index >= 0) {
        PHPVersion env = (PHPVersion) fEnvironments.get(index);
        return PHPRuntime.newPHPContainerPath(env);
      }
      return null;
    }
    if (fSpecificButton.getSelection()) {
View Full Code Here

    if (containerPath == null
        || PHPRuntime.newDefaultPHPContainerPath()
            .equals(containerPath)) {
      setUseDefaultPHP();
    } else {
      PHPVersion version = PHPRuntime.getPHPVersion(containerPath);
      if (version != null) {
        selectEnvironment(version);
        PHPexeItem[] items = PHPexes.getInstance().getCompatibleItems(
            PHPexes.getInstance().getAllItems(), version);
        if (items.length == 0) {
          setError(MessageFormat.format(
              PHPDebugUIMessages.PHPexesComboBlock_7,
              new String[] { version.getAlias() }));
        }
      } else {
        PHPexeItem install = PHPRuntime.getPHPexeItem(containerPath);
        if (install == null) {
          selectPHP(install);
View Full Code Here

        }
      }
      item = PHPDebugPlugin.getPHPexeItem(project);
    } else {
      IPath exePath = Path.fromPortableString(path);
      PHPVersion version = PHPRuntime.getPHPVersion(exePath);
      if (version == null) {
        String exeName = exePath.lastSegment();
        item = PHPexes.getInstance().getItem(exeName);
      } else {
        item = PHPDebugPlugin.getPHPexeItem(version);
View Full Code Here

  private List<String> useTypes;

  public boolean isInUseTraitStatement(int offset,
      IStructuredDocumentRegion sdRegion) {
    PHPVersion phpVersion = ProjectOptions.getPhpVersion(sourceModule
        .getScriptProject().getProject());
    if (phpVersion.isLessThan(PHPVersion.PHP5_4)) {
      return false;
    }
    if (useTypes != null) {
      return true;
    }
View Full Code Here

    for (IModelElement var : fields) {
      reporter.reportField((IField) var, "", replaceRange, false); //$NON-NLS-1$
    }

    if (showPhpVariables) {
      PHPVersion phpVersion = abstractContext.getPhpVersion();
      for (String variable : PHPVariables.getVariables(phpVersion)) {
        if (variable.startsWith(prefix)) {
          if (!requestor.isContextInformationMode()
              || variable.length() == prefix.length()) {
            reporter.reportField(
View Full Code Here

      } catch (ModelException e) {
        PHPCorePlugin.log(e);
      }
    }

    PHPVersion phpVersion = context.getPhpVersion();
    if (phpVersion.isGreaterThan(PHPVersion.PHP5_3)) {
      if (CALLABLE.startsWith(prefix)) {
        reporter.reportKeyword(CALLABLE, suffix, replaceRange);
      }
    }
  }
View Full Code Here

   * @param project
   * @param stream
   * @return a new lexer for the given project with the given stream
   */
  private AbstractPhpLexer getPhpLexer(Reader stream, LexerState startState) {
    final PHPVersion phpVersion = ProjectOptions.getPhpVersion(project);
    final AbstractPhpLexer lexer = PhpLexerFactory.createLexer(stream,
        phpVersion);
    lexer.initialize(ST_PHP_IN_SCRIPTING);
    lexer.setPatterns(project);

View Full Code Here

      Symbol tok = scanner.readNext(offset/* , false */);
      int startPos = scanner.getCurrentStartOffset();
      int nextStart = startPos;
      // prepare the modifiers 'syms'
      PHPVersion phpVersion = this.scanner.getPHPVersion();
      int modifiers[] = new int[] {
          SymbolsProvider.getModifierSym("public", phpVersion), //$NON-NLS-1$
          SymbolsProvider.getModifierSym("private", phpVersion), //$NON-NLS-1$
          SymbolsProvider.getModifierSym("protected", phpVersion), //$NON-NLS-1$
          SymbolsProvider.getModifierSym("static", phpVersion), //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.core.PHPVersion

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.