Package org.eclipse.dltk.internal.core

Examples of org.eclipse.dltk.internal.core.SourceRange


  public void apply(ICompletionReporter reporter) throws BadLocationException {

    AbstractCompletionContext context = (AbstractCompletionContext) getContext();
    String prefix = context.getPrefix();
    String suffix = ""; //$NON-NLS-1$
    SourceRange replaceRange = getReplacementRange(context);
    // if (context.getEnclosingType() != null) {
    // try {
    // int flags = context.getEnclosingType().getFlags();
    // if (!PHPFlags.isNamespace(flags)) {
    // for (String keyword : KEYWORDS) {
View Full Code Here


    super(context);
  }

  public void apply(ICompletionReporter reporter) throws BadLocationException {
    ICompletionContext context = getContext();
    SourceRange range = getReplacementRange(context);
    TypeCastingContext typeCastingContext = (TypeCastingContext) context;
    String prefix = typeCastingContext.getPrefix().toLowerCase();
    for (String cast : TYPE_CASTS) {
      if (cast.startsWith(prefix)) {
        reporter.reportKeyword(cast, "", range); //$NON-NLS-1$
View Full Code Here

    if (!(context instanceof PHPDocTagContext)) {
      return;
    }
    super.apply(reporter);
    String prefix = ((PHPDocTagContext) context).getPrefix();
    SourceRange replaceRange = getReplacementRange(context);
    for (int i = 0; i < ALL_TYPE.length; i++) {
      reportKeyword(reporter, replaceRange, ALL_TYPE[i], prefix);

    }
  }
View Full Code Here

    hasSpecialOffsets = true;
  }

  public ISourceRange getNameRange() throws ModelException {
    if (hasSpecialOffsets)
      return new SourceRange(nameOffset, nameLength);
    return super.getNameRange();
  }
View Full Code Here

    return super.getNameRange();
  }

  public ISourceRange getSourceRange() throws ModelException {
    if (hasSpecialOffsets)
      return new SourceRange(offset, length);
    return super.getSourceRange();
  }
View Full Code Here

      return;
    }

    IncludeStatementContext includeContext = (IncludeStatementContext) context;
    String prefix = includeContext.getPrefix();
    SourceRange replaceRange = getReplacementRange(includeContext);

    final ISourceModule sourceModule = includeContext.getSourceModule();
    if (sourceModule == null || sourceModule.getScriptProject() == null) {
      if (DLTKCore.DEBUG_COMPLETION) {
        System.out.println("Unable to locate source module or project"); //$NON-NLS-1$
View Full Code Here

    CompletionRequestor requestor = concreteContext
        .getCompletionRequestor();
    String prefix = concreteContext.getPrefix();

    String suffix = getSuffix(concreteContext);
    SourceRange replaceRange = null;
    if (suffix.equals("")) { //$NON-NLS-1$
      replaceRange = getReplacementRange(concreteContext);
    } else {
      replaceRange = getReplacementRangeWithBraces(concreteContext);
    }
View Full Code Here

  public void apply(ICompletionReporter reporter) throws BadLocationException {

    ICompletionContext context = getContext();
    NamespaceMemberContext concreteContext = (NamespaceMemberContext) context;

    SourceRange replaceRange = getReplacementRange(context);

    String suffix = "";//$NON-NLS-1$
    String nsSuffix = getNSSuffix(concreteContext);
    IType[] types = getTypes(concreteContext);
    for (IType type : types) {
View Full Code Here

    return superClassNames;
  }

  public ISourceRange getNameRange() throws ModelException {
    if (hasSpecialOffsets)
      return new SourceRange(nameOffset, nameLength);
    if (getElementInfo() != null)
      return super.getNameRange();
    return new SourceRange(0, 0);
  }
View Full Code Here

    return new SourceRange(0, 0);
  }

  public ISourceRange getSourceRange() throws ModelException {
    if (hasSpecialOffsets)
      return new SourceRange(offset, length);
    if (getElementInfo() != null)
      return super.getSourceRange();
    return new SourceRange(0, 0);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.internal.core.SourceRange

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.