|Re: Couldn't resolve reference to Type [message #1016884 is a reply to message #1016273]
||Fri, 08 March 2013 04:07
| Ankit Agarwal
Registered: March 2012
I tried with both the relative path as well as absolute path, but was getting the same error. |
Anyways i got the problem fixed.
In DefaultLinkingService method getLinkedObjects, collected all scopes from imported files, then it looks for each string (In My case Calculator.add), converts it to QualifiedName and then matches if it exists in the scope. There was a catch here. while converting String to QualifiedName it created a new Object if it encounters a '.' in the String as mentioned in IQualifiedNameConverter. This only happened when a '.' was used as a separator or when an attribute or method was accessed by ClassName.MethodName or ClassName.Attribute. As it was a different object, so the object in the scope and this were never equal , hence the Type was not getting resolved.
To resolve this I had to bind a new QualifiedNameConverter that extended IQualifiedNameConverter.DefaultImpl in that class i had to override toQualifiedName method.
I dont know whether its correct or not but this got my problem fixed.
[Updated on: Fri, 08 March 2013 04:12]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.07541 seconds