Create object
Completion and resolving on second argument is working if first argument if "java".

Java methods completion

Expressions types
Binary/unary/etc. expression types are calculated if operands are appropriate java classes or literal expressions. The result parameters are always java classes (in case of literal operands - boxed types).

If resolve crashes
Sometimes you may get wrong result of the resolve - for example in long complex expressions. Yet it not work for standard functions - except createObject.

Then you may specify variable type in comments for completion to work for its methods. The pattern is (if you are familiar with regular expressions)
<!---[^@]*@cfmlvariable name=\"([^\"]+)\" type=\"([^\"]*)\"([^-]*|-[^-]|--[^-]|---[^>])*--->>
Well... it is easier to give an example =) Here is it: <!--- @cfmlvariable name="yourVariableName" type="javaClassName" --->

And your completion would be working from this comment down to next such comment for this variable. Of course resolve works on "type" parameter.
Enjoy! =)
2 comments:
The comment functionality is key, because many, if not most, CF folks use JavaLoader (http://javaloader.riaforge.org/) to load Java classes. The syntax for that is :
paths = [];
paths[1] = '/home/user/webapps/app/lib/MyJar.jar';
loader = createObject('component','javaloader.JavaLoader').init(paths);
myJavaObject = loader.create('com.foo.Bar');
So, being able to customize the completion/resolution in this context makes this feature usable.
bill
Post a Comment