Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] How can I display other objects in the Outline View or the Script Explorer?

Hi Gabriel,

Outline and Script Explorer display model elements (in java model container is part of the java model). So the uinnversal way is to introduce additional model elements.  And we are working on the plan how to extend the model with language specific elements.

Model elements are usually generated from the AST, e.g. for TCL it is performed in org.eclipse.dltk.tcl.internal.parser.TclSourceElementRequestVisitor class.
In particular its processField(Statement) method generates model element for the field(variable). If I place "set varName 0" in TCL script then varName is correctly displayed in the outline. So I would recommend to look at this code and modify your code accordingly.

Regards,
Alex

----- Original Message -----
From: "Gabriel Petrovay" <gabriel.petrovay@xxxxxxxxxx>
To: "dltk-dev" <dltk-dev@xxxxxxxxxxx>
Sent: Friday, March 20, 2009 10:58:59 PM GMT +06:00 Almaty, Novosibirsk
Subject: [Dltk-dev] How can I display other objects in the Outline View or the Script Explorer?

Hello,

Is there a way to display other elements in the outline view or the Script Explorer (of course without having to reimplement the Navigator or the OutlinePage)? The same way like package name and import container+imports in java Outline.

A related problem is: can I display the FieldDeclaration (a proper name for those would be "variable declarations" or "global variables") on the top level? I can do this with functions but my FieldDeclaration's are not displayed although my AST is generating them.

Thanks!

Regards,
Gabriel

--
MSc Gabriel Petrovay
MCSA, MCDBA, MCAD
Mobile: +41(0)787978034

_______________________________________________ dltk-dev mailing list dltk-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/dltk-dev

Back to the top