netbeanstcl

This page is about (the features that should be produced within) an ongoing project of the Google Summer Of Code 2011.


The idea (abstractly): Tcl is available as a plugin for Eclipse, this projects goal is to have the same functionality within netbeans.

General

Resources

Short description

Provided from Proposal: The idea is to create Tcl language support for Netbeans. Including creation of Tcl projects and files, syntax highlighting, running scripts and full debug support.

Progress

For details please follow "Tcl Plugin For Netbeans" thread at tcl-gsoc mailing list and the timeline here: http://chiselapp.com/user/wiede/repository/netbeanstcl/timeline .

Before the official coding time

28.04.2011: Fossil repository is prepared and we've discussed some implementation ideas already. Currently focusing on Java and Tcl communication using ProcessBuilder (direct tclsh execution) to provide stdin/stdout/stderr and sockets interface for debugging informations. It's important aspect to have such working mechanism before integration with Netbeans API.

8.05.2011: I've been following tutorials from Netbeans Wiki and made first steps with Netbeans API and ANTLR.

15.05.2011: First .nbm file is prepared. Module allows to open .tcl files and provides syntax hilight. Lexer is generated by antlrworks. Used grammar file could be found at antlrgrammar/Tcl.g in project repository.

19.05.2011: Now I'm focusing on improving grammar file (following Arnulf's tips).

Official coding time

Week 1-2: Grammar file and lexer part is still improving.

Week 3: I'm working with Tcl Project type for Netbeans. Sample empty Tcl Project is ready. Template has just one .tcl file - ready to edit and no directories. Probably everyone has own habits for directories schema with sources and other stuff, so creating directories is basic action in Netbeans Logical View. Of course some templates could be prepared for different kind of scripts.

escargo 12 June 2011 - You can edit this comment out once you have read it, or leave as you prefer. I was thinking it might make sense to create a directory structure similar to what is used by Freewrap and Starkits. That way packaging up a completed application might be simpler.

dmp Thanks for comment. That's really good idea.

Week 4: Created .nbm (Netbeans Module) file can be found here: http://plugins.netbeans.org/plugin/39119/tcl-plugin . I've prepared short tutorial how to deal with prepared plugin: netbeanstcl tutorial.

Week 5: Added new package org.netbeans.modules.languages.tcl.optionpanel. OptionPanel appears in Netbeans Tools→Options and allows to set tclsh path (NbPreferences used). Added org.netbeans.modules.languages.tcl.run package. RunTclsh class allows to open new output window with tclsh. It also gives ability to execute Tcl scripts. Toolbar button to execute empty tclsh is available. Fixed hex number recognition. I will prepare new .nbm after small improvements of new features. I made few improvements. Here is my commit comment: "Improved RunTclsh.java. Tclsh is set to an interactive mode (set ::tcl_interactive 1) and is working via Netbeans output window same as within standard console. Way of running scripts changed to "source" from tclsh instead of passing scripts location via first tclsh argument. Added popup window with information how to fix problem when default tclsh path doesn't work.". New version uploaded to Netbeans Plugin Portal.

Week 6: Commit: "Empty Tcl file" moved from "Others" to new "Tcl" category. Fixed stdout/stdin mixing in output window, using thread locking. Fixed backslashes in paths (problem appeared under windows). Now I'm writing properties functionality (for each Tcl Project), mostly to be able to select one from project files that may be run by F6 (Run Main Project) action. For details please follow timeline . Feature ready and new version published at Netbeans Plugin Portal.

Week 7: I've started working with Debugging feature.

Week 8: Netbeans Debugger API to handle breakpoints (trace execution) is almost implemented. Please follow repository timeline .

Week 9: Working with Tcl and Java parts of debug process. Current version from repository allows to do single steps using Netbeans interface. Great news that: Our plugin will be visible as Featured Plugin at http://netbeans.org for 2 weeks from August 29th.

Week 10: Support for "Step Over" is here. Latest commit (689e69ec6f ): Added new package org.netbeans.modules.languages.tcl.debugger.variables to handle VariablesView. Includes NameColumn, TclVariable and the most important TclVariablesModel. Also TclDebuggerActionsProvider is now registered via META-INF/ to be available for TclVariablesModel class and for general comunication with TclDebuggerJavaPart. debugServer.tcl upgraded to serve [info vars]. Next commit (55a3ad0bc1 ): Changed: [info vars] is now splited to [info locals] and [info globals]. VariablesView adapted to locals and globals. Added support for displaying arrays in VariablesView.

Week 11: Breakpoints feature is ready. Latest commits: (0db6cfc1ab ): Added support for breakpoints in debugServer.tcl. (ba318ba05c ): Breakpoints are working. User interface and debugServer.tcl work as expected. Also debugServer.tcl got verbose mode that could be turn on by the fourth argv.

Week 12: "Run to Cursor" option is working. Watches View is prepared. CallStack View was added.

Week 13: Last week of GSoC 2011. Little improvement: Added preferences to select verbose mode and port number for debugger. That's the last project's improvement during GsoC. This week is spend on polishing and documentation for project. Current version (1.0) published at Netbeans Plugin Portal. Wikified netbeanstcl debugger to overview debugger functionality.