Package org.eclipse.dltk.core.index2.IIndexingRequestor

Examples of org.eclipse.dltk.core.index2.IIndexingRequestor.ReferenceInfo


        if (field instanceof SimpleReference) {
          SimpleReference var = (SimpleReference) field;
          int modifiers = Modifiers.AccPublic;
          int offset = var.sourceStart();
          int length = var.sourceEnd() - offset;
          modifyDeclaration(assignment, new DeclarationInfo(
              IModelElement.FIELD, modifiers, offset, length,
              offset, length, '$' + var.getName(), null, null,
              fCurrentQualifier, fCurrentParent));
        }
      }
    } else if (left instanceof VariableReference) {
      int modifiers = Modifiers.AccPublic | Modifiers.AccGlobal;
      if (!declarations.empty()
          && declarations.peek() instanceof MethodDeclaration
          && !methodGlobalVars.peek().contains(
              ((VariableReference) left).getName())) {
        return visitGeneral(assignment);
      }
      int offset = left.sourceStart();
      int length = left.sourceEnd() - offset;
      modifyDeclaration(assignment, new DeclarationInfo(
          IModelElement.FIELD, modifiers, offset, length, offset,
          length, ((VariableReference) left).getName(), null, null,
          null, null));
    }
    return visitGeneral(assignment);
View Full Code Here


        argsCount = args.getChilds().size();
      }

      modifyReference(
          call,
          new ReferenceInfo(IModelElement.METHOD, call.sourceStart(),
              call.sourceEnd() - call.sourceStart(), call
                  .getName(), Integer.toString(argsCount),
              null));
    }
View Full Code Here

    // information in order to access it quickly:
    if (include.getExpr() instanceof Scalar) {
      Scalar filePath = (Scalar) include.getExpr();
      modifyReference(
          include,
          new ReferenceInfo(IModelElement.METHOD, filePath
              .sourceStart(), filePath.sourceEnd()
              - filePath.sourceStart(), "include", Integer //$NON-NLS-1$
              .toString(1), null));

      String fullPath = ASTUtils.stripQuotes(((Scalar) filePath)
View Full Code Here

    return visitGeneral(s);
  }

  public boolean visit(TypeReference reference) throws Exception {
    modifyReference(reference,
        new ReferenceInfo(IModelElement.TYPE, reference.sourceStart(),
            reference.sourceEnd() - reference.sourceStart(),
            reference.getName(), null, null));
    return visitGeneral(reference);
  }
View Full Code Here

      String name = simpleReference.getName();
      if (!name.startsWith(DOLOR)) {
        name = DOLOR + name;
      }
      modifyReference(access, new ReferenceInfo(IModelElement.FIELD,
          simpleReference.sourceStart(), simpleReference.sourceEnd()
              - simpleReference.sourceStart(), name, null, null));
    }

    return visitGeneral(access);
View Full Code Here

      final ConstantReference constantReference = access.getConstant();
      final String name = constantReference.getName();

      modifyReference(
          access,
          new ReferenceInfo(IModelElement.FIELD, constantReference
              .sourceStart(), constantReference.sourceEnd()
              - constantReference.sourceStart(), name, null, null));
    }

    return visitGeneral(access);
View Full Code Here

                    RegisterNamespaceVisitor registrar = new RegisterNamespaceVisitor(sourceModule);
                    registrar.visit(call);

                    for (IPath namespace : registrar.getNamespaces()) {
                        ReferenceInfo info = new ReferenceInfo(ISymfonyModelElement.NAMESPACE, 0, 0, namespace.toString(), null, null);
                        requestor.addReference(info);
                    }
                }
                // TODO: check if the variable implements Symfony\Component\DependencyInjection\ContainerInterface
                else if("setAlias".equals(call.getName())) {
View Full Code Here

                if (args.get(0) instanceof Scalar) {
                    Scalar environment = (Scalar) args.get(0);
                    String value = environment.getValue().replace("\"", "").replace("'", "");
                    String path = sourceModule.getPath().toString();
                    Logger.debugMSG("indexing environment: " + value + " => " + path);
                    ReferenceInfo info = new ReferenceInfo(ISymfonyModelElement.ENVIRONMENT, instance.sourceStart(), instance.sourceEnd()-instance.sourceStart(), value, null, path);
                    requestor.addReference(info);
                }
            }
        }
        return super.visit(s);
View Full Code Here

                        // we got a bundle definition, index it
                        if (fqcn.equals(SymfonyCoreConstants.BUNDLE_FQCN) && ! isTestOrFixture) {
                            int length = (currentClass.sourceEnd() - currentClass.sourceEnd());
                            JSONObject meta = JsonUtils.createBundle(sourceModule, currentClass, namespace);
                            ReferenceInfo info = new ReferenceInfo(ISymfonyModelElement.BUNDLE, currentClass.sourceStart(), length, currentClass.getName(), meta.toJSONString(), namespace.getName());
                            requestor.addReference(info);
                        }
                    }

                    //TODO: Check against an implementation of Symfony\Component\DependencyInjection\ContainerAwareInterface
View Full Code Here

        if (namespace != null) {
            ns = namespace.getName();
        }

        Logger.debugMSG("indexing annotation class: " + clazz.getName() + " " + ns);
        ReferenceInfo info = new ReferenceInfo(ISymfonyModelElement.ANNOTATION, clazz.sourceStart(), clazz.sourceEnd(), clazz.getName(), null, ns);
        requestor.addReference(info);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.core.index2.IIndexingRequestor.ReferenceInfo

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.