Community
Participate
Working Groups
Build Identifier: 20100917-0705 Argument expansion, i.e. {*}, gets marked as an error -- namely "Extra characters after close-brace". TclOO syntax also does not appear to be supported Reproducible: Always
same for: code: namespace _ensemble_ create ... ==> Invalid argument:ensemble. Possible values:children,code,current,delete,eval,exists,export,forget,import,inscope,origin,parent,qualifiers,tail,which DLTK: Dynamic Languages Toolkit - TCL Development Tools 3.0.0.v20101109-0623-7g--EC3wSgpTPwM02543 Eclipse Galileo: Version: 3.5.2 Build id: M20100211-1343 Expect: 5.44.1.15 Tcl: 8.5.8 OS: Debian Squeeze
I'm also getting similar errors: Code: 1) uplevel 1 [list namespace upvar $ns {*}$vs] set admin_cost [rstpPortGetAdminPathCost $dutNo $portNo {*}$args] set admin_cost [rstpPortGetOperPathCost $dutNo $portNo {*}$args] return [$specific_proc_name {*}$args] ==> Extra characters after close-brace Notice that there are many, many uses of {*} argument expansion in the code that do not give this error. These 4 lines are the only places with the error. 2) set my [info object namespace $cls]::my if { [catch { set ns [info object namespace [uplevel 1 {self class}]] } result] } { set ns [info object namespace [uplevel 1 {info object class [self object]}]] ==> Invalid argument:object. Possible values:args,body,cmdcount,commands,complete,default,exists,frame,functions,globals,hostname,level,library,loaded,locals,nameofexecutable,patchlevel,procs,script,sharedlibextension,tclversion,vars Every usage of "info object namespace" gets this error. 3) foreach var [info variable] { set vsSearch [catch {info variable $memberVar -value} vsReturnVal] if {[catch {info variable $memberVar -name}]} { ==> Invalid argument:variable. Possible values:args,body,cmdcount,commands,complete,default,exists,frame,functions,globals,hostname,level,library,loaded,locals,nameofexecutable,patchlevel,procs,script,sharedlibextension,tclversion,vars vplsFrame.tcl /Common line 636 DLTK Problem Most but not all instances of "info variable" get this error. DLTK: Dynamic Languages Toolkit - TCL Development Tools 4.0.0.201206120848 Eclipse: Juno Service Release 1 Build id: 20121004-1855 Tcl: ActiveTcl8.5.12.0.296033-win32-x86_64-threaded.exe OS: Windows 7 64-bit
See also Bug 328236.
Created attachment 225806 [details] Support for argument expansion in Tcl parser This patch allows the parser to recognise the argument expansion, so that it is no more marked as an error.
Hi Oldrich, Thank you for the patch! Could you update it, so it contains only the real changes? e.g. TclLaunchingTests was moved to the separate plugin ~2 months ago, but somehow that change is repeated in the patch. Regards, Alex
Created attachment 225807 [details] Support for argument expansion in Tcl parser This patch allows the parser to recognise the argument expansion, so that it is no more marked as an error. There was some garbage added by Eclipse, so I exported it directly from Git.
I don't know the DLTK styling rules, so the isArgumentExpansion attribute and enum ArgumentExpansionState in BracesSubstitution might be marked as private and moved at the beginning/end of the class.
(In reply to Oldrich Jedlicka from comment #6) > Created attachment 225807 [details] > Support for argument expansion in Tcl parser > > This patch allows the parser to recognise the argument expansion, so that it > is no more marked as an error. > > There was some garbage added by Eclipse, so I exported it directly from Git. I have tried to install the patch. I manually replaced the org.eclipse.dltk.tcl.parser_4.0.0.201206120848.jar in the plugin folder with a jar file containing your modified and from my IDE (JCreator) compiled 2 classes (SimpleTclParser.class BracesSubstitution.class). I also used a second way according this manual: Download the plug-in JAR to somewhere. In Eclipse, File->Import->Plug-ins and Fragments Select the directory you saved it in, select 'Projects with source folders', Next Add the plugin, Finish You now have an Eclipse project representing the plugin. Make your changes, and then: File->Export->Deployable plug-ins and fragments Select the plug-in, select a place to save it In both cases there were no improvement. It works, but following else condition is not triggered: if (!((BracesSubstitution)first).isArgumentExpansion()) { ... } else { ... } If change it to a "forced always usage": if (((BracesSubstitution)first).isArgumentExpansion()) { ... } else { ... } the whole plugin crashed with a ClassNotDefExeception. Version: Juno Service Release 1 Build id: 20120920-0800 Ubuntu Linux Oracle Java 1.7
(In reply to michael scheerer from comment #8) > (In reply to Oldrich Jedlicka from comment #6) > > Created attachment 225807 [details] > > Support for argument expansion in Tcl parser > > ... > the whole plugin crashed with a ClassNotDefExeception. I used latest Git version (at the time of generating the patch) and exported the dltk.core, dltk.mylyn and dltk.tcl features. I then used the exported plugins directory as a remote update site (url "file:/home/...") and installed the update from there.
(In reply to Oldrich Jedlicka from comment #9) > (In reply to michael scheerer from comment #8) > > (In reply to Oldrich Jedlicka from comment #6) > > > Created attachment 225807 [details] > > > Support for argument expansion in Tcl parser > > > > ... > > the whole plugin crashed with a ClassNotDefExeception. > > I used latest Git version (at the time of generating the patch) and exported > the dltk.core, dltk.mylyn and dltk.tcl features. I then used the exported > plugins directory as a remote update site (url "file:/home/...") and > installed the update from there. It works now. But there's another problem: Editing the builtin.xmi and then exporting or even manually copy the modified .xmi has no result. I want to elimiate the wrong warnings "extra arguments" in case of e.g.: dict create {*}[ list .... So changing even the create section to e.g. <groups constant="create"> <arguments xsi:type="tclparse:Group" lowerBound="0" upperBound="-1"> <arguments xsi:type="tclparse:TypedArgument" name="blabla"/> </arguments> </groups> has no effect
Hi Alex, > > Thank you for the patch! The patch doesn't work correct, because it produced new false positive warnings and Errors. But I developed the Plugin further to solve the Problem and to introduce TCL version dependend behaviour and fix the former broken checking: It checkes against both, 8.0 AND 8.5 Syntax and this is then broken. With a new check box you can then Switch the Versions. What I Need: 1. Access to the git-repository 2. Urgend: How can I emulate a setDirty-Save Action on loading the Editor to sync the new tcl version with the error behaviour (does currently work during editing and saving). Please don't tell me about manual stuff (firerProperty(PROP_DIRTY) - if it would be so easy, I wouldn't ask) - he would need the right listeners to do so. So then with exception of 1. and 2. it is fixed.
Kaloyan Raev, Alexander Kurtakov, looking at your work for 5.9: https://github.com/eclipse/dltk.tcl/commits/master can you please include correction for Tcl v8.5 syntax changes?