for (Test test : tests) {
for (MethodDeclaration method : methods) {
if (method.getName().equals(test.getInternalFunction())) {
PHPMethodDeclaration phpMethod = (PHPMethodDeclaration) method;
PHPDocBlock doc = phpMethod.getPHPDoc();
if (doc != null) {
test.addDoc(doc);
}
Logger.debugMSG("indexing test tag: "
+ test.getElementName() + " with metadata: "
+ test.getMetadata());
ReferenceInfo info = new ReferenceInfo(
ITwigModelElement.TEST, 0, 0,
test.getElementName(), test.getMetadata(), null);
addReferenceInfo(info);
}
}
}
for (Function function : functions) {
for (MethodDeclaration method : methods) {
if (method.getName().equals(function.getInternalFunction())) {
PHPMethodDeclaration phpMethod = (PHPMethodDeclaration) method;
PHPDocBlock doc = phpMethod.getPHPDoc();
if (doc != null) {
function.addDoc(doc);
}
function.addArgs(method.getArguments());
Logger.debugMSG("indexing function: "
+ function.getElementName() + " with metadata: "
+ function.getMetadata());
ReferenceInfo info = new ReferenceInfo(
ITwigModelElement.FUNCTION, 0, 0,
function.getElementName(), function.getMetadata(),
null);
addReferenceInfo(info);
}
}
}
for (Filter filter : filters) {
for (MethodDeclaration method : methods) {
if (method.getName().equals(filter.getInternalFunction())) {
PHPMethodDeclaration phpMethod = (PHPMethodDeclaration) method;
PHPDocBlock doc = phpMethod.getPHPDoc();
if (doc != null) {
filter.addDoc(doc);
}