Commit 6ebfe399 authored by Florian's avatar Florian

OpenFileHandler now works for Generic Params

parent 0f24ea75
......@@ -110,17 +110,26 @@ public class OpenFileHandler extends AbstractHandler {
for (IMethod meth : methArray) {
try {
boolean hasName = operation.contains(meth.getElementName());
if(!hasName)
continue;
boolean hasParams = true;
String[] parameters = meth.getParameterTypes();
for (String param : parameters) {
param = Signature.getSignatureSimpleName(param);
int index = param.indexOf("<");
if(index > 0){
param = param.substring(0, index);
}
if (!operation.contains(param)) {
hasParams = false;
}
}
if (hasName && hasParams) {
length = meth.getSourceRange().getLength();
offset = meth.getSourceRange().getOffset();
break;
}
} catch (JavaModelException e) {
e.printStackTrace();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment