Community
Participate
Working Groups
Hi! I've found an error during parsing and AST tree. I use an AST tree and a visitor class. The visitor method 'endVisit' (with QualifiedName as parameter) has this lines: IBinding i_binding = qualifiedName.getQualifier().resolveBinding(); ITypeBinding type_binding = qualifiedName.getQualifier().resolveTypeBinding(); The problems is that when visitor inspect lines as: private int[] posicionTabla = new int[] { AP502002.CODNIVEL3, AP502002.NOMNIVEL3, AP502002.CODAUTORIZA, AP502002.NOMUSRCIA, AP502002.TIPAUTORIZA, AP502002.NOMAUTORIZA, AP502002.CODCTOAUTORIZA, AP502002.NOMCTOAUTORIZA, AP502002.CODMON, AP502002.NOMMON, AP502002.MCAINH, AP502002.IMPORTEAUTORIZA, AP502002.NUMDECIMALES }; the type_binding variables is only correct (not null) for the first element in the array. It is null for the next ones. AP502002 extends from JFrame and all fields are ints.
Could you please attach your complete test case? It is easier for us to reproduce your problem.
I will investigate as soon as I have your test case. Please zip the file and attach it to this bug report.
Created attachment 9005 [details] Classes
Thanks, I will check it with the 3.0 builds.
Could you please provide the source for the class AP502002? Thanks.
Decrease severity as I am waiting for complete reproducable test case.
Created attachment 9082 [details] The AP502002 Class
All the fields in your array initializer are wrong. The names in the file you sent me are preceeded with 'ivj'. Is this a mistake submitting the bug? I will try to reproduce your problem with a simple test case.
I tried to reproduce your problem but unsuccessfully. I will attach my test case. Could you please try it on your side and let me know if it is working? Thanks.
I tried only in 3.0 stream.
Created attachment 9102 [details] Test case to try on your machine
Hi! I run your test case and the problem persist. I'm using VE 2.1.2 and java 1.4.2_3. My code prefix the fields names with a 'ivj' prefix. can you send me your 'parser code' that do this changes? Many thanks!
I build up an example and I removed the 'ivj' prefix. I need some clarifications. Are you saying that you write some code that refers to field without the prefix and you expect to get the bindings? Could you please describe what you are doing to get the problem from an empty worspace? Thanks.
Close as WORKSFORME. Reopen if you can provide a simple test case that shows the problem. Trying to reproduce it using your description is unsuccessful so far.