Package org.eclipse.dltk.internal.core

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


    super(parent, name);
    this.modifiers = modifiers;
  }

  public ISourceRange getNameRange() throws ModelException {
    return new SourceRange(offset, length);
  }
View Full Code Here


  public ISourceRange getNameRange() throws ModelException {
    return new SourceRange(offset, length);
  }

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

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

    SourceRange replaceRange = getReplacementRange(context);

    IType[] types = getTypes(concreteContext);
    String suffix = getSuffix(concreteContext);
    for (IType type : types) {
      IMethod ctor = null;
View Full Code Here

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

    SourceRange replaceRange = getReplacementRange(context);
    String suffix = getSuffix(concreteContext);

    IType[] types = getTypes(concreteContext);
    for (IType type : types) {
      if (!concreteContext.getCompletionRequestor()
View Full Code Here

    char nextChar = ' ';
    try {
      if(insertMode){
        nextChar = abstractContext.getNextChar();
      }else{
        SourceRange replacementRange = getReplacementRange(abstractContext);
        nextChar = abstractContext.getDocument().getChar(replacementRange.getOffset()+replacementRange.getLength());
      }
     
    } catch (BadLocationException e) {
      PHPCorePlugin.log(e);
    }
View Full Code Here

    this(context, 0, 0);
  }

  public SourceRange getReplacementRange(ICompletionContext context)
      throws BadLocationException {
    SourceRange replacementRange = super.getReplacementRange(context);
    boolean insertMode = isInsertMode();
    if (replacementRange.getLength() > 0 && insertMode) {
      return new SourceRange(replacementRange.getOffset(),
          replacementRange.getLength() - 1);
    }
    return replacementRange;
  }
View Full Code Here

    if (abstractContext.getPrefixWithoutProcessing().trim().length() == 0) {
      return;
    }
    boolean isUseContext = context instanceof UseNameContext
        && !((UseNameContext) context).isUseTrait();
    SourceRange replacementRange = getReplacementRange(abstractContext);

    IType[] types = getTypes(abstractContext);
    // now we compute type suffix in PHPCompletionProposalCollector
    String suffix = "";//$NON-NLS-1$
    String nsSuffix = getNSSuffix(abstractContext);
View Full Code Here

  protected void reportAliasForNS(ICompletionReporter reporter,
      String suffix, AbstractCompletionContext abstractContext,
      IModuleSource module, final Map<String, UsePart> result)
      throws BadLocationException {
    SourceRange replacementRange = getReplacementRange(abstractContext);
    IDLTKSearchScope scope = createSearchScope();
    for (Entry<String, UsePart> entry : result.entrySet()) {
      String fullName = entry.getValue().getNamespace()
          .getFullyQualifiedName();
      IType[] elements = PhpModelAccess.getDefault().findTypes(null,
View Full Code Here

  }

  protected void reportAlias(ICompletionReporter reporter, String suffix,
      AbstractCompletionContext abstractContext, IModuleSource module,
      final Map<String, UsePart> result) throws BadLocationException {
    SourceRange replacementRange = getReplacementRange(abstractContext);
    String prefix = abstractContext.getPrefixWithoutProcessing();
    IDLTKSearchScope scope = createSearchScope();
    for (Entry<String, UsePart> entry : result.entrySet()) {
      String name = entry.getKey();
      String fullName = entry.getValue().getNamespace()
View Full Code Here

   */
  protected void addSelf(AbstractCompletionContext context,
      ICompletionReporter reporter) throws BadLocationException {

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

    if (CodeAssistUtils.startsWithIgnoreCase("self", prefix)) { //$NON-NLS-1$
      if (!context.getCompletionRequestor().isContextInformationMode()
          || prefix.length() == 4) { // "self".length()

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.