Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] DLTK scope-management

Hi Duy,

I guess modules are pretty much like namespaces in PHP or in TCL. If
you model modules using IType it shouldn't be a problem to search for
its elements when you need a code completion of elements declared in a
specific module. As for variables declared in function body, you can
filter those whose offsets are greater then current cursor position in
the editor while searching them.
You can refer to implementations in org.eclipse.php.core or in
org.eclipse.dltk.tcl.core for more information.

On Wed, May 27, 2009 at 5:08 AM, Duy Dinh <duy@xxxxxxxxxxxxxxxxxx> wrote:
> According to the python IDE and the DLTK IDE guide we have to make an editor
> for the TTCN3. Now i'm building the .g file and have problem with the
> code-scope.
> The TTCN3 files are comprised of modules, in module we have e.g.:
> module moduleName{
>        type integer A;
>        A a;
>        function func(){
>                a = 2;
>                func2();
>                A b;
>                b = 3;
>        }
>        function func2(){}
> }
> in module scope, the order is arbitrary, that means in func() we can use
> both 'a' variable and func2() function but it func() function we can only
> use 'b' variable after its declaration. Now my problem is to find down
> whenever we use code completion, we can know which variable or function is
> visible at the actual position so we can only make CompletionProposal of
> those.
> I hope i've explain my problem clearly and hope you can help me.
> Thank you very much, for your response and for your DLTK too, it helps use
> much.
> Best regards,
> Pham Dinh Duy
>
>
> _______________________________________________
> dltk-dev mailing list
> dltk-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/dltk-dev
>


Back to the top