Community
Participate
Working Groups
I have a couple of use cases here. The first is using the "Open Type" dialog. If I try to find C_Parser which is in rdoc/parsers, Open Type doesn't find it. I can also call try to find it with the SearchEngine progamatically and get the same result. There seem to be various classes that the search engine can't find. I can even open the C_Parser in the editor and retry the search and it doesn't find it, even though it is already open. I've noticed this with seemingly random classes. I have a test rails project (boxroom) and I try to open the controller "FolderController" but it doesn't show up in the dialog, but I can find all the other controllers. I don't know if these will be reproducable.
It doesn't have anything to do with searching, the parser fails on a specific block of code in folder_controller.rb from the boxroom application. No problem is reported, the only visual indication is in the sript explore it doesn't display any components of folder_controller.rb (ie no class and method subtree). If you open C_Parser in the script explorer it's the same thing. Here is the snippet of code from folder_controller.rb which cause this problem case field when 'create': group_permission.can_create = can_do_it when 'read': group_permission.can_read = can_do_it when 'update': group_permission.can_update = can_do_it when 'delete': group_permission.can_delete = can_do_it end
Hi got some more information for you. I created a simple test case: def m(s) case s when 'create': puts 'created' end end This creates the silent fail. When this is parsed, the RubyASTBuildVisitor.visitWhenNode method doesn't handle the case where RubyArrayExpression is the expressionStatement. I tried the following patch and it seems to work but not sure if it's doing everything required :>. ... insert in the list of tests for expressionsStatement..... } else if (expressionsStatement instanceof RubyArrayExpression) { RubyArrayExpression rae = (RubyArrayExpression)expressionsStatement; statement.setExpressions(rae.getStatements()); When this patch is in I can expand FolderController in the script explorer. There are still other classes that don't expand, I'm going to see if I can isolate where they fail (C_Parser doesn't expand with this patch)
Bugs with parsing code snippets that you provided seems to be already fixed. C_Parser also are found now from Open Type. Thank you for a detailed description of the problems.
bulk change: fixed in 0.95