From 1377f759b3100fb2e6fc4f764d9932ea2cae5023 Mon Sep 17 00:00:00 2001 From: Manindra Moharana Date: Sat, 1 Mar 2014 16:54:09 +0530 Subject: [PATCH] clean up --- .../mode/experimental/ASTNodeWrapper.java | 42 +------------------ 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/pdex/src/processing/mode/experimental/ASTNodeWrapper.java b/pdex/src/processing/mode/experimental/ASTNodeWrapper.java index 45518b4b6..6c6cbc6a5 100644 --- a/pdex/src/processing/mode/experimental/ASTNodeWrapper.java +++ b/pdex/src/processing/mode/experimental/ASTNodeWrapper.java @@ -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 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 it = thisNode - .structuralPropertiesForType().iterator(); - boolean flag = true; - int altStartPos = 0; - while (it.hasNext()) { - StructuralPropertyDescriptor prop = (StructuralPropertyDescriptor) it - .next(); - if (prop.isChildListProperty()) { - List nodelist = (List) 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