|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Resolving bindings with ASTParser in JDT with SVNKitI am using Eclipse JDT's ASTParser to parse source files retrieved by SVNKit. What I do is to checkout the file of interest (typically I go to each revision and check out the changed files) and parse them. However, ASTParser requires the rest of the project to resolve name bindings to external classes and methods. One way I can do this is to check out the whole project to provide the binding but it seems an overkill because I am only interested in only one or two files. Also I currently checkout each file and store it as a string to parse, checking out the whole project means creating the whole directory structure in some temp location, etc.
Anyone has experience doing this or knows of a better way? |
|
|
RE: Resolving bindings with ASTParser in JDT with SVNKit I've done similar things with the Java 6 java.tools compiler
interface (and many many like it) which I would assume is similar to the JDT ASTParser, which I haven't used like this. My guess would be that you can probably fake something out, but you may end up creating a series of classes to represent a virtual file system in memory. That's basically what I did, though I was generating the source on the fly rather than pulling it SVNKit. -Greg > -----Original Message----- > From: alexloh [mailto:alexloh80@...] > Sent: Monday, June 08, 2009 6:32 PM > To: svnkit-users@... > Subject: Resolving bindings with ASTParser in JDT with SVNKit > > > I am using Eclipse JDT's ASTParser to parse source files retrieved by > SVNKit. > What I do is to checkout the file of interest (typically I go to each > revision and check out the changed files) and parse them. However, > ASTParser > requires the rest of the project to resolve name bindings to external > classes and methods. One way I can do this is to check out the whole > project > to provide the binding but it seems an overkill because I am only > interested > in only one or two files. Also I currently checkout each file and store > it > as a string to parse, checking out the whole project means creating the > whole directory structure in some temp location, etc. > > Anyone has experience doing this or knows of a better way? > > -- > View this message in context: http://www.nabble.com/Resolving-bindings- > with-ASTParser-in-JDT-with-SVNKit-tp23934976p23934976.html > Sent from the SVNKit - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: svnkit-users-unsubscribe@... > For additional commands, e-mail: svnkit-users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
|
|
RE: Resolving bindings with ASTParser in JDT with SVNKitHmm "fake something up" does not sound that good because I do need to know the actual bindings. Eg. if I have a class FOO that inherits from BAR, I need to know which methods are inherited from BAR, or even which "BAR" I am using (ie the "namespace"). I actually do check out the head revision of the project, but when I am parsing source files from older revisions, the context may be different. I am actually hoping there is a way I have some kind of 'IProject' wrapper from maybe 'SVNRepository' and somehow read from it only whatever I need.
But thanks for replying anyway.
|
|
|
RE: Resolving bindings with ASTParser in JDT with SVNKit That's exactly what I was suggesting, I meant that you'd need to
create a "fake" filesystem. Sorry for not being more clear. It shouldn't be too hard to do, really. -Greg > -----Original Message----- > From: alexloh [mailto:alexloh80@...] > Sent: Monday, June 08, 2009 7:06 PM > To: svnkit-users@... > Subject: RE: Resolving bindings with ASTParser in JDT with SVNKit > > > Hmm "fake something up" does not sound that good because I do need to > know > the actual bindings. Eg. if I have a class FOO that inherits from BAR, > I > need to know which methods are inherited from BAR, or even which "BAR" > I am > using (ie the "namespace"). I actually do check out the head revision > of the > project, but when I am parsing source files from older revisions, the > context may be different. I am actually hoping there is a way I have > some > kind of 'IProject' wrapper from maybe 'SVNRepository' and somehow read > from > it only whatever I need. > > But thanks for replying anyway. > > > > Greg Gibeling-2 wrote: > > > > I've done similar things with the Java 6 java.tools compiler > > interface (and many many like it) which I would assume is similar to > the > > JDT > > ASTParser, which I haven't used like this. My guess would be that > you can > > probably fake something out, but you may end up creating a series of > > classes > > to represent a virtual file system in memory. That's basically what > I > > did, > > though I was generating the source on the fly rather than pulling it > > SVNKit. > > > > -Greg > > > >> -----Original Message----- > >> From: alexloh [mailto:alexloh80@...] > >> Sent: Monday, June 08, 2009 6:32 PM > >> To: svnkit-users@... > >> Subject: Resolving bindings with ASTParser in JDT with SVNKit > >> > >> > >> I am using Eclipse JDT's ASTParser to parse source files retrieved > by > >> SVNKit. > >> What I do is to checkout the file of interest (typically I go to > each > >> revision and check out the changed files) and parse them. However, > >> ASTParser > >> requires the rest of the project to resolve name bindings to > external > >> classes and methods. One way I can do this is to check out the whole > >> project > >> to provide the binding but it seems an overkill because I am only > >> interested > >> in only one or two files. Also I currently checkout each file and > store > >> it > >> as a string to parse, checking out the whole project means creating > the > >> whole directory structure in some temp location, etc. > >> > >> Anyone has experience doing this or knows of a better way? > >> > >> -- > >> View this message in context: http://www.nabble.com/Resolving- > bindings- > >> with-ASTParser-in-JDT-with-SVNKit-tp23934976p23934976.html > >> Sent from the SVNKit - Users mailing list archive at Nabble.com. > >> > >> > >> -------------------------------------------------------------------- > - > >> To unsubscribe, e-mail: svnkit-users-unsubscribe@... > >> For additional commands, e-mail: svnkit-users-help@... > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: svnkit-users-unsubscribe@... > > For additional commands, e-mail: svnkit-users-help@... > > > > > > > > -- > View this message in context: http://www.nabble.com/Resolving-bindings- > with-ASTParser-in-JDT-with-SVNKit-tp23934976p23935229.html > Sent from the SVNKit - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: svnkit-users-unsubscribe@... > For additional commands, e-mail: svnkit-users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |