[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.technology.dltk] Re: type hierarchy and code completion
|
Unfortunately, this doesn't work since ISourceModule passed to
ICompletionEngine.complete is not the same as ISourceModule passed to
SourceParserUtil.getModuleDeclaration.
I'm not sure why there are two ISourceModule interfaces.
package org.eclipse.dltk.core;
/**
* Represents an entire source module (source file). Module elements need to
be opened before they can be navigated or manipulated. The children
* appear in the order in which they are declared in the source. If a file
cannot be parsed, its structure remains unknown. Use
* {@link IModelElement#isStructureKnown} to determine whether this is the
case.
* <p>
* This interface is not intended to be implemented by clients.
* </p>
*/
public interface ISourceModule extends IModule,
ISourceReference,ISourceManipulation,ICodeAssist
----------------------------
package org.eclipse.dltk.compiler.env;
/**
* This interface denotes a compilation unit, providing its name and content.
*/
public interface ISourceModule extends IDependent {
"Chuck Doucette" <cdoucette@xxxxxxxxxxx> wrote in message
news:g2kgmo$551$1@xxxxxxxxxxxxxxxxxxxx
> Apparently, given the an ISourceModule I can get the corresponding
> ModuleDeclaration by calling:
>
> package org.eclipse.dltk.core;
> public class SourceParserUtil {
>
> public static ModuleDeclaration getModuleDeclaration(ISourceModule module,
>
> IProblemReporter reporter, int flags) {
>
> If it is already parsed, it will return the cached copy of the AST tree.
>
> If not, it will parse it (and thus it needs the IProblemReporter argument
> etc.)
>
> Is this an appropriate way to proceed?
>
> Thanks,
>
> Chuck
>
>
>
>