Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » ISourceModule from Non-DLTK Project(How to obtain ISourceModule from a non-DLTK Project)
ISourceModule from Non-DLTK Project [message #489586] Mon, 05 October 2009 07:18
Andreas Nusser is currently offline Andreas NusserFriend
Messages: 7
Registered: October 2009
Junior Member

Before explaining my problem, let me give you some background:
One of the features of my current project is that it parses the source files of a project to obtain the internal structure. This information is then displayed in a way that the user can click on it and Eclipse jumps to the appropriate source location. Like an extended Outline.
Thanks to JDT and DLKT (and the "getHandleIdentifier()") this works like a charm 99% of the time.

Now to the problem:
Sometimes there are projects which contain mixed sources (Java and PHP) but the project nature is only Java. In this case, the DLTK wan't allow me to open the project iterate through it. First I've tried the ISourceParser, but I couldn't find a way from a ModuleDeclaration to an ISourceModule.
Then I tried to use the Workspace root as model and iterate over it, but it only returns an empty model.
Then I tried to create a ScriptProject and walk my way to ScriptFolder and call "getSourceModule(filename)". This works, but only for the files in the project root. For some reason I can't get it to work with scripts located in directories below the root.
Finally I tried the ScriptFolder method "createSourceModule(...)"
which resulted in a "not implemented" exception.

So it all boils down to the question: How can I get an ISourceModule object from a file which does not belong to a project with DLTK nature?

Previous Topic:is the file ConsoleProxy.js missing?
Next Topic:where can i find eScript sources
Goto Forum:

Current Time: Mon Jun 25 20:05:13 GMT 2018

Powered by FUDForum. Page generated in 0.02136 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top