diff --git a/pdex/Todo, GSoC 2013.txt b/pdex/Todo, GSoC 2013.txt new file mode 100644 index 000000000..c4c9b267e --- /dev/null +++ b/pdex/Todo, GSoC 2013.txt @@ -0,0 +1,51 @@ +TODO List for Experimental Mode Plus- GSOC 2013 + +This would also be a break down of my thought process and ideas as I tackle various tasks. + +Manindra Moharana (me@mkmoharana.com) + +* : Todo, x : Done, ? : Undecided Todo, ! : Critical, + : Minor Todo + +Code Completion +============== +The big stuff: +x! Code competition for local code is working with recursive look up. +x! Code completion with library code, non-nested seems to be broken, fix it. Fixed. +x Completion for external classes - ArrayList, HashMap, etc. +*! Recursive lookup for compiled(library) code! +*! Library CC for nested would be tricky. Need to jump from local->compiled code while searching recursively. Recursive find's current implementation is based on ASTNode return type. Afaik, no way to instantiate orphaned +ASTNode objects(or did I miss it?). ASTNode objects have to be created only from the main ast instance. But I need to find a way to switch to compiled instances from local class instance. +*! May be I should just implement recursive find for compiled code first, see how it goes and hopefully it would give me some ideas about how to integrating the two. +*! Should I implement wrapper for ASTNode? - possibly needed for code completion with compiled and non-compiled code. +* Trie implementation would be lower priority, "premature optimisation is pure evil". Get all features of CC working good enough and then plan this. +*+ Differentiating between multiple statements on the same line. How to? + +Finer details +* Obj a1; a1.-> completion doesn't work before it is instantiated. Look into that. +* printStuff(int,float,String) - completion endings have to be appropriate. Right now it's just printStuff(,,). Cursor positioning also needs to be taken care of. Argument list as tooltip if possible? +* Sorted list of completion candidates - fields, then methods. It's unsorted presently. +*! p5 enhanced stuff in java, how does it fit in with everything else, and edge cases. Possibly add support for them. +* Reflection API - getMethods vs getDeclaredMethods. + +Refactoring +=========== +First major hurdle is offset mapping +* pde<->java code offset : precise conversion needed +x for the above, I've decide to first implement a sketch outline like feature, which would highlight an AST element precisely in the pde code. This would ensure I've got the mapping working properly. And may lead to a future feature. +* This is precise upto a certain line. Once on a line, pde stuff have to be taken into consideration. +* PDE specific enhancements will also have to be tackled like int(), # literals. + +Refactoring would work only when code is compiler error free. I plan to do a find replace type op on the compile ready code. +1. First identify the declaration of the variable in the AST. +2. Now for each instance of the word in code inside the declaration scope(i.e further down the child nodes in the AST), find if the matched word is the same one whose declaration I know of. +3. If it is so, replace it with the new name. +4. All the changes in code would be made in a separate copy of the code(?). After all the renaming is done, allow it only if the new code compiles. Basically an undo should be possible in case of conflicts. + +Quick Navigation +============== +x Ctrl + Click on an element to scroll to its definition in code +x Local Vars +x Local Methods +x Local Classes +x Recursive lookup, a.b().c() + diff --git a/pdex/src/processing/mode/experimental/ErrorCheckerService.java b/pdex/src/processing/mode/experimental/ErrorCheckerService.java index 5b931eb70..0f97281a1 100644 --- a/pdex/src/processing/mode/experimental/ErrorCheckerService.java +++ b/pdex/src/processing/mode/experimental/ErrorCheckerService.java @@ -1081,7 +1081,7 @@ public class ErrorCheckerService implements Runnable{ } /** - * /** Static method for scroll to a particular line in the PDE. Requires the + * Static method for scroll to a particular line in the PDE. Requires the * editor instance as arguement. * * @param edt