mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 02:45:36 +01:00
clean up
This commit is contained in:
@@ -259,6 +259,7 @@ public class ASTNodeWrapper {
|
||||
}
|
||||
|
||||
private int getJavadocOffset(TypeDeclaration td){
|
||||
// TODO: This is still broken. Hence no refactoring or highlighting on scroll works :\
|
||||
List<ASTNode> list= td.modifiers();
|
||||
list = td.modifiers();
|
||||
SimpleName sn = (SimpleName) getNode();
|
||||
@@ -277,47 +278,6 @@ public class ASTNodeWrapper {
|
||||
return 0;
|
||||
}
|
||||
|
||||
private void testForMultilineDecl(ASTNode thisNode){
|
||||
int minLineNum = lineNumber, maxLineNum = ((CompilationUnit) thisNode
|
||||
.getRoot()).getLineNumber(thisNode.getStartPosition());
|
||||
log("Visiting children of node " + getNodeAsString(thisNode));
|
||||
Iterator<StructuralPropertyDescriptor> it = thisNode
|
||||
.structuralPropertiesForType().iterator();
|
||||
boolean flag = true;
|
||||
int altStartPos = 0;
|
||||
while (it.hasNext()) {
|
||||
StructuralPropertyDescriptor prop = (StructuralPropertyDescriptor) it
|
||||
.next();
|
||||
if (prop.isChildListProperty()) {
|
||||
List<ASTNode> nodelist = (List<ASTNode>) thisNode
|
||||
.getStructuralProperty(prop);
|
||||
log("prop " + prop);
|
||||
for (ASTNode cnode : nodelist) {
|
||||
log("Visiting node " + getNodeAsString(cnode));
|
||||
if (getLineNumber(cnode) >= minLineNum && getLineNumber(cnode) <= maxLineNum) {
|
||||
if (flag) {
|
||||
altStartPos = cnode.getStartPosition();
|
||||
// log("multi...");
|
||||
|
||||
flag = false;
|
||||
} else {
|
||||
if (cnode == Node) {
|
||||
// loop only till the current node.
|
||||
break;
|
||||
}
|
||||
// We've located the first node in the line.
|
||||
// Now normalize offsets till Node
|
||||
//altStartPos += normalizeOffsets(cnode);
|
||||
|
||||
}
|
||||
testForMultilineDecl(cnode); FieldDeclaration f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
log("Altspos " + altStartPos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the difference in pde and java code offsets
|
||||
* @param source
|
||||
|
||||
Reference in New Issue
Block a user