Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[Dltk-dev] problem with indexing two different languages in one project

Title: problem with indexing two different languages in one project

Hello,


I have created a project that should contain two types of scripts and support editing for both of them. I use PDT and DLTK _javascript_ implementation. To enable support for both languages I create PDT project and then add a _javascript_ nature to its .project file. But when I try to use code completion or in some other way access an index, it appears to be working only on PHP files.

I looked deeper in DLTK code and it appears that in a lot of places it assumes that one project matches one nature and one language. In the end it all comes to methods such as org.eclipse.dltk.internal.core.util.Util#isValidSourceModule(...), which validate the resource to match the project's toolkit, which is usually the first one matching the first one of script natures of a project (see PriorityDLTKExtensionManager#findScriptNature(IProject) method).


So the problem is, it appears that currently DLTK does not support more than one language per project, which is a common situation in web projects. Is there some known workaround for this problem? I am currently preparing a patch that will at least enable indexing to work in these circumstances but maybe you can propose a better solution?


Thanks in advance,
Evgeny.


Back to the top